Gale: Add LED support.
authorSuresh Rajashekara <sureshraj@google.com>
Thu, 19 May 2016 00:01:55 +0000 (17:01 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Sat, 25 Jun 2016 09:29:14 +0000 (02:29 -0700)
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: Ib199bb15e65b4eb16017f671f9338fdfaa3ce770
Signed-off-by: Suresh Rajashekara <sureshraj@google.com>
Reviewed-on: https://chromium-review.googlesource.com/355191
Commit-Ready: Suresh Rajashekara <sureshraj@chromium.org>
Tested-by: Suresh Rajashekara <sureshraj@chromium.org>
Reviewed-by: Suresh Rajashekara <sureshraj@chromium.org>
board/gale/defconfig
src/board/gale/board.c
src/drivers/bus/i2c/ipq40xx_blsp.c

index 679ee2e..cca4e33 100644 (file)
@@ -37,7 +37,7 @@ CONFIG_DRIVER_SOUND_ROUTE=y
 CONFIG_DRIVER_STORAGE_IPQ_40XX=y
 CONFIG_DRIVER_STORAGE_MMC=y
 CONFIG_DRIVER_TPM_SLB9635_I2C=y
-CONFIG_DRIVER_VIDEO_WW_RING=y
+CONFIG_DRIVER_VIDEO_WW_RING=y
 
 CONFIG_HEADLESS=y
 CONFIG_NV_STORAGE_FLASH=y
index 22a51bb..3c14602 100644 (file)
@@ -46,6 +46,7 @@
 #include "drivers/storage/spi_gpt.h"
 #include "drivers/tpm/slb9635_i2c.h"
 #include "drivers/tpm/tpm.h"
+#include "drivers/video/ww_ring.h"
 #include "vboot/callbacks/nvstorage_flash.h"
 #include "vboot/stages.h"
 #include "vboot/util/flag.h"
@@ -429,6 +430,13 @@ static int board_setup(void)
        tpm_set_ops(&new_slb9635_i2c(&i2c->ops, 0x20)->base.ops);
 #endif
 
+       DisplayOps *ww_ring_ops = new_ww_ring_display
+               (&new_ipq40xx_i2c (BLSP_QUP_ID_3)->ops, 0x32);
+
+       display_set_ops(ww_ring_ops);
+
+       display_init();
+
 #if 0
        Ipq806xSound *sound = new_ipq806x_sound(new_storm_dac_gpio_output(),
                        48000, 2, 16, 1000);
index 3457b9a..0b7ffc5 100644 (file)
 #define GPIO_FUNC_SCL  0x1
 #define GPIO_FUNC_SDA  0x1
 
+#define SCL_GPIO_I2C1       34
+#define SDA_GPIO_I2C1       35
+#define GPIO_I2C1_FUNC_SCL  0x1
+#define GPIO_I2C1_FUNC_SDA  0x1
+
 int blsp_init_board(blsp_qup_id_t id)
 {
        switch (id) {
@@ -55,6 +60,12 @@ int blsp_init_board(blsp_qup_id_t id)
                gpio_tlmm_config_set(SCL_GPIO, GPIO_FUNC_SCL,
                        GPIO_NO_PULL, GPIO_2MA, 1);
 
+               /* Configure GPIOs 34 - SCL, 35 - SDA, 2mA gpio_en */
+               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);
+
                break;
        default:
                return 1;