Skip to content

Commit

Permalink
sunxi: power: enable DLDO1 switch as well
Browse files Browse the repository at this point in the history
The DLDO1 switch enables power to the HDMI part of the SoC.
Enable this power rail unconditionally for now until we have proper
regulator support.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
  • Loading branch information
Icenowy committed Dec 22, 2016
1 parent cd7fa48 commit 74fec2e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions plat/sun50iw1p1/sunxi_power.c
Expand Up @@ -236,22 +236,25 @@ static int pmic_setup(void)
}

ret = sunxi_pmic_read(0x12);
if ((ret & 0x3f) != 0x01) {
if ((ret & 0x37) != 0x01) {
NOTICE("PMIC: Output power control 2 is an unexpected 0x%x\n",
ret);
return -3;
}

if ((ret & 0xc1) != 0xc1) {
/* Enable DC1SW to power PHY and DLDO4 for WiFi */
ret = sunxi_pmic_write(0x12, ret | 0xc0);
if ((ret & 0xc9) != 0xc9) {
/* Enable DC1SW to power PHY, DLDO4 for WiFi and DLDO1 for HDMI */
ret = sunxi_pmic_write(0x12, ret | 0xc8);
if (ret < 0) {
NOTICE("PMIC: error %d enabling DC1SW/DLDO4\n", ret);
NOTICE("PMIC: error %d enabling DC1SW/DLDO4/DLDO1\n", ret);
return -4;
}
}

sunxi_pmic_write(0x24, 0xb3); /* DCDC5 = DDR RAM voltage = 1.5V */

sunxi_pmic_write(0x15, 0x1a); /* DLDO1 = VCC3V3_HDMI voltage = 3.3V */


return 0;
}
Expand Down

0 comments on commit 74fec2e

Please sign in to comment.