Skip to contentSkip to conversation

arm: mach-omap2: am33xx: Init pinmux before clock

PATCH New Marek Vasut 2 participants 2 messages May 25, 2019 – Jul 11, 2019

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

PATCH 1/1 arm: mach-omap2: am33xx: Init pinmux before clock

The board_early_init_f() inits clock before initing pinmux. However, the clock configuration code might need to adjust PMIC settings of a PMIC on I2C bus (e.g. board/ti/am335x/board.c does that). If the I2C bus pin muxing is not configured before attempting to communicate with the PMIC, the communication will silently fail and the prcm_init() may configure fast enough CPU clock that the default voltage provided by the PMIC would be insufficient and the platform would become unstable.

Cc Jean-Jacques Hiblot <[email protected]>
Cc Tom Rini <[email protected]>
---
 arch/arm/mach-omap2/am33xx/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/am33xx/board.c +1 -1
index 5507348981..03460c3eb7 100644
@@ -375,8 +375,8 @@ void update_rtc_magic(void)
  */
 int board_early_init_f(void)
 {
-	prcm_init();
 	set_mux_conf_regs();
+	prcm_init();
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_RTC_DDR_SUPPORT)
 	update_rtc_magic();
 #endif
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 arm: mach-omap2: am33xx: Init pinmux before clock

Quoted 9 lines · Marek Vasut

The board_early_init_f() inits clock before initing pinmux. However, the clock configuration code might need to adjust PMIC settings of a PMIC on I2C bus (e.g. board/ti/am335x/board.c does that). If the I2C bus pin muxing is not configured before attempting to communicate with the PMIC, the communication will silently fail and the prcm_init() may configure fast enough CPU clock that the default voltage provided by the PMIC would be insufficient and the platform would become unstable.

Quoted 3 lines
Cc Jean-Jacques Hiblot <[email protected]>
Cc Tom Rini <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- 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/20190711/4a1045ce/attachment.sig>