From: Xilin Wu Date: 星期四, 5 May 2022 10:35:39 +0000 (+0800) Subject: test sound X-Git-Url: https://git.renegade-project.org/?a=commitdiff_plain;h=536d853b2e30f6af7759a403a08856fbc8ebbfe3;p=edk2-sdm845-acpi.git test sound not working unfortunately :) --- 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 df5cb95..9e39f58 100644 Binary files a/polaris/DSDT.AML and b/polaris/DSDT.AML differ 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 + }, + }, + } + } + }) +}