mb/trulo/var/pujjolo: Fix p-sensor function
Because the pujjolo motherboard p-sensor could not recognize, so
I modify the below changes.
1. Update P-sensor I2C bus from 2 to 3.
2. Copy P-sensor parameters from pujjocento.
BUG=b:395763555
BRANCH=none
TEST=Build and verify on pujjolo
Device list:
cat /sys/bus/iio/devices/iio\:device0/name
sx9324
The value of register 01 when away:
i2cget -f -y 13 0x28 01
0x00
The value of register 01 when approaching:
i2cget -f -y 13 0x28 01
0x01
Change-Id: Ia5685ad790949001da7ba793759eb286b8cce1e8
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88104
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
a7cd5c8c6b
commit
fb2c834f7c
1 changed files with 33 additions and 39 deletions
|
|
@ -76,7 +76,7 @@ chip soc/intel/alderlake
|
|||
#| | required to set up a BAR |
|
||||
#| | for TPM communication |
|
||||
#| I2C1 | Touchscreen |
|
||||
#| I2C2 | Psensor |
|
||||
#| I2C3 | Psensor |
|
||||
#| I2C4 | Mipi camera |
|
||||
#| I2C5 | Trackpad |
|
||||
#+-------------------+---------------------------+
|
||||
|
|
@ -100,11 +100,11 @@ chip soc/intel/alderlake
|
|||
.sda_hold = 7,
|
||||
}
|
||||
},
|
||||
.i2c[2] = {
|
||||
.i2c[3] = {
|
||||
.speed = I2C_SPEED_FAST,
|
||||
.speed_config[0] = {
|
||||
.speed = I2C_SPEED_FAST,
|
||||
.scl_lcnt = 157,
|
||||
.scl_lcnt = 158,
|
||||
.scl_hcnt = 79,
|
||||
.sda_hold = 7,
|
||||
}
|
||||
|
|
@ -132,8 +132,8 @@ chip soc/intel/alderlake
|
|||
register "serial_io_i2c_mode" = "{
|
||||
[PchSerialIoIndexI2C0] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C1] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C2] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C3] = PchSerialIoDisabled,
|
||||
[PchSerialIoIndexI2C2] = PchSerialIoDisabled,
|
||||
[PchSerialIoIndexI2C3] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C4] = PchSerialIoPci,
|
||||
[PchSerialIoIndexI2C5] = PchSerialIoPci,
|
||||
}"
|
||||
|
|
@ -234,39 +234,38 @@ chip soc/intel/alderlake
|
|||
device generic 0 on end
|
||||
end
|
||||
end
|
||||
device ref i2c2 on
|
||||
device ref i2c3 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_irq_cfg0" = "0x00"
|
||||
register "reg_irq_cfg1" = "0x80"
|
||||
register "reg_irq_cfg2" = "0x00"
|
||||
register "reg_gnrl_ctrl0" = "0x16"
|
||||
register "reg_gnrl_ctrl1" = "0x21"
|
||||
register "reg_afe_ctrl0" = "0x00"
|
||||
register "reg_gnrl_ctrl1" = "0x25"
|
||||
register "reg_afe_ctrl0" = "0x20"
|
||||
register "reg_afe_ctrl1" = "0x10"
|
||||
register "reg_afe_ctrl2" = "0x00"
|
||||
register "reg_afe_ctrl3" = "0x00"
|
||||
register "reg_afe_ctrl4" = "0x47"
|
||||
register "reg_afe_ctrl4" = "0x86"
|
||||
register "reg_afe_ctrl5" = "0x00"
|
||||
register "reg_afe_ctrl6" = "0x00"
|
||||
register "reg_afe_ctrl7" = "0x47"
|
||||
register "reg_afe_ctrl7" = "0x86"
|
||||
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_afe_ctrl9" = "0x0F"
|
||||
register "reg_prox_ctrl0" = "0x09"
|
||||
register "reg_prox_ctrl1" = "0x09"
|
||||
register "reg_prox_ctrl2" = "0x20"
|
||||
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_prox_ctrl6" = "0x2C"
|
||||
register "reg_prox_ctrl7" = "0xFF"
|
||||
register "reg_adv_ctrl0" = "0x00"
|
||||
register "reg_adv_ctrl1" = "0x00"
|
||||
register "reg_adv_ctrl2" = "0x00"
|
||||
register "reg_adv_ctrl2" = "0x04"
|
||||
register "reg_adv_ctrl3" = "0x00"
|
||||
register "reg_adv_ctrl4" = "0x00"
|
||||
register "reg_adv_ctrl5" = "0x05"
|
||||
|
|
@ -277,29 +276,24 @@ chip soc/intel/alderlake
|
|||
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 "reg_adv_ctrl16" = "0x00"
|
||||
register "reg_adv_ctrl17" = "0x00"
|
||||
register "reg_adv_ctrl18" = "0x00"
|
||||
|
||||
register "ph0_pin" = "{1, 3, 3}"
|
||||
register "ph1_pin" = "{3, 2, 1}"
|
||||
register "ph0_pin" = "{3, 1, 3}"
|
||||
register "ph1_pin" = "{1, 3, 3}"
|
||||
register "ph2_pin" = "{3, 3, 1}"
|
||||
register "ph3_pin" = "{1, 3, 3}"
|
||||
register "ph01_resolution" = "1024"
|
||||
register "ph23_resolution" = "1024"
|
||||
register "ph3_pin" = "{3, 3, 3}"
|
||||
register "ph01_resolution" = "512"
|
||||
register "ph23_resolution" = "512"
|
||||
register "startup_sensor" = "1"
|
||||
register "ph01_proxraw_strength" = "3"
|
||||
register "ph23_proxraw_strength" = "2"
|
||||
register "ph01_proxraw_strength" = "1"
|
||||
register "ph23_proxraw_strength" = "1"
|
||||
register "avg_pos_strength" = "256"
|
||||
register "cs_idle_sleep" = ""hi-z""
|
||||
register "cs_idle_sleep" = ""gnd""
|
||||
register "int_comp_resistor" = ""lowest""
|
||||
register "input_precharge_resistor_ohms" = "4000"
|
||||
register "input_analog_gain" = "1"
|
||||
register "input_analog_gain" = "3"
|
||||
device i2c 28 on end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue