ARM: tegra124: Clear IDDQ when enabling PLLC
Subsystems (3)
PATCH 1/2 ARM: tegra124: Clear IDDQ when enabling PLLC
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence").
--- arch/arm/include/asm/arch-tegra124/clock.h | 3 +++ arch/arm/mach-tegra/tegra124/clock.c | 5 +++++ 2 files changed, 8 insertions(+)
arch/arm/include/asm/arch-tegra124/clock.h +3 -0
@@ -16,6 +16,9 @@#define OSC_FREQ_SHIFT 28#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +/* CLK_RST_CONTROLLER_PLLC_MISC_0 */ +#define PLLC_IDDQ (1 << 26) +/* CLK_RST_CONTROLLER_CLK_SOURCE_SOR0_0 */ #define SOR0_CLK_SEL0 (1 << 14)#define SOR0_CLK_SEL1 (1 << 15)
arch/arm/mach-tegra/tegra124/clock.c +5 -0
@@ -809,6 +809,11 @@ void clock_early_init(void)tegra30_set_up_pllp (); +/* clear IDDQ before accessing any other PLLC registers */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_CGENERAL ]; +clrbits_le32 (&clkrst->crc_pll[CLOCK_ID_CGENERAL ].pll_misc,PLLC_IDDQ ); +udelay (2 ); +/* * PLLC output frequency set to 600Mhz * PLLD output frequency set to 925Mhz
Signature · 1 line
2.5.0
PATCH 2/2 ARM: tegra114: Clear IDDQ when enabling PLLC
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence"). The Tegra114 TRM doesn't contain this information, but the programming of PLLC is the same on Tegra114 and Tegra124.
--- arch/arm/include/asm/arch-tegra114/clock.h | 3 +++ arch/arm/mach-tegra/tegra114/clock.c | 5 +++++ 2 files changed, 8 insertions(+)
arch/arm/include/asm/arch-tegra114/clock.h +3 -0
@@ -25,4 +25,7 @@#define OSC_FREQ_SHIFT 28#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +/* CLK_RST_CONTROLLER_PLLC_MISC_0 */ +#define PLLC_IDDQ (1 << 26) +#endif /* _TEGRA114_CLOCK_H_ */
arch/arm/mach-tegra/tegra114/clock.c +5 -0
@@ -629,6 +629,11 @@ void clock_early_init(void)tegra30_set_up_pllp (); +/* clear IDDQ before accessing any other PLLC registers */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_CGENERAL ]; +clrbits_le32 (&clkrst->crc_pll[CLOCK_ID_CGENERAL ].pll_misc,PLLC_IDDQ ); +udelay (2 ); +/* * PLLC output frequency set to 600Mhz * PLLD output frequency set to 925Mhz
Signature · 1 line
2.5.0
PATCH 2/2 ARM: tegra114: Clear IDDQ when enabling PLLC
Thierry,
Quoted 7 lines
-----Original Message-----
From: Thierry Reding [mailto:thierry.reding at gmail.com]
Sent: Tuesday, September 08, 2015 2:38 AM
To: Tom Warren
Cc: Nicolas Chauvet; u-boot at lists.denx.de
Subject: [PATCH 2/2] ARM: tegra114: Clear IDDQ when enabling PLLC
Quoted 8 lines
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence"). The Tegra114 TRM doesn't contain this information, but the programming of PLLC is the same on Tegra114 and Tegra124.
Do we need this for T210, too? A quick glance at the TRM shows IDDQ for PLLA, M, C, U, P, D.
I'll get these two in for the next PR.
Tom
--
nvpublic
Quoted 40 lines
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/include/asm/arch-tegra114/clock.h | 3 +++ arch/arm/mach-tegra/tegra114/clock.c | 5 +++++ 2 files changed, 8 insertions(+)arch/arm/include/asm/arch-tegra114/clock.h +3
-0@@ -25,4 +25,7 @@#define OSC_FREQ_SHIFT 28#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +/* CLK_RST_CONTROLLER_PLLC_MISC_0 */ +#define PLLC_IDDQ (1 << 26) +#endif /* _TEGRA114_CLOCK_H_ */ arch/arm/mach- renamed from arch/arm/mach-tegra/tegra114/clock.c +0
-0
tegra/tegra114/clock.c
indexcec843b27df7..e6ef873c8dc4100644arch/arm/mach-tegra/tegra114/clock.c +5
-0@@ -629,6 +629,11 @@ void clock_early_init(void)tegra30_set_up_pllp (); +/* clear IDDQ before accessing any other PLLC registers */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_CGENERAL ]; +clrbits_le32 (&clkrst->crc_pll[CLOCK_ID_CGENERAL ].pll_misc,PLLC_IDDQ ); +udelay (2 ); +/* * PLLC output frequency set to 600Mhz * PLLD output frequency set to 925Mhz
--
2.5.0
PATCH 2/2 ARM: tegra114: Clear IDDQ when enabling PLLC
Quoted 11 lines · Tom Warren
Thierry,
Quoted 9 lines
-----Original Message-----
From: Thierry Reding [mailto:thierry.reding at gmail.com]
Sent: Tuesday, September 08, 2015 2:38 AM
To: Tom Warren
Cc: Nicolas Chauvet; u-boot at lists.denx.de
Subject: [PATCH 2/2] ARM: tegra114: Clear IDDQ when enabling PLLCFrom: Thierry Reding <[email protected]>
Quoted 7 lines
Quoted 6 lines
Enabling a PLL while IDDQ is high. The Linux kernel checks for this condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence"). The Tegra114 TRM doesn't contain this information, but the programming of PLLC is the same on Tegra114 and Tegra124.
Do we need this for T210, too? A quick glance at the TRM shows IDDQ for PLLA, M, C, U, P, D.
I suspect that we might need this for Tegra210 as well, though I haven't encountered the warning yet. That said, I think this is a fairly new warning, though the code's been in the kernel since essentially forever, so it could be that I just haven't encountered it on Tegra210 because I haven't tested with the right U-Boot/kernel combination.
On that note, any ideas on what could've triggered this? I know there were a couple of changes to the Tegra clock code in U-Boot recently, but I don't remember seeing anything suspicious.
Thierry
Quoted 28 lines
Quoted 28 lines
Signed-off-by Thierry Reding <[email protected]>--- arch/arm/include/asm/arch-tegra114/clock.h | 3 +++ arch/arm/mach-tegra/tegra114/clock.c | 5 +++++ 2 files changed, 8 insertions(+)arch/arm/include/asm/arch-tegra114/clock.h +3
-0@@ -25,4 +25,7 @@#define OSC_FREQ_SHIFT 28#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +/* CLK_RST_CONTROLLER_PLLC_MISC_0 */ +#define PLLC_IDDQ (1 << 26) +#endif /* _TEGRA114_CLOCK_H_ */ arch/arm/mach- renamed from arch/arm/mach-tegra/tegra114/clock.c +0
-0
tegra/tegra114/clock.c
indexcec843b27df7..e6ef873c8dc4100644arch/arm/mach-tegra/tegra114/clock.c +0
-0@@ -629,6 +629,11 @@ void clock_early_init(void)tegra30_set_up_pllp ();
Quoted 12 lines
Quoted 11 lines
arch/arm/mach-tegra/tegra114/clock.c +5
-0+/* clear IDDQ before accessing any other PLLC registers */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_CGENERAL ]; +clrbits_le32 (&clkrst->crc_pll[CLOCK_ID_CGENERAL ].pll_misc,PLLC_IDDQ ); +udelay (2 ); +/* * PLLC output frequency set to 600Mhz * PLLD output frequency set to 925Mhz
--
2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150910/654445b6/attachment.sig>
PATCH 1/2 ARM: tegra124: Clear IDDQ when enabling PLLC
In reply to Thierry RedingTest-HW: jetson-tk1
Fix the issue on recent kernel
Nicolas (kwizart)
2015-09-08 11:38 GMT+02:00 Thierry Reding <[email protected]>:
Quoted 52 lines
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence").
Reported-by Nicolas Chauvet <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- arch/arm/include/asm/arch-tegra124/clock.h | 3 +++ arch/arm/mach-tegra/tegra124/clock.c | 5 +++++ 2 files changed, 8 insertions(+)arch/arm/include/asm/arch-tegra124/clock.h +3
-0@@ -16,6 +16,9 @@#define OSC_FREQ_SHIFT 28#define OSC_FREQ_MASK (0xF << OSC_FREQ_SHIFT) +/* CLK_RST_CONTROLLER_PLLC_MISC_0 */ +#define PLLC_IDDQ (1 << 26) +/* CLK_RST_CONTROLLER_CLK_SOURCE_SOR0_0 */ #define SOR0_CLK_SEL0 (1 << 14)#define SOR0_CLK_SEL1 (1 << 15)arch/arm/mach-tegra/tegra124/clock.c +5
-0@@ -809,6 +809,11 @@ void clock_early_init(void)tegra30_set_up_pllp (); +/* clear IDDQ before accessing any other PLLC registers */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_CGENERAL ]; +clrbits_le32 (&clkrst->crc_pll[CLOCK_ID_CGENERAL ].pll_misc,PLLC_IDDQ ); +udelay (2 ); +/* * PLLC output frequency set to 600Mhz * PLLD output frequency set to 925Mhz
--
2.5.0
Signature · 3 lines
- Nicolas (kwizart)
PATCH 1/2 ARM: tegra124: Clear IDDQ when enabling PLLC
In reply to Thierry RedingQuoted 3 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this
Is there some word missing in/at-the-end-of that first sentence? It doesn't seem complete.
Quoted 4 lines
condition and warns about it verbosely, so while this seems to work fine, fix it up according to the programming guidelines provided in the Tegra K1 TRM (v02p), Section 5.3.8.1 ("PLLC and PLLC4 Startup Sequence").
PATCH 1/2 ARM: tegra124: Clear IDDQ when enabling PLLC
Quoted 7 lines · Stephen Warren
Quoted 3 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Enabling a PLL while IDDQ is high. The Linux kernel checks for this
Is there some word missing in/at-the-end-of that first sentence? It doesn't seem complete.
Erm... yeah. This should read:
"Enabling a PLL while IDDQ is high is not allowed."
or "not supported" or similar. Interestingly doing this does seem to work. Unless we don't actually use PLLC yet.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150910/00de3eba/attachment.sig>