beryllium: Hopefully fix FTS
authorMarijan Limov <tao_croatia@pop-os.localdomain>
星期二, 9 Nov 2021 22:38:40 +0000 (23:38 +0100)
committerMarijan Limov <tao_croatia@pop-os.localdomain>
星期二, 9 Nov 2021 22:38:40 +0000 (23:38 +0100)
beryllium/DSDT.aml
beryllium/DSDT.dsl
beryllium/cust_touch_resources.asl

index 7049b038f7fcf2ad93c5a388cfcfb01d97011470..72d9cb0c571879fda9d70c30e670b27eec40df2a 100644 (file)
Binary files a/beryllium/DSDT.aml and b/beryllium/DSDT.aml differ
index 3d1992087e3fc1948fdfe81b7e72638b607d40ae..c12ac1acda7064e3b4c250e8b1d76ae9f14512d8 100644 (file)
@@ -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
                 }
             }
         }
index 58c47bfdc860300b065daf1b2f86ef0009dc8c97..1a23c01d7e2d42d1d9b0d27571a97ac4e014a4b7 100644 (file)
@@ -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
+                    },
+                },
+             },
+         },       
+    })
+}