Revert "Made code compilable with lastest iasl"
authorXilin Wu <strongtz@yeah.net>
星期一, 17 Jan 2022 14:06:36 +0000 (22:06 +0800)
committerXilin Wu <strongtz@yeah.net>
星期一, 17 Jan 2022 14:06:36 +0000 (22:06 +0800)
DSDT built using iasl breaks Modern Standby and some power configuration
This reverts commit b1b0550175d97e19a9611894fdb6251a92b9ea9f.

Common/pcie.asl
Common/pcie1.asl
Common/pmic_core.asl
polaris/DSDT.AML
polaris/display2.asl
polaris/graphics.asl
polaris/nfc.asl

index d725d1d12ad86d8dfde0b66855a214a372e0a9e2..10503a5f638f05c6fe77881d289dddd32149c5c7 100644 (file)
@@ -755,7 +755,7 @@ Device (PCI0) {
                        
                        If(LNotEqual(And(SUPP, 0x16), 0x16))
                        {
-                               And(CTRL,0x1E,CTRL) // Give control of everything to the OS //Fixed syntax.
+                               And(CTRL,0x1E) // Give control of everything to the OS
                        }
                        
                        And(CTRL,0x15,CTRL) 
index e702c4b4a4818f0fb895618e60a76681757d5844..0ef7bf37becdeabc12fc75470e37f0c4048aef57 100644 (file)
@@ -1007,7 +1007,7 @@ Device (PCI1) {
                        
                        If(LNotEqual(And(SUPP, 0x16), 0x16))
                        {
-                               And(CTRL,0x1E,CTRL) // Give control of everything to the OS //Fixed syntax.
+                               And(CTRL,0x1E) // Give control of everything to the OS
                        }
                        
                        And(CTRL,0x15,CTRL) 
index 5ee5b8939db994b77bba96f01584cbfede7402ff..b99a3f8c2f0129908cafddc3f1ea800ee98e66cf 100644 (file)
@@ -157,7 +157,7 @@ Device (PMAP)
 Device (PRTC) 
 {
        Name(_HID, "ACPI000E")
-       Name(_DEP, Package() {PMAP})       // PRTC is dependent on PMAP which implements the RTC Functions
+       Name(_DEP, Package() {"\\_SB.PMAP"})       // PRTC is dependent on PMAP which implements the RTC Functions
 
        //Get the capabilities of the time and alarm device
        Method(_GCP)
index 2a018e72d04011d249bd215afae79904a4f90df6..df5cb954c2a1584d626de89aaabf701782657dc3 100644 (file)
Binary files a/polaris/DSDT.AML and b/polaris/DSDT.AML differ
index c16e08ddf4f1f1f1796125e857c09650b43d87f5..b8724ef83dff1dd6656cdfdf153af3ce4dbe4aa6 100644 (file)
@@ -17,15 +17,13 @@ Method (ROM2, 3, NotSerialized) {
    //       PCFG is buffer name for all default panel configurations
    //       All other dynamically detected panel configurations must not use this name
    //======================================================================================
-//   Switch (  ToInteger (Arg2) )
-//   {
-//        // Default case
-//        Default {
-//            Store (PCFG, Local2)
-//        }
-//   }
-
-Store (PCFG, Local2) //It's the default above, looks like it gets run always. TAO_Croatia
+   Switch (  ToInteger (Arg2) )
+   {
+        // Default case
+        Default {
+            Store (PCFG, Local2)
+        }
+   }
 
    // Ensure offset does not exceed the buffer size 
    // otherwise return a Null terminated buffer
index 2055be9cde4bbf9a341544ef368cd00054d429c7..e92ac7e8900ec4eb8ec8cee1fbf4256f38cb32de 100644 (file)
@@ -1449,7 +1449,7 @@ Device (GPU0)
                     "BANDWIDTH",                                         // Resource Type
                     13,                                                  // Num P-States in Set
                     0,                                                   // Num CustomData fields in Set
-                    "TRUE",                                                // Has Thermal Thresholds //Put it in quotes so compiler doesn't complain. TAO_Croatia
+                    TRUE,                                                // Has Thermal Thresholds
                     4,                                                   // Initial P-State
                     3,                                                   // Stable Power P-State
                 
@@ -2962,7 +2962,7 @@ Device (GPU0)
                 "CORE_CLOCK",                                        // Resource Type
                 9,                                                   // Num P-States in Set
                 1,                                                   // Num CustomData fields in Set
-                "TRUE",                                                // Has Thermal Thresholds
+                TRUE,                                                // Has Thermal Thresholds
                 5,                                                   // Initial P-State
                 3,                                                   // Stable Power P-State
             
@@ -3001,7 +3001,7 @@ Device (GPU0)
                 "CORE_CLOCK",                                        // Resource Type
                 2,                                                   // Num P-States in Set
                 1,                                                   // Num CustomData fields in Set
-                "TRUE",                                                // Has Thermal Thresholds
+                TRUE,                                                // Has Thermal Thresholds
                 0,                                                   // Initial P-State
                 0,                                                   // Stable Power P-State
             
index 6e1d4a716e8e6611ad31acb7147601104d3b3a8a..8445d32a1d05656cf6c1c67aa1aafcf3afce697b 100644 (file)
-Device (NFCD)
+//
+// NFC entry.
+//
+Device(NFCD)
 {
-    Name (_HID, "NXP1001")  // _HID: Hardware ID
-    Name (_CID, "ACPI\NXP1001")  // _CID: Compatible ID
-    Alias (\_SB.PSUB, _SUB)
-    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+    Name(_HID, "NXP1001")
+    Name(_CID, "ACPI\NXP1001")
+       Alias(\_SB.PSUB, _SUB)
+    Name(_CRS, ResourceTemplate()
     {
-        I2cSerialBusV2 (0x0028, ControllerInitiated, 0x00061A80,
-            AddressingMode7Bit, "\\_SB.I2C4",
-            0x00, ResourceConsumer, , Exclusive,
-            )
-        GpioInt (Level, ActiveHigh, Exclusive, PullDefault, 0x0000,
-            "\\_SB.GIO0", 0x00, ResourceConsumer, ,
-            )
-            {   // Pin list
-                0x003F
-            }
+        I2CSerialBus(0x28, ControllerInitiated, 400000, AddressingMode7Bit, "\\_SB.I2C4", 0, ResourceConsumer, , )
+        GpioInt(Level, ActiveHigh, Exclusive, PullDefault, 0, "\\_SB.GIO0", 0, ResourceConsumer, , ) {63}
     })
 // ESE SPI GPIO
-    Name (NFCS, ResourceTemplate ()
+    Name(NFCS, ResourceTemplate()
     {
-        GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionNone,
-            "\\_SB.GIO0", 0x00, ResourceConsumer, ,
-            )
-            {   // Pin list
-                0x0074
-            }
+       GpioIO(Exclusive, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GIO0", 0, ResourceConsumer, , ) {116}
     })
 // NFCC VEN GPIO
-    Name (NFCP, ResourceTemplate ()
+    Name(NFCP, ResourceTemplate()
     {
-        GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionNone,
-            "\\_SB.GIO0", 0x00, ResourceConsumer, ,
-            )
-            {   // Pin list
-                0x000C
-            }
+       GpioIO(Exclusive, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GIO0", 0, ResourceConsumer, , ) {12}
     })
-    Scope (GIO0)
-    {
-        OperationRegion (NFPO, GeneralPurposeIo, Zero, One)
-    }
-
-    Field (\_SB.GIO0.NFPO, ByteAcc, NoLock, Preserve)
-    {
-        Connection (\_SB.NFCD.NFCP), 
-        MGPE,   1
-    }
-
-    Method (POON, 0, NotSerialized)
-    {
-        MGPE = One
-    }
-
-    Method (POOF, 0, NotSerialized)
-    {
-        MGPE = Zero
-    }
+        Scope(GIO0)
+        {
+           OperationRegion(NFPO, GeneralPurposeIO, Zero, One)
+        }
+        Field(\_SB_.GIO0.NFPO, ByteAcc, NoLock, Preserve)
+        {
+            Connection(\_SB_.NFCD.NFCP),
+            MGPE, 1
+        }
+           Method(POON, 0x0, NotSerialized)
+            {
+                Store(One, MGPE)
+            }
+            Method(POOF, 0x0, NotSerialized)
+            {
+                Store(Zero, MGPE)
+            }
 //NFCC FW DOWNLOAD GPIO
-    Name (NFCF, ResourceTemplate ()
+    Name(NFCF, ResourceTemplate()
     {
-        GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionNone,
-            "\\_SB.GIO0", 0x00, ResourceConsumer, ,
-            )
-            {   // Pin list
-                0x0058
-            }
+        GpioIO(Exclusive, PullDefault, 0, 0, IoRestrictionNone, "\\_SB.GIO0", 0, ResourceConsumer, , ) {88} // Download
     })
-    Scope (GIO0)
-    {
-        OperationRegion (NFFO, GeneralPurposeIo, Zero, One)
-    }
-
-    Field (\_SB.GIO0.NFFO, ByteAcc, NoLock, Preserve)
-    {
-        Connection (\_SB.NFCD.NFCF), 
-        MGFE,   1
-    }
-
-    Method (FWON, 0, NotSerialized)
-    {
-        MGFE = One
-    }
-
-    Method (FWOF, 0, NotSerialized)
-    {
-        MGFE = Zero
-    }
-
-    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
-    {
-        Debug = "Method NFC _DSM begin"
-        If ((Arg0 == ToUUID ("a2e7f6c4-9638-4485-9f12-6b4e20b60d63") /* Unknown UUID */))
+        Scope(GIO0)
         {
-            If ((Arg2 == Zero))
+            OperationRegion(NFFO, GeneralPurposeIO, Zero, One)
+        }
+        Field(\_SB_.GIO0.NFFO, ByteAcc, NoLock, Preserve)
+        {
+            Connection(\_SB_.NFCD.NFCF),
+            MGFE, 1
+        }
+            Method(FWON, 0x0, NotSerialized)
             {
-                Debug = "Method NFC _DSM QUERY"
-                If ((Arg1 == One))
-                {
-                    \_SB.NFCD.POOF ()
-                    Sleep (0x14)
-                    Return (Buffer (One)
-                    {
-                            0x0F                                             // .
-                    })
-                }
+                Store(One, MGFE)
             }
-
-            If ((Arg2 == 0x02))
+            Method(FWOF, 0x0, NotSerialized)
             {
-                Debug = "Method NFC _DSM SETPOWERMODE"
-                If ((Arg3 == One))
-                {
-                    \_SB.NFCD.POON ()
-                    Sleep (0x14)
-                }
-
-                If ((Arg3 == Zero))
-                {
-                    \_SB.NFCD.POOF ()
-                    Sleep (0x14)
-                }
+                Store(Zero, MGFE)
             }
-
-            If ((Arg2 == One))
+            Method(_DSM, 0x4, NotSerialized)
             {
-                Debug = "Method NFC _DSM SETFWMODE"
+                Store("Method NFC _DSM begin", Debug)
+                If(LEqual(Arg0, Buffer(0x10)
+                {
+                    0xc4, 0xf6, 0xe7, 0xa2, 0x38, 0x96, 0x85, 0x44, 0x9f, 0x12, 0x6b, 0x4e,
+                    0x20, 0xb6, 0x0d, 0x63
+                }))
+                {
+                   If(LEqual(Arg2, Zero))
+                   {
+                        Store("Method NFC _DSM QUERY", Debug)
+                        If(LEqual(Arg1, One))
+                        {
+                            \_SB_.NFCD.POOF()
+                            Sleep(0x14)
+                            Return(Buffer(One)
+                            {
+                                0x0f
+                            })
+                        }
+                    }
+                   If(LEqual(Arg2, 0x2))
+                   {
+                        Store("Method NFC _DSM SETPOWERMODE", Debug)
+                        If(LEqual(Arg3, One))
+                        {
+                            \_SB_.NFCD.POON()
+                             Sleep(0x14)
+                        }
+                        If(LEqual(Arg3, Zero))
+                        {
+                            \_SB_.NFCD.POOF()
+                            Sleep(0x14)
+                        }
+                    }
+                    If(LEqual(Arg2, One))
+                    {
+                        Store("Method NFC _DSM SETFWMODE", Debug)
 //
 // Set the firmware mode to ON.
 //
-                If ((Arg3 == One))
-                {
-                    \_SB.NFCD.FWON ()
+                        If(LEqual(Arg3, One))
+                        {
+                            \_SB_.NFCD.FWON()
 //
 // Provide any delay required by the controller before toggling the power GPIO line.
 //
-                    Sleep (0x14)
-                    \_SB.NFCD.POOF ()
-                    Sleep (0x14)
-                    \_SB.NFCD.POON ()
-                    Sleep (0x14)
-                }
+                        Sleep(0x14)
+                            \_SB_.NFCD.POOF()
+                            Sleep(0x14)
+                            \_SB_.NFCD.POON()
+                            Sleep(0x14)
+                        }
 //
 // Set the firmware mode to OFF.
 //
-                If ((Arg3 == Zero))
-                {
-                    \_SB.NFCD.FWOF ()
-                    Sleep (0x14)
-                    \_SB.NFCD.POOF ()
-                    Sleep (0x14)
-                    \_SB.NFCD.POON ()
-                    Sleep (0x14)
+                        If(LEqual(Arg3, Zero))
+                        {
+                            \_SB_.NFCD.FWOF()
+                            Sleep(0x14)
+                            \_SB_.NFCD.POOF()
+                            Sleep(0x14)
+                            \_SB_.NFCD.POON()
+                            Sleep(0x14)
+                        }
+                    } 
+                        If(LEqual(Arg2, 0x3))
+                        {
+                            Store("Method NFC _DSM EEPROM Config", Debug)
+                            Return(Buffer(0x13)
+                            {
+                                0x9c, 0x1f, 0x38, 0x19, 0xa8, 0xb9, 0x4b, 0xab, 0xa1, 0xba, 0xd0, 0x20,
+                                0x76, 0x88, 0x2a, 0xe0, 0x03, 0x01, 0x11
+                            })
+                        }
                 }
             }
-
-            If ((Arg2 == 0x03))
+//PEP Proxy Support
+    Name(PGID, Buffer(10) {"\\_SB.NFCD"}) // Device ID buffer - PGID( Pep given ID )
+    Name(DBUF, Buffer(DBFL) {})           // Device ID buffer - PGID( Pep given ID )
+        CreateByteField(DBUF, 0x0, STAT)      // STATUS 1 BYTE
+                                          // HIDDEN 1 BYTE ( SIZE )
+        CreateByteField(DBUF, 2, DVAL )       // Packet value, 1 BYTES Device Status
+        CreateField(DBUF, 24, 160, DEID)      // Device ID, 20 BYTES(160 Bits)
+            Method (_S1D, 0) { Return (3) }     // S1 => D3
+            Method (_S2D, 0) { Return (3) }     // S2 => D3
+            Method (_S3D, 0) { Return (3) }     // S3 => D3
+
+            Method(_PS0, 0x0, NotSerialized) 
             {
-                Debug = "Method NFC _DSM EEPROM Config"
-                Return (Buffer (0x13)
-                {
-                    /* 0000 */  0x9C, 0x1F, 0x38, 0x19, 0xA8, 0xB9, 0x4B, 0xAB,  // ..8...K.
-                    /* 0008 */  0xA1, 0xBA, 0xD0, 0x20, 0x76, 0x88, 0x2A, 0xE0,  // ... v.*.
-                    /* 0010 */  0x03, 0x01, 0x11                                 // ...
-                })
+                Store(Buffer(ESNL){}, DEID)
+                Store(0, DVAL)
+                Store(PGID, DEID)
+                    If(\_SB.ABD.AVBL)
+                    {
+                        Store(DBUF, \_SB.PEP0.FLD0)
+                    }
             }
-        }
-    }
-//PEP Proxy Support
-    Name (PGID, Buffer (0x0A)           // Device ID buffer - PGID( Pep given ID )
-    {
-        "\\_SB.NFCD"
-    })
-    Name (DBUF, Buffer (DBFL) {})       // Device ID buffer - PGID( Pep given ID )
-    CreateByteField (DBUF, Zero, STAT)  // STATUS 1 BYTE
-                                        // HIDDEN 1 BYTE ( SIZE )
-    CreateByteField (DBUF, 0x02, DVAL)  // Packet value, 1 BYTES Device Status
-    CreateField (DBUF, 0x18, 0xA0, DEID)// Device ID, 20 BYTES(160 Bits)
-
-    // Sets all sleep states to D3
-    Method (_S1D, 0, NotSerialized)     // _S1D: S1 Device State
-    {
-        Return (0x03)
-    }
-
-    Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
-    {
-        Return (0x03)
-    }
-
-    Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
-    {
-        Return (0x03)
-    }
-
-    Method (_PS0, 0, NotSerialized)  // _PS0: Power State 0
-    {
-        DEID = Buffer (ESNL) {}
-        DVAL = Zero
-        DEID = PGID /* \_SB_.NFCD.PGID */
-        If (\_SB.ABD.AVBL)
-        {
-            \_SB.PEP0.FLD0 = DBUF /* \_SB_.NFCD.DBUF */
-        }
-    }
-
-    Method (_PS3, 0, NotSerialized)  // _PS3: Power State 3
-    {
-        DEID = Buffer (ESNL) {}
-        DVAL = 0x03
-        DEID = PGID /* \_SB_.NFCD.PGID */
-        If (\_SB.ABD.AVBL)
-        {
-            \_SB.PEP0.FLD0 = DBUF /* \_SB_.NFCD.DBUF */
-        }
-    }
-}
\ No newline at end of file
+            Method(_PS3, 0x0, NotSerialized) 
+            {
+                Store(Buffer(ESNL){}, DEID)
+                Store(3, DVAL)
+                Store(PGID, DEID)
+                    If(\_SB.ABD.AVBL)
+                    {
+                        Store(DBUF, \_SB.PEP0.FLD0)
+                    }
+            }
+}