Skip to contentSkip to conversation

ARM: imx: imx8m: Add 933 MHz PLL settings

PATCH In review Marek Vasut 4 participants 8 messages Feb 26, 2022 – Apr 12, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: imx: imx8m: Add 933 MHz PLL settings

Add settings for operating PLL at 933 MHz. This setting is useful in case the LPDDR4 DRAM should operate at 1866 MHz or 3733 MT/s.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/clock_imx8mm.c +1 -0
index 76132defc21..4db55f86081 100644
@@ -48,6 +48,7 @@ int enable_i2c_clk(unsigned char enable, unsigned i2c_num)
 #ifdef CONFIG_SPL_BUILD
 static struct imx_int_pll_rate_table imx8mm_fracpll_tbl[] = {
 	PLL_1443X_RATE(1000000000U, 250, 3, 1, 0),
+	PLL_1443X_RATE(933000000U, 311, 4, 1, 0),
 	PLL_1443X_RATE(800000000U, 300, 9, 0, 0),
 	PLL_1443X_RATE(750000000U, 250, 8, 0, 0),
 	PLL_1443X_RATE(650000000U, 325, 3, 2, 0),
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 imx8m: ddrphy_utils: Add 3732 MT/s mode

Add entry for 3732 MT/s mode of operation of the LPDDR4, in which case the DDR PLL has to be configured in 933 MHz mode.

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 drivers/ddr/imx/imx8m/ddrphy_utils.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/ddr/imx/imx8m/ddrphy_utils.c +4 -0
index 0f8baefb1f8..a54449e5f14 100644
@@ -117,6 +117,10 @@ void ddrphy_init_set_dfi_clk(unsigned int drate)
 		dram_pll_init(MHZ(1000));
 		dram_disable_bypass();
 		break;
+	case 3732:
+		dram_pll_init(MHZ(933));
+		dram_disable_bypass();
+		break;
 	case 3200:
 		dram_pll_init(MHZ(800));
 		dram_disable_bypass();
Signature · 1 line
2.34.1
#3 lore raw

PATCH 2/2 imx8m: ddrphy_utils: Add 3732 MT/s mode

In reply to Marek Vasut
Quoted 7 lines

Add entry for 3732 MT/s mode of operation of the LPDDR4, in which case the DDR PLL has to be configured in 933 MHz mode.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

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: [email protected]
=====================================================================
#5 lore raw
In reply to Marek Vasut
Quoted 2 lines · Marek Vasut

Add settings for operating PLL at 933 MHz. This setting is useful in case the LPDDR4 DRAM should operate at 1866 MHz or 3733 MT/s.

Is the DDR operation value get from NXP DDR TOOL?

Thanks,
Peng.

Quoted 22 lines
Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
  arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 +
  1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8m/clock_imx8mm.c +1 -0
index 76132defc21..4db55f86081 100644
@@ -48,6 +48,7 @@ int enable_i2c_clk(unsigned char enable, unsigned i2c_num)
  #ifdef CONFIG_SPL_BUILD
  static struct imx_int_pll_rate_table imx8mm_fracpll_tbl[] = {
  	PLL_1443X_RATE(1000000000U, 250, 3, 1, 0),
+	PLL_1443X_RATE(933000000U, 311, 4, 1, 0),
  	PLL_1443X_RATE(800000000U, 300, 9, 0, 0),
  	PLL_1443X_RATE(750000000U, 250, 8, 0, 0),
  	PLL_1443X_RATE(650000000U, 325, 3, 2, 0),
#6 lore raw
Quoted 7 lines · Peng Fan (OSS)
Quoted 2 lines · Marek Vasut

Add settings for operating PLL at 933 MHz. This setting is useful in case the LPDDR4 DRAM should operate at 1866 MHz or 3733 MT/s.

Is the DDR operation value get from NXP DDR TOOL?

No, the DDR RPA supports like two PLL settings, it is very limited. I had to derive the PLL settings myself and been using those since.

Do you expect any stability issues ? I don't observe any so far, and I tested it including LCDIFv3 and GPU (etnaviv), no funny behavior was observed.

#7 lore raw

PATCH 1/2 ARM: imx: imx8m: Add 933 MHz PLL settings

In reply to Marek Vasut
Quoted 7 lines

Add settings for operating PLL at 933 MHz. This setting is useful in case the LPDDR4 DRAM should operate at 1866 MHz or 3733 MT/s.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

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: [email protected]
=====================================================================