Skip to content

Instantly share code, notes, and snippets.

@ldrahnik
Last active January 17, 2026 13:11
Show Gist options
  • Select an option

  • Save ldrahnik/49ebc55981f5878b21649a94a6ba7e7d to your computer and use it in GitHub Desktop.

Select an option

Save ldrahnik/49ebc55981f5878b21649a94a6ba7e7d to your computer and use it in GitHub Desktop.
Different device addresses used for controlling of touchpad feature (DialPad / NumberPad) via i2c (0x15 and 0x38) in DSDT tables
Part of dsdt table of laptop with device address 0x15 (ASUS Zenbook UM3402YA):
```
Scope (_SB.I2CA)
{
Device (TPDD)
{
Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID
Name (_UID, 0x05) // _UID: Unique ID
Name (ETPH, Package (0x16)
{
"ASUE120C",
"ASUE140D",
"ELAN1203",
"ELAN1300",
"ELAN1301",
"ELAN1400",
"ELAN140C"
})
Method (_HID, 0, NotSerialized) // _HID: Hardware ID
{
If ((TPDT == One))
{
Return (DerefOf (ETPH [Zero]))
}
If ((TPDT == 0x02))
{
Return (DerefOf (ETPH [One]))
}
Return (0x500CD041)
}
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Name (RBUF, ResourceTemplate ()
{
I2cSerialBusV2 (0x0015, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2CA",
0x00, ResourceConsumer, , Exclusive,
)
GpioInt (Level, ActiveLow, ExclusiveAndWake, PullNone, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0009
}
})
Return (RBUF) /* \_SB_.I2CA.TPDD._CRS.RBUF */
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (((TPOS >= 0x60) & (THPD == Zero)))
{
If (((TPDT == One) | (TPDT == 0x02)))
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Else
{
Return (Zero)
}
}
Method (_DSW, 3, NotSerialized) // _DSW: Device Sleep Wake
{
If (Arg0){}
Else
{
}
}
Method (_PS0, 0, NotSerialized) // _PS0: Power State 0
{
}
Method (_PS3, 0, NotSerialized) // _PS3: Power State 3
{
}
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
{
Switch (ToInteger (Arg2))
{
Case (Zero)
{
Switch (ToInteger (Arg1))
{
Case (One)
{
Return (Buffer (One)
{
0x03 // .
})
}
Default
{
Return (Buffer (One)
{
0x00 // .
})
}
}
}
Case (One)
{
Return (One)
}
Default
{
Return (Zero)
}
}
}
Else
{
Return (Buffer (One)
{
0x00 // .
})
}
}
}
...
}
```
and another with 0x15 (mine Zenbook UP5401EA):
```
Scope (_SB.PC00.I2C1)
{
Device (ETPD)
{
Name (_ADR, One) // _ADR: Address
Name (ETPH, Package (0x23)
{
"ELAN1200",
"ELAN1201",
"ELAN1203",
"ELAN1200",
"ELAN1201",
"ELAN1300",
"ELAN1301",
"ELAN1300",
"ELAN1301",
"ELAN1000",
"ELAN1200",
"ELAN1200",
"ELAN1200",
"ELAN1200",
"ELAN1200",
"ELAN1203",
"ELAN1203",
"ELAN1201",
"ELAN1300",
"ELAN1300",
"ELAN1200",
"ELAN1300",
"ELAN1201",
"ELAN1200",
"ELAN1201",
"ELAN1200",
"ELAN1401",
"ELAN1200",
"ELAN1401",
"ELAN1401",
"ELAN1401",
"ELAN1206",
"ASUE1407",
"ASUE140A",
"ASUE140D"
})
Name (FTPH, Package (0x0C)
{
"FTE1001",
"FTE1200",
"FTE1200",
"FTE1300",
"FTE1300",
"FTE1201",
"FTE1200",
"FTE1200",
"FTE1201",
"FTE1201",
"FTE1200",
"FTE1200"
})
Name (GTPH, Package (0x05)
{
"GDX1505",
"GDX1300",
"GDX1200",
"GDX1301",
"GDX1515"
})
Method (_HID, 0, NotSerialized) // _HID: Hardware ID
{
If ((TPDI & 0x04))
{
Return (DerefOf (ETPH [TPHI]))
}
If ((TPDI & 0x10))
{
Return (DerefOf (FTPH [TPHI]))
}
If ((TPDI & 0x40))
{
Return (DerefOf (GTPH [TPHI]))
}
Return ("ELAN1010")
}
Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID
Name (_UID, One) // _UID: Unique ID
Name (_S0W, 0x03) // _S0W: S0 Device Wake State
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
{
If ((Arg2 == Zero))
{
If ((Arg1 == One))
{
Return (Buffer (One)
{
0x03 // .
})
}
Else
{
Return (Buffer (One)
{
0x00 // .
})
}
}
If ((Arg2 == One))
{
Return (One)
}
}
Else
{
Return (Buffer (One)
{
0x00 // .
})
}
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (((TPIF != One) || (DSYN && One)))
{
Return (Zero)
}
Return (0x0F)
}
Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings
{
Name (SBFI, ResourceTemplate ()
{
I2cSerialBusV2 (0x0015, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.PC00.I2C1",
0x00, ResourceConsumer, , Exclusive,
)
Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
{
0x00000039,
}
})
Return (SBFI) /* \_SB_.PC00.I2C1.ETPD._CRS.SBFI */
}
}
}
```
And with device address 0x38 (ROG Strix G16 G614JVR):
```
N: Name="ASUF1416:00 2808:0108 Touchpad"
P: Phys=i2c-ASUF1416:00
```
and
```
Scope (_SB.PC00.I2C0)
{
...
Device (TPD0)
{
Name (HID2, Zero)
Name (SBFB, ResourceTemplate ()
{
I2cSerialBusV2 (0x0000, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "NULL",
0x00, ResourceConsumer, _Y65, Exclusive,
)
})
Name (SBFG, ResourceTemplate ()
{
GpioInt (Level, ActiveLow, Exclusive, PullDefault, 0x0000,
"\\_SB.GPI0", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0000
}
})
Name (SBFI, ResourceTemplate ()
{
Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, _Y66)
{
0x00000000,
}
})
CreateWordField (SBFB, \_SB.PC00.I2C0.TPD0._Y65._ADR, BADR) // _ADR: Address
CreateDWordField (SBFB, \_SB.PC00.I2C0.TPD0._Y65._SPE, SPED) // _SPE: Speed
CreateWordField (SBFG, 0x17, INT1)
CreateDWordField (SBFI, \_SB.PC00.I2C0.TPD0._Y66._INT, INT2) // _INT: Interrupts
Method (_INI, 0, NotSerialized) // _INI: Initialize
{
If ((OSYS < 0x07DC))
{
SRXO (GPDI, One)
}
INT1 = GNUM (GPDI)
INT2 = INUM (GPDI)
If ((TPDM == Zero))
{
SHPO (GPDI, One)
}
If ((TPDM == One))
{
SGRA (GPDI, One)
SGII (GPDI, Zero)
GRXE (GPDI, Zero)
}
If ((TPDT == One))
{
_HID = "SYNA2393"
HID2 = 0x20
Return (Zero)
}
If ((TPDT == 0x02))
{
_HID = "06CB2846"
HID2 = 0x20
Return (Zero)
}
If ((TPDT == 0x06))
{
HID2 = 0x20
BADR = 0x2C
Return (Zero)
}
If ((TPDT == 0x07))
{
HID2 = 0x20
BADR = 0x2C
Return (Zero)
}
If ((TPDT == 0x05))
{
If ((TPSL == 0x9A))
{
_HID = "ASUE1403"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0x9B))
{
_HID = "ASUE120A"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0xFB))
{
_HID = "ASUE120D"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0x75))
{
_HID = "ASUE1416"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0xFC))
{
_HID = "ASUF1416"
HID2 = One
BADR = 0x38
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0xFD))
{
_HID = "ASUF1205"
HID2 = One
BADR = 0x38
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0x3A))
{
_HID = "ASUP1203"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0xFE))
{
_HID = "ASUF1204"
HID2 = One
BADR = 0x38
SPED = 0x00061A80
Return (Zero)
}
If ((TPSL == 0xFF))
{
_HID = "ASUP1205"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
}
_HID = "ASUE120A"
HID2 = One
BADR = 0x15
SPED = 0x00061A80
Return (Zero)
HID2 = TPDH /* \TPDH */
BADR = TPDB /* \TPDB */
If ((TPDS == Zero))
{
SPED = 0x000186A0
}
If ((TPDS == One))
{
SPED = 0x00061A80
}
If ((TPDS == 0x02))
{
SPED = 0x000F4240
}
Return (Zero)
}
}
Name (_HID, "ASUE120A") // _HID: Hardware ID
Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID
Name (_S0W, 0x03) // _S0W: S0 Device Wake State
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
If ((Arg0 == HIDG))
{
Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
}
If ((Arg0 == TP7G))
{
Return (TP7D (Arg0, Arg1, Arg2, Arg3, SBFB, SBFG))
}
Return (Buffer (One)
{
0x00 // .
})
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (((TPDT != Zero) && (I2CN & One)))
{
Return (0x0F)
}
Return (Zero)
}
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
If ((OSYS < 0x07DC))
{
Return (SBFI) /* \_SB_.PC00.I2C0.TPD0.SBFI */
}
If ((TPDM == Zero))
{
Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFG))
}
Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFI))
}
}
Name (_DSD, Package (0x02) // _DSD: Device-Specific Data
{
ToUUID ("f87a6d23-2884-4fe4-a55f-633d9e339ce1") /* Unknown UUID */,
Package (0x04)
{
Package (0x02)
{
"idle-latency-tolerance",
0xFFFF
},
Package (0x02)
{
"SS-active-latency-tolerance",
0xFFFF
},
Package (0x02)
{
"FM-active-latency-tolerance",
0xFFFF
},
Package (0x02)
{
"FMP-active-latency-tolerance",
0xFFFF
}
}
})
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment