]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: am64x: Set the core voltage of USB PHY to 0.85V
authorAswath Govindraju <a-govindraju@ti.com>
Fri, 4 Jun 2021 16:30:34 +0000 (22:00 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Wed, 9 Jun 2021 16:53:44 +0000 (22:23 +0530)
Set the core voltage of USB PHY in AM64x to 0.85V in spl_board_init().

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Link: https://lore.kernel.org/r/20210604163043.12811-5-a-govindraju@ti.com
board/ti/am64x/evm.c

index 35cd9e027c041e5389f545b8963e1d15c4545f00..cdbb9a87bc44bc3845bdf371c9864df902a3633d 100644 (file)
@@ -152,3 +152,17 @@ int board_late_init(void)
        return 0;
 }
 #endif
+
+#define CTRLMMR_USB0_PHY_CTRL  0x43004008
+#define CORE_VOLTAGE           0x80000000
+
+#ifdef CONFIG_SPL_BOARD_INIT
+void spl_board_init(void)
+{
+       u32 val;
+       /* Set USB PHY core voltage to 0.85V */
+       val = readl(CTRLMMR_USB0_PHY_CTRL);
+       val &= ~(CORE_VOLTAGE);
+       writel(val, CTRLMMR_USB0_PHY_CTRL);
+}
+#endif