Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45912 )
Change subject: mb/google/dedede/var/waddledee: Enable GPIO based I2C Multiplexer ......................................................................
mb/google/dedede/var/waddledee: Enable GPIO based I2C Multiplexer
The camera sensor component chosen for UFC and WFC have an address conflict. Resolve it by enabling GPIO based I2C Multiplexer. Also configure the GPIO that is used as select line.
BUG=b:169444894 TEST=Build and boot waddledee to OS. Ensure that the ACPI identifiers are added for I2C devices multiplexed using I2C MUX under the appropriate scope.
Change-Id: I9b09e063b4377587019ade9e6e194f4aadcdd312 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45912 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/dedede/Kconfig M src/mainboard/google/dedede/variants/waddledee/Makefile.inc A src/mainboard/google/dedede/variants/waddledee/gpio.c M src/mainboard/google/dedede/variants/waddledee/overridetree.cb 4 files changed, 32 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index 2892dd1..377702d 100644 --- a/src/mainboard/google/dedede/Kconfig +++ b/src/mainboard/google/dedede/Kconfig @@ -4,6 +4,7 @@ select CR50_USE_LONG_INTERRUPT_PULSES select DPTF_USE_EISA_HID select DRIVERS_I2C_GENERIC + select DRIVERS_I2C_GPIO_MUX select DRIVERS_I2C_HID select DRIVERS_INTEL_DPTF select DRIVERS_SPI_ACPI diff --git a/src/mainboard/google/dedede/variants/waddledee/Makefile.inc b/src/mainboard/google/dedede/variants/waddledee/Makefile.inc index eda535c..93f34f8 100644 --- a/src/mainboard/google/dedede/variants/waddledee/Makefile.inc +++ b/src/mainboard/google/dedede/variants/waddledee/Makefile.inc @@ -2,4 +2,5 @@
romstage-y += memory.c
+ramstage-y += gpio.c ramstage-y += variant.c diff --git a/src/mainboard/google/dedede/variants/waddledee/gpio.c b/src/mainboard/google/dedede/variants/waddledee/gpio.c new file mode 100644 index 0000000..0905e8f --- /dev/null +++ b/src/mainboard/google/dedede/variants/waddledee/gpio.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> + +/* Pad configuration in ramstage*/ +static const struct pad_config gpio_table[] = { + /* E5 : AP_SUB_IO_2 */ + PAD_CFG_GPO(GPP_E5, 0, PLTRST), +}; + +const struct pad_config *variant_override_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(gpio_table); + return gpio_table; +} diff --git a/src/mainboard/google/dedede/variants/waddledee/overridetree.cb b/src/mainboard/google/dedede/variants/waddledee/overridetree.cb index 22a08a0..b67b870 100644 --- a/src/mainboard/google/dedede/variants/waddledee/overridetree.cb +++ b/src/mainboard/google/dedede/variants/waddledee/overridetree.cb @@ -119,6 +119,20 @@ device i2c 0x5d on end end end # I2C 2 + device pci 15.3 on + chip drivers/i2c/gpiomux/mux + register "mux_gpio_count" = "1" + register "mux_gpio[0]" = "ACPI_GPIO_OUTPUT(GPP_E5)" + device generic 0 on + chip drivers/i2c/gpiomux/bus + device generic 0 on end # I2C Mux Bus 0 + end + chip drivers/i2c/gpiomux/bus + device generic 1 on end # I2C Mux Bus 1 + end + end # I2C MUX + end + end # I2C 3 device pci 19.0 on chip drivers/i2c/generic register "hid" = ""10EC5682""