]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: clock: H6: Adjust PLL LDO before clock setup
authorJernej Skrabec <jernej.skrabec@gmail.com>
Sun, 30 Jan 2022 14:27:15 +0000 (15:27 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 4 Apr 2022 22:24:17 +0000 (23:24 +0100)
BSP boot0 adjust PLL LDO regulator before clocks are initialized.
Let's do that.

Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/mach-sunxi/clock_sun50i_h6.c

index 32119ad16555246c3122a570a2efda443b0ccd99..7926394cf7624284255f6fe9e2ab71907141e0fa 100644 (file)
@@ -21,6 +21,13 @@ void clock_init_safe(void)
        clrbits_le32(&prcm->res_cal_ctrl, 1);
        setbits_le32(&prcm->res_cal_ctrl, 1);
 
+       if (IS_ENABLED(CONFIG_MACH_SUN50I_H6)) {
+               /* set key field for ldo enable */
+               setbits_le32(&prcm->pll_ldo_cfg, 0xA7000000);
+               /* set PLL VDD LDO output to 1.14 V */
+               setbits_le32(&prcm->pll_ldo_cfg, 0x60000);
+       }
+
        clock_set_pll1(408000000);
 
        writel(CCM_PLL6_DEFAULT, &ccm->pll6_cfg);