UP Board: issue adding touchscreen device support via ACPI overlay
wangyafei
New Member Posts: 3 ✭
Hi,
I want to add a touchscreen driver to ublinux. I want to add my touchscreen device under the i2c1 bus and do the following things:
1. Extract ACPI tables cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
2. Decompile: iasl -d dsdt.dat
3. Add the following ASL code to dsdt.dsl
And now I have some questions about this,
1. Can I add my touchscreen device by the above steps?
2. If can, There have two gpio pins used by touchscreen device, one is irq-pin and another is reset-pin, they may described like following with ASL code:
I want to add a touchscreen driver to ublinux. I want to add my touchscreen device under the i2c1 bus and do the following things:
1. Extract ACPI tables cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
2. Decompile: iasl -d dsdt.dat
3. Add the following ASL code to dsdt.dsl
Device (I2C2)
{
Name (_HID, "808622C1") // _HID: Hardware ID
Name (_CID, "808622C1") // _CID: Compatible ID
...
...
Device (TCS0) /* add my touchscreen device here*/
{
Name (_ADR, Zero) // _ADR: Address
Name (_HID, "GDIX1001") // _HID: Hardware ID
Name (_CID, "GDIX1001") // _CID: Compatible ID
Name (_S0W, Zero) // _S0W: S0 Device Wake State
Method (_PS3, 0, Serialized) // _PS3: Power State 3
{
}
Method (_PS0, 0, Serialized) // _PS0: Power State 0
{
}
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Name (WBUF, ResourceTemplate ()
{
I2cSerialBus (0x0014, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2C2",
0x00, ResourceConsumer, ,
)
GpioInt (Edge, ActiveLow, Shared, PullDefault, 0x0000,
"\\_SB.GPO2", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0000
}
GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
"\\_SB.GPO2", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0001
}
})
Return (WBUF) /* \_SB_.PCI0.I2C2.TCS0._CRS.WBUF */
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Method (INTI, 0, Serialized)
{
}
Method (INTO, 1, Serialized)
{
}
Method (INTS, 0, Serialized)
{
}
}
}
4. Recompile: iasl -tc dsdt.dslAnd now I have some questions about this,
1. Can I add my touchscreen device by the above steps?
2. If can, There have two gpio pins used by touchscreen device, one is irq-pin and another is reset-pin, they may described like following with ASL code:
GpioInt (Edge, ActiveLow, Shared, PullDefault, 0x0000, "\\_SB.GPO2", 0x00, ResourceConsumer, , )
{
0x0000
}
GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, "\\_SB.GPO2", 0x00, ResourceConsumer, , )
{
0x0001
}
I want to use GPIO4 as irq-pin and GPIO5 as reset-pin in the "up-board 40-pin", can anyone tell me how to modify the above ASL code? Comments
-
Hi wangyafei,
I suppose you are running ubilinux 3.0 with our 4.4 Linux Kernel on a UP Board, right? -
Hi dcleri,
Yes right, I running ublinux 3.0 with 4.4 Linux Kernel on UP Board. -
The connection between Touch controller and UP Board will show in the following image
-
Hi @wangyafei. Did you managed to get the acpi overlay to work?.