diff options
author | Julius Werner <jwerner@chromium.org> | 2015-01-21 15:28:07 -0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-04-15 16:54:07 +0200 |
commit | 1f0569f01c601b010360c8a729ed9c8156452244 (patch) | |
tree | 1e2f41ccb3396a663143e647afc6cfb24333831a /src/mainboard/google/veyron_pinky | |
parent | 25f5778f4a648218b303b6021eae09bf0c450ac0 (diff) |
veyron: Add "backlight" GPIO to coreboot table
This patch adds a new "backlight" output GPIO to the coreboot table in
order to avoid redundantly defining that GPIO in the payload.
BRANCH=veyron
BUG=chrome-os-partner:34713
TEST=Tested together with corresponding depthcharge CL.
Change-Id: Ia997beb1a400136ad65d8f0217781c9782f6e8a5
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 04ce4c23573cf926aeef3d817d3ab00835f897c7
Original-Change-Id: I69b3c7ac6be4b9723b6a0dfecef5e1c4ea681aff
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/242400
Original-Tested-by: Lin Huang <hl@rock-chips.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9652
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/mainboard/google/veyron_pinky')
-rw-r--r-- | src/mainboard/google/veyron_pinky/board.h | 1 | ||||
-rw-r--r-- | src/mainboard/google/veyron_pinky/chromeos.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/veyron_pinky/mainboard.c | 6 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/mainboard/google/veyron_pinky/board.h b/src/mainboard/google/veyron_pinky/board.h index bf842c1cc0..8fe102fd26 100644 --- a/src/mainboard/google/veyron_pinky/board.h +++ b/src/mainboard/google/veyron_pinky/board.h @@ -23,6 +23,7 @@ #include <boardid.h> #include <gpio.h> +#define GPIO_BACKLIGHT GPIO(7, A, 0) #define GPIO_RESET (board_id() > 0 ? GPIO(0, B, 5) : GPIO(0, B, 2)) /* TODO: move setup_chromeos_gpios() here once bootblock code is in mainboard */ diff --git a/src/mainboard/google/veyron_pinky/chromeos.c b/src/mainboard/google/veyron_pinky/chromeos.c index 83ca70b949..dd781aae58 100644 --- a/src/mainboard/google/veyron_pinky/chromeos.c +++ b/src/mainboard/google/veyron_pinky/chromeos.c @@ -101,6 +101,14 @@ void fill_lb_gpios(struct lb_gpios *gpios) GPIO_MAX_NAME_LENGTH); count++; + /* Backlight: GPIO active high (output) */ + gpios->gpios[count].port = GPIO_BACKLIGHT.raw; + gpios->gpios[count].polarity = ACTIVE_HIGH; + gpios->gpios[count].value = -1; + strncpy((char *)gpios->gpios[count].name, "backlight", + GPIO_MAX_NAME_LENGTH); + count++; + gpios->size = sizeof(*gpios) + (count * sizeof(struct lb_gpio)); gpios->count = count; diff --git a/src/mainboard/google/veyron_pinky/mainboard.c b/src/mainboard/google/veyron_pinky/mainboard.c index a22ef92fb1..c272d66e06 100644 --- a/src/mainboard/google/veyron_pinky/mainboard.c +++ b/src/mainboard/google/veyron_pinky/mainboard.c @@ -187,17 +187,17 @@ void mainboard_power_on_backlight(void) case 0: case 1: case 2: - gpio_output(GPIO(7, A, 0), 0); /* BL_EN */ + gpio_output(GPIO_BACKLIGHT, 0); /* BL_EN */ gpio_output(GPIO(7, A, 2), 1); /* LCD_BL */ mdelay(10); - gpio_output(GPIO(7, A, 0), 1); /* BL_EN */ + gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ break; default: gpio_output(GPIO(2, B, 4), 1); /* BL_PWR_EN */ mdelay(10); gpio_output(GPIO(7, A, 2), 1); /* LCD_BL */ mdelay(10); - gpio_output(GPIO(7, A, 0), 1); /* BL_EN */ + gpio_output(GPIO_BACKLIGHT, 1); /* BL_EN */ break; } } |