[U-Boot] [PATCH 0/4]: imx: mx6: use OTP for temperature grade and freq grade

The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Tim Harvey (4): imx: mx6: display max cpu frequency in print_cpuinfo() mx6: add OTP bank1 registers imx: mx6: add display of temperature grade of processor in cpu_printinfo() thermal: imx_thermal: use CPU temperature grade for trip points
arch/arm/cpu/armv7/mx6/soc.c | 58 +++++++++++++++++++++++++++++++ arch/arm/imx-common/cpu.c | 37 +++++++++++++++++++- arch/arm/include/asm/arch-mx6/imx-regs.h | 19 ++++++++++ arch/arm/include/asm/arch-mx6/sys_proto.h | 2 ++ arch/arm/include/asm/proc | 1 + drivers/thermal/imx_thermal.c | 29 ++++++++++------ include/imx_thermal.h | 6 ++++ 7 files changed, 141 insertions(+), 11 deletions(-) create mode 120000 arch/arm/include/asm/proc

The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING (OCOTP_CFG3[17:16]).
Display this value to make it clear the difference regarding the CPU speed currently running at vs the max speed allowed per grade. Note that the power on CPU speed is determined by OCOTP_CFG4[18].
I see no indication in the IMX6SX reference manual that it has the same CPU speed grades in this OTP register.
Signed-off-by: Tim Harvey tharvey@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 26 ++++++++++++++++++++++++++ arch/arm/imx-common/cpu.c | 17 +++++++++++++++++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + arch/arm/include/asm/proc | 1 + 4 files changed, 45 insertions(+) create mode 120000 arch/arm/include/asm/proc
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dd34138..dc422a6 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -83,6 +83,32 @@ u32 get_cpu_rev(void) return (type << 12) | (reg + 0x10); }
+#define OCOTP_CFG3_SPEED_SHIFT 16 +#define OCOTP_CFG3_SPEED_1P2GHZ 0x3 +#define OCOTP_CFG3_SPEED_996MHZ 0x2 +#define OCOTP_CFG3_SPEED_852MHZ 0x1 + +u32 get_cpu_speed_grade_hz(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = &ocotp->bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank->fuse_regs; + uint32_t val; + + val = readl(&fuse->cfg3); + val >>= OCOTP_CFG3_SPEED_SHIFT; + val &= 0x3; + + if (val == OCOTP_CFG3_SPEED_1P2GHZ) + return 1200000000; + if (val == OCOTP_CFG3_SPEED_996MHZ) + return 996000000; + if (val == OCOTP_CFG3_SPEED_852MHZ) + return 852000000; + return 792000000; +} + #ifdef CONFIG_REVISION_TAG u32 __weak get_board_rev(void) { diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 067d08f..ead7f08 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -151,11 +151,28 @@ int print_cpuinfo(void)
cpurev = get_cpu_rev();
+#if defined(CONFIG_MX6) + printf("CPU: Freescale i.MX%s rev%d.%d", + get_imx_type((cpurev & 0xFF000) >> 12), + (cpurev & 0x000F0) >> 4, + (cpurev & 0x0000F) >> 0); + if (is_cpu_type(MXC_CPU_MX6SX)) + printf(" at %d MHz", mxc_get_clock(MXC_ARM_CLK) / 1000000); + else { + printf(" %d MHz", get_cpu_speed_grade_hz() / 1000000); + if (get_cpu_speed_grade_hz() != mxc_get_clock(MXC_ARM_CLK)) { + printf(" (at %d MHz)", + mxc_get_clock(MXC_ARM_CLK) / 1000000); + } + } + puts("\n"); +#else printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n", get_imx_type((cpurev & 0xFF000) >> 12), (cpurev & 0x000F0) >> 4, (cpurev & 0x0000F) >> 0, mxc_get_clock(MXC_ARM_CLK) / 1000000); +#endif
#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL) ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev); diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index 28ba844..a2cd0a9 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -16,6 +16,7 @@
u32 get_nr_cpus(void); u32 get_cpu_rev(void); +u32 get_cpu_speed_grade_hz(void);
/* returns MXC_CPU_ value */ #define cpu_type(rev) (((rev) >> 12)&0xff) diff --git a/arch/arm/include/asm/proc b/arch/arm/include/asm/proc new file mode 120000 index 0000000..c7f3c20 --- /dev/null +++ b/arch/arm/include/asm/proc @@ -0,0 +1 @@ +proc-armv \ No newline at end of file

Hello Tim,
Am 28.04.2015 um 17:44 schrieb Tim Harvey:
The IMX6 has four different speed grades determined by eFUSE SPEED_GRADING (OCOTP_CFG3[17:16]).
Display this value to make it clear the difference regarding the CPU speed currently running at vs the max speed allowed per grade. Note that the power on CPU speed is determined by OCOTP_CFG4[18].
I see no indication in the IMX6SX reference manual that it has the same CPU speed grades in this OTP register.
AFAIK there is no speed grading info for i.MX6 Solo / DualLight in OTP.
Signed-off-by: Tim Harvey tharvey@gateworks.com
arch/arm/cpu/armv7/mx6/soc.c | 26 ++++++++++++++++++++++++++ arch/arm/imx-common/cpu.c | 17 +++++++++++++++++ arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + arch/arm/include/asm/proc | 1 + 4 files changed, 45 insertions(+) create mode 120000 arch/arm/include/asm/proc
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dd34138..dc422a6 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -83,6 +83,32 @@ u32 get_cpu_rev(void) return (type << 12) | (reg + 0x10); }
+#define OCOTP_CFG3_SPEED_SHIFT 16 +#define OCOTP_CFG3_SPEED_1P2GHZ 0x3 +#define OCOTP_CFG3_SPEED_996MHZ 0x2 +#define OCOTP_CFG3_SPEED_852MHZ 0x1
+u32 get_cpu_speed_grade_hz(void) +{
- struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
- struct fuse_bank *bank = &ocotp->bank[0];
- struct fuse_bank0_regs *fuse =
(struct fuse_bank0_regs *)bank->fuse_regs;
- uint32_t val;
- val = readl(&fuse->cfg3);
- val >>= OCOTP_CFG3_SPEED_SHIFT;
- val &= 0x3;
- if (val == OCOTP_CFG3_SPEED_1P2GHZ)
return 1200000000;
- if (val == OCOTP_CFG3_SPEED_996MHZ)
return 996000000;
- if (val == OCOTP_CFG3_SPEED_852MHZ)
return 852000000;
- return 792000000;
+}
#ifdef CONFIG_REVISION_TAG u32 __weak get_board_rev(void) { diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index 067d08f..ead7f08 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -151,11 +151,28 @@ int print_cpuinfo(void)
cpurev = get_cpu_rev();
+#if defined(CONFIG_MX6)
- printf("CPU: Freescale i.MX%s rev%d.%d",
get_imx_type((cpurev & 0xFF000) >> 12),
(cpurev & 0x000F0) >> 4,
(cpurev & 0x0000F) >> 0);
- if (is_cpu_type(MXC_CPU_MX6SX))
printf(" at %d MHz", mxc_get_clock(MXC_ARM_CLK) / 1000000);
- else {
printf(" %d MHz", get_cpu_speed_grade_hz() / 1000000);
if (get_cpu_speed_grade_hz() != mxc_get_clock(MXC_ARM_CLK)) {
printf(" (at %d MHz)",
mxc_get_clock(MXC_ARM_CLK) / 1000000);
}
- }
- puts("\n");
+#else printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n", get_imx_type((cpurev & 0xFF000) >> 12), (cpurev & 0x000F0) >> 4, (cpurev & 0x0000F) >> 0, mxc_get_clock(MXC_ARM_CLK) / 1000000); +#endif
#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL) ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev); diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index 28ba844..a2cd0a9 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -16,6 +16,7 @@
u32 get_nr_cpus(void); u32 get_cpu_rev(void); +u32 get_cpu_speed_grade_hz(void);
/* returns MXC_CPU_ value */ #define cpu_type(rev) (((rev) >> 12)&0xff) diff --git a/arch/arm/include/asm/proc b/arch/arm/include/asm/proc new file mode 120000 index 0000000..c7f3c20 --- /dev/null +++ b/arch/arm/include/asm/proc @@ -0,0 +1 @@ +proc-armv \ No newline at end of file

Signed-off-by: Tim Harvey tharvey@gateworks.com --- arch/arm/include/asm/arch-mx6/imx-regs.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 9a4ad8b..35bb005 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -640,6 +640,25 @@ struct fuse_bank0_regs { u32 rsvd7[3]; };
+struct fuse_bank1_regs { + u32 mem0; + u32 rsvd0[3]; + u32 mem1; + u32 rsvd1[3]; + u32 mem2; + u32 rsvd2[3]; + u32 mem3; + u32 rsvd3[3]; + u32 mem4; + u32 rsvd4[3]; + u32 ana0; + u32 rsvd5[3]; + u32 ana1; + u32 rsvd6[3]; + u32 ana2; + u32 rsvd7[3]; +}; + #ifdef CONFIG_MX6SX struct fuse_bank4_regs { u32 sjc_resp_low;

The MX6 has a temperature grade defined by OCOTP_MEM0[7:6].
While the MX6SX also has temperature grades, I see no mention in the reference manual where that information is stored in the OTP.
Signed-off-by: Tim Harvey tharvey@gateworks.com --- arch/arm/cpu/armv7/mx6/soc.c | 32 +++++++++++++++++++++++++++++++ arch/arm/imx-common/cpu.c | 28 ++++++++++++++++++++++----- arch/arm/include/asm/arch-mx6/sys_proto.h | 1 + include/imx_thermal.h | 6 ++++++ 4 files changed, 62 insertions(+), 5 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index dc422a6..8d41c47 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -109,6 +109,38 @@ u32 get_cpu_speed_grade_hz(void) return 792000000; }
+#define OCOTP_MEM0_TEMP_SHIFT 6 + +u32 get_cpu_temp_grade(int *minc, int *maxc) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = &ocotp->bank[1]; + struct fuse_bank1_regs *fuse = + (struct fuse_bank1_regs *)bank->fuse_regs; + uint32_t val; + + val = readl(&fuse->mem0); + val >>= OCOTP_MEM0_TEMP_SHIFT; + val &= 0x3; + + if (minc && maxc) { + if (val == TEMP_AUTOMOTIVE) { + *minc = -40; + *maxc = 125; + } else if (val == TEMP_INDUSTRIAL) { + *minc = -40; + *maxc = 105; + } else if (val == TEMP_EXTCOMMERCIAL) { + *minc = -20; + *maxc = 105; + } else { + *minc = 0; + *maxc = 95; + } + } + return val; +} + #ifdef CONFIG_REVISION_TAG u32 __weak get_board_rev(void) { diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c index ead7f08..a1045db 100644 --- a/arch/arm/imx-common/cpu.c +++ b/arch/arm/imx-common/cpu.c @@ -16,6 +16,7 @@ #include <asm/arch/clock.h> #include <asm/arch/sys_proto.h> #include <asm/arch/crm_regs.h> +#include <imx_thermal.h> #include <ipu_pixfmt.h> #include <thermal.h> #include <sata.h> @@ -146,24 +147,41 @@ int print_cpuinfo(void)
#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL) struct udevice *thermal_dev; - int cpu_tmp, ret; + int cpu_tmp, minc, maxc, ret; #endif
cpurev = get_cpu_rev();
#if defined(CONFIG_MX6) printf("CPU: Freescale i.MX%s rev%d.%d", - get_imx_type((cpurev & 0xFF000) >> 12), - (cpurev & 0x000F0) >> 4, - (cpurev & 0x0000F) >> 0); + get_imx_type((cpurev & 0xFF000) >> 12), + (cpurev & 0x000F0) >> 4, + (cpurev & 0x0000F) >> 0); if (is_cpu_type(MXC_CPU_MX6SX)) printf(" at %d MHz", mxc_get_clock(MXC_ARM_CLK) / 1000000); else { +#if defined(CONFIG_IMX6_THERMAL) + switch (get_cpu_temp_grade(&minc, &maxc)) { + case TEMP_AUTOMOTIVE: + puts(" automotive"); + break; + case TEMP_INDUSTRIAL: + puts(" industrial"); + break; + case TEMP_EXTCOMMERCIAL: + puts(" extended commercial"); + break; + default: + puts(" commercial"); + break; + } + printf(" (%dC to %dC)", minc, maxc); printf(" %d MHz", get_cpu_speed_grade_hz() / 1000000); if (get_cpu_speed_grade_hz() != mxc_get_clock(MXC_ARM_CLK)) { printf(" (at %d MHz)", mxc_get_clock(MXC_ARM_CLK) / 1000000); } +#endif /* #if defined(CONFIG_IMX6_THERMAL) */ } puts("\n"); #else @@ -172,7 +190,7 @@ int print_cpuinfo(void) (cpurev & 0x000F0) >> 4, (cpurev & 0x0000F) >> 0, mxc_get_clock(MXC_ARM_CLK) / 1000000); -#endif +#endif /* #if defined(CONFIG_MX6) */
#if defined(CONFIG_MX6) && defined(CONFIG_IMX6_THERMAL) ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev); diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index a2cd0a9..c583291 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -17,6 +17,7 @@ u32 get_nr_cpus(void); u32 get_cpu_rev(void); u32 get_cpu_speed_grade_hz(void); +u32 get_cpu_temp_grade(int *minc, int *maxc);
/* returns MXC_CPU_ value */ #define cpu_type(rev) (((rev) >> 12)&0xff) diff --git a/include/imx_thermal.h b/include/imx_thermal.h index be13652..8ce333c 100644 --- a/include/imx_thermal.h +++ b/include/imx_thermal.h @@ -8,6 +8,12 @@ #ifndef _IMX_THERMAL_H_ #define _IMX_THERMAL_H_
+/* CPU Temperature Grades */ +#define TEMP_COMMERCIAL 0 +#define TEMP_EXTCOMMERCIAL 1 +#define TEMP_INDUSTRIAL 2 +#define TEMP_AUTOMOTIVE 3 + struct imx_thermal_plat { void *regs; int fuse_bank;

Hi Tim,
On Tue, Apr 28, 2015 at 12:44 PM, Tim Harvey tharvey@gateworks.com wrote:
+#if defined(CONFIG_IMX6_THERMAL)
switch (get_cpu_temp_grade(&minc, &maxc)) {
case TEMP_AUTOMOTIVE:
puts(" automotive");
break;
case TEMP_INDUSTRIAL:
puts(" industrial");
break;
case TEMP_EXTCOMMERCIAL:
puts(" extended commercial");
break;
default:
puts(" commercial");
Could you please change 'commercial' to 'consumer'?
That's the term we see in the datasheet.
I also agree with Nikolay that it would be better to split the CPU line info in two now.
Thanks,
Fabio Estevam

On Sun, May 10, 2015 at 7:54 AM, Fabio Estevam festevam@gmail.com wrote:
Hi Tim,
On Tue, Apr 28, 2015 at 12:44 PM, Tim Harvey tharvey@gateworks.com wrote:
+#if defined(CONFIG_IMX6_THERMAL)
switch (get_cpu_temp_grade(&minc, &maxc)) {
case TEMP_AUTOMOTIVE:
puts(" automotive");
break;
case TEMP_INDUSTRIAL:
puts(" industrial");
break;
case TEMP_EXTCOMMERCIAL:
puts(" extended commercial");
break;
default:
puts(" commercial");
Could you please change 'commercial' to 'consumer'?
That's the term we see in the datasheet.
I also agree with Nikolay that it would be better to split the CPU line info in two now.
Thanks,
Fabio Estevam
Fabio,
It looks like I convinced you in the thread regarding the similar patch to the kernel (http://www.spinics.net/lists/arm-kernel/msg417378.html) that the verbiage should remain as is, but I will follow-up with a v2 that puts the thermal information on the line with the current temperature.
Tim

On Mon, May 11, 2015 at 4:59 PM, Tim Harvey tharvey@gateworks.com wrote:
Fabio,
It looks like I convinced you in the thread regarding the similar patch to the kernel (http://www.spinics.net/lists/arm-kernel/msg417378.html) that the verbiage should remain as is, but I will follow-up with a v2 that puts the thermal information on the line with the current temperature.
Thanks, Tim

Replace the hard-coded values for min/max/passive with values derived from the CPU temperature grade.
Cc: Ye.Li B37916@freescale.com Signed-off-by: Tim Harvey tharvey@gateworks.com --- drivers/thermal/imx_thermal.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 0bd9cfd..b5dab63 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -12,15 +12,13 @@ #include <fuse.h> #include <asm/io.h> #include <asm/arch/clock.h> +#include <asm/arch/sys_proto.h> #include <dm.h> #include <errno.h> #include <malloc.h> #include <thermal.h> #include <imx_thermal.h>
-#define TEMPERATURE_MIN -40 -#define TEMPERATURE_HOT 80 -#define TEMPERATURE_MAX 125 #define FACTOR0 10000000 #define FACTOR1 15976 #define FACTOR2 4297157 @@ -34,14 +32,21 @@ #define MISC0_REFTOP_SELBIASOFF (1 << 3) #define TEMPSENSE1_MEASURE_FREQ 0xffff
+struct thermal_data { + unsigned int fuse; + int passive; + int minc; + int maxc; +}; + static int read_cpu_temperature(struct udevice *dev) { int temperature; unsigned int reg, n_meas; const struct imx_thermal_plat *pdata = dev_get_platdata(dev); struct anatop_regs *anatop = (struct anatop_regs *)pdata->regs; - unsigned int *priv = dev_get_priv(dev); - u32 fuse = *priv; + struct thermal_data *priv = dev_get_priv(dev); + u32 fuse = priv->fuse; int t1, n1; u32 c1, c2; u64 temp64; @@ -119,11 +124,12 @@ static int read_cpu_temperature(struct udevice *dev)
int imx_thermal_get_temp(struct udevice *dev, int *temp) { + struct thermal_data *priv = dev_get_priv(dev); int cpu_tmp = 0;
cpu_tmp = read_cpu_temperature(dev); - while (cpu_tmp > TEMPERATURE_MIN && cpu_tmp < TEMPERATURE_MAX) { - if (cpu_tmp >= TEMPERATURE_HOT) { + while (cpu_tmp > priv->minc && cpu_tmp < priv->maxc) { + if (cpu_tmp >= priv->passive) { printf("CPU Temperature is %d C, too hot to boot, waiting...\n", cpu_tmp); udelay(5000000); @@ -147,7 +153,7 @@ static int imx_thermal_probe(struct udevice *dev) unsigned int fuse = ~0;
const struct imx_thermal_plat *pdata = dev_get_platdata(dev); - unsigned int *priv = dev_get_priv(dev); + struct thermal_data *priv = dev_get_priv(dev);
/* Read Temperature calibration data fuse */ fuse_read(pdata->fuse_bank, pdata->fuse_word, &fuse); @@ -158,7 +164,10 @@ static int imx_thermal_probe(struct udevice *dev) return -EPERM; }
- *priv = fuse; + /* set passive cooling temp to max - 20C */ + get_cpu_temp_grade(&priv->minc, &priv->maxc); + priv->passive = priv->maxc - 20; + priv->fuse = fuse;
enable_thermal_clk();
@@ -170,6 +179,6 @@ U_BOOT_DRIVER(imx_thermal) = { .id = UCLASS_THERMAL, .ops = &imx_thermal_ops, .probe = imx_thermal_probe, - .priv_auto_alloc_size = sizeof(unsigned int), + .priv_auto_alloc_size = sizeof(struct thermal_data), .flags = DM_FLAG_PRE_RELOC, };

Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan

On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese sr@denx.de wrote:
Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan
Stefan,
Good point - as I am guessing there will be debate about the 'amount' of info displayed and am open to suggestions on how to word it and/or how to enable it. In future revs of the patchset I'll be more explicit in the commit logs, but for now with the series applied I get this:
IMX6Q automotive (1GHz capable) powering up at 800MHz: - before: CPU: Freescale i.MX6Q rev1.2 at 792 MHz - after Patch 1/4: CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz) - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined) CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz: - before: CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz - after Patch 1/4: (max speed == cur speed) CPU: Freescale i.MX6SOLO rev1.2 792 MHz - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined) CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
When I submit the next version I will split out adding the functions to get speed-grade and temperature-grade from using those functions in cpu_printinfo() as well as some may not be happy with adding more info to cpu_printinfo() but may find value in setting the thermal limits of imx_thermal properly based on temp-grade (Patch 4/4).
Tim

On Tue, Apr 28, 2015 at 10:31 AM, Tim Harvey tharvey@gateworks.com wrote:
On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese sr@denx.de wrote:
Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan
Stefan,
Good point - as I am guessing there will be debate about the 'amount' of info displayed and am open to suggestions on how to word it and/or how to enable it. In future revs of the patchset I'll be more explicit in the commit logs, but for now with the series applied I get this:
IMX6Q automotive (1GHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- after Patch 1/4:
CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz
- after Patch 1/4: (max speed == cur speed)
CPU: Freescale i.MX6SOLO rev1.2 792 MHz
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
When I submit the next version I will split out adding the functions to get speed-grade and temperature-grade from using those functions in cpu_printinfo() as well as some may not be happy with adding more info to cpu_printinfo() but may find value in setting the thermal limits of imx_thermal properly based on temp-grade (Patch 4/4).
Tim
Stefano,
I've cc'd all the maintainers I could find of MX6 based boards for comment on adding this text to the mx6 print_cpuinfo. I would like to see some ack/review from them otherwise I would think silence is considered a thumbs up ;)
Regards,
Tim

On 07.05.2015 17:55, Tim Harvey wrote:
On Tue, Apr 28, 2015 at 10:31 AM, Tim Harvey tharvey@gateworks.com wrote:
On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese sr@denx.de wrote:
Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan
Stefan,
Good point - as I am guessing there will be debate about the 'amount' of info displayed and am open to suggestions on how to word it and/or how to enable it. In future revs of the patchset I'll be more explicit in the commit logs, but for now with the series applied I get this:
IMX6Q automotive (1GHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- after Patch 1/4:
CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz
- after Patch 1/4: (max speed == cur speed)
CPU: Freescale i.MX6SOLO rev1.2 792 MHz
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
When I submit the next version I will split out adding the functions to get speed-grade and temperature-grade from using those functions in cpu_printinfo() as well as some may not be happy with adding more info to cpu_printinfo() but may find value in setting the thermal limits of imx_thermal properly based on temp-grade (Patch 4/4).
Tim
Stefano,
I've cc'd all the maintainers I could find of MX6 based boards for comment on adding this text to the mx6 print_cpuinfo. I would like to see some ack/review from them otherwise I would think silence is considered a thumbs up ;)
Yep. ;)
Acked-by: Stefan Roese sr@denx.de
Thanks, Stefan

Hi Tim,
On 07/05/2015 17:55, Tim Harvey wrote:
Stefano,
I've cc'd all the maintainers I could find of MX6 based boards for comment on adding this text to the mx6 print_cpuinfo. I would like to see some ack/review from them otherwise I would think silence is considered a thumbs up ;)
Yes, agree :-)
From my side:
Acked-by: Stefano Babic sbabic@denx.de
Regards, Stefano

2015-05-07 17:55 GMT+02:00 Tim Harvey tharvey@gateworks.com:
On Tue, Apr 28, 2015 at 10:31 AM, Tim Harvey tharvey@gateworks.com wrote:
On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese sr@denx.de wrote:
Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan
Stefan,
Good point - as I am guessing there will be debate about the 'amount' of info displayed and am open to suggestions on how to word it and/or how to enable it. In future revs of the patchset I'll be more explicit in the commit logs, but for now with the series applied I get this:
IMX6Q automotive (1GHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- after Patch 1/4:
CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz
- after Patch 1/4: (max speed == cur speed)
CPU: Freescale i.MX6SOLO rev1.2 792 MHz
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
When I submit the next version I will split out adding the functions to get speed-grade and temperature-grade from using those functions in cpu_printinfo() as well as some may not be happy with adding more info to cpu_printinfo() but may find value in setting the thermal limits of imx_thermal properly based on temp-grade (Patch 4/4).
Tim
Stefano,
I've cc'd all the maintainers I could find of MX6 based boards for comment on adding this text to the mx6 print_cpuinfo. I would like to see some ack/review from them otherwise I would think silence is considered a thumbs up ;)
Acked-by: Christian Gmeiner christian.gmeiner@gmail.com
greets -- Christian Gmeiner, MSc

Hello Tim,
Am 07.05.2015 um 17:55 schrieb Tim Harvey:
On Tue, Apr 28, 2015 at 10:31 AM, Tim Harvey tharvey@gateworks.com wrote:
On Tue, Apr 28, 2015 at 10:11 AM, Stefan Roese sr@denx.de wrote:
Hi Tim,
On 28.04.2015 17:44, Tim Harvey wrote:
The MX6 has OTP bits specifying the processor speed grade as well as temperature grade.
This series adds functions to return this information as well as adds the details to the CPU info displayed.
Additionally we use the temperature grade to replace the hard-coded limits in imx_thermal.c
I expect some possible discussion/debate regarding the displaying of this info, but perhaps adding the functions to obtain the info and use it for imx_thermal is beyond debate. Please let me know.
Could you please send (or include in the commit text) an example, how these infos are displayed now in the bootup log? Best in comparison to the "old" log. To see the output change resulting from the patchset.
Thanks, Stefan
Stefan,
Good point - as I am guessing there will be debate about the 'amount' of info displayed and am open to suggestions on how to word it and/or how to enable it. In future revs of the patchset I'll be more explicit in the commit logs, but for now with the series applied I get this:
IMX6Q automotive (1GHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- after Patch 1/4:
CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz
- after Patch 1/4: (max speed == cur speed)
CPU: Freescale i.MX6SOLO rev1.2 792 MHz
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
When I submit the next version I will split out adding the functions to get speed-grade and temperature-grade from using those functions in cpu_printinfo() as well as some may not be happy with adding more info to cpu_printinfo() but may find value in setting the thermal limits of imx_thermal properly based on temp-grade (Patch 4/4).
Tim
Stefano,
I've cc'd all the maintainers I could find of MX6 based boards for comment on adding this text to the mx6 print_cpuinfo. I would like to see some ack/review from them otherwise I would think silence is considered a thumbs up ;)
Where do get the speed grade ant temperature grade information from i.MX6SOLO / DL from? The fusemap in the reference manual says nothing about these info for SOLO / DL and a Freescale FAE stated that these information is not present in the fuses for SOLO / DL.
Regards,
Markus
Regards,
Tim _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Thu, May 7, 2015 at 11:57 PM, Markus Niebel list-09_u-boot@tqsc.de wrote:
Hello Tim,
<snip>
IMX6Q automotive (1GHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
- after Patch 1/4:
CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz)
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz)
IMX6S industrial (800MHz capable) powering up at 800MHz:
- before:
CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz
- after Patch 1/4: (max speed == cur speed)
CPU: Freescale i.MX6SOLO rev1.2 792 MHz
- after Patch 3/4 (if CONFIG_IMX6_THERMAL defined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
<snip>
Where do get the speed grade ant temperature grade information from i.MX6SOLO / DL from? The fusemap in the reference manual says nothing about these info for SOLO / DL and a Freescale FAE stated that these information is not present in the fuses for SOLO / DL.
Regards,
Markus
Markus,
Your right - There is no indication in the IMX6SDLRM that OTP indicates either temperature grade 'or' speed grade, however my testing looks like they implement the same OTP settings for this as the IMX6DUAL/IMX6QUAD as indicated in the IMX6DQRM.
I have tested these patches with the following SoC's I have available: - MCIMX6S7CVM08AC (IMX6S r1.2, Industrial temp, 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' (correct) - MCIMX6S5EVM10AC (IMX6S r1.2, Extended Commercial temp, 1GHz) - shows 'extended commercial (-20C to 105C) 996 MHz (at 792 MHz)' (correct) - MCIMX6U7CVM08AB (IMX6DL r1.1, Industrial temp, 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' (correct) - MCIMX6Q6AVT10AC (IMX6Q r1.2. Automotive temp, 1GHz) - shows 'automotive (-40C to 125C) 996 MHz (at 792 MHz)' (correct)
I'll send our FAE a question to verify - perhaps your FAE simply answered the questions based on the reference manual (which is notoriously lacking info and in some cases wrong).
I encourage anyone with additional parts to test these patches and report if they show accurate information. If anyone has any IMX6SX I would appreciate removing the check that ignores the OTP for that and seeing if the results make sense.
Tim

Hi Tim,
On 05/08/2015 06:42 PM, Tim Harvey wrote:
On Thu, May 7, 2015 at 11:57 PM, Markus Niebel list-09_u-boot@tqsc.de wrote:
Hello Tim,
<snip> >>> >>> IMX6Q automotive (1GHz capable) powering up at 800MHz: >>> - before: >>> CPU: Freescale i.MX6Q rev1.2 at 792 MHz >>> - after Patch 1/4: >>> CPU: Freescale i.MX6Q rev1.2 996 MHz (at 792 MHz) >>> - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined) >>> CPU: Freescale i.MX6Q rev1.2 automotive (-40C to 125C) 996 MHz (at 792 MHz) >>> >>> IMX6S industrial (800MHz capable) powering up at 800MHz: >>> - before: >>> CPU: Freescale i.MX6SOLO rev1.2 at 792 MHz >>> - after Patch 1/4: (max speed == cur speed) >>> CPU: Freescale i.MX6SOLO rev1.2 792 MHz >>> - after Patch 3/4 (if CONFIG_IMX6_THERMAL defined) >>> CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz >>> <snip> > > Where do get the speed grade ant temperature grade information from i.MX6SOLO / DL from? > The fusemap in the reference manual says nothing about these info for SOLO / DL and a Freescale > FAE stated that these information is not present in the fuses for SOLO / DL. > > Regards, > > Markus >
Markus,
Your right - There is no indication in the IMX6SDLRM that OTP indicates either temperature grade 'or' speed grade, however my testing looks like they implement the same OTP settings for this as the IMX6DUAL/IMX6QUAD as indicated in the IMX6DQRM.
I have tested these patches with the following SoC's I have available:
- MCIMX6S7CVM08AC (IMX6S r1.2, Industrial temp, 800MHz) - shows
'industrial (-40C to 105C) 792 MHz' (correct)
- MCIMX6S5EVM10AC (IMX6S r1.2, Extended Commercial temp, 1GHz) - shows
'extended commercial (-20C to 105C) 996 MHz (at 792 MHz)' (correct)
- MCIMX6U7CVM08AB (IMX6DL r1.1, Industrial temp, 800MHz) - shows
'industrial (-40C to 105C) 792 MHz' (correct)
- MCIMX6Q6AVT10AC (IMX6Q r1.2. Automotive temp, 1GHz) - shows
'automotive (-40C to 125C) 996 MHz (at 792 MHz)' (correct)
I'll send our FAE a question to verify - perhaps your FAE simply answered the questions based on the reference manual (which is notoriously lacking info and in some cases wrong).
I encourage anyone with additional parts to test these patches and report if they show accurate information. If anyone has any IMX6SX I would appreciate removing the check that ignores the OTP for that and seeing if the results make sense.
Here are the results from riotboard (imx6s) testing with your patches against Stefano's tree:
Before: CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz
After patch 1: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 MHz)
After patch 2: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 MHz)
After patch 3: CPU: Freescale i.MX6SOLO rev1.1 // No idea why I lost the MHz values
After patch 4: CPU: Freescale i.MX6SOLO rev1.1
MHz values are missing after patch 3, and looking diagonally at the code I don't see a reason. Next, riotboard doesn't have CONFIG_IMX6_THERMAL by default. When added, I get this:
$ make u-boot.imx ... OBJCOPY examples/standalone/hello_world.bin LDS u-boot.lds LD u-boot arch/arm/imx-common/built-in.o: In function `print_cpuinfo': /home/picmaster/work/u-boot-imx/arch/arm/imx-common/cpu.c:196: undefined reference to `uclass_get_device' /home/picmaster/work/u-boot-imx/arch/arm/imx-common/cpu.c:198: undefined reference to `thermal_get_temp' drivers/built-in.o: In function `imx_thermal_probe': /home/picmaster/work/u-boot-imx/drivers/thermal/imx_thermal.c:155: undefined reference to `dev_get_platdata' /home/picmaster/work/u-boot-imx/drivers/thermal/imx_thermal.c:156: undefined reference to `dev_get_priv' drivers/built-in.o: In function `read_cpu_temperature': /home/picmaster/work/u-boot-imx/drivers/thermal/imx_thermal.c:46: undefined reference to `dev_get_platdata' /home/picmaster/work/u-boot-imx/drivers/thermal/imx_thermal.c:48: undefined reference to `dev_get_priv' drivers/built-in.o: In function `imx_thermal_get_temp': /home/picmaster/work/u-boot-imx/drivers/thermal/imx_thermal.c:127: undefined reference to `dev_get_priv' ld.bfd: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:7498 ld.bfd: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:7498 ld.bfd: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:7498 ld.bfd: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:7498 ld.bfd: BFD (GNU Binutils for Debian) 2.22 assertion fail ../../bfd/elf32-arm.c:13830 Segmentation fault make: *** [u-boot] Error 139
Are there additional CONFIG dependencies?
Regards, Nikolay

On Fri, May 8, 2015 at 10:35 AM, Nikolay Dimitrov picmaster@mail.bg wrote:
Hi Tim,
On 05/08/2015 06:42 PM, Tim Harvey wrote:
<snip>
Your right - There is no indication in the IMX6SDLRM that OTP indicates either temperature grade 'or' speed grade, however my testing looks like they implement the same OTP settings for this as the IMX6DUAL/IMX6QUAD as indicated in the IMX6DQRM.
I have tested these patches with the following SoC's I have available:
- MCIMX6S7CVM08AC (IMX6S r1.2, Industrial temp, 800MHz) - shows
'industrial (-40C to 105C) 792 MHz' (correct)
- MCIMX6S5EVM10AC (IMX6S r1.2, Extended Commercial temp, 1GHz) - shows
'extended commercial (-20C to 105C) 996 MHz (at 792 MHz)' (correct)
- MCIMX6U7CVM08AB (IMX6DL r1.1, Industrial temp, 800MHz) - shows
'industrial (-40C to 105C) 792 MHz' (correct)
- MCIMX6Q6AVT10AC (IMX6Q r1.2. Automotive temp, 1GHz) - shows
'automotive (-40C to 125C) 996 MHz (at 792 MHz)' (correct)
I'll send our FAE a question to verify - perhaps your FAE simply answered the questions based on the reference manual (which is notoriously lacking info and in some cases wrong).
I encourage anyone with additional parts to test these patches and report if they show accurate information. If anyone has any IMX6SX I would appreciate removing the check that ignores the OTP for that and seeing if the results make sense.
Here are the results from riotboard (imx6s) testing with your patches against Stefano's tree:
Before: CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz
After patch 1: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 MHz)
After patch 2: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 MHz)
After patch 3: CPU: Freescale i.MX6SOLO rev1.1 // No idea why I lost the MHz values
Nikolay,
thats an issue in my patch if you don't have CONFIG_IMX6_THERMAL. I'll fix in a followup patch version
After patch 4: CPU: Freescale i.MX6SOLO rev1.1
MHz values are missing after patch 3, and looking diagonally at the code I don't see a reason. Next, riotboard doesn't have CONFIG_IMX6_THERMAL by default. When added, I get this:
$ make u-boot.imx ...
<snip>
Are there additional CONFIG dependencies?
Looks like CONFIG_IMX6_THERMAL also needs CONFIG_DM_THERMAL (includes thermal-uclass from drivers/thermal/Makefile)
Thanks for testing this. If you can get it working please let me know what the actual part markings are on the parts you test with.
Tim
Regards, Nikolay

Hi Tim,
On 05/08/2015 10:26 PM, Tim Harvey wrote:
On Fri, May 8, 2015 at 10:35 AM, Nikolay Dimitrov picmaster@mail.bg wrote:
Hi Tim,
On 05/08/2015 06:42 PM, Tim Harvey wrote:
<snip> >> >> Your right - There is no indication in the IMX6SDLRM that OTP >> indicates either temperature grade 'or' speed grade, however my >> testing looks like they implement the same OTP settings for this >> as the IMX6DUAL/IMX6QUAD as indicated in the IMX6DQRM. >> >> I have tested these patches with the following SoC's I have >> available: - MCIMX6S7CVM08AC (IMX6S r1.2, Industrial temp, >> 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' (correct) - >> MCIMX6S5EVM10AC (IMX6S r1.2, Extended Commercial temp, 1GHz) - >> shows 'extended commercial (-20C to 105C) 996 MHz (at 792 MHz)' >> (correct) - MCIMX6U7CVM08AB (IMX6DL r1.1, Industrial temp, >> 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' (correct) - >> MCIMX6Q6AVT10AC (IMX6Q r1.2. Automotive temp, 1GHz) - shows >> 'automotive (-40C to 125C) 996 MHz (at 792 MHz)' (correct) >> >> I'll send our FAE a question to verify - perhaps your FAE simply >> answered the questions based on the reference manual (which is >> notoriously lacking info and in some cases wrong). >> >> I encourage anyone with additional parts to test these patches >> and report if they show accurate information. If anyone has any >> IMX6SX I would appreciate removing the check that ignores the >> OTP for that and seeing if the results make sense. > > > Here are the results from riotboard (imx6s) testing with your > patches against Stefano's tree: > > > Before: CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz > > After patch 1: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 > MHz) > > After patch 2: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 > MHz) > > After patch 3: CPU: Freescale i.MX6SOLO rev1.1 // No idea why I > lost the MHz values
Nikolay,
thats an issue in my patch if you don't have CONFIG_IMX6_THERMAL. I'll fix in a followup patch version
After patch 4: CPU: Freescale i.MX6SOLO rev1.1
MHz values are missing after patch 3, and looking diagonally at the code I don't see a reason. Next, riotboard doesn't have CONFIG_IMX6_THERMAL by default. When added, I get this:
$ make u-boot.imx ...
<snip> > > Are there additional CONFIG dependencies?
Looks like CONFIG_IMX6_THERMAL also needs CONFIG_DM_THERMAL (includes thermal-uclass from drivers/thermal/Makefile)
Thanks for testing this. If you can get it working please let me know what the actual part markings are on the parts you test with.
The updated CONFIGs fixed the build. Here are the outputs of all boards where I can easily run mainline U-Boot.
Riotboard 1, part number MCIMX6S5DVM10AB ======================================== CPU: Freescale i.MX6SOLO rev1.1 commercial (0C to 95C) 996 MHz (at 792 MHz) CPU: Temperature 53 C
Riotboard 2, part number MCIMX6S5DVM10AC ======================================== CPU: Freescale i.MX6SOLO rev1.2 commercial (0C to 95C) 996 MHz (at 792 MHz) CPU: Temperature 42 C
Marsboard, part number MCIMX6D5EYM10AC ====================================== CPU: Freescale i.MX6D rev1.2 extended commercial (-20C to 105C) 996 MHz (at 792 MHz) CPU: Temperature 38 C
Btw, as the information in the "CPU:" line gets bigger and bigger, it's probably worth thinking about splitting it into separate lines. This will simplify the text formatting tricks, can be easily controlled by CONFIG directives and can look neater. But even if you don't change it, it looks fine to me - I like to see info, and if I don't need it, I can always cut it off easily.
Thanks for working on this patch series.
Regards, Nikolay
PS: I have also some more customer boards with imx6d rev 1.3 and some imx6q with unknown revisions, but can't test there as mainline u-boot has broken spi flash support in SPL since 2014.07 and I hadn't had time to fix it and port it (although I would love to).

On 05/10/2015 04:46 PM, Nikolay Dimitrov wrote:
Hi Tim,
On 05/08/2015 10:26 PM, Tim Harvey wrote:
On Fri, May 8, 2015 at 10:35 AM, Nikolay Dimitrov picmaster@mail.bg wrote:
Hi Tim,
On 05/08/2015 06:42 PM, Tim Harvey wrote:
<snip> >> >> Your right - There is no indication in the IMX6SDLRM that OTP >> indicates either temperature grade 'or' speed grade, however >> my testing looks like they implement the same OTP settings for >> this as the IMX6DUAL/IMX6QUAD as indicated in the IMX6DQRM. >> >> I have tested these patches with the following SoC's I have >> available: - MCIMX6S7CVM08AC (IMX6S r1.2, Industrial temp, >> 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' (correct) >> - MCIMX6S5EVM10AC (IMX6S r1.2, Extended Commercial temp, 1GHz) >> - shows 'extended commercial (-20C to 105C) 996 MHz (at 792 >> MHz)' (correct) - MCIMX6U7CVM08AB (IMX6DL r1.1, Industrial >> temp, 800MHz) - shows 'industrial (-40C to 105C) 792 MHz' >> (correct) - MCIMX6Q6AVT10AC (IMX6Q r1.2. Automotive temp, 1GHz) >> - shows 'automotive (-40C to 125C) 996 MHz (at 792 MHz)' >> (correct) >> >> I'll send our FAE a question to verify - perhaps your FAE >> simply answered the questions based on the reference manual >> (which is notoriously lacking info and in some cases wrong). >> >> I encourage anyone with additional parts to test these patches >> and report if they show accurate information. If anyone has >> any IMX6SX I would appreciate removing the check that ignores >> the OTP for that and seeing if the results make sense. > > > Here are the results from riotboard (imx6s) testing with your > patches against Stefano's tree: > > > Before: CPU: Freescale i.MX6SOLO rev1.1 at 792 MHz > > After patch 1: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 > MHz) > > After patch 2: CPU: Freescale i.MX6SOLO rev1.1 996 MHz (at 792 > MHz) > > After patch 3: CPU: Freescale i.MX6SOLO rev1.1 // No idea why > I lost the MHz values
Nikolay,
thats an issue in my patch if you don't have CONFIG_IMX6_THERMAL. I'll fix in a followup patch version
After patch 4: CPU: Freescale i.MX6SOLO rev1.1
MHz values are missing after patch 3, and looking diagonally at the code I don't see a reason. Next, riotboard doesn't have CONFIG_IMX6_THERMAL by default. When added, I get this:
$ make u-boot.imx ...
<snip> > > Are there additional CONFIG dependencies?
Looks like CONFIG_IMX6_THERMAL also needs CONFIG_DM_THERMAL (includes thermal-uclass from drivers/thermal/Makefile)
Thanks for testing this. If you can get it working please let me know what the actual part markings are on the parts you test with.
The updated CONFIGs fixed the build. Here are the outputs of all boards where I can easily run mainline U-Boot.
Riotboard 1, part number MCIMX6S5DVM10AB ======================================== CPU: Freescale i.MX6SOLO rev1.1 commercial (0C to 95C) 996 MHz (at 792 MHz) CPU: Temperature 53 C
Riotboard 2, part number MCIMX6S5DVM10AC ======================================== CPU: Freescale i.MX6SOLO rev1.2 commercial (0C to 95C) 996 MHz (at 792 MHz) CPU: Temperature 42 C
Marsboard, part number MCIMX6D5EYM10AC ====================================== CPU: Freescale i.MX6D rev1.2 extended commercial (-20C to 105C) 996 MHz (at 792 MHz) CPU: Temperature 38 C
Btw, as the information in the "CPU:" line gets bigger and bigger, it's probably worth thinking about splitting it into separate lines. This will simplify the text formatting tricks, can be easily controlled by CONFIG directives and can look neater. But even if you don't change it, it looks fine to me - I like to see info, and if I don't need it, I can always cut it off easily.
Thanks for working on this patch series.
Regards, Nikolay
PS: I have also some more customer boards with imx6d rev 1.3 and some imx6q with unknown revisions, but can't test there as mainline u-boot has broken spi flash support in SPL since 2014.07 and I hadn't had time to fix it and port it (although I would love to).
Tested-by: Nikolay Dimitrov picmaster@mail.bg
Regards, Nikolay
participants (7)
-
Christian Gmeiner
-
Fabio Estevam
-
Markus Niebel
-
Nikolay Dimitrov
-
Stefan Roese
-
Stefano Babic
-
Tim Harvey