From e8ee6f975b255c41102d1549ebdb69cfb2aa7850 Mon Sep 17 00:00:00 2001 From: vsujithk Date: Mon, 27 Jan 2020 17:47:31 +0530 Subject: [PATCH] sc7180: GPIO: Add I2S configuration for sc7180 Configuring GPIO Pins as I2S mode for Audio speaker. Change-Id: I681aa6d0d57671b0fd9b7bc88de6f2cc202a7af0 Signed-off-by: V Sujith Kumar Reddy Reviewed-on: https://review.coreboot.org/c/coreboot/+/38593 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/mainboard/google/trogdor/board.h | 4 +++- src/mainboard/google/trogdor/chromeos.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mainboard/google/trogdor/board.h b/src/mainboard/google/trogdor/board.h index fa2fb9f5de..63d03db51c 100644 --- a/src/mainboard/google/trogdor/board.h +++ b/src/mainboard/google/trogdor/board.h @@ -11,7 +11,9 @@ #define GPIO_AP_EC_INT GPIO(94) #define GPIO_AP_SUSPEND GPIO(20) #define GPIO_WP_STATE GPIO(42) -#define GPIO_H1_AP_INT GPIO(21) +#define GPIO_H1_AP_INT (CONFIG(TROGDOR_REV0) ? GPIO(21) : GPIO(42)) +#define GPIO_SD_CD_L GPIO(69) +#define GPIO_AMP_ENABLE GPIO(23) void setup_chromeos_gpios(void); diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c index 985ba0f85e..324d6ca8b9 100644 --- a/src/mainboard/google/trogdor/chromeos.c +++ b/src/mainboard/google/trogdor/chromeos.c @@ -28,6 +28,10 @@ void fill_lb_gpios(struct lb_gpios *gpios) "EC interrupt"}, {GPIO_H1_AP_INT.addr, ACTIVE_LOW, gpio_get(GPIO_H1_AP_INT), "TPM interrupt"}, + {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"}, }; lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));