From 2f3d822e83a6f5c4a7e083da8f02000d22d20f5d Mon Sep 17 00:00:00 2001 From: Marijan Limov Date: Tue, 9 Nov 2021 23:38:40 +0100 Subject: [PATCH] beryllium: Hopefully fix FTS --- beryllium/DSDT.aml | Bin 245057 -> 245389 bytes beryllium/DSDT.dsl | 20 ++-- beryllium/cust_touch_resources.asl | 181 +++++++++++++++++++++++++++++ 3 files changed, 190 insertions(+), 11 deletions(-) diff --git a/beryllium/DSDT.aml b/beryllium/DSDT.aml index 7049b038f7fcf2ad93c5a388cfcfb01d97011470..72d9cb0c571879fda9d70c30e670b27eec40df2a 100644 GIT binary patch delta 109 zcmX^3i?8=DpR!A^OGxiNW(Fq1KxcnnUxi>7Ukg(M1qNmY1_n>R5FbNk#fi$BnR;(E z-e|qSxb+6ptAi2(-Xa060R|%6J^{W_3`=|hB3w8?#Pq&{Op=U7+gBW9y8DvRXnOie N<}=%a)-b;p004{ZC0PIf delta 75 zcmV-R0JQ&&{SLwU4kJWUL{ve&0{{XzQA1BnO(0W5O*l0$AOHgZ002o&R7@oaAdw@p h0)fVX*oD{uwb%mc!M6^?0>kK+vZ@2kx1Oy7?+~cw98&-Q diff --git a/beryllium/DSDT.dsl b/beryllium/DSDT.dsl index 3d19920..c12ac1a 100644 --- a/beryllium/DSDT.dsl +++ b/beryllium/DSDT.dsl @@ -57684,9 +57684,7 @@ Include("cust_thermal_zones.asl") Name (_SUB, "RENEGA0E") // _SUB: Subsystem ID } - - - Device (TSC1) + Device (TSC1) { //change HID back to TEST3330 Name (_HID, "NVTS3667") // _HID: Hardware ID @@ -57834,7 +57832,7 @@ Include("cust_thermal_zones.asl") } } } - + Device (TSC2) { Name (_HID, "FTTS8719") // _HID: Hardware ID @@ -57870,7 +57868,7 @@ Include("cust_thermal_zones.asl") // 32 // } }) - Return (RBUF) /* \_SB_.TSC1._CRS.RBUF */ + Return (RBUF) } Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method @@ -57881,7 +57879,7 @@ Include("cust_thermal_zones.asl") { 0x00 // . }) - CopyObject (ToBuffer (Arg0), _T_0) /* \_SB_.TSC1._DSM._T_0 */ + CopyObject (ToBuffer (Arg0), _T_0) If ((_T_0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */)) { While (One) @@ -57938,7 +57936,7 @@ Include("cust_thermal_zones.asl") Name (PGID, Buffer (0x0A) { - "\\_SB.TSC1" + "\\_SB.TSC2" }) Name (DBUF, Buffer (DBFL){}) CreateByteField (DBUF, Zero, STAT) @@ -57963,10 +57961,10 @@ Include("cust_thermal_zones.asl") { DEID = Buffer (ESNL){} DVAL = Zero - DEID = PGID /* \_SB_.TSC1.PGID */ + DEID = PGID If (^^ABD.AVBL) { - ^^PEP0.FLD0 = DBUF /* \_SB_.TSC1.DBUF */ + ^^PEP0.FLD0 = DBUF } } @@ -57974,10 +57972,10 @@ Include("cust_thermal_zones.asl") { DEID = Buffer (ESNL){} DVAL = 0x03 - DEID = PGID /* \_SB_.TSC1.PGID */ + DEID = PGID If (^^ABD.AVBL) { - ^^PEP0.FLD0 = DBUF /* \_SB_.TSC1.DBUF */ + ^^PEP0.FLD0 = DBUF } } } diff --git a/beryllium/cust_touch_resources.asl b/beryllium/cust_touch_resources.asl index 58c47bf..1a23c01 100644 --- a/beryllium/cust_touch_resources.asl +++ b/beryllium/cust_touch_resources.asl @@ -185,3 +185,184 @@ Scope(\_SB_.PEP0) }, }) } + +Scope(\_SB_.PEP0) +{ + + Method(LPMZ) + { + Return(LPXD) + } + + Name(LPXD, + Package(){ + // Touch LVS1 + Package() + { + "DEVICE", + "\\_SB.TSC2", + Package() + { + "DSTATE", + 0x0, // D0 state + + // TS_INT configuration + Package() + { + "TLMMGPIO", // TLMMGPIO resource TS_INT + Package() + { + 31, // PIN number = 31 + 0, // State: NOT active = 0x0 + 0, // Function select = 0 + 0, // direction = Input. + 3, // Pull Up + 0, // Drive Strength: 0x0 = 2mA + }, + }, + Package() + { + "TLMMGPIO", // TLMMGPIO resource RESET + Package() + { + 32, // PIN number = 32 + 0, // State: NOT active = 0x0 + 0, // Function select = 0 + 1, // direction = Output. + 0, // NO Pull + 0, // Drive Strength: 0x0 = 2mA + }, + }, + + // Synaptics Power source - VDD + Package() + { + "PMICVREGVOTE", // PMICVREGVOTE resource + Package() + { + "PPP_RESOURCE_ID_LDO14_A", // VREG ID + 1, // Voltage Regulator type = LDO + 1800000, // 3.3V + 1, // force enable from software + 7, // power mode - Normal Power Mode + 0, // head room voltage + }, + }, + + // I2C Pull Up source + // Package() + // { + // "TLMMGPIO", + // Package() + // { + // 23, // PIN number = 23 + // 1, // State: active = 0x1 + // 0, // Function select = 0 + // 1, // direction = Output. + // 3, // Pull Up + // 0, // Drive Strength: 0x0 = 2mA + // }, + // }, + + Package() + { + "DELAY", // Hold the RESET line LOW after power up for 2ms + Package() + { + 1000, // 2 Milsec delay + } + }, + + // Drive RESET Line High + Package() + { + "TLMMGPIO", // TLMMGPIO resource TS_RESET + Package() + { + 32, // PIN number = 32 + 1, // State: active = 0x1 + 0, // Function select = 0 + 1, // direction = O/P + 0, // Pull Up + 0, // Drive Strength: 0x0 = 2mA + }, + }, + + // Synaptics may need needs ~200 ms to be ready for comm + Package() + { + "DELAY", + Package() + { + 20000, // 200 Milsec delay + } + }, + }, + Package() + { + "DSTATE", + 0x3, // D3 state + + // Synaptics Power source - VDD + Package() + { + "PMICVREGVOTE", // PMICVREGVOTE resource + Package() + { + "PPP_RESOURCE_ID_LDO14_A", // VREG ID + 1, // Voltage Regulator type = LDO + 0, // Voltage is in micro volts + 0, // Force disable from s/w + 5, // power mode - Low Power Mode + 0, // head room voltage + }, + }, + + // I2C Pull Up source + // Package() + // { + // "TLMMGPIO", + // Package() + // { + // 23, // PIN number = 23 + // 0, // State: IN active = 0x0 + // 0, // Function select = 0 + // 1, // direction = Output. + // 1, // Pull Down + // 0, // Drive Strength: 0x0 = 2mA + // }, + // }, + + // RESET pin - power save mode + Package() + { + "TLMMGPIO", // TLMMGPIO resource RESET + Package() + { + 32, // PIN number = 32 + 0, // State: IN active = 0x0 + 0, // Function select = 0 + 0, // direction = Output. + 1, // Pull Down + 0, // Drive Strength: 0x0 = 2mA + }, + }, + + // TS_INT configuration - power save mode + Package() + { + "TLMMGPIO", // TLMMGPIO resource TS_INT + Package() + { + 31, // PIN number = 31 + 0, // State: IN active = 0x0 + 0, // Function select = 0 + 0, // direction = Input. + 1, // Pull Down + 0, // Drive Strength: 0x0 = 2mA + }, + }, + }, + }, + }) +} -- 2.45.2