diff mbox

[U-Boot,v2,10/15] cgtqmx6eval: Add thermal support

Message ID 1436814070-9108-10-git-send-email-otavio@ossystems.com.br
State Changes Requested
Headers show

Commit Message

Otavio Salvador July 13, 2015, 7:01 p.m. UTC
Add thermal support so that we can see the following message on boot:

CPU:   Industrial temperature grade (-40C to 105C) at 33C

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v2: None

 configs/cgtqmx6qeval_defconfig | 3 +++
 include/configs/cgtqmx6eval.h  | 8 ++++++++
 2 files changed, 11 insertions(+)

Comments

Simon Glass July 13, 2015, 9:11 p.m. UTC | #1
Hi,

On 13 July 2015 at 13:01, Otavio Salvador <otavio@ossystems.com.br> wrote:
> Add thermal support so that we can see the following message on boot:
>
> CPU:   Industrial temperature grade (-40C to 105C) at 33C
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
> Changes in v2: None
>
>  configs/cgtqmx6qeval_defconfig | 3 +++
>  include/configs/cgtqmx6eval.h  | 8 ++++++++
>  2 files changed, 11 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

While you are in there, do you think you could fix the comments in
thermal.h, which are mostly bogus?

>
> diff --git a/configs/cgtqmx6qeval_defconfig b/configs/cgtqmx6qeval_defconfig
> index e1eb871..6fd29a0 100644
> --- a/configs/cgtqmx6qeval_defconfig
> +++ b/configs/cgtqmx6qeval_defconfig
> @@ -1,6 +1,9 @@
>  CONFIG_ARM=y
>  CONFIG_TARGET_CGTQMX6EVAL=y
>  CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/congatec/cgtqmx6eval/imximage.cfg,MX6Q"
> +CONFIG_CMD_NET=y
> +CONFIG_DM=y
> +CONFIG_DM_THERMAL=y
>  # CONFIG_CMD_IMLS is not set
>  # CONFIG_CMD_FLASH is not set
>  # CONFIG_CMD_SETEXPR is not set
> diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
> index 31ad366..f031940 100644
> --- a/include/configs/cgtqmx6eval.h
> +++ b/include/configs/cgtqmx6eval.h
> @@ -56,6 +56,14 @@
>  #define CONFIG_PHYLIB
>  #define CONFIG_PHY_ATHEROS
>
> +/* Thermal support */
> +#define CONFIG_IMX6_THERMAL

This could move to Kconfig.

> +
> +#define CONFIG_CMD_FUSE
> +#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
> +#define CONFIG_MXC_OCOTP
> +#endif
> +
>  #define CONFIG_DEFAULT_FDT_FILE "imx6q-congatec.dtb"
>
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> --
> 2.4.5
>

Regards,
Simon
Peter Robinson July 13, 2015, 11:54 p.m. UTC | #2
On Mon, Jul 13, 2015 at 8:01 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> Add thermal support so that we can see the following message on boot:
>
> CPU:   Industrial temperature grade (-40C to 105C) at 33C
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>
> Changes in v2: None
>
>  configs/cgtqmx6qeval_defconfig | 3 +++
>  include/configs/cgtqmx6eval.h  | 8 ++++++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/configs/cgtqmx6qeval_defconfig b/configs/cgtqmx6qeval_defconfig
> index e1eb871..6fd29a0 100644
> --- a/configs/cgtqmx6qeval_defconfig
> +++ b/configs/cgtqmx6qeval_defconfig
> @@ -1,6 +1,9 @@
>  CONFIG_ARM=y
>  CONFIG_TARGET_CGTQMX6EVAL=y
>  CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/congatec/cgtqmx6eval/imximage.cfg,MX6Q"
> +CONFIG_CMD_NET=y
> +CONFIG_DM=y
> +CONFIG_DM_THERMAL=y
>  # CONFIG_CMD_IMLS is not set
>  # CONFIG_CMD_FLASH is not set
>  # CONFIG_CMD_SETEXPR is not set
> diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
> index 31ad366..f031940 100644
> --- a/include/configs/cgtqmx6eval.h
> +++ b/include/configs/cgtqmx6eval.h
> @@ -56,6 +56,14 @@
>  #define CONFIG_PHYLIB
>  #define CONFIG_PHY_ATHEROS
>
> +/* Thermal support */
> +#define CONFIG_IMX6_THERMAL
> +
> +#define CONFIG_CMD_FUSE
> +#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
> +#define CONFIG_MXC_OCOTP
> +#endif

See my previous patch set, just resent, to centralise these in
mx6_common.h as they're a standard SoC feature.

Peter
Fabio Estevam July 14, 2015, 1:03 a.m. UTC | #3
Hi Simon,

On Mon, Jul 13, 2015 at 6:11 PM, Simon Glass <sjg@chromium.org> wrote:

> While you are in there, do you think you could fix the comments in
> thermal.h, which are mostly bogus?

Just sent a patch fixing it.

>> +/* Thermal support */
>> +#define CONFIG_IMX6_THERMAL
>
> This could move to Kconfig.

There is a patch from Peter Robinson that centralizes this config
option into mx6_common.h.

Regards,

Fabio Estevam
diff mbox

Patch

diff --git a/configs/cgtqmx6qeval_defconfig b/configs/cgtqmx6qeval_defconfig
index e1eb871..6fd29a0 100644
--- a/configs/cgtqmx6qeval_defconfig
+++ b/configs/cgtqmx6qeval_defconfig
@@ -1,6 +1,9 @@ 
 CONFIG_ARM=y
 CONFIG_TARGET_CGTQMX6EVAL=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/congatec/cgtqmx6eval/imximage.cfg,MX6Q"
+CONFIG_CMD_NET=y
+CONFIG_DM=y
+CONFIG_DM_THERMAL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index 31ad366..f031940 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -56,6 +56,14 @@ 
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_ATHEROS
 
+/* Thermal support */
+#define CONFIG_IMX6_THERMAL
+
+#define CONFIG_CMD_FUSE
+#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
+#define CONFIG_MXC_OCOTP
+#endif
+
 #define CONFIG_DEFAULT_FDT_FILE "imx6q-congatec.dtb"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \