From: Marijan Limov Date: 星期天, 22 Aug 2021 23:49:13 +0000 (+0200) Subject: Beryllium - Brightness adjustment works for tianma, still no ebbg X-Git-Url: https://git.renegade-project.org/?a=commitdiff_plain;h=c9c96c6f2444af920e5f060254ef9a1455a6b646;p=edk2-sdm845-acpi.git Beryllium - Brightness adjustment works for tianma, still no ebbg I2C should be working too --- diff --git a/beryllium/DSDT.aml b/beryllium/DSDT.aml index 24db902..fa6a4ca 100644 Binary files a/beryllium/DSDT.aml and b/beryllium/DSDT.aml differ diff --git a/beryllium/DSDT.dsl b/beryllium/DSDT.dsl index 3941ecc..49d3df1 100644 --- a/beryllium/DSDT.dsl +++ b/beryllium/DSDT.dsl @@ -30970,7 +30970,7 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) One, 0x001B7740, One, - 0x07, + 0x05, Zero } }, @@ -30984,7 +30984,7 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) One, 0x0013E5C0, One, - 0x07, + 0x05, Zero } }, @@ -30998,7 +30998,7 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) One, 0x002F5D00, One, - 0x07, + 0x05, Zero } } @@ -42227,175 +42227,8 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) }) } - Scope (PEP0) - { - Method (LPMX, 0, NotSerialized) - { - Return (LPXC) /* \_SB_.PEP0.LPXC */ - } - - Name (LPXC, Package (0x01) - { - Package (0x04) - { - "DEVICE", - "\\_SB.TSC1", - Package (0x09) - { - "DSTATE", - Zero, - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x7D, - Zero, - Zero, - Zero, - 0x03, - Zero - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x63, - Zero, - Zero, - One, - Zero, - Zero - } - }, - - Package (0x02) - { - "PMICVREGVOTE", - Package (0x06) - { - "PPP_RESOURCE_ID_LDO28_A", - One, - 0x00325AA0, - One, - 0x07, - Zero - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x17, - One, - Zero, - One, - 0x03, - Zero - } - }, - - Package (0x02) - { - "DELAY", - Package (0x01) - { - 0x02 - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x63, - One, - Zero, - One, - Zero, - Zero - } - }, - - Package (0x02) - { - "DELAY", - Package (0x01) - { - 0xC8 - } - } - }, - - Package (0x06) - { - "DSTATE", - 0x03, - Package (0x02) - { - "PMICVREGVOTE", - Package (0x06) - { - "PPP_RESOURCE_ID_LDO28_A", - One, - Zero, - Zero, - Zero, - Zero - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x17, - Zero, - Zero, - One, - One, - Zero - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x63, - Zero, - Zero, - Zero, - One, - Zero - } - }, - - Package (0x02) - { - "TLMMGPIO", - Package (0x06) - { - 0x7D, - Zero, - Zero, - Zero, - One, - Zero - } - } - } - } - }) - } + + Include ("cust_touch_resources.asl") Device (BAM1) { @@ -53384,42 +53217,10 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) Return (RBUF) /* \_SB_.GPU0.DITH.RBUF */ } - Method (BLCP, 1, Serialized) + Method (BLCP, 1, NotSerialized) { Name (RBUF, Buffer (0x0100){}) - Local0 = Zero - CreateField (RBUF, (Local0 * 0x08), 0x20, PKHR) - Local0 += 0x04 - CreateField (RBUF, (Local0 * 0x08), 0x08, PKCM) - Local0 += One - CreateField (RBUF, (Local0 * 0x08), 0x08, PKDS) - Local0 += One - CreateField (RBUF, (Local0 * 0x08), 0x08, PKUB) - Local0 += One - CreateField (RBUF, (Local0 * 0x08), 0x08, PKLB) - Local0 += One - Name (BON, Buffer (0x03) - { - 0x39, 0x53, 0x24 // 9S$ - }) - CreateField (RBUF, (Local0 * 0x08), 0x20, PKH2) - Local0 += 0x04 - CreateField (RBUF, (Local0 * 0x08), 0x20, PKP2) - PKH2 = SizeOf (BON) - PKP2 = BON /* \_SB_.GPU0.BLCP.BON_ */ - Local0 += SizeOf (BON) - CreateDWordField (RBUF, (Local0 * 0x08), EOF) - Local1 = (Arg0 * 0x03FF) - Local1 /= 0xFF - Local2 = (Arg0 * 0x03FF) - Local2 /= 0xFF00 - Local2 &= 0x03 - PKHR = 0x04 - PKCM = 0x39 - PKDS = 0x51 - PKUB = Local2 - PKLB = Local1 - EOF = Zero + Return (RBUF) /* \_SB_.GPU0.BLCP.RBUF */ } @@ -54031,7 +53832,7 @@ DefinitionBlock ("", "DSDT", 2, "QCOMM ", "SDM850 ", 0x00000003) Package (0x02) { "DisableMiracast", - One + Zero }, Package (0x02) @@ -58466,7 +58267,7 @@ Include("cust_thermal_zones.asl") Device (TSC1) { - Name (_HID, "MSHW1003") // _HID: Hardware ID + Name (_HID, "TEST3330") // _HID: Hardware ID Name (_UID, One) // _UID: Unique ID Name (_DEP, Package (0x03) // _DEP: Dependencies { @@ -58478,7 +58279,7 @@ Include("cust_thermal_zones.asl") { Name (RBUF, ResourceTemplate () { - I2cSerialBusV2 (0x0020, ControllerInitiated, 0x00061A80, + I2cSerialBusV2 (0x0062, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.IC15", 0x00, ResourceConsumer, , Exclusive, ) @@ -58486,13 +58287,13 @@ Include("cust_thermal_zones.asl") "\\_SB.GIO0", 0x00, ResourceConsumer, , ) { // Pin list - 0x007D + 31 } GpioIo (Exclusive, PullNone, 0x0000, 0x0000, IoRestrictionNone, "\\_SB.GIO0", 0x00, ResourceConsumer, , ) { // Pin list - 0x0063 + 32 } }) Return (RBUF) /* \_SB_.TSC1._CRS.RBUF */ diff --git a/beryllium/cust_touch_resources.asl b/beryllium/cust_touch_resources.asl new file mode 100644 index 0000000..58c47bf --- /dev/null +++ b/beryllium/cust_touch_resources.asl @@ -0,0 +1,187 @@ +//=========================================================================== +// +// DESCRIPTION +// This file contains the resources needed by touch driver. +// +// +//=========================================================================== +Scope(\_SB_.PEP0) +{ + + Method(LPMX) + { + Return(LPXC) + } + + Name(LPXC, + Package(){ + // Touch LVS1 + Package() + { + "DEVICE", + "\\_SB.TSC1", + 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 + }, + }, + }, + }, + }) +} diff --git a/beryllium/displayXML.asl b/beryllium/displayXML.asl index 127c765..a0fce02 100644 --- a/beryllium/displayXML.asl +++ b/beryllium/displayXML.asl @@ -338,5 +338,17 @@ Name (PCFG, Buffer(){" 1 2 + 100 + 15 + 600000 + 80 + 40 + 1 + 21 + 1 + 1 + True + 200 + 319970 "}) \ No newline at end of file