diff options
author | Subrata Banik <subratabanik@google.com> | 2023-09-21 15:49:55 +0530 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-09-22 09:43:34 +0000 |
commit | 4e154a6676a4c38c863eb7e4fb85f20a6fc46334 (patch) | |
tree | 4217bcdbfa35f2df79e4f1e91b9bfec035434954 | |
parent | f0f1a3ca4a6d822a194bf879b71448dd2ac3f6ab (diff) |
mb/google/rex/var/rex0: Add entries for SAR Proximity Sensors
This patch adds ACPI entries for SAR Proximity Sensors as below
SAR1 Sensor:
- SAR1_INT_L : GPP_E00
- I2C5 7-bit address 0x28
SAR2 Sensor:
- SAR2_INT_L : GPP_E08
- I2C 7-bit address 0x2c
BUG=b:297977526
TEST=Able to build and boot google/rex.
w/o this patch:
Total 6 devices are listed below:
> ls -lt /sys/bus/iio/devices/iio:device*
/sys/bus/iio/devices/iio:device5 -> ../../../devices/LNXSYSTM:00/
LNXSYBUS:00/PNP0A08:00/device:07/
/sys/bus/iio/devices/iio:device0 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device2 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device4 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device1 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device3 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
w/ this patch:
Total 8 devices are listed below:
> ls -lt /sys/bus/iio/devices/iio:device*
/sys/bus/iio/devices/iio:device6 -> ../../../devices/pci0000:00/
0000:00:19.1/i2c_designware.4/i2c-
/sys/bus/iio/devices/iio:device5 -> ../../../devices/LNXSYSTM:00/
LNXSYBUS:00/PNP0A08:00/device:07/
/sys/bus/iio/devices/iio:device7 -> ../../../devices/pci0000:00/
0000:00:19.1/i2c_designware.4/i2c-
/sys/bus/iio/devices/iio:device0 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device2 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device4 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device1 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
/sys/bus/iio/devices/iio:device3 -> ../../../devices/pci0000:00/
0000:00:1f.0/PNP0C09:00/GOOG0004:0
Change-Id: I0a518d58915f9f4dbe58a45c4dc5875abbfda135
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78045
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
-rw-r--r-- | src/mainboard/google/rex/Kconfig | 2 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/overridetree.cb | 96 |
2 files changed, 98 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index edec6ac864..3d246681f8 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -52,6 +52,8 @@ config BOARD_GOOGLE_MODEL_REX select CHROMEOS_WIFI_SAR if CHROMEOS select DRIVERS_GENERIC_MAX98357A select DRIVERS_GENESYSLOGIC_GL9755 + select DRIVERS_I2C_SX9324 + select DRIVERS_I2C_SX9324_SUPPORT_LEGACY_LINUX_DRIVER select DRIVERS_INTEL_ISH select DRIVERS_INTEL_SOUNDWIRE select DRIVERS_NXP_UWB_SR1XX diff --git a/src/mainboard/google/rex/variants/rex0/overridetree.cb b/src/mainboard/google/rex/variants/rex0/overridetree.cb index c3c4372668..d92dc24088 100644 --- a/src/mainboard/google/rex/variants/rex0/overridetree.cb +++ b/src/mainboard/google/rex/variants/rex0/overridetree.cb @@ -691,6 +691,102 @@ chip soc/intel/meteorlake probe UFC UFC_MIPI end end + chip drivers/i2c/sx9324 + register "desc" = ""SAR1 Proximity Sensor"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E00_IRQ)" + register "speed" = "I2C_SPEED_FAST" + register "uid" = "1" + register "reg_gnrl_ctrl0" = "0x16" + register "reg_gnrl_ctrl1" = "0x21" + register "reg_afe_ctrl0" = "0x00" + register "reg_afe_ctrl1" = "0x10" + register "reg_afe_ctrl2" = "0x00" + register "reg_afe_ctrl3" = "0x00" + register "reg_afe_ctrl4" = "0x07" + register "reg_afe_ctrl5" = "0x00" + register "reg_afe_ctrl6" = "0x00" + register "reg_afe_ctrl7" = "0x07" + register "reg_afe_ctrl8" = "0x12" + register "reg_afe_ctrl9" = "0x0f" + register "reg_prox_ctrl0" = "0x12" + register "reg_prox_ctrl1" = "0x12" + register "reg_prox_ctrl2" = "0x90" + register "reg_prox_ctrl3" = "0x60" + register "reg_prox_ctrl4" = "0x0c" + register "reg_prox_ctrl5" = "0x12" + register "reg_prox_ctrl6" = "0x3c" + register "reg_prox_ctrl7" = "0x58" + 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" = "0x5c" + register "reg_adv_ctrl11" = "0x52" + register "reg_adv_ctrl12" = "0xb5" + register "reg_adv_ctrl13" = "0x00" + register "reg_adv_ctrl14" = "0x80" + register "reg_adv_ctrl15" = "0x0c" + register "reg_adv_ctrl16" = "0x38" + register "reg_adv_ctrl17" = "0x56" + register "reg_adv_ctrl18" = "0x33" + register "reg_adv_ctrl19" = "0xf0" + register "reg_adv_ctrl20" = "0xf0" + device i2c 28 on end + end + chip drivers/i2c/sx9324 + register "desc" = ""SAR2 Proximity Sensor"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E08_IRQ)" + register "speed" = "I2C_SPEED_FAST" + register "uid" = "2" + register "reg_gnrl_ctrl0" = "0x16" + register "reg_gnrl_ctrl1" = "0x21" + register "reg_afe_ctrl0" = "0x00" + register "reg_afe_ctrl1" = "0x10" + register "reg_afe_ctrl2" = "0x00" + register "reg_afe_ctrl3" = "0x00" + register "reg_afe_ctrl4" = "0x07" + register "reg_afe_ctrl5" = "0x00" + register "reg_afe_ctrl6" = "0x00" + register "reg_afe_ctrl7" = "0x07" + register "reg_afe_ctrl8" = "0x12" + register "reg_afe_ctrl9" = "0x0f" + register "reg_prox_ctrl0" = "0x12" + register "reg_prox_ctrl1" = "0x12" + register "reg_prox_ctrl2" = "0x90" + register "reg_prox_ctrl3" = "0x60" + register "reg_prox_ctrl4" = "0x0c" + register "reg_prox_ctrl5" = "0x12" + register "reg_prox_ctrl6" = "0x3c" + register "reg_prox_ctrl7" = "0x58" + 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" = "0x5c" + register "reg_adv_ctrl11" = "0x52" + register "reg_adv_ctrl12" = "0xb5" + register "reg_adv_ctrl13" = "0x00" + register "reg_adv_ctrl14" = "0x80" + register "reg_adv_ctrl15" = "0x0c" + register "reg_adv_ctrl16" = "0x38" + register "reg_adv_ctrl17" = "0x56" + register "reg_adv_ctrl18" = "0x33" + register "reg_adv_ctrl19" = "0xf0" + register "reg_adv_ctrl20" = "0xf0" + device i2c 2C on end + end end #I2C5 device ref pcie_rp5 on probe WIFI WIFI_PCIE |