[coreboot-gerrit] Change in coreboot[master]: Scarlet: support kd097d04 panel

Lin Huang (Code Review) gerrit at coreboot.org
Wed Nov 15 04:28:18 CET 2017


Lin Huang has uploaded this change for review. ( https://review.coreboot.org/22472


Change subject: Scarlet: support kd097d04 panel
......................................................................

Scarlet: support kd097d04 panel

Scarlet use kd097d04 dual mipi panel, add panel
data in devicetree.cb , also add the reset pin and
backlight control.

Change-Id: Ie8bc0cbb79840f1924a8cc111f2511292203731f
Signed-off-by: Lin Huang <hl at rock-chips.com>
---
M src/mainboard/google/gru/board.h
M src/mainboard/google/gru/devicetree.scarlet.cb
M src/mainboard/google/gru/mainboard.c
3 files changed, 143 insertions(+), 8 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/22472/1

diff --git a/src/mainboard/google/gru/board.h b/src/mainboard/google/gru/board.h
index f95db57..5caf601 100644
--- a/src/mainboard/google/gru/board.h
+++ b/src/mainboard/google/gru/board.h
@@ -26,6 +26,7 @@
 
 #if IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)
 #define GPIO_BACKLIGHT	GPIO(4, C, 5)
+#define GPIO_PANEL_RST	GPIO(4, D, 1)
 #define GPIO_EC_IN_RW	GPIO(0, A, 1)
 #define GPIO_EC_IRQ	GPIO(1, C, 2)
 #define GPIO_P15V_EN	dead_code_t(gpio_t, "PP1500 doesn't exist on Scarlet")
diff --git a/src/mainboard/google/gru/devicetree.scarlet.cb b/src/mainboard/google/gru/devicetree.scarlet.cb
index f1129a4..c56e97c 100644
--- a/src/mainboard/google/gru/devicetree.scarlet.cb
+++ b/src/mainboard/google/gru/devicetree.scarlet.cb
@@ -13,20 +13,147 @@
 ## GNU General Public License for more details.
 ##
 
+##Scarlet use dual mipi panel kd097d04
 chip soc/rockchip/rk3399
 	device cpu_cluster 0 on end
 	register "vop_mode" = "VOP_MODE_MIPI"
 	register "framebuffer_bits_per_pixel" = "32"
-	register "panel_pixel_clock" = "56900"
+	register "panel_dual_mipi" = "1"
+	register "panel_format" = "0"
+	register "panel_lanes" = "8"
+	register "panel_pixel_clock" = "213000"
 	register "panel_refresh" = "60"
-	register "panel_ha" = "768"
-	register "panel_hbl" = "120"
-	register "panel_hso" = "40"
-	register "panel_hspw" = "40"
-	register "panel_va" = "1024"
+	register "panel_ha" = "1536"
+	register "panel_hbl" = "164"
+	register "panel_hso" = "70"
+	register "panel_hspw" = "24"
+	register "panel_va" = "2048"
 	register "panel_vbl" = "44"
-	register "panel_vso" = "20"
-	register "panel_vspw" = "4"
+	register "panel_vso" = "17"
+	register "panel_vspw" = "2"
 	register "panel_display_on_mdelay" = "120"
 	register "panel_video_mode_mdelay" = "5"
+	register "panel_need_init" = "1"
+	register "panel_init_data" = "{
+		0xB0, 0x00,
+		0xB2, 0x02,
+		0xB3, 0x11,
+		0xB4, 0x00,
+		0xB6, 0x80,
+		0xB8, 0x80,
+		0xBA, 0x43,
+		0xBB, 0x53,
+		0xBC, 0x0A,
+		0xBD, 0x4A,
+		0xBE, 0x2F,
+		0xBF, 0x1A,
+		0xF0, 0x39,
+		0xF1, 0x21,
+		0xB0, 0x02,
+		0xC0, 0x00,
+		0xC1, 0x01,
+		0xC2, 0x0B,
+		0xC3, 0x15,
+		0xC4, 0x22,
+		0xC5, 0x11,
+		0xC6, 0x15,
+		0xC7, 0x19,
+		0xC8, 0x1A,
+		0xC9, 0x16,
+		0xCA, 0x18,
+		0xCB, 0x13,
+		0xCC, 0x18,
+		0xCD, 0x13,
+		0xCE, 0x1C,
+		0xCF, 0x19,
+		0xD0, 0x21,
+		0xD1, 0x2C,
+		0xD2, 0x2F,
+		0xD3, 0x30,
+		0xD4, 0x19,
+		0xD5, 0x1F,
+		0xD6, 0x00,
+		0xD7, 0x01,
+		0xD8, 0x0B,
+		0xD9, 0x15,
+		0xDA, 0x22,
+		0xDB, 0x11,
+		0xDC, 0x15,
+		0xDD, 0x19,
+		0xDE, 0x1A,
+		0xDF, 0x16,
+		0xE0, 0x18,
+		0xE1, 0x13,
+		0xE2, 0x18,
+		0xE3, 0x13,
+		0xE4, 0x1C,
+		0xE5, 0x19,
+		0xE6, 0x21,
+		0xE7, 0x2C,
+		0xE8, 0x2F,
+		0xE9, 0x30,
+		0xEA, 0x19,
+		0xEB, 0x1F,
+		0xB0, 0x01,
+		0xC0, 0x10,
+		0xC1, 0x0F,
+		0xC2, 0x0E,
+		0xC3, 0x0D,
+		0xC4, 0x0C,
+		0xC5, 0x0B,
+		0xC6, 0x0A,
+		0xC7, 0x09,
+		0xC8, 0x08,
+		0xC9, 0x07,
+		0xCA, 0x06,
+		0xCB, 0x05,
+		0xCC, 0x00,
+		0xCD, 0x01,
+		0xCE, 0x02,
+		0xCF, 0x03,
+		0xD0, 0x04,
+		0xD6, 0x10,
+		0xD7, 0x0F,
+		0xD8, 0x0E,
+		0xD9, 0x0D,
+		0xDA, 0x0C,
+		0xDB, 0x0B,
+		0xDC, 0x0A,
+		0xDD, 0x09,
+		0xDE, 0x08,
+		0xDF, 0x07,
+		0xE0, 0x06,
+		0xE1, 0x05,
+		0xE2, 0x00,
+		0xE3, 0x01,
+		0xE4, 0x02,
+		0xE5, 0x03,
+		0xE6, 0x04,
+		0xE7, 0x00,
+		0xEC, 0xC0,
+		0xB0, 0x03,
+		0xC0, 0x01,
+		0xC2, 0x6F,
+		0xC3, 0x6F,
+		0xC5, 0x36,
+		0xC8, 0x08,
+		0xC9, 0x04,
+		0xCA, 0x41,
+		0xCC, 0x43,
+		0xCF, 0x60,
+		0xD2, 0x04,
+		0xD3, 0x04,
+		0xD4, 0x03,
+		0xD5, 0x02,
+		0xD6, 0x01,
+		0xD7, 0x00,
+		0xDB, 0x01,
+		0xDE, 0x36,
+		0xE6, 0x6F,
+		0xE7, 0x6F,
+		0xB0, 0x06,
+		0xB8, 0xA5,
+		0xC0, 0xA5,
+		0xD5, 0x3F,
+	}"
 end
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 3721ce8..d865a32 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -365,6 +365,13 @@
 {
 	gpio_output(GPIO_BACKLIGHT, 1);  /* BL_EN */
 
+	/*
+	 * set backlight gpio to output,
+	 * it will be controlled in depthcharge
+	 */
+	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
+		gpio_output(GPIO(4, C, 6), 0);
+
 	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
 		prepare_backlight_i2c();
 }

-- 
To view, visit https://review.coreboot.org/22472
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8bc0cbb79840f1924a8cc111f2511292203731f
Gerrit-Change-Number: 22472
Gerrit-PatchSet: 1
Gerrit-Owner: Lin Huang <hl at rock-chips.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171115/abf494db/attachment.html>


More information about the coreboot-gerrit mailing list