I'm trying to register I2C gpio expander (PCF8575) on Odroid H3+/Ubuntu 22.04 using ACPI SSDT so later I can easly assign each GPIO as led and use nice names for toggling pins. I have following SSDT table:
DefinitionBlock ("gpio-expander.aml", "SSDT", 1, "Vendor", "Accel", 0x00000004)
{
External (\_SB.PC00.I2C0, DeviceObj)
Scope (\_SB.PC00.I2C0)
{
Device (PCF0)
{
Name (_CID, "PRP0001")
Name (_DDN, "GPIO-Expander")
Name (_ADR, 0x0020)
Name (_DSD, Package ()
{
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
Package ()
{
Package () { "compatible", Package() { "nxp,pcf8575" } },
}
})
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Name (_CRS, ResourceTemplate()
{
I2cSerialBusV2 (
0x20,
ControllerInitiated,
100000,
AddressingMode7Bit,
"\\_SB.PC00.I2C0",
0x00
)
})
}
}
}
(loaded using GRUB or acpi_configfs - effect is the same), there is node appearing in /sys in correct place but for same, unknown to me, reason kernel is not assigning any driver. if I add device using echo "pcf8575 0x20" > ../new_device driver is assigned correctly, so it should also assign it using ACPI
I tried different variations: with or without _ADR, _CRS being method or not.