Sathya Prakash M R has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31280
Change subject: mb/google/hatch: Enable Audio support ......................................................................
mb/google/hatch: Enable Audio support
Following changes are done to enable Audio support on hatch 1. Enable I2C4 device at 400Khz at 3.3V 2. Configure GPIO for HP INT and SPEAKER EN 3. Add ACPI entry for RT5682 4. Enable DMIC, I2S0 and I2S1 lines.
BUG=b:123738217 BRANCH=none TEST=check SSDT table for RT5682 entry. verify audio over SOF.
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 2 files changed, 46 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/1
diff --git a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb index eb528f2..6d0ea04 100644 --- a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb @@ -27,6 +27,7 @@ #| | before memory is up | #| I2C0 | Touchpad | #| I2C1 | Touch screen | + #| I2C4 | Audio | #+-------------------+---------------------------+ register "common_soc_config" = "{ .gspi[0] = { @@ -39,6 +40,9 @@ .i2c[1] = { .speed = I2C_SPEED_FAST, }, + .i2c[4] = { + .speed = I2C_SPEED_FAST, + }, }"
# FSP configuration @@ -92,6 +96,12 @@ register "PcieClkSrcUsage[3]" = "13" register "PcieClkSrcClkReq[3]" = "3"
+ #Enable I2S Audio, SSP0, SSP1 and DMIC0 + register "PchHdaDspEnable" = "1" + register "PchHdaAudioLinkSsp0" = "1" + register "PchHdaAudioLinkSsp1" = "1" + register "PchHdaAudioLinkDmic0" = "1" + device cpu_cluster 0 on device lapic 0 on end end @@ -223,7 +233,21 @@ device pci 16.4 off end # Management Engine Interface 3 device pci 16.5 off end # Management Engine Interface 4 device pci 17.0 on end # SATA - device pci 19.0 on end # I2C #4 + device pci 19.0 on + chip drivers/i2c/generic + register "hid" = ""10EC5682"" + register "name" = ""RT58"" + register "desc" = ""Realtek RT5682"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_H0_IRQ)" + register "probed" = "1" + register "property_count" = "1" + # Set the jd_src to RT5668_JD1 for jack detection + register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" + register "property_list[0].name" = ""realtek,jd-src"" + register "property_list[0].integer" = "1" + device i2c 1a on end + end + end #I2C #4 device pci 19.1 off end # I2C #5 device pci 19.2 off end # UART #2 device pci 1a.0 off end # eMMC @@ -264,7 +288,13 @@ end # eSPI Interface device pci 1f.1 on end # P2SB device pci 1f.2 on end # Power Management Controller - device pci 1f.3 off end # Intel HDA + device pci 1f.3 on + chip drivers/generic/max98357a + register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)" + register "sdmode_delay" = "5" + device generic 0 on end + end + end # Intel HDA device pci 1f.4 on end # SMBus device pci 1f.5 on end # PCH SPI device pci 1f.6 off end # GbE diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c index f8d5d7d..5820af7 100644 --- a/src/mainboard/google/hatch/variants/baseboard/gpio.c +++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c @@ -65,6 +65,10 @@ PAD_CFG_NF(GPP_C18, NONE, DEEP, NF1), /* PCH_I2C_TOUCHSCREEN_SCL */ PAD_CFG_NF(GPP_C19, NONE, DEEP, NF1), + /* PCH_I2C_AUDIO_SDA */ + PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), + /* PCH_I2C_AUDIO_SCL */ + PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), /* PCH_WP_OD */ PAD_CFG_GPI(GPP_C20, NONE, DEEP), /* H1_PCH_INT_ODL */ @@ -143,6 +147,16 @@ PAD_CFG_NF(GPP_G6, NONE, DEEP, NF1), /* SD_WP => NC */ PAD_NC(GPP_G7, DN_20K), + /*AUDIO IRQ*/ + PAD_CFG_GPI_APIC(GPP_H0, NONE, PLTRST, LEVEL, INVERT), + /*SPEAKER SD MODE ENABLE*/ + PAD_CFG_GPO(GPP_H3, 0, DEEP), + /* DMIC_CLK_0_SNDW4_CLK */ + PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), + /* DMIC_DATA_0_SNDW4_DATA */ + PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1), + /* SPP_MCLK */ + PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1),
/* PCH_I2C_PEN_SDA */ PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1),
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 1:
(5 comments)
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... PS1, Line 69: PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), code indent should use tabs where possible
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... PS1, Line 69: PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), please, no spaces at the start of a line
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... PS1, Line 70: /* PCH_I2C_AUDIO_SCL */ code indent should use tabs where possible
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... PS1, Line 71: PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), code indent should use tabs where possible
https://review.coreboot.org/#/c/31280/1/src/mainboard/google/hatch/variants/... PS1, Line 71: PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), please, no spaces at the start of a line
Hello Rizwan Qureshi, V Sowmya, build bot (Jenkins), HARSHAPRIYA N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#2).
Change subject: mb/google/hatch: Enable Audio support ......................................................................
mb/google/hatch: Enable Audio support
Following changes are done to enable Audio support on hatch 1. Enable I2C4 device at 400Khz at 3.3V 2. Configure GPIO for HP INT and SPEAKER EN 3. Add ACPI entry for RT5682 4. Enable DMIC, I2S0 and I2S1 lines.
BUG=b:123738217 BRANCH=none TEST=check SSDT table for RT5682 entry. verify audio over SOF.
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 2 files changed, 46 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/2
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 2:
patch set #2 : fixed styling error identified
Sathyanarayana Nujella has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 2: Code-Review+1
V Sowmya has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 2: Code-Review+1
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 2: Code-Review-1
Found speaker SSDT not populated. will fix that and post patch set #3
Hello Rizwan Qureshi, V Sowmya, Sathyanarayana Nujella, build bot (Jenkins), HARSHAPRIYA N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#3).
Change subject: mb/google/hatch: Enable Audio support ......................................................................
mb/google/hatch: Enable Audio support
Following changes are done to enable Audio support on hatch 1. Enable I2C4 device at 400Khz at 3.3V 2. Configure GPIO for HP INT and SPEAKER EN 3. Add ACPI entry for RT5682 4. Enable DMIC, I2S0 and I2S1 lines. 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=check SSDT table for RT5682 entry. verify audio over SOF.
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 47 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/3
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 3: Code-Review+1
Fixed the missing SSDT entry for speaker. Now this is good to go.
Rizwan Qureshi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/31280/3/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/3/src/mainboard/google/hatch/variants/... PS3, Line 150: /*AUDIO IRQ*/ nit: add space
https://review.coreboot.org/#/c/31280/3/src/mainboard/google/hatch/variants/... PS3, Line 151: INVERT please refer the changes here https://review.coreboot.org/c/coreboot/+/31328/5/src/mainboard/google/hatch/... You will have to do similar for an active low interrupt. Also add a todo.
https://review.coreboot.org/#/c/31280/3/src/mainboard/google/hatch/variants/... PS3, Line 152: /*SPEAKER SD MODE ENABLE*/ nit: add space
Hello Rizwan Qureshi, Shelley Chen, V Sowmya, Sathyanarayana Nujella, build bot (Jenkins), HARSHAPRIYA N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#4).
Change subject: mb/google/hatch: Enable Audio support ......................................................................
mb/google/hatch: Enable Audio support
Following changes are done to enable Audio support on hatch 1. Enable I2C4 device at 400Khz at 3.3V 2. Configure GPIO for HP INT and SPEAKER EN 3. Add ACPI entry for RT5682 4. Enable DMIC, I2S0 and I2S1 lines. 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=check SSDT table for RT5682 entry. verify audio over SOF.
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 51 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/4
Sathyanarayana Nujella has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/#/c/31280/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31280/4//COMMIT_MSG@18 PS4, Line 18: =check SSDT table for Please add TEST=...for SSDT entry to maxim too..
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/#/c/31280/4/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31280/4/src/mainboard/google/hatch/variants/... PS4, Line 242: register "probed" = "1" Why is probed required here?
https://review.coreboot.org/#/c/31280/4/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/4/src/mainboard/google/hatch/variants/... PS4, Line 68: /* PCH_I2C_AUDIO_SDA */ : PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), : /* PCH_I2C_AUDIO_SCL */ : PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), Can we please place these along with rest of the GPP_H?
https://review.coreboot.org/#/c/31280/4/src/mainboard/google/hatch/variants/... PS4, Line 155: PAD_CFG_GPI_APIC(GPP_H0, NONE, PLTRST, LEVEL, NONE), : /* SPEAKER SD MODE ENABLE */ : PAD_CFG_GPO(GPP_H3, 0, DEEP), : /* DMIC_CLK_0_SNDW4_CLK */ : PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), : /* DMIC_DATA_0_SNDW4_DATA */ : PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1), : /* SPP_MCLK */ : PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1), Can we please order these according to GPP groups?
Hello Rizwan Qureshi, Sathyanarayana Nujella, Shelley Chen, V Sowmya, build bot (Jenkins), HARSHAPRIYA N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#5).
Change subject: mb/google/hatch: Enable Audio support ......................................................................
mb/google/hatch: Enable Audio support
Following changes are done to enable Audio support on hatch 1. Enable I2C4 device at 400Khz at 3.3V 2. Configure GPIO for HP INT and SPEAKER EN 3. Add ACPI entry for RT5682 4. Enable DMIC, I2S0 and I2S1 lines. 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=check SSDT table for RT5682 entry. verify audio over SOF.
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 51 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/5
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 5:
(6 comments)
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@10 PS5, Line 10: 3.3V Is this really 3.3V? Its pulled up to 1.8V in schematics.
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/Kconfig File src/mainboard/google/hatch/Kconfig:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/Kconfig@6 PS5, Line 6: DRIVERS_GENERIC_MAX98357A Can you please place this alphabetically before DRIVERS_I2C_GENERIC?
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 247: register "probed" = "1" Probed is not required here.
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 72: /* PCH_I2C_AUDIO_SDA */ : PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), : /* PCH_I2C_AUDIO_SCL */ : PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1), Can you please order these and the pins below as per GPP_* groups?
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 163: * AUDIO IRQ (HP_INT#)
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 168: SPEAKER SD MODE ENABLE Please use net name as comment so that its easier to compare with schematics.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 5:
(5 comments)
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@7 PS5, Line 7: Audio audio
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@9 PS5, Line 9: Audio audio
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@18 PS5, Line 18: check Check
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@19 PS5, Line 19: SOF What is SOF?
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@19 PS5, Line 19: verify Verify
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable Audio support ......................................................................
Patch Set 5:
(6 comments)
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31280/5//COMMIT_MSG@10 PS5, Line 10: 3.3V
Is this really 3.3V? Its pulled up to 1.8V in schematics.
will confirm. thanks for bringing this up
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/Kconfig File src/mainboard/google/hatch/Kconfig:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/Kconfig@6 PS5, Line 6: DRIVERS_GENERIC_MAX98357A
Can you please place this alphabetically before DRIVERS_I2C_GENERIC?
Sure.
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 247: register "probed" = "1"
Probed is not required here.
Yes. i've confirmed that. will update this along with other comments
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 72: /* PCH_I2C_AUDIO_SDA */ : PAD_CFG_NF(GPP_H8, NONE, DEEP, NF1), : /* PCH_I2C_AUDIO_SCL */ : PAD_CFG_NF(GPP_H9, NONE, DEEP, NF1),
Can you please order these and the pins below as per GPP_* groups?
Yes. its pending from previous patch set too. Will fix with other comments.
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 163: * AUDIO IRQ
(HP_INT#)
Sure. will correct.
https://review.coreboot.org/#/c/31280/5/src/mainboard/google/hatch/variants/... PS5, Line 168: SPEAKER SD MODE ENABLE
Please use net name as comment so that its easier to compare with schematics.
Will correct it as suggested.
Hello Rizwan Qureshi, Sathyanarayana Nujella, Shelley Chen, V Sowmya, build bot (Jenkins), Harshapriya N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#6).
Change subject: mb/google/hatch: Enable audio support ......................................................................
mb/google/hatch: Enable audio support
Following changes are done to enable audio support on hatch 1. Enable I2C4 device at 400Khz at 1.8V 2. Configure GPIO for HP INT and SPKR_PA_EN 3. Add ACPI entry for RT5682 and MAX98357A 4. Enable DMIC, I2S0 and I2S1 lines 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=Check SSDT table for RT5682 & MAX98357a entry. Verify audio using Sound Open firmware (SOF)
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 49 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/6
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable audio support ......................................................................
Patch Set 6:
@Furquan , @Paul : addressed all comments. @Rizwan : as per comment in patch set #3, modified the INT configuration.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable audio support ......................................................................
Patch Set 6:
(5 comments)
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 248: register "probed" = "1" This is not required.
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 344: /* : * AUDIO IRQ : * TODO Configure it back to invert mode, when : * ITSS IPCx configuration is fixed in FSP. : */ : PAD_CFG_GPI_APIC(GPP_H0, NONE, PLTRST, LEVEL, NONE), This is already done in line 364
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 351: PAD_CFG_GPO(GPP_H3, 0, DEEP), This is already done in line 370
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 353: PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), : /* DMIC_DATA_0_SNDW4_DATA */ : PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1), This is already done in line 216-218
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 357: PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1), This is already done in line 228
Hello Rizwan Qureshi, Sathyanarayana Nujella, Shelley Chen, V Sowmya, build bot (Jenkins), Harshapriya N, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31280
to look at the new patch set (#7).
Change subject: mb/google/hatch: Enable audio support ......................................................................
mb/google/hatch: Enable audio support
Following changes are done to enable audio support on hatch 1. Enable I2C4 device at 400Khz at 1.8V 2. Configure GPIO for HP INT and SPKR_PA_EN 3. Add ACPI entry for RT5682 and MAX98357A 4. Enable I2S0 and I2S1 lines 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=Check SSDT table for RT5682 & MAX98357a entry. Verify audio using Sound Open firmware (SOF)
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 34 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/31280/7
Sathya Prakash M R has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable audio support ......................................................................
Patch Set 7:
(5 comments)
Fixed comments in v6.
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 248: register "probed" = "1"
This is not required.
Done
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/gpio.c:
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 344: /* : * AUDIO IRQ : * TODO Configure it back to invert mode, when : * ITSS IPCx configuration is fixed in FSP. : */ : PAD_CFG_GPI_APIC(GPP_H0, NONE, PLTRST, LEVEL, NONE),
This is already done in line 364
Done
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 351: PAD_CFG_GPO(GPP_H3, 0, DEEP),
This is already done in line 370
Done
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 353: PAD_CFG_NF(GPP_D19, NONE, DEEP, NF1), : /* DMIC_DATA_0_SNDW4_DATA */ : PAD_CFG_NF(GPP_D20, NONE, DEEP, NF1),
This is already done in line 216-218
Done
https://review.coreboot.org/#/c/31280/6/src/mainboard/google/hatch/variants/... PS6, Line 357: PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1),
This is already done in line 228
Done
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable audio support ......................................................................
Patch Set 7: Code-Review+2
Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31280 )
Change subject: mb/google/hatch: Enable audio support ......................................................................
mb/google/hatch: Enable audio support
Following changes are done to enable audio support on hatch 1. Enable I2C4 device at 400Khz at 1.8V 2. Configure GPIO for HP INT and SPKR_PA_EN 3. Add ACPI entry for RT5682 and MAX98357A 4. Enable I2S0 and I2S1 lines 5. Enable generic max98357a driver in Kconfig
BUG=b:123738217 BRANCH=none TEST=Check SSDT table for RT5682 & MAX98357a entry. Verify audio using Sound Open firmware (SOF)
Change-Id: I93f3917c19cc3f0f8fd7b5e1b4d9b24a59f45f84 Signed-off-by: Sathya Prakash M R sathya.prakash.m.r@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/31280 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb M src/mainboard/google/hatch/variants/baseboard/gpio.c 3 files changed, 34 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig index 2290d8c..7902a04 100644 --- a/src/mainboard/google/hatch/Kconfig +++ b/src/mainboard/google/hatch/Kconfig @@ -2,6 +2,7 @@ config BOARD_GOOGLE_BASEBOARD_HATCH def_bool n select BOARD_ROMSIZE_KB_32768 + select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID select DRIVERS_SPI_ACPI diff --git a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb index e2c3392..16a0ef1 100644 --- a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb @@ -27,6 +27,7 @@ #| | before memory is up | #| I2C0 | Touchpad | #| I2C1 | Touch screen | + #| I2C4 | Audio | #+-------------------+---------------------------+ register "common_soc_config" = "{ .gspi[0] = { @@ -39,6 +40,9 @@ .i2c[1] = { .speed = I2C_SPEED_FAST, }, + .i2c[4] = { + .speed = I2C_SPEED_FAST, + }, }"
# FSP configuration @@ -97,6 +101,12 @@ register "PcieClkSrcUsage[3]" = "13" register "PcieClkSrcClkReq[3]" = "3"
+ #Enable I2S Audio, SSP0, SSP1 and DMIC0 + register "PchHdaDspEnable" = "1" + register "PchHdaAudioLinkSsp0" = "1" + register "PchHdaAudioLinkSsp1" = "1" + register "PchHdaAudioLinkDmic0" = "1" + device cpu_cluster 0 on device lapic 0 on end end @@ -229,7 +239,20 @@ device pci 16.4 off end # Management Engine Interface 3 device pci 16.5 off end # Management Engine Interface 4 device pci 17.0 on end # SATA - device pci 19.0 on end # I2C #4 + device pci 19.0 on + chip drivers/i2c/generic + register "hid" = ""10EC5682"" + register "name" = ""RT58"" + register "desc" = ""Realtek RT5682"" + register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_H0_IRQ)" + register "property_count" = "1" + # Set the jd_src to RT5668_JD1 for jack detection + register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" + register "property_list[0].name" = ""realtek,jd-src"" + register "property_list[0].integer" = "1" + device i2c 1a on end + end + end #I2C #4 device pci 19.1 off end # I2C #5 device pci 19.2 off end # UART #2 device pci 1a.0 off end # eMMC @@ -270,7 +293,13 @@ end # eSPI Interface device pci 1f.1 on end # P2SB device pci 1f.2 on end # Power Management Controller - device pci 1f.3 off end # Intel HDA + device pci 1f.3 on + chip drivers/generic/max98357a + register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)" + register "sdmode_delay" = "5" + device generic 0 on end + end + end # Intel HDA device pci 1f.4 on end # SMBus device pci 1f.5 on end # PCH SPI device pci 1f.6 off end # GbE diff --git a/src/mainboard/google/hatch/variants/baseboard/gpio.c b/src/mainboard/google/hatch/variants/baseboard/gpio.c index 35dd912..091f6b8 100644 --- a/src/mainboard/google/hatch/variants/baseboard/gpio.c +++ b/src/mainboard/google/hatch/variants/baseboard/gpio.c @@ -343,7 +343,7 @@ PAD_NC(GPP_G7, DN_20K),
/* - * H0 : AUDIO IRQ + * H0 : HP_INT_L * TODO Configure it back to invert mode, when * ITSS IPCx configuration is fixed in FSP. */ @@ -352,7 +352,7 @@ PAD_CFG_NF(GPP_H1, NONE, DEEP, NF3), /* H2 : CNV_CLKREQ0 */ PAD_CFG_NF(GPP_H2, NONE, DEEP, NF3), - /* H3 : SPEAKER SD MODE ENABLE */ + /* H3 : SPKR_PA_EN */ PAD_CFG_GPO(GPP_H3, 0, DEEP), /* H4 : PCH_I2C_PEN_SDA */ PAD_NC(GPP_H4, NONE),