mb/google/asurada: Support audio
- Turns audio-related things power on. - Selects I2S pin-muxing. - Exposes GPIO "speaker enable" for switching on and off. BUG=b:176856418 Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: If595657bbddad85bc9a154b3648bae1190cb00b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49135 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
3436bb03f6
commit
3f80a7aa6d
|
@ -15,6 +15,7 @@ void setup_chromeos_gpios(void)
|
||||||
gpio_input_pullup(GPIO_H1_AP_INT);
|
gpio_input_pullup(GPIO_H1_AP_INT);
|
||||||
gpio_input_pullup(GPIO_SD_CD);
|
gpio_input_pullup(GPIO_SD_CD);
|
||||||
gpio_output(GPIO_RESET, 0);
|
gpio_output(GPIO_RESET, 0);
|
||||||
|
gpio_output(GPIO_EN_SPK_AMP, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fill_lb_gpios(struct lb_gpios *gpios)
|
void fill_lb_gpios(struct lb_gpios *gpios)
|
||||||
|
@ -24,6 +25,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
|
||||||
{GPIO_EC_AP_INT.id, ACTIVE_LOW, -1, "EC interrupt"},
|
{GPIO_EC_AP_INT.id, ACTIVE_LOW, -1, "EC interrupt"},
|
||||||
{GPIO_H1_AP_INT.id, ACTIVE_HIGH, -1, "TPM interrupt"},
|
{GPIO_H1_AP_INT.id, ACTIVE_HIGH, -1, "TPM interrupt"},
|
||||||
{GPIO_SD_CD.id, ACTIVE_HIGH, -1, "SD card detect"},
|
{GPIO_SD_CD.id, ACTIVE_HIGH, -1, "SD card detect"},
|
||||||
|
{GPIO_EN_SPK_AMP.id, ACTIVE_HIGH, -1, "speaker enable"},
|
||||||
};
|
};
|
||||||
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#define GPIO_SD_CD GPIO(EINT17)
|
#define GPIO_SD_CD GPIO(EINT17)
|
||||||
/* AP_EC_WARM_RST_REQ */
|
/* AP_EC_WARM_RST_REQ */
|
||||||
#define GPIO_RESET GPIO(CAM_PDN2)
|
#define GPIO_RESET GPIO(CAM_PDN2)
|
||||||
|
/* EN_SPK */
|
||||||
|
#define GPIO_EN_SPK_AMP GPIO(CAM_PDN1)
|
||||||
|
|
||||||
void setup_chromeos_gpios(void);
|
void setup_chromeos_gpios(void);
|
||||||
|
|
||||||
|
|
|
@ -193,10 +193,23 @@ static void configure_sdcard(void)
|
||||||
mainboard_enable_regulator(MTK_REGULATOR_VCCQ, enable);
|
mainboard_enable_regulator(MTK_REGULATOR_VCCQ, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void configure_audio(void)
|
||||||
|
{
|
||||||
|
/* Audio PWR */
|
||||||
|
mtcmos_audio_power_on();
|
||||||
|
|
||||||
|
/* SoC I2S */
|
||||||
|
gpio_set_mode(GPIO(I2S3_MCK), PAD_I2S3_MCK_FUNC_I2S3_MCK);
|
||||||
|
gpio_set_mode(GPIO(I2S3_BCK), PAD_I2S3_BCK_FUNC_I2S3_BCK);
|
||||||
|
gpio_set_mode(GPIO(I2S3_LRCK), PAD_I2S3_LRCK_FUNC_I2S3_LRCK);
|
||||||
|
gpio_set_mode(GPIO(I2S3_DO), PAD_I2S3_DO_FUNC_I2S3_DO);
|
||||||
|
}
|
||||||
|
|
||||||
static void mainboard_init(struct device *dev)
|
static void mainboard_init(struct device *dev)
|
||||||
{
|
{
|
||||||
configure_emmc();
|
configure_emmc();
|
||||||
configure_sdcard();
|
configure_sdcard();
|
||||||
|
configure_audio();
|
||||||
setup_usb_host();
|
setup_usb_host();
|
||||||
|
|
||||||
register_reset_to_bl31();
|
register_reset_to_bl31();
|
||||||
|
|
Loading…
Reference in New Issue