Skip to content

Instantly share code, notes, and snippets.

@anarsoul
Created June 30, 2018 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anarsoul/9e4eaa59964f9669a090cec9cddaddc9 to your computer and use it in GitHub Desktop.
Save anarsoul/9e4eaa59964f9669a090cec9cddaddc9 to your computer and use it in GitHub Desktop.
diff --git a/plat/sun50iw1p1/sunxi_power.c b/plat/sun50iw1p1/sunxi_power.c
index 71ccafa3..b4567b47 100644
--- a/plat/sun50iw1p1/sunxi_power.c
+++ b/plat/sun50iw1p1/sunxi_power.c
@@ -236,6 +236,13 @@ static int pmic_setup(const char *dt_name)
ret);
return -4;
}
+
+ /* power on LCD */
+ if (!strcmp(dt_name, "sun50i-a64-pine64-plus")) {
+ sunxi_pmic_write(0x16, 0x0b); /* DLDO2 = VCC-MIPI = 1.8V, 0x1a for 3.3v */
+ ret = sunxi_pmic_read(0x12);
+ sunxi_pmic_write(0x12, ret | 0x10);
+ }
}
/*
@@ -265,6 +272,7 @@ static int pmic_setup(const char *dt_name)
sunxi_pmic_write(0x16, 0x12); /* DLDO2 = VCC-MIPI = 2.5V */
ret = sunxi_pmic_read(0x12);
sunxi_pmic_write(0x12, ret | 0x10);
+ udelay(1000); /* wait > 2ms */
sunxi_pmic_write(0x1c, 0x0a); /* FLDO1 = HSIC = 1.2V */
ret = sunxi_pmic_read(0x13);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment