diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/herobrine/board.h | 5 | ||||
-rw-r--r-- | src/mainboard/google/herobrine/chromeos.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/herobrine/mainboard.c | 13 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/herobrine/board.h b/src/mainboard/google/herobrine/board.h index 0f396bc816..d336bce0ad 100644 --- a/src/mainboard/google/herobrine/board.h +++ b/src/mainboard/google/herobrine/board.h @@ -31,6 +31,11 @@ #define USB_HUB_LDO_EN GPIO(157) #endif +#define GPIO_AMP_ENABLE GPIO(63) +#define GPIO_MI2S1_SCK GPIO(106) +#define GPIO_MI2S1_DATA0 GPIO(107) +#define GPIO_MI2S1_WS GPIO(108) + #define QCOM_SC7280_SKU1 0x0 #define QCOM_SC7280_SKU2 0x1 diff --git a/src/mainboard/google/herobrine/chromeos.c b/src/mainboard/google/herobrine/chromeos.c index 4c37ef129c..b5631fc8b2 100644 --- a/src/mainboard/google/herobrine/chromeos.c +++ b/src/mainboard/google/herobrine/chromeos.c @@ -21,6 +21,7 @@ void setup_chromeos_gpios(void) gpio_output(GPIO_FP_RST_L, 0); gpio_output(GPIO_EN_FP_RAILS, 0); } + gpio_output(GPIO_AMP_ENABLE, 0); } void fill_lb_gpios(struct lb_gpios *gpios) @@ -28,6 +29,8 @@ void fill_lb_gpios(struct lb_gpios *gpios) const struct lb_gpio chromeos_gpios[] = { {GPIO_SD_CD_L.addr, ACTIVE_LOW, gpio_get(GPIO_SD_CD_L), "SD card detect"}, + {GPIO_AMP_ENABLE.addr, ACTIVE_HIGH, gpio_get(GPIO_AMP_ENABLE), + "speaker enable"}, #if CONFIG(EC_GOOGLE_CHROMEEC) {GPIO_EC_IN_RW.addr, ACTIVE_LOW, gpio_get(GPIO_EC_IN_RW), "EC in RW"}, diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c index a97f97ef56..e929ec9365 100644 --- a/src/mainboard/google/herobrine/mainboard.c +++ b/src/mainboard/google/herobrine/mainboard.c @@ -36,6 +36,18 @@ static void configure_sdhci(void) write32((void *)SDC2_TLMM_CFG_ADDR, 0x1FE4); } +static void qi2s_configure_gpios(void) +{ + gpio_configure(GPIO_MI2S1_SCK, GPIO106_FUNC_MI2S1_SCK, + GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT); + + gpio_configure(GPIO_MI2S1_WS, GPIO108_FUNC_MI2S1_WS, + GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT); + + gpio_configure(GPIO_MI2S1_DATA0, GPIO107_FUNC_MI2S1_DATA0, + GPIO_NO_PULL, GPIO_16MA, GPIO_OUTPUT); +} + static void mainboard_init(struct device *dev) { /* Configure clock for eMMC */ @@ -90,6 +102,7 @@ static void mainboard_init(struct device *dev) gpio_output(GPIO_FP_RST_L, 1); setup_usb(); + qi2s_configure_gpios(); } static void mainboard_enable(struct device *dev) |