summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvy Jian <ivy.jian@quanta.corp-partner.google.com>2023-09-28 14:49:25 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-10-23 12:57:57 +0000
commit51eee89c783e3f7200c520c907b67983ec9d5a2e (patch)
tree794e134ff6abb171ac623ffc2423c3e1d1c0d0a5
parent61374317b1c96fad2df040318a87b3c708d0fb1c (diff)
mb/google/rex: Use upstream driver properties for SX9324
Use human readable properties as upstream driver support. BUG=b:297977526 TEST=Able to get sensor values changed w/wo a hand covering the device. before this CL , SSD.dsl of STH9324 Package (0x02) { "semtech,ph0-pin", Package (0x03) { Zero, Zero, Zero }, ... Package (0x02) { "semtech,ph23-resolution", Zero }, Package (0x02) { "semtech,startup-sensor", Zero }, .... after this CL , SSD.dsl of STH9324 Package (0x02) { "semtech,ph0-pin", Package (0x03) { One, 0x02, 0x02 }, ... Package (0x02) { " semtech,ph23-resolution", 0x0400 }, Package (0x02) { "semtech,startup-sensor", One }, Change-Id: Ie0d929228f4510f33b07d9c4cfdfcd2a9a437c27 Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78174 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
-rw-r--r--src/mainboard/google/rex/Kconfig1
-rw-r--r--src/mainboard/google/rex/variants/rex0/overridetree.cb142
2 files changed, 47 insertions, 96 deletions
diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig
index 8be8b6f39b..2c68428712 100644
--- a/src/mainboard/google/rex/Kconfig
+++ b/src/mainboard/google/rex/Kconfig
@@ -53,7 +53,6 @@ config BOARD_GOOGLE_MODEL_REX
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 6df91f340c..6c05d9ed93 100644
--- a/src/mainboard/google/rex/variants/rex0/overridetree.cb
+++ b/src/mainboard/google/rex/variants/rex0/overridetree.cb
@@ -692,101 +692,53 @@ chip soc/intel/meteorlake
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
+ register "desc" = ""SAR Proximity Sensor""
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E00_IRQ)"
+ register "speed" = "I2C_SPEED_FAST"
+ register "uid" = "1"
+ register "ph0_pin" = "{1, 2, 2}"
+ register "ph1_pin" = "{2, 1, 2}"
+ register "ph2_pin" = "{2, 2, 1}"
+ register "ph3_pin" = "{2, 1, 1}"
+ register "ph01_resolution" = "1024"
+ register "ph23_resolution" = "1024"
+ register "startup_sensor" = "1"
+ register "ph01_proxraw_strength" = "2"
+ register "ph23_proxraw_strength" = "2"
+ register "avg_pos_strength" = "256"
+ register "cs_idle_sleep" = ""hi-z""
+ register "int_comp_resistor" = ""lowest""
+ register "input_precharge_resistor_ohms" = "4000"
+ register "input_analog_gain" = "1"
+ device i2c 28 on
+ probe CELLULAR CELLULAR_USB
+ probe CELLULAR CELLULAR_PCIE
+ end
+ end
+ chip drivers/i2c/sx9324
+ register "desc" = ""SAR Proximity Sensor""
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E08_IRQ)"
+ register "speed" = "I2C_SPEED_FAST"
+ register "uid" = "2"
+ register "ph0_pin" = "{1, 2, 2}"
+ register "ph1_pin" = "{2, 1, 2}"
+ register "ph2_pin" = "{2, 2, 1}"
+ register "ph3_pin" = "{2, 1, 1}"
+ register "ph01_resolution" = "1024"
+ register "ph23_resolution" = "1024"
+ register "startup_sensor" = "1"
+ register "ph01_proxraw_strength" = "2"
+ register "ph23_proxraw_strength" = "2"
+ register "avg_pos_strength" = "256"
+ register "cs_idle_sleep" = ""hi-z""
+ register "int_comp_resistor" = ""lowest""
+ register "input_precharge_resistor_ohms" = "4000"
+ register "input_analog_gain" = "1"
+ device i2c 2c on
+ probe CELLULAR CELLULAR_USB
+ probe CELLULAR CELLULAR_PCIE
+ end
+ end
end #I2C5
device ref pcie_rp5 on
probe WIFI WIFI_PCIE