Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37427 )
Change subject: soc/intel/tigerlake: Update GPIO config ......................................................................
Patch Set 16:
(3 comments)
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/ac... File src/soc/intel/tigerlake/acpi/gpio.asl:
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/ac... PS16, Line 20: Device (GPIO) So, I was looking at the latest version of pinctrl-tigerlake.c driver and one thing that I noticed was that it uses uid for each community e.g. https://github.com/torvalds/linux/blob/master/drivers/pinctrl/intel/pinctrl-...
This means that the way we have exported GPIO device on CNL and SKL/KBL will not work for TGL. Instead each community will have to be described as its own device with a different UID. Something like this should work:
Device (GCM0) { » Name (_HID, "INT34C5") » Name (_UID, 0) » Name (_DDN, "GPIO Controller Community 0")
» Name (RBUF, ResourceTemplate() » { » » Memory32Fixed (ReadWrite, 0, GPIO_BASE_SIZE, COM0) » » Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, GIRQ) » » » { GPIO_IRQ14 } » })
» Method (_CRS, 0, NotSerialized) » { » » CreateDWordField (^RBUF, ^COM0._BAS, BAS0) » » BAS0 = ^^PCRB (PID_GPIOCOM0) » » Return (^RBUF) » }
» Method (_STA) » { » » Return (0xF) » } }
Device (GCM1) { » Name (_HID, "INT34C5") » Name (_UID, 1) » Name (_DDN, "GPIO Controller Community 1")
» Name (RBUF, ResourceTemplate() » { » » Memory32Fixed (ReadWrite, 0, GPIO_BASE_SIZE, COM1) » » Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, GIRQ) » » » { GPIO_IRQ14 } » })
» Method (_CRS, 0, NotSerialized) » { » » CreateDWordField (^RBUF, ^COM1._BAS, BAS1) » » BAS1 = ^^PCRB (PID_GPIOCOM1) » » Return (^RBUF) » }
» Method (_STA) » { » » Return (0xF) » } }
Device (GCM4) { » Name (_HID, "INT34C5") » Name (_UID, 4) » Name (_DDN, "GPIO Controller Community 4")
» Name (RBUF, ResourceTemplate() » { » » Memory32Fixed (ReadWrite, 0, GPIO_BASE_SIZE, COM4) » » Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, GIRQ) » » » { GPIO_IRQ14 } » })
» Method (_CRS, 0, NotSerialized) » { » » CreateDWordField (^RBUF, ^COM4._BAS, BAS4) » » BAS4 = ^^PCRB (PID_GPIOCOM4) » » Return (^RBUF) » }
» Method (_STA) » { » » Return (0xF) » } }
Device (GCM5) { » Name (_HID, "INT34C5") » Name (_UID, 5) » Name (_DDN, "GPIO Controller Community 5")
» Name (RBUF, ResourceTemplate() » { » » Memory32Fixed (ReadWrite, 0, GPIO_BASE_SIZE, COM5) » » Interrupt (ResourceConsumer, Level, ActiveLow, Shared,,, GIRQ) » » » { GPIO_IRQ14 } » })
» Method (_CRS, 0, NotSerialized) » { » » CreateDWordField (^RBUF, ^COM5._BAS, BAS5) » » BAS5 = ^^PCRB (PID_GPIOCOM5) » » Return (^RBUF) » }
» Method (_STA) » { » » Return (0xF) » } }
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/gp... File src/soc/intel/tigerlake/gpio.c:
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/gp... PS16, Line 197: { PMC_GPP_G, GPP_G },
I dont see these groups in EDS.SO i would guess for this version of silicon its not possible. […]
Ack
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/in... File src/soc/intel/tigerlake/include/soc/gpio.h:
https://review.coreboot.org/c/coreboot/+/37427/16/src/soc/intel/tigerlake/in... PS16, Line 22: CROS_GPIO_DEVICE_NAME This will have to be provided for each community device as per the comment on gpio.asl file.