* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
@ 2012-04-13 8:00 Dirk Behme
2012-04-18 10:41 ` Dirk Behme
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Dirk Behme @ 2012-04-13 8:00 UTC (permalink / raw)
To: u-boot
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 <dirk.behme@de.bosch.com>
CC: Jason Chen <b02280@freescale.com>
CC: Jason Liu <r64343@freescale.com>
CC: Ranjani Vaidyanathan <ra5478@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <festevam@gmail.com>
---
arch/arm/cpu/armv7/mx6/soc.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 543b2cc..957ea34 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -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
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
2012-04-13 8:00 [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init Dirk Behme
@ 2012-04-18 10:41 ` Dirk Behme
2012-04-18 11:05 ` Jason Liu
2012-04-23 9:55 ` Stefano Babic
2 siblings, 0 replies; 6+ messages in thread
From: Dirk Behme @ 2012-04-18 10:41 UTC (permalink / raw)
To: u-boot
On 13.04.2012 10:00, Dirk Behme wrote:
> 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 <dirk.behme@de.bosch.com>
> CC: Jason Chen <b02280@freescale.com>
> CC: Jason Liu <r64343@freescale.com>
> CC: Ranjani Vaidyanathan <ra5478@freescale.com>
> CC: Stefano Babic <sbabic@denx.de>
> CC: Fabio Estevam <festevam@gmail.com>
> ---
> arch/arm/cpu/armv7/mx6/soc.c | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 543b2cc..957ea34 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -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
Any comments on this?
Many thanks
Dirk
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
2012-04-13 8:00 [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init Dirk Behme
2012-04-18 10:41 ` Dirk Behme
@ 2012-04-18 11:05 ` Jason Liu
2012-04-23 9:55 ` Stefano Babic
2 siblings, 0 replies; 6+ messages in thread
From: Jason Liu @ 2012-04-18 11:05 UTC (permalink / raw)
To: u-boot
2012/4/13 Dirk Behme <dirk.behme@de.bosch.com>:
> 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 <dirk.behme@de.bosch.com>
> CC: Jason Chen <b02280@freescale.com>
> CC: Jason Liu <r64343@freescale.com>
> CC: Ranjani Vaidyanathan <ra5478@freescale.com>
> CC: Stefano Babic <sbabic@denx.de>
> CC: Fabio Estevam <festevam@gmail.com>
> ---
> ?arch/arm/cpu/armv7/mx6/soc.c | ? 16 ++++++++++++++++
> ?1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 543b2cc..957ea34 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -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
Acked-by:Jason Liu <r64343@freescale.com>
> --
> 1.7.0.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
2012-04-13 8:00 [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init Dirk Behme
2012-04-18 10:41 ` Dirk Behme
2012-04-18 11:05 ` Jason Liu
@ 2012-04-23 9:55 ` Stefano Babic
2012-04-23 10:16 ` Dirk Behme
2012-04-23 10:20 ` Stefano Babic
2 siblings, 2 replies; 6+ messages in thread
From: Stefano Babic @ 2012-04-23 9:55 UTC (permalink / raw)
To: u-boot
On 13/04/2012 10:00, Dirk Behme wrote:
> 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 <dirk.behme@de.bosch.com>
> CC: Jason Chen <b02280@freescale.com>
> CC: Jason Liu <r64343@freescale.com>
> CC: Ranjani Vaidyanathan <ra5478@freescale.com>
> CC: Stefano Babic <sbabic@denx.de>
> CC: Fabio Estevam <festevam@gmail.com>
> ---
Hi Dirk,
> +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
--
=====================================================================
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@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
2012-04-23 9:55 ` Stefano Babic
@ 2012-04-23 10:16 ` Dirk Behme
2012-04-23 10:20 ` Stefano Babic
1 sibling, 0 replies; 6+ messages in thread
From: Dirk Behme @ 2012-04-23 10:16 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On 23.04.2012 11:55, Stefano Babic wrote:
> On 13/04/2012 10:00, Dirk Behme wrote:
>> 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 <dirk.behme@de.bosch.com>
>> CC: Jason Chen <b02280@freescale.com>
>> CC: Jason Liu <r64343@freescale.com>
>> CC: Ranjani Vaidyanathan <ra5478@freescale.com>
>> CC: Stefano Babic <sbabic@denx.de>
>> CC: Fabio Estevam <festevam@gmail.com>
>> ---
>
> Hi Dirk,
>
>> +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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init
2012-04-23 9:55 ` Stefano Babic
2012-04-23 10:16 ` Dirk Behme
@ 2012-04-23 10:20 ` Stefano Babic
1 sibling, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2012-04-23 10:20 UTC (permalink / raw)
To: u-boot
On 23/04/2012 11:55, Stefano Babic wrote:
>
>> +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
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-04-23 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-13 8:00 [U-Boot] [PATCH] i.MX6: Add ANATOP regulator init Dirk Behme
2012-04-18 10:41 ` Dirk Behme
2012-04-18 11:05 ` Jason Liu
2012-04-23 9:55 ` Stefano Babic
2012-04-23 10:16 ` Dirk Behme
2012-04-23 10:20 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox