[coreboot-gerrit] Change in coreboot[master]: google/gru: correct backlight gpio

Lin Huang (Code Review) gerrit at coreboot.org
Mon Nov 20 09:58:31 CET 2017


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


Change subject: google/gru: correct backlight gpio
......................................................................

google/gru: correct backlight gpio

it use backlight enable pin as backlight gpio before, correct it and
define the right backlight gpio.

Change-Id: I7c5abfd5bbbae015b899f3edc8892ea32bf82463
Signed-off-by: Lin Huang <hl at rock-chips.com>
---
M src/mainboard/google/gru/board.h
M src/mainboard/google/gru/mainboard.c
2 files changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/22529/1

diff --git a/src/mainboard/google/gru/board.h b/src/mainboard/google/gru/board.h
index f95db57..3d769d7 100644
--- a/src/mainboard/google/gru/board.h
+++ b/src/mainboard/google/gru/board.h
@@ -25,7 +25,8 @@
 #define GPIO_SDMMC_PWR	GPIO(4, D, 5)
 
 #if IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)
-#define GPIO_BACKLIGHT	GPIO(4, C, 5)
+#define GPIO_BL_EN	GPIO(4, C, 5)
+#define GPIO_BACKLIGHT	GPIO(4, C, 6)
 #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")
@@ -36,7 +37,8 @@
 #define GPIO_TPM_IRQ	GPIO(1, C, 1)
 #define GPIO_WP		GPIO(0, B, 5)
 #else
-#define GPIO_BACKLIGHT	GPIO(1, C, 1)
+#define GPIO_BL_EN	GPIO(1, C, 1)
+#define GPIO_BACKLIGHT	dead_code_t(gpio_t, "backlight controlled by ec")
 #define GPIO_EC_IN_RW	GPIO(3, B, 0)
 #define GPIO_EC_IRQ	GPIO(0, A, 1)
 #define GPIO_P15V_EN	GPIO(0, B, 2)
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 3721ce8..9fdfbf5 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -363,7 +363,13 @@
 
 void mainboard_power_on_backlight(void)
 {
-	gpio_output(GPIO_BACKLIGHT, 1);  /* BL_EN */
+	gpio_output(GPIO_BL_EN, 1);  /* BL_EN */
+
+	/*
+	 * set backlight gpio to output,
+	 * it will be controlled in depthcharge
+	 */
+	gpio_output(GPIO_BACKLIGHT, 0);
 
 	if (IS_ENABLED(CONFIG_BOARD_GOOGLE_GRU))
 		prepare_backlight_i2c();

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c5abfd5bbbae015b899f3edc8892ea32bf82463
Gerrit-Change-Number: 22529
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/20171120/5c0528f7/attachment.html>


More information about the coreboot-gerrit mailing list