test sound
authorXilin Wu <wuxilin123@gmail.com>
星期四, 5 May 2022 10:35:39 +0000 (18:35 +0800)
committerXilin Wu <wuxilin123@gmail.com>
星期四, 5 May 2022 10:36:31 +0000 (18:36 +0800)
not working unfortunately :)

Common/pep_common.asl
beryllium/oem_resources.asl [moved from Common/oem_resources.asl with 100% similarity]
dipper/oem_resources.asl [new file with mode: 0755]
polaris/DSDT.AML
polaris/cust_dsdt.asl
polaris/oem_resources.asl [new file with mode: 0755]

index 6c7bdb6529d3a6ad4fe9e24b900f34ec996c5d1a..de51ba556ce8442ebb845497733b50826c4fbc53 100644 (file)
@@ -488,7 +488,7 @@ Include("pep_tsens.asl")
 Include("../Common/audio_resources.asl")
 Include("../Common/graphics_resources.asl")
 Include("../Common/HoyaSmmu_resources.asl")
-Include("../Common/oem_resources.asl")
+Include("oem_resources.asl")
 Include("../Common/subsys_resources.asl")
 Include("../Common/pep_resources.asl")
 Include("../Common/corebsp_resources.asl")
diff --git a/dipper/oem_resources.asl b/dipper/oem_resources.asl
new file mode 100755 (executable)
index 0000000..5e16513
--- /dev/null
@@ -0,0 +1,24 @@
+//===========================================================================
+//                           <oem_resources.asl>
+// DESCRIPTION
+//   This file contans the resources needed by oem drivers.
+//
+//===========================================================================
+
+
+Scope(\_SB_.PEP0) 
+{
+       
+    // OEM 
+    Method(OPMD)
+    {
+        Return(OPCC)
+    }  
+       
+       
+    Name(OPCC,
+    Package ()
+    { 
+    })
+    
+}
index df5cb954c2a1584d626de89aaabf701782657dc3..9e39f58b11aa5a620f67993129d9f92a94e72a2c 100644 (file)
Binary files a/polaris/DSDT.AML and b/polaris/DSDT.AML differ
index 7884613ead3c78c9ef7b87a20e30b2c31c130a62..7fcc7ba597e434716269a37040a9e9b982495449 100644 (file)
@@ -37,3 +37,91 @@ Method (_MID, 0, Serialized) {
     Store(PIN1, NMID)
     Return (NMID)
 }
+
+Device(RHPX)
+{
+       Name(_HID, "MSFT8000")
+       Name(_CID, "MSFT8000")
+       Name(_UID, 1)
+
+       Name(_CRS, ResourceTemplate()
+       {
+               // Index 0
+               I2CSerialBus(
+                       0xFF,                  // SlaveAddress: placeholder
+                       ,                      // SlaveMode: default to ControllerInitiated
+                       400000,                // ConnectionSpeed: in Hz
+                       ,                      // Addressing Mode: default to 7 bit
+                       "\\_SB.I2C6",          // ResourceSource: I2C bus controller name
+                       ,
+                       ,
+               )                          // VendorData
+
+               // // Index 1
+               // GpioIo (Shared, PullNone, 0, 0, IoRestrictionNone, "\\_SB.GPO2",) {0}  // Pin 21 of JP1 (GPIO_S5[00])
+               // // Index 2
+               // GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO2",) {0}
+
+               // // Index 3
+               // GpioIo (Shared, PullNone, 0, 0, IoRestrictionNone, "\\_SB.GPO2",) {1}  // Pin 23 of JP1 (GPIO_S5[01])
+               // // Index 4
+               // GpioInt(Edge, ActiveBoth, SharedAndWake, PullNone, 0,"\\_SB.GPO2",) {1}
+       })
+
+       Name(_DSD, Package()
+       {
+               ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+               Package()
+               {
+                       // I2C Mapping
+                       Package() { "bus-I2C-I2C1", Package() { 0 }},
+                       // no UART Mapping
+               }
+       })
+
+
+       Name (PGID, Buffer (0x0A)
+       {
+               "\\_SB.RHPX"
+       })
+       Name (DBUF, Buffer (DBFL){})
+       CreateByteField (DBUF, Zero, STAT)
+       CreateByteField (DBUF, 0x02, DVAL)
+       CreateField (DBUF, 0x18, 0xA0, DEID)
+       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_.RHPX.PGID */
+               If (\_SB.ABD.AVBL)
+               {
+                       \_SB.PEP0.FLD0 = DBUF /* \_SB_.RHPX.DBUF */
+               }
+       }
+
+       Method (_PS3, 0, NotSerialized)  // _PS3: Power State 3
+       {
+               DEID = Buffer (ESNL){}
+               DVAL = 0x03
+               DEID = PGID /* \_SB_.RHPX.PGID */
+               If (\_SB.ABD.AVBL)
+               {
+                       \_SB.PEP0.FLD0 = DBUF /* \_SB_.RHPX.DBUF */
+               }
+       }
+}
diff --git a/polaris/oem_resources.asl b/polaris/oem_resources.asl
new file mode 100755 (executable)
index 0000000..17baa65
--- /dev/null
@@ -0,0 +1,194 @@
+//===========================================================================
+//                           <oem_resources.asl>
+// DESCRIPTION
+//   This file contans the resources needed by oem drivers.
+//
+//===========================================================================
+
+
+Scope(\_SB_.PEP0) 
+{
+       
+    // OEM 
+    Method(OPMD)
+    {
+        Return(OPCC)
+    }  
+       
+    Name(OPCC,
+    Package (){ 
+        Package ()
+        {
+            "DEVICE", 
+            "\\_SB.RHPX", 
+            Package()
+            { 
+                "DSTATE",
+                0x0, // D0 state
+                
+                // interrupt configuration
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2559-irq-gpio
+                    package()
+                    {                                    
+                        24,  // PIN number = 24
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        0,   // direction = Input.
+                        3,   // Pull Up 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2560-irq-gpio
+                    package()
+                    {                                    
+                        30,  // PIN number = 30
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        0,   // direction = Input.
+                        3,   // Pull Up 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2559-reset-gpio
+                    package()
+                    {                                    
+                        14,  // PIN number = 14
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        1,   // direction = Output.
+                        0,   // NO Pull 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2560-reset-gpio
+                    package()
+                    {                                    
+                        25,  // PIN number = 25
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        1,   // direction = Output.
+                        0,   // NO Pull 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                
+                // Power is connected to PM8998 S4, no need to manage power
+                
+                package()
+                {
+                    "DELAY",
+                    package()
+                    {
+                        500,  // 500 Milsec delay
+                    }
+                },
+                
+                // Drive RESET Line High
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2559-reset-gpio 
+                    package()
+                    {                                    
+                        14,  // PIN number = 14
+                        1,   // State: active = 0x1
+                        0,   // Function select = 0
+                        1,   // direction = O/P
+                        0,   //  Pull none 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2560-reset-gpio 
+                    package()
+                    {                                    
+                        25,  // PIN number = 25
+                        1,   // State: active = 0x1
+                        0,   // Function select = 0
+                        1,   // direction = O/P
+                        0,   //  Pull none 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+
+                package()
+                {
+                    "DELAY", 
+                    package()
+                    {
+                        200,  // 200 Milsec delay
+                    }
+                },
+            },
+            Package()
+            {
+                "DSTATE",
+                0x3, // D3 state    
+                
+                // RESET pin - power save mode 
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2559-reset-gpio
+                    package()
+                    {                                    
+                        14,  // PIN number = 14
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        1,   // direction = Output.
+                        0,   // NO Pull 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2560-reset-gpio
+                    package()
+                    {                                    
+                        25,  // PIN number = 25
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        1,   // direction = Output.
+                        0,   // NO Pull 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+
+                // INT configuration - power save mode
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2559-irq-gpio
+                    package()
+                    {                                    
+                        24,  // PIN number = 24
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        0,   // direction = Input.
+                        1,   // Pull Down 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+                package()
+                {
+                    "TLMMGPIO", // TLMMGPIO resource tas2560-irq-gpio
+                    package()
+                    {                                    
+                        30,  // PIN number = 30
+                        0,   // State: NOT active = 0x0
+                        0,   // Function select = 0
+                        0,   // direction = Input.
+                        1,   // Pull Down 
+                        0,   // Drive Strength: 0x0 = 2mA
+                    },
+                },
+            }
+        }
+    })
+}