: imx: mx6: use OTP for temperature grade and freq grade
Subsystems (3)
cover : 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
Signature · 1 line
1.9.1
PATCH 1/4 imx: mx6: display max cpu frequency in print_cpuinfo()
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.
--- 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
arch/arm/cpu/armv7/mx6/soc.c +26 -0
@@ -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 ) {
arch/arm/imx-common/cpu.c +17 -0
@@ -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);
arch/arm/include/asm/arch-mx6/sys_proto.h +1 -0
@@ -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)
arch/arm/include/asm/proc new file +1 -0
@@ -0,0 +1 @@ +proc-armv
Signature · 1 line
1.9.1
PATCH 1/4 imx: mx6: display max cpu frequency in print_cpuinfo()
Hello Tim,
Am 28.04.2015 um 17:44 schrieb Tim Harvey:
Quoted 10 lines
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.
Quoted 100 lines
Signed-off-by Tim Harvey <[email protected]>--- 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/procarch/arm/cpu/armv7/mx6/soc.c +26
-0@@ -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 ) {arch/arm/imx-common/cpu.c +17
-0@@ -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);arch/arm/include/asm/arch-mx6/sys_proto.h +1
-0@@ -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)arch/arm/include/asm/proc new file +1
-0@@ -0,0 +1 @@ +proc-armv
PATCH 2/4 mx6: add OTP bank1 registers
In reply to Tim Harvey--- arch/arm/include/asm/arch-mx6/imx-regs.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/include/asm/arch-mx6/imx-regs.h +19 -0
@@ -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;
Signature · 1 line
1.9.1
PATCH 3/4 imx: mx6: add display of temperature grade of processor in cpu_printinfo()
In reply to Tim HarveyThe 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.
--- 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(-)
arch/arm/cpu/armv7/mx6/soc.c +32 -0
@@ -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 ) {
arch/arm/imx-common/cpu.c +23 -5
@@ -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);
arch/arm/include/asm/arch-mx6/sys_proto.h +1 -0
@@ -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)
include/imx_thermal.h +6 -0
@@ -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;
Signature · 1 line
1.9.1
Fabio Estevam
reviewerPATCH 3/4 imx: mx6: add display of temperature grade of processor in cpu_printinfo()
Hi Tim,
arch/arm/imx-common/cpu.c int print_cpuinfo(void) · line 175
Quoted 13 lines · Tim Harvey
arch/arm/imx-common/cpu.c +13
-0+#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
PATCH 3/4 imx: mx6: add display of temperature grade of processor in cpu_printinfo()
Quoted 20 lines · Fabio Estevam
Hi Tim,
arch/arm/imx-common/cpu.c int print_cpuinfo(void) · line 175
Quoted 13 lines · Tim Harvey
arch/arm/imx-common/cpu.c +13
-0+#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'?
Quoted 8 lines
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
Fabio Estevam
reviewerPATCH 3/4 imx: mx6: add display of temperature grade of processor in cpu_printinfo()
Quoted 7 lines · Tim Harvey
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
PATCH 4/4 thermal: imx_thermal: use CPU temperature grade for trip points
In reply to Tim HarveyReplace the hard-coded values for min/max/passive with values derived from the CPU temperature grade.
--- drivers/thermal/imx_thermal.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)
drivers/thermal/imx_thermal.c +19 -10
@@ -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, };
Signature · 1 line
1.9.1
cover : imx: mx6: use OTP for temperature grade and freq grade
In reply to Tim HarveyHi Tim,
Quoted 6 lines · Tim Harvey
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.
Quoted 6 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI 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_thermalis 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
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 20 lines · Stefan Roese
Hi Tim,
Quoted 7 lines · Tim Harvey
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.
Quoted 8 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI expect some possible discussion/debate regarding the displaying of this info,
but perhaps adding the functions to obtain the info and use it forimx_thermal
is beyond debate. Please let me know.
Quoted 7 lines
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
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 52 lines · Tim Harvey
Quoted 20 lines · Stefan Roese
Hi Tim,
Quoted 7 lines · Tim Harvey
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.
Quoted 8 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI expect some possible discussion/debate regarding the displaying of this info,
but perhaps adding the functions to obtain the info and use it forimx_thermal
is beyond debate. Please let me know.Quoted 7 lines
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,
StefanStefan,
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
Quoted 7 lines
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 tocpu_printinfo()but may find value in setting the thermal limits ofimx_thermalproperly 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
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 59 lines · Tim Harvey
Quoted 58 lines · Tim Harvey
Quoted 20 lines · Stefan Roese
Hi Tim,
Quoted 7 lines · Tim Harvey
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.
Quoted 8 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI expect some possible discussion/debate regarding the displaying of this info,
but perhaps adding the functions to obtain the info and use it forimx_thermal
is beyond debate. Please let me know.Quoted 7 lines
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,
StefanStefan,
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHzWhen 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 tocpu_printinfo()but may find value in setting the thermal limits ofimx_thermalproperly based on temp-grade (Patch 4/4).
Quoted 8 lines
Quoted 1 line
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. ;)
Thanks,
Stefan
cover : imx: mx6: use OTP for temperature grade and freq grade
In reply to Tim HarveyHi Tim,
Quoted 6 lines · Tim Harvey
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:
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
cover : imx: mx6: use OTP for temperature grade and freq grade
In reply to Tim Harvey2015-05-07 17:55 GMT+02:00 Tim Harvey <[email protected]>:
Quoted 59 lines · Tim Harvey
Quoted 58 lines · Stefan Roese
Quoted 20 lines
Hi Tim,
Quoted 7 lines · Tim Harvey
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.
Quoted 8 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI expect some possible discussion/debate regarding the displaying of this info,
but perhaps adding the functions to obtain the info and use it forimx_thermal
is beyond debate. Please let me know.Quoted 7 lines
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,
StefanStefan,
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHzWhen 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 tocpu_printinfo()but may find value in setting the thermal limits ofimx_thermalproperly based on temp-grade (Patch 4/4).
Quoted 9 lines
Quoted 1 line
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 ;)
greets
--
Christian Gmeiner, MSc
cover : imx: mx6: use OTP for temperature grade and freq grade
In reply to Tim HarveyHello Tim,
Am 07.05.2015 um 17:55 schrieb Tim Harvey:
Quoted 59 lines · Tim Harvey
Quoted 58 lines · Stefan Roese
Quoted 20 lines
Hi Tim,
Quoted 7 lines · Tim Harvey
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.
Quoted 8 lines
Additionally we use the temperature grade to replace the hard-coded limits in
imx_thermal.cI expect some possible discussion/debate regarding the displaying of this info,
but perhaps adding the functions to obtain the info and use it forimx_thermal
is beyond debate. Please let me know.Quoted 7 lines
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,
StefanStefan,
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHzWhen 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 tocpu_printinfo()but may find value in setting the thermal limits ofimx_thermalproperly based on temp-grade (Patch 4/4).
Quoted 9 lines
Quoted 1 line
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
Quoted 8 lines
Regards,
Tim
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 2 lines · Markus Niebel
Hello Tim,
<snip>
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz
<snip>
Quoted 9 lines
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
cover : imx: mx6: use OTP for temperature grade and freq grade
Hi Tim,
Quoted 49 lines · Tim Harvey
Quoted 2 lines · Markus Niebel
Hello Tim,
<snip>
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
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 (ifCONFIG_IMX6_THERMALdefined)
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 (ifCONFIG_IMX6_THERMALdefined)
CPU: Freescale i.MX6SOLO rev1.2 industrial (-40C to 105C) 792 MHz<snip>
Quoted 9 lines
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)
Quoted 8 lines
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
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 5 lines · Nikolay Dimitrov
Hi Tim,
Quoted 1 line · Tim Harvey
<snip>
Quoted 33 lines
Quoted 16 lines
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)Quoted 8 lines
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
Quoted 8 lines
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
Quoted 12 lines
After patch 4:
CPU: Freescale i.MX6SOLO rev1.1MHz 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_THERMALby default. When added, I get this:$ make u-boot.imx ...
<snip>
Quoted 2 lines
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
Quoted 3 lines
Regards,
Nikolay
cover : imx: mx6: use OTP for temperature grade and freq grade
Hi Tim,
Quoted 66 lines · Tim Harvey
Quoted 5 lines · Nikolay Dimitrov
Hi Tim,
Quoted 1 line · Tim Harvey
<snip>
Quoted 32 lines
Quoted 16 lines
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)Quoted 8 lines
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
Quoted 8 lines
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 valuesNikolay,
thats an issue in my patch if you don't have
CONFIG_IMX6_THERMAL. I'll fix in a followup patch versionQuoted 10 lines
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_THERMALby default. When added, I get this:$ make u-boot.imx ...<snip>
Quoted 1 line
Quoted 7 lines
Quoted 1 line
Are there additional CONFIG dependencies?
Looks like
CONFIG_IMX6_THERMALalso needsCONFIG_DM_THERMAL(includes thermal-uclass fromdrivers/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).
cover : imx: mx6: use OTP for temperature grade and freq grade
Quoted 105 lines · Nikolay Dimitrov
Hi Tim,
Quoted 67 lines · Tim Harvey
Quoted 5 lines · Nikolay Dimitrov
Hi Tim,
Quoted 1 line · Tim Harvey
<snip>
Quoted 33 lines
Quoted 17 lines
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)Quoted 8 lines
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
Quoted 8 lines
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 valuesNikolay,
thats an issue in my patch if you don't have
CONFIG_IMX6_THERMAL. I'll fix in a followup patch versionQuoted 10 lines
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_THERMALby default. When added, I get this:$ make u-boot.imx ...<snip>
Quoted 1 line
Quoted 7 lines
Quoted 1 line
Are there additional CONFIG dependencies?
Looks like
CONFIG_IMX6_THERMALalso needsCONFIG_DM_THERMAL(includes thermal-uclass fromdrivers/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 CRiotboard 2, part number MCIMX6S5DVM10AC
======================================== CPU: Freescale i.MX6SOLO
rev1.2 commercial (0C to 95C) 996 MHz (at 792 MHz) CPU: Temperature
42 CMarsboard, part number MCIMX6D5EYM10AC
====================================== CPU: Freescale i.MX6D rev1.2
extended commercial (-20C to 105C) 996 MHz (at 792 MHz) CPU:
Temperature 38 CBtw, 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.
Quoted 8 lines
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).
Regards,
Nikolay