aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/gru/mainboard.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2017-12-08 16:42:59 -0800
committerJulius Werner <jwerner@chromium.org>2017-12-11 19:03:45 +0000
commit5598db254fe34cb9b3557fcfba915d90725bf173 (patch)
tree7b9f70d83c829c68f1ee92657b12f2cf05a6052b /src/mainboard/google/gru/mainboard.c
parentef935f04e0c65d48424b80040741a7c8745368b8 (diff)
google/gru: Stop mucking with unused I2S0 pins in codec config
Due to a schematic error, our code was written to configure more I2S0 pins than are actually used. We're also pinmuxing the whole bank of pins over to the I2S controller even though we don't need them all. Restrict the GPIO initialization and pinmuxing to the pins we really need so the other ones can be correctly used as SKU ID pins on Scarlet. Also, move the "audio" IO voltage domain selection to the other such selections in the bootblock, since that covers two whole banks of GPIOs and there's no guarantee that they're all used for audio (and thus not needed before ramstage). BUG=b:69373077 TEST=Booted Scarlet, confirmed correct SKU ID (7) was detected on rev2. Change-Id: I9314617e725fe83d254984529f269d4442e736f1 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/22791 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Schneider <dnschneid@chromium.org>
Diffstat (limited to 'src/mainboard/google/gru/mainboard.c')
-rw-r--r--src/mainboard/google/gru/mainboard.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 9a241f59ad..1a24862184 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -218,18 +218,13 @@ static void configure_codec(void)
gpio_input(GPIO(3, D, 1)); /* I2S0_RX remove pull-up */
gpio_input(GPIO(3, D, 2)); /* I2S0_TX remove pull-up */
gpio_input(GPIO(3, D, 3)); /* I2S0_SDI0 remove pull-up */
- gpio_input(GPIO(3, D, 4)); /* I2S0_SDI1 remove pull-up */
- /* GPIO3_D5 (I2S0_SDI2SDO2) not connected */
- gpio_input(GPIO(3, D, 6)); /* I2S0_SDO1 remove pull-up */
+ /* GPIOs 3_D4 - 3_D6 not used for I2S and are SKU ID pins on Scarlet. */
gpio_input(GPIO(3, D, 7)); /* I2S0_SDO0 remove pull-up */
gpio_input(GPIO(4, A, 0)); /* I2S0_MCLK remove pull-up */
- write32(&rk3399_grf->iomux_i2s0, IOMUX_I2S0);
+ write32(&rk3399_grf->iomux_i2s0, IOMUX_I2S0_SD0);
write32(&rk3399_grf->iomux_i2sclk, IOMUX_I2SCLK);
- /* AUDIO IO domain 1.8V voltage selection */
- write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 1));
-
if (!IS_ENABLED(CONFIG_GRU_BASEBOARD_SCARLET))
gpio_output(GPIO_P18V_AUDIO_PWREN, 1);
gpio_output(GPIO_SPK_PA_EN, 0);