summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorLeo Chou <leo.chou@lcfc.corp-partner.google.com>2024-05-29 10:40:53 +0800
committerFelix Held <felix-coreboot@felixheld.de>2024-06-12 11:03:26 +0000
commit123a44e252546545ead69d1115f713de49528934 (patch)
treec8f5ce8580360b23894c605ae9170e081e6950f7 /src/mainboard
parent4cd75854ce57b6f279d6f09ba468b3cee0153f39 (diff)
mb/google/nissa/var/pujjoga: Tune SX9324 registers setting
Currently, the P sensor does not work. So add SX9324 registers settings based on tuning value from SEMTECH. BUG=b:340749850 TEST=Check i2c register settings on Pujjoga and confirm P sensor function can work by kernel 6.6 driver. Change-Id: I205c1f5228d792afc763a06f74a8744918e2da75 Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82689 Reviewed-by: Derek Huang <derekhuang@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <ericllai@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/brya/Kconfig2
-rw-r--r--src/mainboard/google/brya/variants/pujjoga/overridetree.cb69
2 files changed, 71 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig
index e89192412a..f72e90b8dc 100644
--- a/src/mainboard/google/brya/Kconfig
+++ b/src/mainboard/google/brya/Kconfig
@@ -421,6 +421,8 @@ config BOARD_GOOGLE_PUJJOGA
select BOARD_GOOGLE_BASEBOARD_NISSA
select DRIVERS_GENERIC_GPIO_KEYS
select CHROMEOS_WIFI_SAR if CHROMEOS
+ select DRIVERS_I2C_SX9324
+ select DRIVERS_I2C_SX9324_SUPPORT_LEGACY_LINUX_DRIVER
config BOARD_GOOGLE_QUANDISO
select BOARD_GOOGLE_BASEBOARD_NISSA
diff --git a/src/mainboard/google/brya/variants/pujjoga/overridetree.cb b/src/mainboard/google/brya/variants/pujjoga/overridetree.cb
index a8b9a7eaa7..951d60ef22 100644
--- a/src/mainboard/google/brya/variants/pujjoga/overridetree.cb
+++ b/src/mainboard/google/brya/variants/pujjoga/overridetree.cb
@@ -186,6 +186,75 @@ chip soc/intel/alderlake
device generic 0 on end
end
end
+ device ref i2c2 on
+ chip drivers/i2c/sx9324
+ register "desc" = ""SAR Proximity Sensor""
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_H19_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" = "0x47"
+ register "reg_afe_ctrl5" = "0x00"
+ register "reg_afe_ctrl6" = "0x00"
+ register "reg_afe_ctrl7" = "0x47"
+ register "reg_afe_ctrl8" = "0x12"
+ register "reg_afe_ctrl9" = "0x08"
+ register "reg_afe_ph0" = "0x3d"
+ register "reg_afe_ph1" = "0x1b"
+ register "reg_afe_ph2" = "0x1f"
+ register "reg_afe_ph3" = "0x3d"
+ register "reg_prox_ctrl0" = "0x0b"
+ register "reg_prox_ctrl1" = "0x0a"
+ register "reg_prox_ctrl2" = "0x90"
+ register "reg_prox_ctrl3" = "0x60"
+ register "reg_prox_ctrl4" = "0x0c"
+ register "reg_prox_ctrl5" = "0x00"
+ register "reg_prox_ctrl6" = "0x19"
+ 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" = "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" = "0x08"
+ register "reg_adv_ctrl17" = "0x56"
+ register "reg_adv_ctrl18" = "0x33"
+ register "reg_adv_ctrl19" = "0x00"
+ register "reg_adv_ctrl20" = "0x00"
+
+ register "ph0_pin" = "{1, 3, 3}"
+ register "ph1_pin" = "{3, 2, 1}"
+ register "ph2_pin" = "{3, 3, 1}"
+ register "ph3_pin" = "{1, 3, 3}"
+ register "ph01_resolution" = "1024"
+ register "ph23_resolution" = "1024"
+ register "startup_sensor" = "1"
+ register "ph01_proxraw_strength" = "3"
+ 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 end
+ end
+ end
device ref i2c3 on
chip drivers/i2c/generic
register "hid" = ""RTL5682""