Tzung-Bi Shih has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: google/asurada: support beep ......................................................................
google/asurada: support beep
Supports beep.
Signed-off-by: Tzung-Bi Shih tzungbi@chromium.org Change-Id: If595657bbddad85bc9a154b3648bae1190cb00b5 --- M src/mainboard/google/asurada/chromeos.c M src/mainboard/google/asurada/gpio.h M src/mainboard/google/asurada/mainboard.c 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/49135/1
diff --git a/src/mainboard/google/asurada/chromeos.c b/src/mainboard/google/asurada/chromeos.c index a57392b..56a1084 100644 --- a/src/mainboard/google/asurada/chromeos.c +++ b/src/mainboard/google/asurada/chromeos.c @@ -15,6 +15,7 @@ gpio_input_pullup(GPIO_H1_AP_INT); gpio_input_pullup(GPIO_SD_CD); gpio_output(GPIO_RESET, 0); + gpio_output(GPIO_EN_SPK_AMP, 0); }
void fill_lb_gpios(struct lb_gpios *gpios) @@ -24,6 +25,7 @@ {GPIO_EC_AP_INT.id, ACTIVE_LOW, -1, "EC interrupt"}, {GPIO_H1_AP_INT.id, ACTIVE_HIGH, -1, "TPM interrupt"}, {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)); } diff --git a/src/mainboard/google/asurada/gpio.h b/src/mainboard/google/asurada/gpio.h index 90de583..ae34d33 100644 --- a/src/mainboard/google/asurada/gpio.h +++ b/src/mainboard/google/asurada/gpio.h @@ -14,6 +14,8 @@ #define GPIO_SD_CD GPIO(EINT17) /* AP_EC_WARM_RST_REQ */ #define GPIO_RESET GPIO(CAM_PDN2) +/* EN_SPK */ +#define GPIO_EN_SPK_AMP GPIO(CAM_PDN1)
void setup_chromeos_gpios(void);
diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c index f836724..9de8d1c 100644 --- a/src/mainboard/google/asurada/mainboard.c +++ b/src/mainboard/google/asurada/mainboard.c @@ -193,10 +193,23 @@ 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) { configure_emmc(); configure_sdcard(); + configure_audio(); setup_usb_host();
register_reset_to_bl31();
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: google/asurada: support beep ......................................................................
Patch Set 1:
(3 comments)
This patch looks fine. I think we can start reviewing it.
https://review.coreboot.org/c/coreboot/+/49135/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/49135/1//COMMIT_MSG@7 PS1, Line 7: google/asurada: support beep mb/google/asurada: Support beep sound
https://review.coreboot.org/c/coreboot/+/49135/1//COMMIT_MSG@10 PS1, Line 10: BUG=b:176856418
https://review.coreboot.org/c/coreboot/+/49135/1/src/mainboard/google/asurad... File src/mainboard/google/asurada/mainboard.c:
https://review.coreboot.org/c/coreboot/+/49135/1/src/mainboard/google/asurad... PS1, Line 198: * Need a space
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49135
to look at the new patch set (#2).
Change subject: mb/google/asurada: Support audio ......................................................................
mb/google/asurada: Support audio
- Turns audio-related things power on. - Selects I2S pin-muxing. - Exposes GPIO "speaker enable" for switching on and off.
Signed-off-by: Tzung-Bi Shih tzungbi@chromium.org Change-Id: If595657bbddad85bc9a154b3648bae1190cb00b5 --- M src/mainboard/google/asurada/chromeos.c M src/mainboard/google/asurada/gpio.h M src/mainboard/google/asurada/mainboard.c 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/49135/2
Attention is currently required from: Tzung-Bi Shih, Yu-Ping Wu. Tzung-Bi Shih has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: mb/google/asurada: Support audio ......................................................................
Patch Set 2:
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49135/comment/d103f71c_020d2395 PS1, Line 7: google/asurada: support beep
mb/google/asurada: Support beep sound
Done. I changed it a bit.
https://review.coreboot.org/c/coreboot/+/49135/comment/d4bb7026_8b96288f PS1, Line 10:
BUG=b:176856418
NACK, this is coreboot upstream, IIUC, BUG= shouldn't require.
File src/mainboard/google/asurada/mainboard.c:
https://review.coreboot.org/c/coreboot/+/49135/comment/b88e083a_6811e87e PS1, Line 198: *
Need a space
Done
Attention is currently required from: Tzung-Bi Shih, Yu-Ping Wu. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: mb/google/asurada: Support audio ......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49135/comment/1b7c15cb_c395ac62 PS1, Line 10:
this is coreboot upstream, IIUC, BUG= shouldn't require.
It's true this is coreboot upstream, but actually we usually also put BUG= here, and I think they don't mind 😊
Patchset:
PS2: Do you have any dependency on other changes that are not merged yet?
If no, I'd recommend rebasing this to master head (not coreboot tot) so we can merge this earlier.
Attention is currently required from: Tzung-Bi Shih, Yu-Ping Wu. Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49135
to look at the new patch set (#3).
Change subject: mb/google/asurada: Support audio ......................................................................
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 --- M src/mainboard/google/asurada/chromeos.c M src/mainboard/google/asurada/gpio.h M src/mainboard/google/asurada/mainboard.c 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/49135/3
Attention is currently required from: Hung-Te Lin, Yu-Ping Wu. Tzung-Bi Shih has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: mb/google/asurada: Support audio ......................................................................
Patch Set 3:
(2 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49135/comment/d3e8cd0b_573b3d0f PS1, Line 10:
this is coreboot upstream, IIUC, BUG= shouldn't require. […]
Done. (And not too surprise: it doesn't come out with hyperlink)
Patchset:
PS3: There is no further dependency. Rebase to the latest master head for merging.
Attention is currently required from: Tzung-Bi Shih, Hung-Te Lin. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: mb/google/asurada: Support audio ......................................................................
Patch Set 3: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49135/comment/60416833_6e917ece PS1, Line 10:
Done. […]
Yes, I know it won't become a link, but it will be in the downstream CL. Also we'd like the chromium CL to appear in the issue.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49135 )
Change subject: mb/google/asurada: Support audio ......................................................................
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 --- M src/mainboard/google/asurada/chromeos.c M src/mainboard/google/asurada/gpio.h M src/mainboard/google/asurada/mainboard.c 3 files changed, 17 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/mainboard/google/asurada/chromeos.c b/src/mainboard/google/asurada/chromeos.c index a57392b..56a1084 100644 --- a/src/mainboard/google/asurada/chromeos.c +++ b/src/mainboard/google/asurada/chromeos.c @@ -15,6 +15,7 @@ gpio_input_pullup(GPIO_H1_AP_INT); gpio_input_pullup(GPIO_SD_CD); gpio_output(GPIO_RESET, 0); + gpio_output(GPIO_EN_SPK_AMP, 0); }
void fill_lb_gpios(struct lb_gpios *gpios) @@ -24,6 +25,7 @@ {GPIO_EC_AP_INT.id, ACTIVE_LOW, -1, "EC interrupt"}, {GPIO_H1_AP_INT.id, ACTIVE_HIGH, -1, "TPM interrupt"}, {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)); } diff --git a/src/mainboard/google/asurada/gpio.h b/src/mainboard/google/asurada/gpio.h index 90de583..ae34d33 100644 --- a/src/mainboard/google/asurada/gpio.h +++ b/src/mainboard/google/asurada/gpio.h @@ -14,6 +14,8 @@ #define GPIO_SD_CD GPIO(EINT17) /* AP_EC_WARM_RST_REQ */ #define GPIO_RESET GPIO(CAM_PDN2) +/* EN_SPK */ +#define GPIO_EN_SPK_AMP GPIO(CAM_PDN1)
void setup_chromeos_gpios(void);
diff --git a/src/mainboard/google/asurada/mainboard.c b/src/mainboard/google/asurada/mainboard.c index f836724..812cb00 100644 --- a/src/mainboard/google/asurada/mainboard.c +++ b/src/mainboard/google/asurada/mainboard.c @@ -193,10 +193,23 @@ 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) { configure_emmc(); configure_sdcard(); + configure_audio(); setup_usb_host();
register_reset_to_bl31();