[coreboot-gerrit] Patch set updated for coreboot: Gale: Add LED support.

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Thu Jul 7 20:59:06 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15572

-gerrit

commit 02858a2993da8ff7ac39d9e27c7eb066ee95f701
Author: Suresh Rajashekara <sureshraj at google.com>
Date:   Wed May 18 17:48:33 2016 -0700

    Gale: Add LED support.
    
    Reusing the LED patterns as it was defined for Storm/WW/Platform.
    
    BUG=b:29051518
    TEST=After about 3 seconds of powering on the device different colors
    should be seen at the LED ring, depending on the state of the device.
    Alternatively, move the device to different states manually by
    appropriate actions (like dev mode, rec mode etc) and observe the
    colors.
    BRANCH=None
    
    Change-Id: I6f1b23fee15747a402e209a2d06f8794bbc2c5a1
    Signed-off-by: Martin Roth <martinroth at chromium.org>
    Original-Commit-Id: be1194b095d9a5cf269710c43a27a5afb3e87b29
    Original-Change-Id: Ie82d4e148025c0040cdb26f53f028d9b4cbe2332
    Original-Signed-off-by: Suresh Rajashekara <sureshraj at google.com>
    Original-Reviewed-on: https://chromium-review.googlesource.com/355200
    Original-Commit-Ready: Suresh Rajashekara <sureshraj at chromium.org>
    Original-Tested-by: Suresh Rajashekara <sureshraj at chromium.org>
    Original-Reviewed-by: Suresh Rajashekara <sureshraj at chromium.org>
---
 src/mainboard/google/gale/blsp.c     | 18 ++++++++++++++++++
 src/mainboard/google/gale/chromeos.c |  5 +----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/mainboard/google/gale/blsp.c b/src/mainboard/google/gale/blsp.c
index 3be075f..2bc562a 100644
--- a/src/mainboard/google/gale/blsp.c
+++ b/src/mainboard/google/gale/blsp.c
@@ -34,6 +34,7 @@
 
 #define IPQ40XX_I2C0_PINGROUP_1		1
 #define IPQ40XX_I2C0_PINGROUP_2		(!IPQ40XX_I2C0_PINGROUP_1)
+#define IPQ40XX_I2C1_PINGROUP_1         1
 
 #if IPQ40XX_I2C0_PINGROUP_1
 
@@ -55,6 +56,16 @@
 
 #endif
 
+
+#if IPQ40XX_I2C1_PINGROUP_1
+
+#define SCL_GPIO_I2C1                34
+#define SDA_GPIO_I2C1                35
+#define GPIO_I2C1_FUNC_SCL           0x1
+#define GPIO_I2C1_FUNC_SDA           0x1
+
+#endif
+
 int blsp_i2c_init_board(blsp_qup_id_t id)
 {
 	switch (id) {
@@ -68,6 +79,13 @@ int blsp_i2c_init_board(blsp_qup_id_t id)
 		gpio_tlmm_config_set(SCL_GPIO, GPIO_FUNC_SCL,
 				     GPIO_NO_PULL, GPIO_2MA, 1);
 #endif /* Pin Group 1 or 2 */
+
+#if defined(IPQ40XX_I2C1_PINGROUP_1)
+		gpio_tlmm_config_set(SDA_GPIO_I2C1, GPIO_I2C1_FUNC_SDA,
+				     GPIO_NO_PULL, GPIO_2MA, 1);
+		gpio_tlmm_config_set(SCL_GPIO_I2C1, GPIO_I2C1_FUNC_SCL,
+				     GPIO_NO_PULL, GPIO_2MA, 1);
+#endif
 		break;
 	default:
 		return 1;
diff --git a/src/mainboard/google/gale/chromeos.c b/src/mainboard/google/gale/chromeos.c
index 7430407..beeb2a5 100644
--- a/src/mainboard/google/gale/chromeos.c
+++ b/src/mainboard/google/gale/chromeos.c
@@ -78,10 +78,7 @@ enum switch_state {
 
 static void display_pattern(int pattern)
 {
-#if IS_ENABLED(notyet)
-	if (board_id() == BOARD_ID_WHIRLWIND_SP5)
-		ww_ring_display_pattern(GSBI_ID_7, pattern);
-#endif
+	ww_ring_display_pattern(BLSP_QUP_ID_3, pattern);
 }
 
 #define WIPEOUT_MODE_DELAY_MS (8 * 1000)



More information about the coreboot-gerrit mailing list