Skip to content

Instantly share code, notes, and snippets.

@Novakov
Created August 9, 2023 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Novakov/c0527524a6021064f74faaae59d7544e to your computer and use it in GitHub Desktop.
Save Novakov/c0527524a6021064f74faaae59d7544e to your computer and use it in GitHub Desktop.
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
)
})
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment