summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/veyron_jerry/board.h1
-rw-r--r--src/mainboard/google/veyron_jerry/chromeos.c8
-rw-r--r--src/mainboard/google/veyron_jerry/mainboard.c6
-rw-r--r--src/mainboard/google/veyron_mighty/board.h1
-rw-r--r--src/mainboard/google/veyron_mighty/chromeos.c8
-rw-r--r--src/mainboard/google/veyron_mighty/mainboard.c6
-rw-r--r--src/mainboard/google/veyron_pinky/board.h1
-rw-r--r--src/mainboard/google/veyron_pinky/chromeos.c8
-rw-r--r--src/mainboard/google/veyron_pinky/mainboard.c6
-rw-r--r--src/mainboard/google/veyron_speedy/board.h1
-rw-r--r--src/mainboard/google/veyron_speedy/chromeos.c8
-rw-r--r--src/mainboard/google/veyron_speedy/mainboard.c6
12 files changed, 48 insertions, 12 deletions
diff --git a/src/mainboard/google/veyron_jerry/board.h b/src/mainboard/google/veyron_jerry/board.h
index be96ce7843..3d567ded68 100644
--- a/src/mainboard/google/veyron_jerry/board.h
+++ b/src/mainboard/google/veyron_jerry/board.h
@@ -23,6 +23,7 @@
#include <boardid.h>
#include <gpio.h>
+#define GPIO_BACKLIGHT GPIO(7, A, 0)
#define GPIO_RESET GPIO(0, B, 5)
/* TODO: move setup_chromeos_gpios() here once bootblock code is in mainboard */
diff --git a/src/mainboard/google/veyron_jerry/chromeos.c b/src/mainboard/google/veyron_jerry/chromeos.c
index 069b28b91a..d509a01653 100644
--- a/src/mainboard/google/veyron_jerry/chromeos.c
+++ b/src/mainboard/google/veyron_jerry/chromeos.c
@@ -100,6 +100,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_jerry/mainboard.c b/src/mainboard/google/veyron_jerry/mainboard.c
index 198a93003d..2d7dbc706a 100644
--- a/src/mainboard/google/veyron_jerry/mainboard.c
+++ b/src/mainboard/google/veyron_jerry/mainboard.c
@@ -141,17 +141,17 @@ void mainboard_power_on_backlight(void)
{
switch (board_id()) {
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;
}
}
diff --git a/src/mainboard/google/veyron_mighty/board.h b/src/mainboard/google/veyron_mighty/board.h
index 249552e79d..280568a43f 100644
--- a/src/mainboard/google/veyron_mighty/board.h
+++ b/src/mainboard/google/veyron_mighty/board.h
@@ -23,6 +23,7 @@
#include <boardid.h>
#include <gpio.h>
+#define GPIO_BACKLIGHT GPIO(7, A, 0)
#define GPIO_RESET GPIO(0, B, 5)
/* TODO: move setup_chromeos_gpios() here once bootblock code is in mainboard */
diff --git a/src/mainboard/google/veyron_mighty/chromeos.c b/src/mainboard/google/veyron_mighty/chromeos.c
index 069b28b91a..d509a01653 100644
--- a/src/mainboard/google/veyron_mighty/chromeos.c
+++ b/src/mainboard/google/veyron_mighty/chromeos.c
@@ -100,6 +100,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_mighty/mainboard.c b/src/mainboard/google/veyron_mighty/mainboard.c
index 3bf5724e37..2441a1b9d5 100644
--- a/src/mainboard/google/veyron_mighty/mainboard.c
+++ b/src/mainboard/google/veyron_mighty/mainboard.c
@@ -141,17 +141,17 @@ void mainboard_power_on_backlight(void)
{
switch (board_id()) {
case 0:
- 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;
}
}
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;
}
}
diff --git a/src/mainboard/google/veyron_speedy/board.h b/src/mainboard/google/veyron_speedy/board.h
index 244cdfb762..817aac2981 100644
--- a/src/mainboard/google/veyron_speedy/board.h
+++ b/src/mainboard/google/veyron_speedy/board.h
@@ -23,6 +23,7 @@
#include <boardid.h>
#include <gpio.h>
+#define GPIO_BACKLIGHT GPIO(7, A, 0)
#define GPIO_RESET GPIO(0, B, 5)
/* TODO: move setup_chromeos_gpios() here once bootblock code is in mainboard */
diff --git a/src/mainboard/google/veyron_speedy/chromeos.c b/src/mainboard/google/veyron_speedy/chromeos.c
index 069b28b91a..d509a01653 100644
--- a/src/mainboard/google/veyron_speedy/chromeos.c
+++ b/src/mainboard/google/veyron_speedy/chromeos.c
@@ -100,6 +100,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_speedy/mainboard.c b/src/mainboard/google/veyron_speedy/mainboard.c
index 3bf5724e37..2441a1b9d5 100644
--- a/src/mainboard/google/veyron_speedy/mainboard.c
+++ b/src/mainboard/google/veyron_speedy/mainboard.c
@@ -141,17 +141,17 @@ void mainboard_power_on_backlight(void)
{
switch (board_id()) {
case 0:
- 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;
}
}