Patchwork [U-Boot] ARM: arch-mx6: fix PLL2_PFD2_FREQ

login
register
mail settings
Submitter Markus Niebel
Date Sept. 11, 2013, 1:30 p.m.
Message ID <1378906215-14266-1-git-send-email-list-09_u-boot@tqsc.de>
Download mbox | patch
Permalink /patch/274287/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Markus Niebel - Sept. 11, 2013, 1:30 p.m.
From: Markus Niebel <Markus.Niebel@tqs.de>

according to the manual frequency of PLL2 PFD2 is 396.000.000
instead of 400.000.000

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
---
 arch/arm/include/asm/arch-mx6/crm_regs.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefano Babic - Sept. 20, 2013, 1:53 p.m.
On 11/09/2013 15:30, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tqs.de>
> 
> according to the manual frequency of PLL2 PFD2 is 396.000.000
> instead of 400.000.000
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
> ---
>  arch/arm/include/asm/arch-mx6/crm_regs.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h
> index 74aefe6..2813593 100644
> --- a/arch/arm/include/asm/arch-mx6/crm_regs.h
> +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
> @@ -892,7 +892,7 @@ struct mxc_ccm_reg {
>  
>  #define PLL2_PFD0_FREQ		352000000
>  #define PLL2_PFD1_FREQ		594000000
> -#define PLL2_PFD2_FREQ		400000000
> +#define PLL2_PFD2_FREQ		396000000
>  #define PLL2_PFD2_DIV_FREQ	200000000
>  #define PLL3_PFD0_FREQ		720000000
>  #define PLL3_PFD1_FREQ		540000000
> 

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
Pierre Aubert - Sept. 20, 2013, 2:32 p.m.
Stefano Babic wrote
> On 11/09/2013 15:30, Markus Niebel wrote:
>> From: Markus Niebel &lt;

> Markus.Niebel@

> &gt;
>> 
>> according to the manual frequency of PLL2 PFD2 is 396.000.000
>> instead of 400.000.000
>> 
>> Signed-off-by: Markus Niebel &lt;

> Markus.Niebel@

> &gt;
>> ---
>>  arch/arm/include/asm/arch-mx6/crm_regs.h |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h
>> b/arch/arm/include/asm/arch-mx6/crm_regs.h
>> index 74aefe6..2813593 100644
>> --- a/arch/arm/include/asm/arch-mx6/crm_regs.h
>> +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
>> @@ -892,7 +892,7 @@ struct mxc_ccm_reg {
>>  
>>  #define PLL2_PFD0_FREQ		352000000
>>  #define PLL2_PFD1_FREQ		594000000
>> -#define PLL2_PFD2_FREQ		400000000
>> +#define PLL2_PFD2_FREQ		396000000
>>  #define PLL2_PFD2_DIV_FREQ	200000000
>>  #define PLL3_PFD0_FREQ		720000000
>>  #define PLL3_PFD1_FREQ		540000000
>> 
> 
> Acked-by: Stefano Babic &lt;

> sbabic@

> &gt;

Hello Markus, Hello Stephano
I think it's better to compute  this frequencies rather than hard coding
values. The default PFD frequencies are not the same for the Quad and for
the other Socs.
Furthermore, if you modify PLL2_PFD2_FREQ, you must also change
PLL2_PFD2_DIV_FREQ.

Please, see the patch I've submitted yesterday ([PATCH V2] mx6: compute PLL
PFD frequencies rather than using defines)

Best regards




--
View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-ARM-arch-mx6-fix-PLL2-PFD2-FREQ-tp162976p163654.html
Sent from the U-Boot mailing list archive at Nabble.com.
Stefano Babic - Sept. 20, 2013, 4:02 p.m.
On 11/09/2013 15:30, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tqs.de>
> 
> according to the manual frequency of PLL2 PFD2 is 396.000.000
> instead of 400.000.000
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
> ---

Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic
Markus Niebel - Sept. 25, 2013, 7:24 a.m.
Hello Pierre,

Am 20.09.2013 16:32, wrote Pierre Aubert:
> Stefano Babic wrote
>> On 11/09/2013 15:30, Markus Niebel wrote:
>>> From: Markus Niebel &lt;
> 
>> Markus.Niebel@
> 
>> &gt;
>>>
>>> according to the manual frequency of PLL2 PFD2 is 396.000.000
>>> instead of 400.000.000
>>>
>>> Signed-off-by: Markus Niebel &lt;
> 
>> Markus.Niebel@
> 
>> &gt;
>>> ---
>>>  arch/arm/include/asm/arch-mx6/crm_regs.h |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h
>>> b/arch/arm/include/asm/arch-mx6/crm_regs.h
>>> index 74aefe6..2813593 100644
>>> --- a/arch/arm/include/asm/arch-mx6/crm_regs.h
>>> +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
>>> @@ -892,7 +892,7 @@ struct mxc_ccm_reg {
>>>  
>>>  #define PLL2_PFD0_FREQ		352000000
>>>  #define PLL2_PFD1_FREQ		594000000
>>> -#define PLL2_PFD2_FREQ		400000000
>>> +#define PLL2_PFD2_FREQ		396000000
>>>  #define PLL2_PFD2_DIV_FREQ	200000000
>>>  #define PLL3_PFD0_FREQ		720000000
>>>  #define PLL3_PFD1_FREQ		540000000
>>>
>>
>> Acked-by: Stefano Babic &lt;
> 
>> sbabic@
> 
>> &gt;
> 
> Hello Markus, Hello Stephano
> I think it's better to compute  this frequencies rather than hard coding
> values. The default PFD frequencies are not the same for the Quad and for
> the other Socs.

As far as I read the manual for i.MX6Q/D and i.MX6DL/S have the same default values.

> Furthermore, if you modify PLL2_PFD2_FREQ, you must also change
> PLL2_PFD2_DIV_FREQ.
> 
> Please, see the patch I've submitted yesterday ([PATCH V2] mx6: compute PLL
> PFD frequencies rather than using defines)
> 

Hmm. Sounds reasonable.Do you expect any side effects?
(We came accross the mismatch that was fixed with my original 
patch when looking over DRAM configuration)
 

> Best regards
> 
> 
> 
> 
> --
> View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-ARM-arch-mx6-fix-PLL2-PFD2-FREQ-tp162976p163654.html
> Sent from the U-Boot mailing list archive at Nabble.com.
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Pierre Aubert - Sept. 25, 2013, 7:38 a.m.
Hello Markus,

Le 25/09/2013 09:24, Markus Niebel a écrit :
> Hello Pierre,
>
> ---
>   arch/arm/include/asm/arch-mx6/crm_regs.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h
> b/arch/arm/include/asm/arch-mx6/crm_regs.h
> index 74aefe6..2813593 100644
> --- a/arch/arm/include/asm/arch-mx6/crm_regs.h
> +++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
> @@ -892,7 +892,7 @@ struct mxc_ccm_reg {
>   
>   #define PLL2_PFD0_FREQ		352000000
>   #define PLL2_PFD1_FREQ		594000000
> -#define PLL2_PFD2_FREQ		400000000
> +#define PLL2_PFD2_FREQ		396000000
>   #define PLL2_PFD2_DIV_FREQ	200000000
>   #define PLL3_PFD0_FREQ		720000000
>   #define PLL3_PFD1_FREQ		540000000
>
>>
>> Hello Markus, Hello Stephano
>> I think it's better to compute  this frequencies rather than hard coding
>> values. The default PFD frequencies are not the same for the Quad and for
>> the other Socs.
> As far as I read the manual for i.MX6Q/D and i.MX6DL/S have the same default values.
For the i.MX6Q/D, the PLL2-PFD0 is 352MHz and the PLL2-PFD1 is 594MHz. 
For the i.MX6DL/S, the PLL2-PFD0 is 302.58MHz and the PLL2-PFD1 is 
528MHz. The definitions in the crm_regs.h are for the i.MX6Q/D.
>
>> Furthermore, if you modify PLL2_PFD2_FREQ, you must also change
>> PLL2_PFD2_DIV_FREQ.
>>
>> Please, see the patch I've submitted yesterday ([PATCH V2] mx6: compute PLL
>> PFD frequencies rather than using defines)
>>
> Hmm. Sounds reasonable.Do you expect any side effects?
> (We came accross the mismatch that was fixed with my original
> patch when looking over DRAM configuration)
>   
I've tested it on the SabreSD with i.MX6DL and on a custom board with 
i.MX6Q and i.MX6S and I didn't noticed any side effects.

Best regards
Stefano Babic - Oct. 10, 2013, 3:09 p.m.
> 
> Hello Markus, Hello Stephano
> I think it's better to compute  this frequencies rather than hard coding
> values. The default PFD frequencies are not the same for the Quad and for
> the other Socs.
> Furthermore, if you modify PLL2_PFD2_FREQ, you must also change
> PLL2_PFD2_DIV_FREQ.
> 
> Please, see the patch I've submitted yesterday ([PATCH V2] mx6: compute PLL
> PFD frequencies rather than using defines)

This V2 patch: applied to u-boot-imx, -next branch, thanks !

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/include/asm/arch-mx6/crm_regs.h b/arch/arm/include/asm/arch-mx6/crm_regs.h
index 74aefe6..2813593 100644
--- a/arch/arm/include/asm/arch-mx6/crm_regs.h
+++ b/arch/arm/include/asm/arch-mx6/crm_regs.h
@@ -892,7 +892,7 @@  struct mxc_ccm_reg {
 
 #define PLL2_PFD0_FREQ		352000000
 #define PLL2_PFD1_FREQ		594000000
-#define PLL2_PFD2_FREQ		400000000
+#define PLL2_PFD2_FREQ		396000000
 #define PLL2_PFD2_DIV_FREQ	200000000
 #define PLL3_PFD0_FREQ		720000000
 #define PLL3_PFD1_FREQ		540000000