From 536d853b2e30f6af7759a403a08856fbc8ebbfe3 Mon Sep 17 00:00:00 2001 From: Xilin Wu Date: Thu, 5 May 2022 18:35:39 +0800 Subject: [PATCH] test sound not working unfortunately :) --- Common/pep_common.asl | 2 +- {Common => beryllium}/oem_resources.asl | 0 dipper/oem_resources.asl | 24 +++ polaris/DSDT.AML | Bin 253543 -> 254319 bytes polaris/cust_dsdt.asl | 88 +++++++++++ polaris/oem_resources.asl | 194 ++++++++++++++++++++++++ 6 files changed, 307 insertions(+), 1 deletion(-) rename {Common => beryllium}/oem_resources.asl (100%) create mode 100755 dipper/oem_resources.asl create mode 100755 polaris/oem_resources.asl diff --git a/Common/pep_common.asl b/Common/pep_common.asl index 6c7bdb6..de51ba5 100644 --- a/Common/pep_common.asl +++ b/Common/pep_common.asl @@ -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/Common/oem_resources.asl b/beryllium/oem_resources.asl similarity index 100% rename from Common/oem_resources.asl rename to beryllium/oem_resources.asl diff --git a/dipper/oem_resources.asl b/dipper/oem_resources.asl new file mode 100755 index 0000000..5e16513 --- /dev/null +++ b/dipper/oem_resources.asl @@ -0,0 +1,24 @@ +//=========================================================================== +// +// DESCRIPTION +// This file contans the resources needed by oem drivers. +// +//=========================================================================== + + +Scope(\_SB_.PEP0) +{ + + // OEM + Method(OPMD) + { + Return(OPCC) + } + + + Name(OPCC, + Package () + { + }) + +} diff --git a/polaris/DSDT.AML b/polaris/DSDT.AML index df5cb954c2a1584d626de89aaabf701782657dc3..9e39f58b11aa5a620f67993129d9f92a94e72a2c 100644 GIT binary patch delta 591 zcmaF9hyVQ{elC|_myrC2%nVE`CUQwLcZt|FYHZbDJbA|1OEg9=KG-Qfz%{@?gxf#B z*M(t;e}JrC@(74v5OU|{;&llQaSU;tUMSBb z%qTHk;3ktequlg+yO_l5`4|`&85o4bn0P~ce0|*mJpCDjIN7))A;SDjKofl&BN>EP z8M(hOVkqNd#I746%m>%a!pL<($dio?>JSDlW~foqF9b4i>Em|O`-NBbxGMb5*VSDrn zW);5r=q6`zP|$M3dw9C=`Ubm&SQr=>FmS{>qjEz%T^NCaLBWEGTylMqz>s2O0y>$E zp+Sm`;Xea7iad>+%@`_ydV%pSq{k#E%q1Xle6Zg#C@3ojwNSskfgo!t) rv{)CYTGvy`$k~uVh?$XrBf#C$MUa<^3m)0i3sy7V*elC|_myq;(%nVHDCUQwLH$Aa!)Yz)Qc=C*#e2iXvuv2`1Yk+|Ww|{`I z3&Rrs0B2_o5Fy00-Rm4`0FBjicJvKq5OPrx;dPm=xPa-`^qIa)ri}j66~dWBrgQi)nK5!txA$Z6 koW5lplSun{Kc?;H{g`E=nUa~ezgx+y!neJBC-Vz+0Gg~k!~g&Q diff --git a/polaris/cust_dsdt.asl b/polaris/cust_dsdt.asl index 7884613..7fcc7ba 100644 --- a/polaris/cust_dsdt.asl +++ b/polaris/cust_dsdt.asl @@ -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 index 0000000..17baa65 --- /dev/null +++ b/polaris/oem_resources.asl @@ -0,0 +1,194 @@ +//=========================================================================== +// +// 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 + }, + }, + } + } + }) +} -- 2.45.2