Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45565 )
Change subject: mb/google/zork/vilboz: Enable SAR proximity sensor STH9324 ......................................................................
mb/google/zork/vilboz: Enable SAR proximity sensor STH9324
BUG=b:161759253 BRANCH=firmware-zork-13434.B TEST=emerge-zork coreboot chromeos-bootimage firmware log: _SB.I2C2.SEMTECH SX9324: SAR Proximity Sensor at I2C: 02:28 kernel log: INFO kernel: [ 11.238644] sx932x i2c-STH9324:00: initial compensation success
Signed-off-by: Frank Wu frank_wu@compal.corp-partner.google.com Change-Id: I6294ce291365443dd1c4550ba75cb7f33481b889 Reviewed-on: https://review.coreboot.org/c/coreboot/+/45565 Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Kangheui Won khwon@chromium.org Reviewed-by: Sam McNally sammc@google.com Reviewed-by: EricR Lai ericr_lai@compal.corp-partner.google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/variants/vilboz/gpio.c M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 14 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve EricR Lai: Looks good to me, approved Kangheui Won: Looks good to me, but someone else must approve Sam McNally: Looks good to me, approved
diff --git a/src/mainboard/google/zork/variants/vilboz/gpio.c b/src/mainboard/google/zork/variants/vilboz/gpio.c index 91ed61a..6fba0e2 100644 --- a/src/mainboard/google/zork/variants/vilboz/gpio.c +++ b/src/mainboard/google/zork/variants/vilboz/gpio.c @@ -16,6 +16,11 @@ PAD_GPO(GPIO_140, HIGH), };
+static const struct soc_amd_gpio vilboz_gpio_set_stage_ram[] = { + /* P sensor INT */ + PAD_INT(GPIO_40, PULL_NONE, LEVEL_LOW, STATUS_DELIVERY), +}; + const struct soc_amd_gpio *variant_override_gpio_table(size_t *size) { uint32_t board_version; @@ -33,6 +38,6 @@ return bid_1_gpio_set_stage_ram; }
- *size = 0; - return NULL; + *size = ARRAY_SIZE(vilboz_gpio_set_stage_ram); + return vilboz_gpio_set_stage_ram; } diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb index a93beb5..a61c027 100644 --- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb +++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb @@ -142,5 +142,12 @@ register "hid_desc_reg_offset" = "0x20" device i2c 2c on end end + chip drivers/i2c/generic + register "hid" = ""STH9324"" + register "name" = ""SEMTECH SX9324"" + register "desc" = ""SAR Proximity Sensor"" + register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_40)" + device i2c 28 on end + end end end # chip soc/amd/picasso