summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorFrank Wu <frank_wu@compal.corp-partner.google.com>2020-09-21 15:25:19 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-10-26 06:44:58 +0000
commitfc66ab6959e7c9d9b8edc87d39a05f6a5103d2ef (patch)
tree14a1cac2199d4a02d69116c65bc7cee99129987c /src/mainboard/google
parent92f46aaac7104c62ab3956dc32af5ccbddc944f1 (diff)
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>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/zork/variants/vilboz/gpio.c9
-rw-r--r--src/mainboard/google/zork/variants/vilboz/overridetree.cb7
2 files changed, 14 insertions, 2 deletions
diff --git a/src/mainboard/google/zork/variants/vilboz/gpio.c b/src/mainboard/google/zork/variants/vilboz/gpio.c
index 91ed61a5c2..6fba0e2595 100644
--- a/src/mainboard/google/zork/variants/vilboz/gpio.c
+++ b/src/mainboard/google/zork/variants/vilboz/gpio.c
@@ -16,6 +16,11 @@ static const struct soc_amd_gpio bid_1_gpio_set_stage_ram[] = {
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 @@ const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
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 a93beb5bd8..a61c027156 100644
--- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb
+++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb
@@ -142,5 +142,12 @@ chip soc/amd/picasso
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