GPIO Enablement with ACPI

Status

AML Code Snippet

Device (GPI1) { Name (_HID, "NXP0103") Name (_UID, 0x0) ... Method (_CRS, 0x0, NotSerialized) { Name (RBUF, ResourceTemplate () { MEMORY32FIXED(ReadWrite, 0x30200000, 0x50000, ) // GPIO1 MEMORY32FIXED(ReadWrite, 0x30330000, 0x10000, ) // IOMUXC Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 96, 97 } }) Return(RBUF) } Name (_DSD, Package () { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package (2) {"gpio-base", 0}, Package (2) {"num-maps", 1}, Package (2) {"pin-controller-0", "\\_SB.PINC"}, Package (2) {"gpio-range-0", Package() { 0, 5, 30 } } } }) }

I.MX GPIO driver requires a few extra data like GPIO to PIN number mapping and the pin-controller device node etc. they are provided through _DSD methods.

Note: Later discussion with a kernel maintainer suggested we should use the DT properties for GPIO to PIN number mapping in _DSD. We haven’t investigated this yet.