EricR Lai has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork/: Change sx9324 from generic driver to sx9324 ......................................................................
mb/google/zork/: Change sx9324 from generic driver to sx9324
Use a new driver for the SX9324 proximity detector device.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47867/1
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 36824e6..d861f1d 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -20,6 +20,7 @@ select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_I2C_SX9324 select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_AUDIO_CODEC select EC_GOOGLE_CHROMEEC_BOARDID diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb index 3b3bdd4..5f854a6 100644 --- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb +++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb @@ -159,11 +159,53 @@ register "hid_desc_reg_offset" = "0x20" device i2c 2c on end end - chip drivers/i2c/generic + chip drivers/i2c/sx9324 register "hid" = ""STH9324"" register "name" = ""SEMTECH SX9324"" register "desc" = ""SAR Proximity Sensor"" register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_40)" + 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 28 on end end end
EricR Lai has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork/: Change sx9324 from generic driver to sx9324 ......................................................................
mb/google/zork/: Change sx9324 from generic driver to sx9324
Use a new driver for the SX9324 proximity detector device. This is draft settings, will modify this after fine tune.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47867/2
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork/: Change sx9324 from generic driver to sx9324 ......................................................................
Patch Set 2:
Here is you want :) Upload draft register settings.
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47867
to look at the new patch set (#3).
Change subject: mb/google/zork/: Change sx9324 from generic driver to sx9324 ......................................................................
mb/google/zork/: Change sx9324 from generic driver to sx9324
Use a new driver for the SX9324 proximity detector device. This is first draft settings, will modify it after fine tune.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47867/3
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork/: Change sx9324 from generic driver to sx9324 ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG@7 PS3, Line 7: / Please remove the slash.
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG@10 PS3, Line 10: tune tuning?
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47867
to look at the new patch set (#4).
Change subject: mb/google/zork: Change sx9324 from generic driver to sx9324 ......................................................................
mb/google/zork: Change sx9324 from generic driver to sx9324
Use a new driver for the SX9324 proximity detector device. This is first draft settings, will modify it after fine tuning.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47867/4
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Change sx9324 from generic driver to sx9324 ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG@7 PS3, Line 7: /
Please remove the slash.
Done
https://review.coreboot.org/c/coreboot/+/47867/3//COMMIT_MSG@10 PS3, Line 10: tune
tuning?
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Change sx9324 from generic driver to sx9324 ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47867/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47867/5//COMMIT_MSG@7 PS5, Line 7: Change sx9324 from generic driver to sx9324 Replace generic driver with sx9324 driver
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/vilboz/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... PS5, Line 206: register "reg_adv_ctrl20" = "0xf0" Uh, why not use an array?
Hello build bot (Jenkins), Furquan Shaikh, Tim Wawrzynczak, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47867
to look at the new patch set (#6).
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
mb/google/zork: Replace generic driver with sx9324 driver
Use a new driver for the SX9324 proximity detector device. This is first draft settings, will modify it after fine tuning.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/47867/6
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/vilboz/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... PS5, Line 206: register "reg_adv_ctrl20" = "0xf0"
Uh, why not use an array?
You can check the registers.h, it used the marco. This is actually not array but use as string instead in sx9324.c. This is the tricks.
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47867/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47867/5//COMMIT_MSG@7 PS5, Line 7: Change sx9324 from generic driver to sx9324
Replace generic driver with sx9324 driver
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... File src/mainboard/google/zork/variants/vilboz/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/47867/5/src/mainboard/google/zork/v... PS5, Line 206: register "reg_adv_ctrl20" = "0xf0"
You can check the registers.h, it used the marco. […]
Yeah, I see. I don't really like it, though.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 6: Code-Review+2
Kangheui Won has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 6: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
mb/google/zork: Replace generic driver with sx9324 driver
Use a new driver for the SX9324 proximity detector device. This is first draft settings, will modify it after fine tuning.
BUG=b:172397658 BRANCH=zork TEST=run "i2cdump -y -f 0 0x28" and checked all registers are expected.
Signed-off-by: Eric Lai ericr_lai@compal.corp-partner.google.com Change-Id: I869d0b6640247099ca489e96ed94e03811a04bf4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47867 Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Kangheui Won khwon@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/Kconfig M src/mainboard/google/zork/variants/vilboz/overridetree.cb 2 files changed, 44 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Kangheui Won: Looks good to me, approved
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 36824e6..d861f1d 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -20,6 +20,7 @@ select DRIVERS_GENERIC_GPIO_KEYS select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID + select DRIVERS_I2C_SX9324 select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_AUDIO_CODEC select EC_GOOGLE_CHROMEEC_BOARDID diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb index 3b3bdd4..a19443d 100644 --- a/src/mainboard/google/zork/variants/vilboz/overridetree.cb +++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb @@ -159,11 +159,51 @@ register "hid_desc_reg_offset" = "0x20" device i2c 2c on end end - chip drivers/i2c/generic - register "hid" = ""STH9324"" - register "name" = ""SEMTECH SX9324"" + chip drivers/i2c/sx9324 register "desc" = ""SAR Proximity Sensor"" register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_40)" + 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 28 on end end end
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 7:
Hey Eric, a new driver interface landed, it uses DT bindings, so for now we'd have to use the `_DSD` to add this info. interested in updating the driver? (https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2...) if you're not, I'll see if I can take a look soonish
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 7:
Patch Set 7:
Hey Eric, a new driver interface landed, it uses DT bindings, so for now we'd have to use the `_DSD` to add this info. interested in updating the driver? (https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2...) if you're not, I'll see if I can take a look soonish
I can check, but how about this for the old kernel? I have short vacation for X'mas as well. I can take look next week :)
EricR Lai has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47867 )
Change subject: mb/google/zork: Replace generic driver with sx9324 driver ......................................................................
Patch Set 7:
Patch Set 7:
Hey Eric, a new driver interface landed, it uses DT bindings, so for now we'd have to use the `_DSD` to add this info. interested in updating the driver? (https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2...) if you're not, I'll see if I can take a look soonish
Do we remove the old DSD or just add for the new one in order to add compatibleness? Since trogdor is use ARM CPU, there is no need for ACPI...