Jeremy Soller has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use I2C HID
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/1
diff --git a/src/mainboard/system76/lemp9/Kconfig b/src/mainboard/system76/lemp9/Kconfig index dd5359e..c606d91 100644 --- a/src/mainboard/system76/lemp9/Kconfig +++ b/src/mainboard/system76/lemp9/Kconfig @@ -3,6 +3,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_16384 + select DRIVERS_I2C_HID select EC_SYSTEM76_EC select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES diff --git a/src/mainboard/system76/lemp9/devicetree.cb b/src/mainboard/system76/lemp9/devicetree.cb index 25ae62f..27f5efb 100644 --- a/src/mainboard/system76/lemp9/devicetree.cb +++ b/src/mainboard/system76/lemp9/devicetree.cb @@ -2,6 +2,11 @@ # Lock Down register "common_soc_config" = "{ .chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT, + .i2c[0] = { + .speed = I2C_SPEED_FAST, + .rise_time_ns = 80, + .fall_time_ns = 110, + }, }"
# Send an extra VR mailbox command for the PS4 exit issue @@ -35,6 +40,22 @@ #register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c) + # Serial I/O + register "SerialIoDevMode" = "{ + [PchSerialIoIndexI2C0] = PchSerialIoPci, + [PchSerialIoIndexI2C1] = PchSerialIoDisabled, + [PchSerialIoIndexI2C2] = PchSerialIoPci, + [PchSerialIoIndexI2C3] = PchSerialIoDisabled, + [PchSerialIoIndexI2C4] = PchSerialIoDisabled, + [PchSerialIoIndexI2C5] = PchSerialIoDisabled, + [PchSerialIoIndexSPI0] = PchSerialIoDisabled, + [PchSerialIoIndexSPI1] = PchSerialIoDisabled, + [PchSerialIoIndexSPI2] = PchSerialIoDisabled, + [PchSerialIoIndexUART0] = PchSerialIoDisabled, + [PchSerialIoIndexUART1] = PchSerialIoDisabled, + [PchSerialIoIndexUART2] = PchSerialIoPci, + }" + # SATA register "SataMode" = "Sata_AHCI" register "SataSalpSupport" = "0" @@ -194,7 +215,16 @@ device pci 14.3 on end # CNVi wifi #end device pci 14.5 off end # SDCard - device pci 15.0 off end # I2C #0 + device pci 15.0 on + chip drivers/i2c/hid + register "generic.hid" = ""PNP0C50"" + register "generic.desc" = ""ELAN Touchpad"" + register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)" + register "generic.probed" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 15 on end + end + end # I2C #0 device pci 15.1 off end # I2C #1 device pci 15.2 off end # I2C #2 device pci 15.3 off end # I2C #3 diff --git a/src/mainboard/system76/lemp9/gpio.h b/src/mainboard/system76/lemp9/gpio.h index d06145d..e71197c 100644 --- a/src/mainboard/system76/lemp9/gpio.h +++ b/src/mainboard/system76/lemp9/gpio.h @@ -139,8 +139,8 @@ PAD_CFG_NC(GPP_B2),
// CPU Misc - // GPP_B3 - _PAD_CFG_STRUCT(GPP_B3, 0x80100100, 0x0000), + // GPP_B3 (touchpad interrupt) + PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT), // NC PAD_CFG_NC(GPP_B4),
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 1: Code-Review+1
(3 comments)
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG@9 PS1, Line 9: Tested on lemp9, touchpad confirmed to use I2C HID "confirmed to use I2C HID"? What do you mean?
Also add a trailing period.
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... PS1, Line 47: PchSerialIoPci What's here?
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... PS1, Line 56: PchSerialIoPci And here? (looks like it was enabled on the devicetree before)
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#2).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of ps/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/2
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#3).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of ps/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 4: Code-Review+1
(4 comments)
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG@9 PS1, Line 9: Tested on lemp9, touchpad confirmed to use I2C HID
"confirmed to use I2C HID"? What do you mean? […]
Done
https://review.coreboot.org/c/coreboot/+/43623/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/4//COMMIT_MSG@10 PS4, Line 10: ps/2 nit: PS/2
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... PS1, Line 47: PchSerialIoPci
What's here?
Done
https://review.coreboot.org/c/coreboot/+/43623/1/src/mainboard/system76/lemp... PS1, Line 56: PchSerialIoPci
And here? (looks like it was enabled on the devicetree before)
Done
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#7).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/7
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#8).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/8
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... PS8, Line 143: PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT), Isn't this the same as `PAD_CFG_GPI_APIC_EDGE_LOW(GPP_B3, NONE, PLTRST)` ?
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#9).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 34 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/9
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 56: PchSerialIoPci Since coreboot already initializes the UART, this should be:
PchSerialIoSkipInit
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, : wait... this commit should only add the touchpad, nothing more. see CB:43642 for the uart part
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50"" no, this is the CID, HID should be ELAN040D
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 225: 15 hex 0x0f
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 2: # Lock Down move that to chipset_lockdown
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 5: .i2c[0] = { /* I2C Touchpad */
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 56: PchSerialIoPci
Since coreboot already initializes the UART, this should be: […]
Or we can get CB:43639 in first, your choice.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, :
wait... this commit should only add the touchpad, nothing more. […]
Did you mean CB:43639 ?
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, :
Did you mean CB:43639 ?
Yes... thx
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, : drop the disabled ones; disabled is default anyways
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 221: register "generic.desc" = ""ELAN Touchpad"" : register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)" : register "generic.probed" = "1" : register "hid_desc_reg_offset" = "0x01" : alignment
Jeremy Soller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 9:
(4 comments)
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/1//COMMIT_MSG@9 PS1, Line 9: Tested on lemp9, touchpad confirmed to use I2C HID
"confirmed to use I2C HID"? What do you mean? […]
Done
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 2: # Lock Down
move that to chipset_lockdown
Think I'll remove the comment, it is pretty self-explanatory anyways
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50""
no, this is the CID, HID should be ELAN040D
This is a generic touchpad, using this generic value for both CID and HID results in not requiring any drivers in Linux or Windows.
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 225: 15
hex 0x0f
This is 15 in hex, similar to the PCI devices. I would not change it
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#10).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 25 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/10
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG@8 PS11, Line 8: It’d be great, if you added
Enable the I2C HID driver, configure I2C port 0 and add the touchpad device to the devicetree.
from Michael’s commit message I3bd28846bb9cbb5f5b137c85eb6ccf77e47a923d [1].
[1]: https://review.coreboot.org/c/coreboot/+/43640/1
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG@8 PS11, Line 8:
It’d be great, if you added […]
you mean CB:43653 ;)
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#12).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 25 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/12
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 13:
(5 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 2: # Lock Down
Think I'll remove the comment, it is pretty self-explanatory anyways
Ack
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 5: .i2c[0] = {
/* I2C Touchpad */
Done
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, :
drop the disabled ones; disabled is default anyways
Done
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 225: 15
This is 15 in hex, similar to the PCI devices. […]
Ack
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... PS13, Line 46: [PchSerialIoIndexUART2] = PchSerialIoSkipInit, // LPSS UART this is not explained and also still has nothing to do with the touchpad -> separate commit
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50""
This is a generic touchpad, using this generic value for both CID and HID results in not requiring a […]
Did you test ELAN040D as hid? I'm ok with that if it doesn't
Jeremy Soller has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 13:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50""
Did you test ELAN040D as hid? I'm ok with that if it doesn't
I will try that value, I guess it doesn't hurt to be more specific, if the generic drivers still work
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... PS13, Line 46: [PchSerialIoIndexUART2] = PchSerialIoSkipInit, // LPSS UART
this is not explained and also still has nothing to do with the touchpad -> separate commit
Good point, will add a new commit doing this
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50""
Did you test ELAN040D as hid? I'm ok with that if it doesn't
Hmm, to me this reads differently here... CID is the compatible id which is checked if a driver for HID was not found. If a driver exists, the OS should use that one instead of a generic one. https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/device-man...
Same applies to Linux AFAICT
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#14).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/14
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#15).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/15
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 15:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/13/src/mainboard/system76/lem... PS13, Line 46: [PchSerialIoIndexUART2] = PchSerialIoSkipInit, // LPSS UART
Good point, will add a new commit doing this
Done
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#16).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/16
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43623
to look at the new patch set (#18).
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 24 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/43623/18
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19: Code-Review+1
(4 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 56: PchSerialIoPci
Or we can get CB:43639 in first, your choice.
Done
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 46: [PchSerialIoIndexI2C1] = PchSerialIoDisabled, : [PchSerialIoIndexI2C2] = PchSerialIoDisabled, : [PchSerialIoIndexI2C3] = PchSerialIoDisabled, : [PchSerialIoIndexI2C4] = PchSerialIoDisabled, : [PchSerialIoIndexI2C5] = PchSerialIoDisabled, : [PchSerialIoIndexSPI0] = PchSerialIoDisabled, : [PchSerialIoIndexSPI1] = PchSerialIoDisabled, : [PchSerialIoIndexSPI2] = PchSerialIoDisabled, : [PchSerialIoIndexUART0] = PchSerialIoDisabled, : [PchSerialIoIndexUART1] = PchSerialIoDisabled, :
Yes... […]
Done
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 220: register "generic.hid" = ""PNP0C50""
Hmm, to me this reads differently here... […]
Done
https://review.coreboot.org/c/coreboot/+/43623/19/src/mainboard/system76/lem... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/19/src/mainboard/system76/lem... PS19, Line 207: on keep the comment here, to keep it in line with the others
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... PS8, Line 143: PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT),
Isn't this the same as `PAD_CFG_GPI_APIC_EDGE_LOW(GPP_B3, NONE, PLTRST)` ?
yes, it is...
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/gpio.h:
https://review.coreboot.org/c/coreboot/+/43623/8/src/mainboard/system76/lemp... PS8, Line 143: PAD_CFG_GPI_APIC(GPP_B3, NONE, PLTRST, EDGE_SINGLE, INVERT),
yes, it is...
Done
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19: Code-Review+2
tested; works fine for me, too
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43623/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/4//COMMIT_MSG@10 PS4, Line 10: ps/2
nit: PS/2
Done
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/43623/11//COMMIT_MSG@8 PS11, Line 8:
you mean CB:43653 ;)
Done
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
Patch Set 19:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/9/src/mainboard/system76/lemp... PS9, Line 221: register "generic.desc" = ""ELAN Touchpad"" : register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)" : register "generic.probed" = "1" : register "hid_desc_reg_offset" = "0x01" :
alignment
let's get this in; a global style fix is required anyways
https://review.coreboot.org/c/coreboot/+/43623/19/src/mainboard/system76/lem... File src/mainboard/system76/lemp9/devicetree.cb:
https://review.coreboot.org/c/coreboot/+/43623/19/src/mainboard/system76/lem... PS19, Line 207: on
keep the comment here, to keep it in line with the others
let's get this in; a global style fix is required anyways
Michael Niewöhner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43623 )
Change subject: mb/system76/lemp9: enable I2C HID touchpad ......................................................................
mb/system76/lemp9: enable I2C HID touchpad
Enable the I2C HID driver, configure I2C bus 0 and add the touchpad device to the devicetree.
Tested on lemp9, touchpad confirmed to use i2c-hid driver in Linux instead of PS/2.
Signed-off-by: Jeremy Soller jeremy@system76.com Change-Id: Ic3a90fda134b1d53f28ab687b3033ec52fee843b Reviewed-on: https://review.coreboot.org/c/coreboot/+/43623 Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/system76/lemp9/Kconfig M src/mainboard/system76/lemp9/devicetree.cb M src/mainboard/system76/lemp9/gpio.h 3 files changed, 24 insertions(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Michael Niewöhner: Looks good to me, approved
diff --git a/src/mainboard/system76/lemp9/Kconfig b/src/mainboard/system76/lemp9/Kconfig index 6f2bee7..6b5b750 100644 --- a/src/mainboard/system76/lemp9/Kconfig +++ b/src/mainboard/system76/lemp9/Kconfig @@ -3,6 +3,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_16384 + select DRIVERS_I2C_HID select EC_SYSTEM76_EC select HAVE_ACPI_RESUME select HAVE_ACPI_TABLES diff --git a/src/mainboard/system76/lemp9/devicetree.cb b/src/mainboard/system76/lemp9/devicetree.cb index e0da72a..6adc188 100644 --- a/src/mainboard/system76/lemp9/devicetree.cb +++ b/src/mainboard/system76/lemp9/devicetree.cb @@ -1,7 +1,12 @@ chip soc/intel/cannonlake - # Lock Down register "common_soc_config" = "{ .chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT, + /* Touchpad */ + .i2c[0] = { + .speed = I2C_SPEED_FAST, + .rise_time_ns = 80, + .fall_time_ns = 110, + }, }"
# Send an extra VR mailbox command for the PS4 exit issue @@ -35,6 +40,11 @@ #register "enable_c6dram" = "1"
# FSP Silicon (soc/intel/cannonlake/fsp_params.c) + # Serial I/O + register "SerialIoDevMode" = "{ + [PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad + }" + # SATA register "SataMode" = "Sata_AHCI" register "SataSalpSupport" = "0" @@ -185,7 +195,16 @@ device pci 14.3 on end end device pci 14.5 off end # SDCard - device pci 15.0 off end # I2C #0 + device pci 15.0 on + chip drivers/i2c/hid + register "generic.hid" = ""ELAN040D"" + register "generic.desc" = ""ELAN Touchpad"" + register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)" + register "generic.probed" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 15 on end + end + end # I2C #0 device pci 15.1 off end # I2C #1 device pci 15.2 off end # I2C #2 device pci 15.3 off end # I2C #3 diff --git a/src/mainboard/system76/lemp9/gpio.h b/src/mainboard/system76/lemp9/gpio.h index 9c99f13..3373c6c 100644 --- a/src/mainboard/system76/lemp9/gpio.h +++ b/src/mainboard/system76/lemp9/gpio.h @@ -138,8 +138,8 @@ PAD_NC(GPP_B2, UP_20K),
// CPU Misc - // GPP_B3 - _PAD_CFG_STRUCT(GPP_B3, 0x80100100, 0x0000), + // GPP_B3 (touchpad interrupt) + PAD_CFG_GPI_APIC_EDGE_LOW(GPP_B3, NONE, PLTRST), // NC PAD_NC(GPP_B4, UP_20K),