Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40944 )
Change subject: mainboard/google/kahlee: Add hook for early wlan rst gpio init ......................................................................
mainboard/google/kahlee: Add hook for early wlan rst gpio init
Base on the grunt board schematic, gpio70 is an alternative way for wlan rst. Add hook for variants to override default state.
BUG=b:154357210,b:154848243 BRANCH=master TEST=emerge-grunt coreboot Signed-off-by: Kevin Chiu Kevin.Chiu@quantatw.com Change-Id: Ic3f1c016357dd5090e6adedf96e7593abff29a0c Reviewed-on: https://review.coreboot.org/c/coreboot/+/40944 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com --- M src/mainboard/google/kahlee/bootblock/bootblock.c M src/mainboard/google/kahlee/variants/baseboard/gpio.c M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h 3 files changed, 16 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/src/mainboard/google/kahlee/bootblock/bootblock.c b/src/mainboard/google/kahlee/bootblock/bootblock.c index 613b35b..338edfd 100644 --- a/src/mainboard/google/kahlee/bootblock/bootblock.c +++ b/src/mainboard/google/kahlee/bootblock/bootblock.c @@ -17,6 +17,9 @@ /* Enable the EC as soon as we have visibility */ mainboard_ec_init();
+ gpios = variant_wlan_rst_early_gpio_table(&num_gpios); + program_gpios(gpios, num_gpios); + gpios = variant_early_gpio_table(&num_gpios); program_gpios(gpios, num_gpios); } diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c index 4fb60b1..fe0744a 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c +++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c @@ -42,9 +42,6 @@ /* GPIO_40 - EMMC_BRIDGE_RST */ PAD_GPO(GPIO_40, LOW),
- /* GPIO_70 - WLAN_PE_RST_L */ - PAD_GPO(GPIO_70, HIGH), - /* GPIO_74 - LPC_CLK0_EC_R */ PAD_NF(GPIO_74, LPCCLK0, PULL_DOWN),
@@ -77,6 +74,11 @@ PAD_GPI(GPIO_142, PULL_NONE), };
+static const struct soc_amd_gpio gpio_wlan_rst_early_reset[] = { + /* GPIO_70 - WLAN_PE_RST_L */ + PAD_GPO(GPIO_70, HIGH), +}; + static const struct soc_amd_gpio gpio_set_stage_rom[] = { /* GPIO_133 - APU_EDP_BKLTEN_L (backlight - Active LOW) */ PAD_GPO(GPIO_133, HIGH), @@ -248,6 +250,13 @@ }
const __weak +struct soc_amd_gpio *variant_wlan_rst_early_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(gpio_wlan_rst_early_reset); + return gpio_wlan_rst_early_reset; +} + +const __weak struct soc_amd_gpio *variant_romstage_gpio_table(size_t *size) { *size = ARRAY_SIZE(gpio_set_stage_rom); diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h index 02d413f..8b78992 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h @@ -16,6 +16,7 @@ int variant_get_xhci_oc_map(uint16_t *usb_oc_map); int variant_get_ehci_oc_map(uint16_t *usb_oc_map); const struct soc_amd_gpio *variant_early_gpio_table(size_t *size); +const struct soc_amd_gpio *variant_wlan_rst_early_gpio_table(size_t *size); const struct soc_amd_gpio *variant_romstage_gpio_table(size_t *size); const struct soc_amd_gpio *variant_gpio_table(size_t *size); void variant_romstage_entry(int s3_resume);