i.MX6: Add ANATOP regulator init
PATCH 1/1 i.MX6: Add ANATOP regulator init
Init the core regulator voltage to 1.2V. This is required for the correct functioning of the GPU and when the ARM LDO is set to 1.225V. This is a workaround to fix some memory clock jitter.
Note: This should be but can't be done in the DCD. The bootloader
prevents access to the ANATOP registers.
--- arch/arm/cpu/armv7/mx6/soc.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/mx6/soc.c +16 -0
@@ -77,10 +77,26 @@ void init_aips(void) writel(0x00000000, &aips2->opacr4); } +static void init_anatop_reg (void ) +{ +struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR ; +int reg =readl (&anatop->reg_core); + +/* +* Increase the VDDSOC to 1.2V +* Mask out the REG_CORE[22:18] bits (REG2_TRIG) +* and set them to 1.2V (0.7V + 0x14 * 0.025V) +*/ + reg = (reg & ~(0x1F <<18 )) | (0x14 <<18 ); +writel (reg, &anatop->reg_core); +} +int arch_cpu_init (void ) {init_aips (); +init_anatop_reg (); +return 0 ; }#endif
Signature · 1 line
1.7.0.4
PATCH 1/1 i.MX6: Add ANATOP regulator init
Quoted 38 lines · Dirk Behme
Init the core regulator voltage to 1.2V. This is required for the correct functioning of the GPU and when the ARM LDO is set to 1.225V. This is a workaround to fix some memory clock jitter.
Note: This should be but can't be done in the DCD. The bootloader
prevents access to the ANATOP registers.Signed-off-by Dirk Behme <[email protected]>CC Jason Chen <[email protected]>CC Jason Liu <[email protected]>CC Ranjani Vaidyanathan <[email protected]>CC Stefano Babic <[email protected]>CC Fabio Estevam <[email protected]>--- arch/arm/cpu/armv7/mx6/soc.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)arch/arm/cpu/armv7/mx6/soc.c +13
-0@@ -77,10 +77,26 @@ void init_aips(void)writel (0x00000000 , &aips2->opacr4); } +static void init_anatop_reg (void ) +{ +struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR ; +int reg =readl (&anatop->reg_core); + +/* +* Increase the VDDSOC to 1.2V +* Mask out the REG_CORE[22:18] bits (REG2_TRIG) +* and set them to 1.2V (0.7V + 0x14 * 0.025V) +*/ + reg = (reg & ~(0x1F <<18 )) | (0x14 <<18 ); +writel (reg, &anatop->reg_core); +}
arch/arm/cpu/armv7/mx6/soc.c void init_aips(void) · line 102
Quoted 10 lines
arch/arm/cpu/armv7/mx6/soc.c +3
-0+int arch_cpu_init (void ) {init_aips (); +init_anatop_reg (); +return 0 ; }#endif
Any comments on this?
Many thanks
Dirk
PATCH 1/1 i.MX6: Add ANATOP regulator init
In reply to Dirk Behme2012/4/13 Dirk Behme <[email protected]>:
Quoted 47 lines
Init the core regulator voltage to 1.2V. This is required for the correct functioning of the GPU and when the ARM LDO is set to 1.225V. This is a workaround to fix some memory clock jitter.
Note: This should be but can't be done in the DCD. The bootloader ? ? ?prevents access to the ANATOP registers.
Signed-off-by Dirk Behme <[email protected]>CC Jason Chen <[email protected]>CC Jason Liu <[email protected]>CC Ranjani Vaidyanathan <[email protected]>CC Stefano Babic <[email protected]>CC Fabio Estevam <[email protected]>---
?arch/arm/cpu/armv7/mx6/soc.c | ? 16 ++++++++++++++++ ?1 files changed, 16 insertions(+), 0 deletions(-)arch/arm/cpu/armv7/mx6/soc.c +16
-0@@ -77,10 +77,26 @@ void init_aips(void) ? ? ? ?writel(0x00000000, &aips2->opacr4); ?} +static void init_anatop_reg (void ) +{ + ? ? ? struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; + ? ? ? int reg = readl(&anatop->reg_core); + + ? ? ? /* + ? ? ? ?* Increase the VDDSOC to 1.2V + ? ? ? ?* Mask out the REG_CORE[22:18] bits (REG2_TRIG) + ? ? ? ?* and set them to 1.2V (0.7V + 0x14 * 0.025V) + ? ? ? ?*/ + ? ? ? reg = (reg & ~(0x1F << 18)) | (0x14 << 18); + ? ? ? writel(reg, &anatop->reg_core); +} + ?int arch_cpu_init(void) ?{ ? ? ? ?init_aips(); + ? ? ? init_anatop_reg(); + ? ? ? ?return 0; ?}
Quoted 1 line
?#endif
Quoted 7 lines
--
1.7.0.4_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/1 i.MX6: Add ANATOP regulator init
In reply to Dirk BehmeQuoted 7 lines · Dirk Behme
Init the core regulator voltage to 1.2V. This is required for the correct functioning of the GPU and when the ARM LDO is set to 1.225V. This is a workaround to fix some memory clock jitter.
Note: This should be but can't be done in the DCD. The bootloader
prevents access to the ANATOP registers.
Quoted 7 lines
Signed-off-by Dirk Behme <[email protected]>CC Jason Chen <[email protected]>CC Jason Liu <[email protected]>CC Ranjani Vaidyanathan <[email protected]>CC Stefano Babic <[email protected]>CC Fabio Estevam <[email protected]>---
Hi Dirk,
arch/arm/cpu/armv7/mx6/soc.c void init_aips(void) · line 90
Quoted 11 lines
arch/arm/cpu/armv7/mx6/soc.c +11
-0+static void init_anatop_reg (void ) +{ +struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR ; +int reg =readl (&anatop->reg_core); + +/* +* Increase the VDDSOC to 1.2V +* Mask out the REG_CORE[22:18] bits (REG2_TRIG) +* and set them to 1.2V (0.7V + 0x14 * 0.025V) +*/ + reg = (reg & ~(0x1F <<18 )) | (0x14 <<18 );
Everything clear, but what do you mind to add an accessor to set this voltage ? It is straightforward, and more boards could use it.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH 1/1 i.MX6: Add ANATOP regulator init
Hi Stefano,
Quoted 18 lines · Stefano Babic
Quoted 7 lines · Dirk Behme
Init the core regulator voltage to 1.2V. This is required for the correct functioning of the GPU and when the ARM LDO is set to 1.225V. This is a workaround to fix some memory clock jitter.
Note: This should be but can't be done in the DCD. The bootloader
prevents access to the ANATOP registers.Quoted 7 lines
Signed-off-by Dirk Behme <[email protected]>CC Jason Chen <[email protected]>CC Jason Liu <[email protected]>CC Ranjani Vaidyanathan <[email protected]>CC Stefano Babic <[email protected]>CC Fabio Estevam <[email protected]>---
Hi Dirk,
Quoted 14 lines
arch/arm/cpu/armv7/mx6/soc.c void init_aips(void) · line 90
Quoted 11 lines
arch/arm/cpu/armv7/mx6/soc.c +11
-0+static void init_anatop_reg (void ) +{ +struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR ; +int reg =readl (&anatop->reg_core); + +/* +* Increase the VDDSOC to 1.2V +* Mask out the REG_CORE[22:18] bits (REG2_TRIG) +* and set them to 1.2V (0.7V + 0x14 * 0.025V) +*/ + reg = (reg & ~(0x1F <<18 )) | (0x14 <<18 );Everything clear, but what do you mind to add an accessor to set this voltage ? It is straightforward, and more boards could use it.
Sorry, but what do you mean with "add an accessor"? Could you give an example?
Best regards
Dirk
PATCH 1/1 i.MX6: Add ANATOP regulator init
In reply to Stefano BabicQuoted 15 lines · Stefano Babic
arch/arm/cpu/armv7/mx6/soc.c void init_aips(void) · line 90
Quoted 12 lines
arch/arm/cpu/armv7/mx6/soc.c +11
-0+static void init_anatop_reg (void ) +{ +struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR ; +int reg =readl (&anatop->reg_core); + +/* +* Increase the VDDSOC to 1.2V +* Mask out the REG_CORE[22:18] bits (REG2_TRIG) +* and set them to 1.2V (0.7V + 0x14 * 0.025V) +*/ + reg = (reg & ~(0x1F <<18 )) | (0x14 <<18 );Everything clear, but what do you mind to add an accessor to set this voltage ? It is straightforward, and more boards could use it.
Well, sometimes I am quite obscure, maybe I need more coffeine before writing my answers ;-)
What I mean is to change the function name to something like set_vddsoc(mV), and exporting it dropping the static clause.
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel 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 =====================================================================