Evan Green has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31998
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
mb/google/hatch: Add SX9310 SAR0 sensor
Add SAR0, which is an SX9310. The schematics and layout have a second SAR1 sensor provisioned on I2C4, with an interrupt of GPP_A6, but this is not populated.
Signed-off-by: Evan Green evgreen@chromium.org
BUG=b:128540461 BRANCH=none TEST=Boot kernel with sx9310 driver, see it come up happily
Change-Id: I63943cc7da5ff56f6ef6dcbd99bb8f8f031e8bf7 --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb 2 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/31998/1
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig index 629b125..abf45c5 100644 --- a/src/mainboard/google/hatch/Kconfig +++ b/src/mainboard/google/hatch/Kconfig @@ -4,6 +4,7 @@ select BOARD_ROMSIZE_KB_32768 select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_GENERIC + select DRIVERS_I2C_SX9310 select DRIVERS_I2C_HID select DRIVERS_SPI_ACPI select DRIVERS_USB_ACPI diff --git a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb index 16a0ef1..3df5007 100644 --- a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb @@ -231,7 +231,38 @@ end end # I2C #1 device pci 15.2 on end # I2C #2 - device pci 15.3 on end # I2C #3 + device pci 15.3 on + chip drivers/i2c/sx9310 + register "desc" = ""SAR Proximity Sensor"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_A0_IRQ)" + register "speed" = "I2C_SPEED_FAST" + register "uid" = "1" + register "reg_prox_ctrl0" = "0x10" + register "reg_prox_ctrl1" = "0x00" + register "reg_prox_ctrl2" = "0x84" + register "reg_prox_ctrl3" = "0x0e" + register "reg_prox_ctrl4" = "0x07" + register "reg_prox_ctrl5" = "0xc6" + register "reg_prox_ctrl6" = "0x20" + register "reg_prox_ctrl7" = "0x0d" + register "reg_prox_ctrl8" = "0x8d" + register "reg_prox_ctrl9" = "0x43" + register "reg_prox_ctrl10" = "0x1f" + register "reg_prox_ctrl11" = "0x00" + register "reg_prox_ctrl12" = "0x00" + register "reg_prox_ctrl13" = "0x00" + register "reg_prox_ctrl14" = "0x00" + register "reg_prox_ctrl15" = "0x00" + register "reg_prox_ctrl16" = "0x00" + register "reg_prox_ctrl17" = "0x00" + register "reg_prox_ctrl18" = "0x00" + register "reg_prox_ctrl19" = "0x00" + register "reg_sar_ctrl0" = "0x50" + register "reg_sar_ctrl1" = "0x8a" + register "reg_sar_ctrl2" = "0x3c" + device i2c 28 on end + end + end # I2C #3 device pci 16.0 on end # Management Engine Interface 1 device pci 16.1 off end # Management Engine Interface 2 device pci 16.2 off end # Management Engine IDE-R
Evan Green has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 1:
Wowo, uploaded to coreboot.org!
Enrico Granata has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... PS1, Line 240: register "reg_prox_ctrl0" = "0x10" Are the values known good/usable?
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/Kconfig File src/mainboard/google/hatch/Kconfig:
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/Kconfig@7 PS1, Line 7: DRIVERS_I2C_SX9310 nit: Arrange this in alphabetical order i.e. after DRIVERS_I2C_HID?
Evan Green has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/Kconfig File src/mainboard/google/hatch/Kconfig:
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/Kconfig@7 PS1, Line 7: DRIVERS_I2C_SX9310
nit: Arrange this in alphabetical order i.e. […]
Ack
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... PS1, Line 240: register "reg_prox_ctrl0" = "0x10"
Are the values known good/usable?
I don't really know :) I got them from src/mainboard/google/poppy/variants/nocturne/devicetree.cb . I'm happy to delete them or modify them if you think that's better.
Hello Enrico Granata, Shelley Chen, build bot (Jenkins), Enrico Granata, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31998
to look at the new patch set (#2).
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
mb/google/hatch: Add SX9310 SAR0 sensor
Add SAR0, which is an SX9310. The schematics and layout have a second SAR1 sensor provisioned on I2C4, with an interrupt of GPP_A6, but this is not populated.
Signed-off-by: Evan Green evgreen@chromium.org
BUG=b:128540461 BRANCH=none TEST=Boot kernel with sx9310 driver, see it come up happily
Change-Id: I63943cc7da5ff56f6ef6dcbd99bb8f8f031e8bf7 --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb 2 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/98/31998/2
Enrico Granata has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/devicetree.cb:
https://review.coreboot.org/#/c/31998/1/src/mainboard/google/hatch/variants/... PS1, Line 240: register "reg_prox_ctrl0" = "0x10"
I don't really know :) I got them from src/mainboard/google/poppy/variants/nocturne/devicetree.cb . […]
Mostly curious. It's fine to leave them in. It is entirely likely that we will need to work with the vendor to get proper values later on, but feel free to use Nocturne's setup for the time being.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31998 )
Change subject: mb/google/hatch: Add SX9310 SAR0 sensor ......................................................................
mb/google/hatch: Add SX9310 SAR0 sensor
Add SAR0, which is an SX9310. The schematics and layout have a second SAR1 sensor provisioned on I2C4, with an interrupt of GPP_A6, but this is not populated.
Signed-off-by: Evan Green evgreen@chromium.org
BUG=b:128540461 BRANCH=none TEST=Boot kernel with sx9310 driver, see it come up happily
Change-Id: I63943cc7da5ff56f6ef6dcbd99bb8f8f031e8bf7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/31998 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Enrico Granata egranata@google.com Reviewed-by: Furquan Shaikh furquan@google.com --- M src/mainboard/google/hatch/Kconfig M src/mainboard/google/hatch/variants/baseboard/devicetree.cb 2 files changed, 33 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Enrico Granata: Looks good to me, but someone else must approve
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig index 629b125..f632a02 100644 --- a/src/mainboard/google/hatch/Kconfig +++ b/src/mainboard/google/hatch/Kconfig @@ -5,6 +5,7 @@ select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_I2C_SX9310 select DRIVERS_SPI_ACPI select DRIVERS_USB_ACPI select EC_GOOGLE_CHROMEEC diff --git a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb index 0299ded..2b18b3b 100644 --- a/src/mainboard/google/hatch/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/hatch/variants/baseboard/devicetree.cb @@ -236,7 +236,38 @@ end end # I2C #1 device pci 15.2 on end # I2C #2 - device pci 15.3 on end # I2C #3 + device pci 15.3 on + chip drivers/i2c/sx9310 + register "desc" = ""SAR Proximity Sensor"" + register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_A0_IRQ)" + register "speed" = "I2C_SPEED_FAST" + register "uid" = "1" + register "reg_prox_ctrl0" = "0x10" + register "reg_prox_ctrl1" = "0x00" + register "reg_prox_ctrl2" = "0x84" + register "reg_prox_ctrl3" = "0x0e" + register "reg_prox_ctrl4" = "0x07" + register "reg_prox_ctrl5" = "0xc6" + register "reg_prox_ctrl6" = "0x20" + register "reg_prox_ctrl7" = "0x0d" + register "reg_prox_ctrl8" = "0x8d" + register "reg_prox_ctrl9" = "0x43" + register "reg_prox_ctrl10" = "0x1f" + register "reg_prox_ctrl11" = "0x00" + register "reg_prox_ctrl12" = "0x00" + register "reg_prox_ctrl13" = "0x00" + register "reg_prox_ctrl14" = "0x00" + register "reg_prox_ctrl15" = "0x00" + register "reg_prox_ctrl16" = "0x00" + register "reg_prox_ctrl17" = "0x00" + register "reg_prox_ctrl18" = "0x00" + register "reg_prox_ctrl19" = "0x00" + register "reg_sar_ctrl0" = "0x50" + register "reg_sar_ctrl1" = "0x8a" + register "reg_sar_ctrl2" = "0x3c" + device i2c 28 on end + end + end # I2C #3 device pci 16.0 on end # Management Engine Interface 1 device pci 16.1 off end # Management Engine Interface 2 device pci 16.2 off end # Management Engine IDE-R