diff options
author | Tony Huang <tony-huang@quanta.corp-partner.google.com> | 2021-06-02 14:00:49 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-06-07 11:36:10 +0000 |
commit | 66713d0cc980c4c6fc0f1f5ac5a2563f54a8b897 (patch) | |
tree | cb742fb32785aac4b518ff5a2ccdbbbe970f7ae6 /src/mainboard | |
parent | 6b4b4a8349209b4131f4524823c392bec64c7418 (diff) |
mb/google/dedede/var/kracko: Add P-sensor support
Configure GPIO D22/D23/E11.
Add P-sensor to device tree, these registers are draft version.
BUG=b:178092096
BRANCH=dedede
TEST=built firmware and dmesg shows STH9324 initial success.
Change-Id: I2c8feedd6efc1a471304322a17480c836e22349e
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/dedede/variants/kracko/gpio.c | 7 | ||||
-rw-r--r-- | src/mainboard/google/dedede/variants/kracko/overridetree.cb | 53 |
2 files changed, 60 insertions, 0 deletions
diff --git a/src/mainboard/google/dedede/variants/kracko/gpio.c b/src/mainboard/google/dedede/variants/kracko/gpio.c index ca89730640..b4c00bdd3a 100644 --- a/src/mainboard/google/dedede/variants/kracko/gpio.c +++ b/src/mainboard/google/dedede/variants/kracko/gpio.c @@ -13,6 +13,13 @@ static const struct pad_config gpio_table[] = { /* D0 : WWAN_HOST_WAKE ==> WWAN_WDISABLE_L */ PAD_CFG_GPO(GPP_D0, 1, DEEP), + /* D22 : AP_I2C_SUB_SDA*/ + PAD_CFG_NF(GPP_D22, NONE, DEEP, NF1), + /* D23 : AP_I2C_SUB_SCL */ + PAD_CFG_NF(GPP_D23, NONE, DEEP, NF1), + + /* E11 : AP_I2C_SUB_INT_ODL */ + PAD_CFG_GPI_APIC(GPP_E11, NONE, PLTRST, LEVEL, NONE), /* H17 : WWAN_RST_L */ PAD_CFG_GPO(GPP_H17, 0, PLTRST), diff --git a/src/mainboard/google/dedede/variants/kracko/overridetree.cb b/src/mainboard/google/dedede/variants/kracko/overridetree.cb index 66fb2747fd..3d9307bed9 100644 --- a/src/mainboard/google/dedede/variants/kracko/overridetree.cb +++ b/src/mainboard/google/dedede/variants/kracko/overridetree.cb @@ -136,6 +136,59 @@ chip soc/intel/jasperlake device i2c 1a on end end end #I2C 4 + device pci 19.1 on + chip drivers/i2c/sx9324 + register "desc" = ""SAR Proximity Sensor"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E11_IRQ)" + register "uid" = "2" + register "reg_gnrl_ctrl0" = "0x0a" + register "reg_gnrl_ctrl1" = "0x22" + register "reg_afe_ctrl0" = "0x20" + register "reg_afe_ctrl3" = "0x01" + register "reg_afe_ctrl4" = "0x47" + register "reg_afe_ctrl6" = "0x00" + register "reg_afe_ctrl7" = "0x47" + register "reg_afe_ctrl8" = "0x12" + register "reg_afe_ctrl9" = "0x0f" + register "reg_afe_ph0" = "0x37" + register "reg_afe_ph1" = "0x29" + register "reg_afe_ph2" = "0x1f" + register "reg_afe_ph3" = "0x3d" + register "reg_prox_ctrl0" = "0x0b" + register "reg_prox_ctrl1" = "0x0b" + register "reg_prox_ctrl2" = "0x20" + register "reg_prox_ctrl3" = "0x20" + register "reg_prox_ctrl4" = "0x0c" + register "reg_prox_ctrl5" = "0x00" + register "reg_prox_ctrl6" = "0x2d" + register "reg_prox_ctrl7" = "0xc0" + register "reg_adv_ctrl0" = "0x00" + register "reg_adv_ctrl1" = "0x00" + register "reg_adv_ctrl2" = "0x00" + register "reg_adv_ctrl3" = "0x00" + register "reg_adv_ctrl4" = "0x00" + register "reg_adv_ctrl5" = "0x05" + register "reg_adv_ctrl6" = "0x00" + register "reg_adv_ctrl7" = "0x00" + register "reg_adv_ctrl8" = "0x00" + register "reg_adv_ctrl9" = "0x00" + register "reg_adv_ctrl10" = "0x00" + register "reg_adv_ctrl11" = "0x00" + register "reg_adv_ctrl12" = "0x00" + register "reg_adv_ctrl13" = "0x00" + register "reg_adv_ctrl14" = "0x80" + register "reg_adv_ctrl15" = "0x0c" + register "reg_adv_ctrl16" = "0x04" + register "reg_adv_ctrl17" = "0x70" + register "reg_adv_ctrl18" = "0x40" + register "reg_adv_ctrl19" = "0x00" + register "reg_adv_ctrl20" = "0x00" + register "reg_irq_cfg0" = "0x00" + register "reg_irq_cfg1" = "0x80" + register "reg_irq_cfg2" = "0x00" + device i2c 28 on end + end + end # I2C 5 device pci 1f.3 on chip drivers/generic/max98357a register "hid" = ""MX98360A"" |