Update cml-u and whl-u with lemp9 changes
This commit is contained in:
@@ -5,7 +5,6 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select ADD_FSP_BINARIES
|
select ADD_FSP_BINARIES
|
||||||
select BOARD_ROMSIZE_KB_16384
|
select BOARD_ROMSIZE_KB_16384
|
||||||
select EC_ACPI
|
select EC_ACPI
|
||||||
select EXCLUDE_EMMC_INTERFACE
|
|
||||||
select HAVE_ACPI_RESUME
|
select HAVE_ACPI_RESUME
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
select HAVE_CMOS_DEFAULT
|
select HAVE_CMOS_DEFAULT
|
||||||
@@ -13,10 +12,10 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select HAVE_SMI_HANDLER
|
select HAVE_SMI_HANDLER
|
||||||
select INTEL_GMA_HAVE_VBT
|
select INTEL_GMA_HAVE_VBT
|
||||||
select INTEL_LPSS_UART_FOR_CONSOLE
|
select INTEL_LPSS_UART_FOR_CONSOLE
|
||||||
|
# Chip select 2 is not yet supported by intel fast_spi
|
||||||
# select MAINBOARD_HAS_SPI_TPM_CR50
|
# select MAINBOARD_HAS_SPI_TPM_CR50
|
||||||
# select MAINBOARD_HAS_TPM2
|
# select MAINBOARD_HAS_TPM2
|
||||||
select NO_UART_ON_SUPERIO
|
select NO_UART_ON_SUPERIO\
|
||||||
select PCIE_DEBUG_INFO
|
|
||||||
select PCIEXP_HOTPLUG
|
select PCIEXP_HOTPLUG
|
||||||
select SOC_INTEL_COMETLAKE
|
select SOC_INTEL_COMETLAKE
|
||||||
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
||||||
@@ -99,10 +98,11 @@ config POST_DEVICE
|
|||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
# Chip select 2 is not yet supported by intel fast_spi
|
||||||
#config DRIVER_TPM_SPI_BUS
|
#config DRIVER_TPM_SPI_BUS
|
||||||
# hex
|
# hex
|
||||||
# default 0x0
|
# default 0x0
|
||||||
|
#
|
||||||
#config DRIVER_TPM_SPI_CHIP
|
#config DRIVER_TPM_SPI_CHIP
|
||||||
# int
|
# int
|
||||||
# default 2
|
# default 2
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
bootblock-y += bootblock.c
|
bootblock-y += bootblock.c
|
||||||
ramstage-y += ramstage.c variants/$(VARIANT_DIR)/hda_verb.c
|
ramstage-y += ramstage.c
|
||||||
|
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
|
||||||
|
@@ -15,21 +15,21 @@
|
|||||||
|
|
||||||
Device (AC)
|
Device (AC)
|
||||||
{
|
{
|
||||||
Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID
|
Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID
|
||||||
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
||||||
{
|
{
|
||||||
_SB
|
_SB
|
||||||
})
|
})
|
||||||
|
|
||||||
Name (ACFG, One)
|
Name (ACFG, One)
|
||||||
|
|
||||||
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
|
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
|
||||||
{
|
{
|
||||||
Return (ACFG)
|
Return (ACFG)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_STA, 0, NotSerialized) // _STA: Status
|
Method (_STA, 0, NotSerialized) // _STA: Status
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,169 +15,169 @@
|
|||||||
|
|
||||||
Device (BAT0)
|
Device (BAT0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID
|
||||||
Name (_UID, Zero) // _UID: Unique ID
|
Name (_UID, Zero) // _UID: Unique ID
|
||||||
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
||||||
{
|
{
|
||||||
_SB
|
_SB
|
||||||
})
|
})
|
||||||
Name (BFCC, Zero)
|
Name (BFCC, Zero)
|
||||||
Method (_STA, 0, NotSerialized) // _STA: Status
|
Method (_STA, 0, NotSerialized) // _STA: Status
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Return (0x1F)
|
Return (0x1F)
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PBIF, Package (0x0D)
|
Name (PBIF, Package (0x0D)
|
||||||
{
|
{
|
||||||
One,
|
One,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
One,
|
One,
|
||||||
0x39D0,
|
0x39D0,
|
||||||
Zero,
|
Zero,
|
||||||
Zero,
|
Zero,
|
||||||
0x40,
|
0x40,
|
||||||
0x40,
|
0x40,
|
||||||
"BAT",
|
"BAT",
|
||||||
"0001",
|
"0001",
|
||||||
"LION",
|
"LION",
|
||||||
"Notebook"
|
"Notebook"
|
||||||
})
|
})
|
||||||
Method (IVBI, 0, NotSerialized)
|
Method (IVBI, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
PBIF [One] = 0xFFFFFFFF
|
PBIF [One] = 0xFFFFFFFF
|
||||||
PBIF [0x02] = 0xFFFFFFFF
|
PBIF [0x02] = 0xFFFFFFFF
|
||||||
PBIF [0x04] = 0xFFFFFFFF
|
PBIF [0x04] = 0xFFFFFFFF
|
||||||
PBIF [0x09] = " "
|
PBIF [0x09] = " "
|
||||||
PBIF [0x0A] = " "
|
PBIF [0x0A] = " "
|
||||||
PBIF [0x0B] = " "
|
PBIF [0x0B] = " "
|
||||||
PBIF [0x0C] = " "
|
PBIF [0x0C] = " "
|
||||||
BFCC = Zero
|
BFCC = Zero
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (UPBI, 0, NotSerialized)
|
Method (UPBI, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
|
||||||
PBIF [One] = Local0
|
PBIF [One] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
|
||||||
PBIF [0x02] = Local0
|
PBIF [0x02] = Local0
|
||||||
BFCC = Local0
|
BFCC = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
|
||||||
PBIF [0x04] = Local0
|
PBIF [0x04] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
|
||||||
PBIF [0x05] = Local0
|
PBIF [0x05] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
|
||||||
PBIF [0x06] = Local0
|
PBIF [0x06] = Local0
|
||||||
PBIF [0x09] = "BAT"
|
PBIF [0x09] = "BAT"
|
||||||
PBIF [0x0A] = "0001"
|
PBIF [0x0A] = "0001"
|
||||||
PBIF [0x0B] = "LION"
|
PBIF [0x0B] = "LION"
|
||||||
PBIF [0x0C] = "Notebook"
|
PBIF [0x0C] = "Notebook"
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBI ()
|
IVBI ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_BIF, 0, NotSerialized) // _BIF: Battery Information
|
Method (_BIF, 0, NotSerialized) // _BIF: Battery Information
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
UPBI ()
|
UPBI ()
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBI ()
|
IVBI ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Return (PBIF) /* \_SB_.BAT0.PBIF */
|
Return (PBIF) /* \_SB_.BAT0.PBIF */
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PBST, Package (0x04)
|
Name (PBST, Package (0x04)
|
||||||
{
|
{
|
||||||
Zero,
|
Zero,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0x3D90
|
0x3D90
|
||||||
})
|
})
|
||||||
Method (IVBS, 0, NotSerialized)
|
Method (IVBS, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
PBST [Zero] = Zero
|
PBST [Zero] = Zero
|
||||||
PBST [One] = 0xFFFFFFFF
|
PBST [One] = 0xFFFFFFFF
|
||||||
PBST [0x02] = 0xFFFFFFFF
|
PBST [0x02] = 0xFFFFFFFF
|
||||||
PBST [0x03] = 0x2710
|
PBST [0x03] = 0x2710
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (UPBS, 0, NotSerialized)
|
Method (UPBS, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Local0 = Zero
|
Local0 = Zero
|
||||||
Local1 = Zero
|
Local1 = Zero
|
||||||
If (^^AC.ACFG)
|
If (^^AC.ACFG)
|
||||||
{
|
{
|
||||||
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
|
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
|
||||||
{
|
{
|
||||||
Local0 |= 0x02
|
Local0 |= 0x02
|
||||||
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Local0 |= One
|
Local0 |= One
|
||||||
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
||||||
}
|
}
|
||||||
|
|
||||||
Local7 = (Local1 & 0x8000)
|
Local7 = (Local1 & 0x8000)
|
||||||
If ((Local7 == 0x8000))
|
If ((Local7 == 0x8000))
|
||||||
{
|
{
|
||||||
Local1 ^= 0xFFFF
|
Local1 ^= 0xFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
|
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
|
||||||
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
|
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
|
||||||
PBST [Zero] = Local0
|
PBST [Zero] = Local0
|
||||||
PBST [One] = Local1
|
PBST [One] = Local1
|
||||||
PBST [0x02] = Local2
|
PBST [0x02] = Local2
|
||||||
PBST [0x03] = Local3
|
PBST [0x03] = Local3
|
||||||
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
|
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
|
||||||
{
|
{
|
||||||
Notify (BAT0, 0x81) // Information Change
|
Notify (BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBS ()
|
IVBS ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_BST, 0, NotSerialized) // _BST: Battery Status
|
Method (_BST, 0, NotSerialized) // _BST: Battery Status
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
UPBS ()
|
UPBS ()
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBS ()
|
IVBS ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Return (PBST) /* \_SB_.BAT0.PBST */
|
Return (PBST) /* \_SB_.BAT0.PBST */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
Device (PWRB)
|
Device (PWRB)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0C"))
|
Name (_HID, EisaId ("PNP0C0C"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
}
|
}
|
||||||
|
|
||||||
Device (SLPB)
|
Device (SLPB)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0E"))
|
Name (_HID, EisaId ("PNP0C0E"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
}
|
}
|
||||||
|
@@ -15,217 +15,217 @@
|
|||||||
|
|
||||||
Device (EC0)
|
Device (EC0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */) // _HID: Hardware ID
|
||||||
Name (_GPE, 0x50 /* GPP_E16 */) // _GPE: General Purpose Events
|
Name (_GPE, 0x50 /* GPP_E16 */) // _GPE: General Purpose Events
|
||||||
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
|
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
|
||||||
{
|
{
|
||||||
IO (Decode16,
|
IO (Decode16,
|
||||||
0x0062, // Range Minimum
|
0x0062, // Range Minimum
|
||||||
0x0062, // Range Maximum
|
0x0062, // Range Maximum
|
||||||
0x00, // Alignment
|
0x00, // Alignment
|
||||||
0x01, // Length
|
0x01, // Length
|
||||||
)
|
)
|
||||||
IO (Decode16,
|
IO (Decode16,
|
||||||
0x0066, // Range Minimum
|
0x0066, // Range Minimum
|
||||||
0x0066, // Range Maximum
|
0x0066, // Range Maximum
|
||||||
0x00, // Alignment
|
0x00, // Alignment
|
||||||
0x01, // Length
|
0x01, // Length
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
#include "acpi/ec_ram.asl"
|
#include "acpi/ec_ram.asl"
|
||||||
|
|
||||||
Name (ECOK, Zero)
|
Name (ECOK, Zero)
|
||||||
Method (_REG, 2, Serialized) // _REG: Region Availability
|
Method (_REG, 2, Serialized) // _REG: Region Availability
|
||||||
{
|
{
|
||||||
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
|
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
|
||||||
If (((Arg0 == 0x03) && (Arg1 == One))) {
|
If (((Arg0 == 0x03) && (Arg1 == One))) {
|
||||||
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
||||||
ECOS = 1
|
ECOS = 1
|
||||||
|
|
||||||
// Enable software display brightness keys
|
// Enable software display brightness keys
|
||||||
WINF = 1
|
WINF = 1
|
||||||
|
|
||||||
// Set current AC state
|
// Set current AC state
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
// Update battery information and status
|
// Update battery information and status
|
||||||
^^^^BAT0.UPBI()
|
^^^^BAT0.UPBI()
|
||||||
^^^^BAT0.UPBS()
|
^^^^BAT0.UPBS()
|
||||||
|
|
||||||
PNOT ()
|
PNOT ()
|
||||||
|
|
||||||
// EC is now available
|
// EC is now available
|
||||||
ECOK = Arg1
|
ECOK = Arg1
|
||||||
|
|
||||||
// Reset System76 Device
|
// Reset System76 Device
|
||||||
^^^^S76D.RSET()
|
^^^^S76D.RSET()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (PTS, 1, Serialized) {
|
Method (PTS, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
|
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Clear wake cause
|
// Clear wake cause
|
||||||
WFNO = Zero
|
WFNO = Zero
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (WAK, 1, Serialized) {
|
Method (WAK, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
|
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Set current AC state
|
// Set current AC state
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
|
|
||||||
// Update battery information and status
|
// Update battery information and status
|
||||||
^^^^BAT0.UPBI()
|
^^^^BAT0.UPBI()
|
||||||
^^^^BAT0.UPBS()
|
^^^^BAT0.UPBS()
|
||||||
|
|
||||||
// Notify of changes
|
// Notify of changes
|
||||||
Notify(^^^^AC, Zero)
|
Notify(^^^^AC, Zero)
|
||||||
Notify(^^^^BAT0, Zero)
|
Notify(^^^^BAT0, Zero)
|
||||||
|
|
||||||
Sleep (1000)
|
Sleep (1000)
|
||||||
|
|
||||||
// Reset System76 Device
|
// Reset System76 Device
|
||||||
^^^^S76D.RSET()
|
^^^^S76D.RSET()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Touchpad Toggle"
|
Debug = "EC: Touchpad Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Screen Toggle"
|
Debug = "EC: Screen Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0C, 0, NotSerialized) // Mute
|
Method (_Q0C, 0, NotSerialized) // Mute
|
||||||
{
|
{
|
||||||
Debug = "EC: Mute"
|
Debug = "EC: Mute"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
||||||
{
|
{
|
||||||
Debug = "EC: Keyboard Backlight"
|
Debug = "EC: Keyboard Backlight"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0E, 0, NotSerialized) // Volume Down
|
Method (_Q0E, 0, NotSerialized) // Volume Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Down"
|
Debug = "EC: Volume Down"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0F, 0, NotSerialized) // Volume Up
|
Method (_Q0F, 0, NotSerialized) // Volume Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Up"
|
Debug = "EC: Volume Up"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Switch Video Mode"
|
Debug = "EC: Switch Video Mode"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q11, 0, NotSerialized) // Brightness Down
|
Method (_Q11, 0, NotSerialized) // Brightness Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Down"
|
Debug = "EC: Brightness Down"
|
||||||
^^^^HIDD.HPEM (20)
|
^^^^HIDD.HPEM (20)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q12, 0, NotSerialized) // Brightness Up
|
Method (_Q12, 0, NotSerialized) // Brightness Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Up"
|
Debug = "EC: Brightness Up"
|
||||||
^^^^HIDD.HPEM (19)
|
^^^^HIDD.HPEM (19)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Camera Toggle"
|
Debug = "EC: Camera Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Airplane Mode"
|
Debug = "EC: Airplane Mode"
|
||||||
// Only send HIDD message when hardware airplane mode not in use
|
// Only send HIDD message when hardware airplane mode not in use
|
||||||
If (ECOS == 2) {
|
If (ECOS == 2) {
|
||||||
^^^^HIDD.HPEM (8)
|
^^^^HIDD.HPEM (8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q15, 0, NotSerialized) // Suspend Button
|
Method (_Q15, 0, NotSerialized) // Suspend Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Suspend Button"
|
Debug = "EC: Suspend Button"
|
||||||
Notify (SLPB, 0x80)
|
Notify (SLPB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q16, 0, NotSerialized) // AC Detect
|
Method (_Q16, 0, NotSerialized) // AC Detect
|
||||||
{
|
{
|
||||||
Debug = "EC: AC Detect"
|
Debug = "EC: AC Detect"
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
Notify (AC, 0x80) // Status Change
|
Notify (AC, 0x80) // Status Change
|
||||||
Sleep (0x01F4)
|
Sleep (0x01F4)
|
||||||
If (BAT0)
|
If (BAT0)
|
||||||
{
|
{
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
Sleep (0x32)
|
Sleep (0x32)
|
||||||
Notify (^^^^BAT0, 0x80) // Status Change
|
Notify (^^^^BAT0, 0x80) // Status Change
|
||||||
Sleep (0x32)
|
Sleep (0x32)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (17)"
|
Debug = "EC: BAT0 Update (17)"
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (19)"
|
Debug = "EC: BAT0 Update (19)"
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1B, 0, NotSerialized) // Lid Close
|
Method (_Q1B, 0, NotSerialized) // Lid Close
|
||||||
{
|
{
|
||||||
Debug = "EC: Lid Close"
|
Debug = "EC: Lid Close"
|
||||||
Notify (LID0, 0x80)
|
Notify (LID0, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
||||||
{
|
{
|
||||||
Debug = "EC: Thermal Trip"
|
Debug = "EC: Thermal Trip"
|
||||||
/* TODO
|
/* TODO
|
||||||
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
||||||
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1D, 0, NotSerialized) // Power Button
|
Method (_Q1D, 0, NotSerialized) // Power Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Power Button"
|
Debug = "EC: Power Button"
|
||||||
Notify (PWRB, 0x80)
|
Notify (PWRB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q50, 0, NotSerialized) // Other Events
|
Method (_Q50, 0, NotSerialized) // Other Events
|
||||||
{
|
{
|
||||||
Local0 = OEM4
|
Local0 = OEM4
|
||||||
If (Local0 == 0x8A) {
|
If (Local0 == 0x8A) {
|
||||||
Debug = "EC: White Keyboard Backlight"
|
Debug = "EC: White Keyboard Backlight"
|
||||||
Notify (^^^^S76D, 0x80)
|
Notify (^^^^S76D, 0x80)
|
||||||
} ElseIf (Local0 == 0x9F) {
|
} ElseIf (Local0 == 0x9F) {
|
||||||
Debug = "EC: Color Keyboard Toggle"
|
Debug = "EC: Color Keyboard Toggle"
|
||||||
Notify (^^^^S76D, 0x81)
|
Notify (^^^^S76D, 0x81)
|
||||||
} ElseIf (Local0 == 0x81) {
|
} ElseIf (Local0 == 0x81) {
|
||||||
Debug = "EC: Color Keyboard Down"
|
Debug = "EC: Color Keyboard Down"
|
||||||
Notify (^^^^S76D, 0x82)
|
Notify (^^^^S76D, 0x82)
|
||||||
} ElseIf (Local0 == 0x82) {
|
} ElseIf (Local0 == 0x82) {
|
||||||
Debug = "EC: Color Keyboard Up"
|
Debug = "EC: Color Keyboard Up"
|
||||||
Notify (^^^^S76D, 0x83)
|
Notify (^^^^S76D, 0x83)
|
||||||
} ElseIf (Local0 == 0x80) {
|
} ElseIf (Local0 == 0x80) {
|
||||||
Debug = "EC: Color Keyboard Color Change"
|
Debug = "EC: Color Keyboard Color Change"
|
||||||
Notify (^^^^S76D, 0x84)
|
Notify (^^^^S76D, 0x84)
|
||||||
} Else {
|
} Else {
|
||||||
Debug = Concatenate("EC: Other: ", ToHexString(Local0))
|
Debug = Concatenate("EC: Other: ", ToHexString(Local0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,173 +16,173 @@
|
|||||||
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
|
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
|
||||||
Field (ERAM, ByteAcc, Lock, Preserve)
|
Field (ERAM, ByteAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
NMSG, 8,
|
NMSG, 8,
|
||||||
SLED, 4,
|
SLED, 4,
|
||||||
Offset (0x02),
|
Offset (0x02),
|
||||||
MODE, 1,
|
MODE, 1,
|
||||||
FAN0, 1,
|
FAN0, 1,
|
||||||
TME0, 1,
|
TME0, 1,
|
||||||
TME1, 1,
|
TME1, 1,
|
||||||
FAN1, 1,
|
FAN1, 1,
|
||||||
, 2,
|
, 2,
|
||||||
Offset (0x03),
|
Offset (0x03),
|
||||||
LSTE, 1,
|
LSTE, 1,
|
||||||
LSW0, 1,
|
LSW0, 1,
|
||||||
LWKE, 1,
|
LWKE, 1,
|
||||||
WAKF, 1,
|
WAKF, 1,
|
||||||
, 2,
|
, 2,
|
||||||
PWKE, 1,
|
PWKE, 1,
|
||||||
MWKE, 1,
|
MWKE, 1,
|
||||||
AC0, 8,
|
AC0, 8,
|
||||||
PSV, 8,
|
PSV, 8,
|
||||||
CRT, 8,
|
CRT, 8,
|
||||||
TMP, 8,
|
TMP, 8,
|
||||||
AC1, 8,
|
AC1, 8,
|
||||||
BBST, 8,
|
BBST, 8,
|
||||||
Offset (0x0B),
|
Offset (0x0B),
|
||||||
Offset (0x0C),
|
Offset (0x0C),
|
||||||
Offset (0x0D),
|
Offset (0x0D),
|
||||||
Offset (0x0E),
|
Offset (0x0E),
|
||||||
SLPT, 8,
|
SLPT, 8,
|
||||||
SWEJ, 1,
|
SWEJ, 1,
|
||||||
SWCH, 1,
|
SWCH, 1,
|
||||||
Offset (0x10),
|
Offset (0x10),
|
||||||
ADP, 1,
|
ADP, 1,
|
||||||
AFLT, 1,
|
AFLT, 1,
|
||||||
BAT0, 1,
|
BAT0, 1,
|
||||||
BAT1, 1,
|
BAT1, 1,
|
||||||
, 3,
|
, 3,
|
||||||
PWOF, 1,
|
PWOF, 1,
|
||||||
WFNO, 8,
|
WFNO, 8,
|
||||||
BPU0, 32,
|
BPU0, 32,
|
||||||
BDC0, 32,
|
BDC0, 32,
|
||||||
BFC0, 32,
|
BFC0, 32,
|
||||||
BTC0, 32,
|
BTC0, 32,
|
||||||
BDV0, 32,
|
BDV0, 32,
|
||||||
BST0, 32,
|
BST0, 32,
|
||||||
BPR0, 32,
|
BPR0, 32,
|
||||||
BRC0, 32,
|
BRC0, 32,
|
||||||
BPV0, 32,
|
BPV0, 32,
|
||||||
BTP0, 16,
|
BTP0, 16,
|
||||||
BRS0, 16,
|
BRS0, 16,
|
||||||
BCW0, 32,
|
BCW0, 32,
|
||||||
BCL0, 32,
|
BCL0, 32,
|
||||||
BCG0, 32,
|
BCG0, 32,
|
||||||
BG20, 32,
|
BG20, 32,
|
||||||
BMO0, 64,
|
BMO0, 64,
|
||||||
BIF0, 64,
|
BIF0, 64,
|
||||||
BSN0, 32,
|
BSN0, 32,
|
||||||
BTY0, 64,
|
BTY0, 64,
|
||||||
Offset (0x67),
|
Offset (0x67),
|
||||||
Offset (0x68),
|
Offset (0x68),
|
||||||
ECOS, 8,
|
ECOS, 8,
|
||||||
LNXD, 8,
|
LNXD, 8,
|
||||||
ECPS, 8,
|
ECPS, 8,
|
||||||
Offset (0x6C),
|
Offset (0x6C),
|
||||||
BTMP, 16,
|
BTMP, 16,
|
||||||
EVTN, 8,
|
EVTN, 8,
|
||||||
Offset (0x72),
|
Offset (0x72),
|
||||||
PRCL, 8,
|
PRCL, 8,
|
||||||
PRC0, 8,
|
PRC0, 8,
|
||||||
PRC1, 8,
|
PRC1, 8,
|
||||||
PRCM, 8,
|
PRCM, 8,
|
||||||
PRIN, 8,
|
PRIN, 8,
|
||||||
PSTE, 8,
|
PSTE, 8,
|
||||||
PCAD, 8,
|
PCAD, 8,
|
||||||
PEWL, 8,
|
PEWL, 8,
|
||||||
PWRL, 8,
|
PWRL, 8,
|
||||||
PECD, 8,
|
PECD, 8,
|
||||||
PEHI, 8,
|
PEHI, 8,
|
||||||
PECI, 8,
|
PECI, 8,
|
||||||
PEPL, 8,
|
PEPL, 8,
|
||||||
PEPM, 8,
|
PEPM, 8,
|
||||||
PWFC, 8,
|
PWFC, 8,
|
||||||
PECC, 8,
|
PECC, 8,
|
||||||
PDT0, 8,
|
PDT0, 8,
|
||||||
PDT1, 8,
|
PDT1, 8,
|
||||||
PDT2, 8,
|
PDT2, 8,
|
||||||
PDT3, 8,
|
PDT3, 8,
|
||||||
PRFC, 8,
|
PRFC, 8,
|
||||||
PRS0, 8,
|
PRS0, 8,
|
||||||
PRS1, 8,
|
PRS1, 8,
|
||||||
PRS2, 8,
|
PRS2, 8,
|
||||||
PRS3, 8,
|
PRS3, 8,
|
||||||
PRS4, 8,
|
PRS4, 8,
|
||||||
PRCS, 8,
|
PRCS, 8,
|
||||||
PEC0, 8,
|
PEC0, 8,
|
||||||
PEC1, 8,
|
PEC1, 8,
|
||||||
PEC2, 8,
|
PEC2, 8,
|
||||||
PEC3, 8,
|
PEC3, 8,
|
||||||
CMDR, 8,
|
CMDR, 8,
|
||||||
CVRT, 8,
|
CVRT, 8,
|
||||||
GTVR, 8,
|
GTVR, 8,
|
||||||
FANT, 8,
|
FANT, 8,
|
||||||
SKNT, 8,
|
SKNT, 8,
|
||||||
AMBT, 8,
|
AMBT, 8,
|
||||||
MCRT, 8,
|
MCRT, 8,
|
||||||
DIM0, 8,
|
DIM0, 8,
|
||||||
DIM1, 8,
|
DIM1, 8,
|
||||||
PMAX, 8,
|
PMAX, 8,
|
||||||
PPDT, 8,
|
PPDT, 8,
|
||||||
PECH, 8,
|
PECH, 8,
|
||||||
PMDT, 8,
|
PMDT, 8,
|
||||||
TSD0, 8,
|
TSD0, 8,
|
||||||
TSD1, 8,
|
TSD1, 8,
|
||||||
TSD2, 8,
|
TSD2, 8,
|
||||||
TSD3, 8,
|
TSD3, 8,
|
||||||
CPUP, 16,
|
CPUP, 16,
|
||||||
MCHP, 16,
|
MCHP, 16,
|
||||||
SYSP, 16,
|
SYSP, 16,
|
||||||
CPAP, 16,
|
CPAP, 16,
|
||||||
MCAP, 16,
|
MCAP, 16,
|
||||||
SYAP, 16,
|
SYAP, 16,
|
||||||
CFSP, 16,
|
CFSP, 16,
|
||||||
CPUE, 16,
|
CPUE, 16,
|
||||||
Offset (0xC6),
|
Offset (0xC6),
|
||||||
Offset (0xC7),
|
Offset (0xC7),
|
||||||
VGAT, 8,
|
VGAT, 8,
|
||||||
OEM1, 8,
|
OEM1, 8,
|
||||||
OEM2, 8,
|
OEM2, 8,
|
||||||
OEM3, 16,
|
OEM3, 16,
|
||||||
OEM4, 8,
|
OEM4, 8,
|
||||||
Offset (0xCE),
|
Offset (0xCE),
|
||||||
DUT1, 8,
|
DUT1, 8,
|
||||||
DUT2, 8,
|
DUT2, 8,
|
||||||
RPM1, 16,
|
RPM1, 16,
|
||||||
RPM2, 16,
|
RPM2, 16,
|
||||||
RPM4, 16,
|
RPM4, 16,
|
||||||
Offset (0xD7),
|
Offset (0xD7),
|
||||||
DTHL, 8,
|
DTHL, 8,
|
||||||
DTBP, 8,
|
DTBP, 8,
|
||||||
AIRP, 8,
|
AIRP, 8,
|
||||||
WINF, 8,
|
WINF, 8,
|
||||||
RINF, 8,
|
RINF, 8,
|
||||||
Offset (0xDD),
|
Offset (0xDD),
|
||||||
INF2, 8,
|
INF2, 8,
|
||||||
MUTE, 1,
|
MUTE, 1,
|
||||||
Offset (0xE0),
|
Offset (0xE0),
|
||||||
RPM3, 16,
|
RPM3, 16,
|
||||||
ECKS, 8,
|
ECKS, 8,
|
||||||
Offset (0xE4),
|
Offset (0xE4),
|
||||||
, 4,
|
, 4,
|
||||||
XTUF, 1,
|
XTUF, 1,
|
||||||
EP12, 1,
|
EP12, 1,
|
||||||
Offset (0xE5),
|
Offset (0xE5),
|
||||||
INF3, 8,
|
INF3, 8,
|
||||||
Offset (0xE7),
|
Offset (0xE7),
|
||||||
GFOF, 8,
|
GFOF, 8,
|
||||||
Offset (0xE9),
|
Offset (0xE9),
|
||||||
KPCR, 1,
|
KPCR, 1,
|
||||||
Offset (0xEA),
|
Offset (0xEA),
|
||||||
Offset (0xF0),
|
Offset (0xF0),
|
||||||
PL1T, 16,
|
PL1T, 16,
|
||||||
PL2T, 16,
|
PL2T, 16,
|
||||||
TAUT, 8,
|
TAUT, 8,
|
||||||
Offset (0xF8),
|
Offset (0xF8),
|
||||||
FCMD, 8,
|
FCMD, 8,
|
||||||
FDAT, 8,
|
FDAT, 8,
|
||||||
FBUF, 8,
|
FBUF, 8,
|
||||||
FBF1, 8,
|
FBF1, 8,
|
||||||
FBF2, 8,
|
FBF2, 8,
|
||||||
FBF3, 8
|
FBF3, 8
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
// GPP_D9 SCI
|
// GPP_D9 SCI
|
||||||
Method (_L29, 0, Serialized) {
|
Method (_L29, 0, Serialized) {
|
||||||
Debug = Concatenate("GPE _L29: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
|
Debug = Concatenate("GPE _L29: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
|
||||||
If (\_SB.PCI0.LPCB.EC0.ECOK) {
|
If (\_SB.PCI0.LPCB.EC0.ECOK) {
|
||||||
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
|
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
|
||||||
Notify(\_SB.LID0, 0x80)
|
Notify(\_SB.LID0, 0x80)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,49 +15,49 @@
|
|||||||
|
|
||||||
Device (HIDD)
|
Device (HIDD)
|
||||||
{
|
{
|
||||||
Name (_HID, "INT33D5")
|
Name (_HID, "INT33D5")
|
||||||
Name (HBSY, Zero)
|
Name (HBSY, Zero)
|
||||||
Name (HIDX, Zero)
|
Name (HIDX, Zero)
|
||||||
Name (HRDY, Zero)
|
Name (HRDY, Zero)
|
||||||
|
|
||||||
Method (HDEM, 0, Serialized)
|
Method (HDEM, 0, Serialized)
|
||||||
{
|
{
|
||||||
HBSY = Zero
|
HBSY = Zero
|
||||||
Return (HIDX)
|
Return (HIDX)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HDMM, 0, Serialized)
|
Method (HDMM, 0, Serialized)
|
||||||
{
|
{
|
||||||
Return (Zero)
|
Return (Zero)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HDSM, 1, Serialized)
|
Method (HDSM, 1, Serialized)
|
||||||
{
|
{
|
||||||
HRDY = Arg0
|
HRDY = Arg0
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HPEM, 1, Serialized)
|
Method (HPEM, 1, Serialized)
|
||||||
{
|
{
|
||||||
HBSY = One
|
HBSY = One
|
||||||
HIDX = Arg0
|
HIDX = Arg0
|
||||||
|
|
||||||
Notify (HIDD, 0xC0)
|
Notify (HIDD, 0xC0)
|
||||||
Local0 = Zero
|
Local0 = Zero
|
||||||
While (((Local0 < 0xFA) && HBSY))
|
While (((Local0 < 0xFA) && HBSY))
|
||||||
{
|
{
|
||||||
Sleep (0x04)
|
Sleep (0x04)
|
||||||
Local0++
|
Local0++
|
||||||
}
|
}
|
||||||
|
|
||||||
If ((HBSY == One))
|
If ((HBSY == One))
|
||||||
{
|
{
|
||||||
HBSY = Zero
|
HBSY = Zero
|
||||||
HIDX = Zero
|
HIDX = Zero
|
||||||
Return (One)
|
Return (One)
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (Zero)
|
Return (Zero)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,22 +15,22 @@
|
|||||||
|
|
||||||
Device (LID0)
|
Device (LID0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0D"))
|
Name (_HID, EisaId ("PNP0C0D"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
|
|
||||||
Method (_LID, 0, NotSerialized) {
|
Method (_LID, 0, NotSerialized) {
|
||||||
DEBUG = "LID: _LID"
|
DEBUG = "LID: _LID"
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
Return (^^PCI0.LPCB.EC0.LSTE)
|
Return (^^PCI0.LPCB.EC0.LSTE)
|
||||||
} Else {
|
} Else {
|
||||||
Return (One)
|
Return (One)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_PSW, 1, NotSerialized) {
|
Method (_PSW, 1, NotSerialized) {
|
||||||
DEBUG = Concatenate("LID: _PSW: ", ToHexString(Arg0))
|
DEBUG = Concatenate("LID: _PSW: ", ToHexString(Arg0))
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.LWKE = Arg0
|
^^PCI0.LPCB.EC0.LWKE = Arg0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,25 +14,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_BOARD_SYSTEM76_DARP6)
|
#if defined(CONFIG_BOARD_SYSTEM76_DARP6)
|
||||||
#define COLOR_KEYBOARD 1
|
#define COLOR_KEYBOARD 1
|
||||||
#elif defined(CONFIG_BOARD_SYSTEM76_GALP4)
|
#elif defined(CONFIG_BOARD_SYSTEM76_GALP4)
|
||||||
#define COLOR_KEYBOARD 0
|
#define COLOR_KEYBOARD 0
|
||||||
#else
|
#else
|
||||||
#error Unknown Mainboard
|
#error Unknown Mainboard
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Scope (\_SB) {
|
Scope (\_SB) {
|
||||||
#include "ac.asl"
|
#include "ac.asl"
|
||||||
#include "battery.asl"
|
#include "battery.asl"
|
||||||
#include "buttons.asl"
|
#include "buttons.asl"
|
||||||
#include "hid.asl"
|
#include "hid.asl"
|
||||||
#include "lid.asl"
|
#include "lid.asl"
|
||||||
#include "s76.asl"
|
#include "s76.asl"
|
||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "tbt.asl"
|
#include "tbt.asl"
|
||||||
|
|
||||||
Scope (_GPE) {
|
Scope (_GPE) {
|
||||||
#include "gpe.asl"
|
#include "gpe.asl"
|
||||||
}
|
}
|
||||||
|
@@ -20,108 +20,108 @@
|
|||||||
// 0x83 - backlight up
|
// 0x83 - backlight up
|
||||||
// 0x84 - backlight color change
|
// 0x84 - backlight color change
|
||||||
Device (S76D) {
|
Device (S76D) {
|
||||||
Name (_HID, "17761776")
|
Name (_HID, "17761776")
|
||||||
Name (_UID, 0)
|
Name (_UID, 0)
|
||||||
|
|
||||||
Method (RSET, 0, Serialized) {
|
Method (RSET, 0, Serialized) {
|
||||||
Debug = "S76D: RSET"
|
Debug = "S76D: RSET"
|
||||||
SAPL(0)
|
SAPL(0)
|
||||||
SKBL(0)
|
SKBL(0)
|
||||||
#if COLOR_KEYBOARD
|
#if COLOR_KEYBOARD
|
||||||
SKBC(0xFFFFFF)
|
SKBC(0xFFFFFF)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (INIT, 0, Serialized) {
|
Method (INIT, 0, Serialized) {
|
||||||
Debug = "S76D: INIT"
|
Debug = "S76D: INIT"
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use software control
|
// Set flags to use software control
|
||||||
^^PCI0.LPCB.EC0.ECOS = 2
|
^^PCI0.LPCB.EC0.ECOS = 2
|
||||||
Return (0)
|
Return (0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (FINI, 0, Serialized) {
|
Method (FINI, 0, Serialized) {
|
||||||
Debug = "S76D: FINI"
|
Debug = "S76D: FINI"
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use hardware control
|
// Set flags to use hardware control
|
||||||
^^PCI0.LPCB.EC0.ECOS = 1
|
^^PCI0.LPCB.EC0.ECOS = 1
|
||||||
Return (0)
|
Return (0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Airplane LED
|
// Get Airplane LED
|
||||||
Method (GAPL, 0, Serialized) {
|
Method (GAPL, 0, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
|
If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Return (0)
|
Return (0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Airplane LED
|
// Set Airplane LED
|
||||||
Method (SAPL, 1, Serialized) {
|
Method (SAPL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
If (Arg0) {
|
If (Arg0) {
|
||||||
^^PCI0.LPCB.EC0.AIRP |= 0x40
|
^^PCI0.LPCB.EC0.AIRP |= 0x40
|
||||||
} Else {
|
} Else {
|
||||||
^^PCI0.LPCB.EC0.AIRP &= 0xBF
|
^^PCI0.LPCB.EC0.AIRP &= 0xBF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if COLOR_KEYBOARD
|
#if COLOR_KEYBOARD
|
||||||
// Set KB LED Brightness
|
// Set KB LED Brightness
|
||||||
Method (SKBL, 1, Serialized) {
|
Method (SKBL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = 6
|
^^PCI0.LPCB.EC0.FDAT = 6
|
||||||
^^PCI0.LPCB.EC0.FBUF = Arg0
|
^^PCI0.LPCB.EC0.FBUF = Arg0
|
||||||
^^PCI0.LPCB.EC0.FBF1 = 0
|
^^PCI0.LPCB.EC0.FBF1 = 0
|
||||||
^^PCI0.LPCB.EC0.FBF2 = Arg0
|
^^PCI0.LPCB.EC0.FBF2 = Arg0
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Keyboard Color
|
// Set Keyboard Color
|
||||||
Method (SKBC, 1, Serialized) {
|
Method (SKBC, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = 0x3
|
^^PCI0.LPCB.EC0.FDAT = 0x3
|
||||||
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
|
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
|
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
|
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
Return (Arg0)
|
Return (Arg0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (0)
|
Return (0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Get KB LED
|
// Get KB LED
|
||||||
Method (GKBL, 0, Serialized) {
|
Method (GKBL, 0, Serialized) {
|
||||||
Local0 = 0
|
Local0 = 0
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = One
|
^^PCI0.LPCB.EC0.FDAT = One
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
Local0 = ^^PCI0.LPCB.EC0.FBUF
|
Local0 = ^^PCI0.LPCB.EC0.FBUF
|
||||||
^^PCI0.LPCB.EC0.FCMD = Zero
|
^^PCI0.LPCB.EC0.FCMD = Zero
|
||||||
}
|
}
|
||||||
Return (Local0)
|
Return (Local0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set KB Led
|
// Set KB Led
|
||||||
Method (SKBL, 1, Serialized) {
|
Method (SKBL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = Zero
|
^^PCI0.LPCB.EC0.FDAT = Zero
|
||||||
^^PCI0.LPCB.EC0.FBUF = Arg0
|
^^PCI0.LPCB.EC0.FBUF = Arg0
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
void bootblock_mainboard_init(void) {
|
void bootblock_mainboard_init(void)
|
||||||
|
{
|
||||||
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
|
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@ chip soc/intel/cannonlake
|
|||||||
register "SendVrMbxCmd" = "2"
|
register "SendVrMbxCmd" = "2"
|
||||||
|
|
||||||
# ACPI (soc/intel/cannonlake/acpi.c)
|
# ACPI (soc/intel/cannonlake/acpi.c)
|
||||||
# Enable s0ix
|
# Disable s0ix
|
||||||
register "s0ix_enable" = "0"
|
register "s0ix_enable" = "0"
|
||||||
|
|
||||||
# PM Timer Enabled
|
# PM Timer Enabled
|
||||||
@@ -138,7 +138,7 @@ chip soc/intel/cannonlake
|
|||||||
register "PchPmSlpS3MinAssert" = "3" # 50ms
|
register "PchPmSlpS3MinAssert" = "3" # 50ms
|
||||||
register "PchPmSlpS4MinAssert" = "1" # 1s
|
register "PchPmSlpS4MinAssert" = "1" # 1s
|
||||||
register "PchPmSlpSusMinAssert" = "2" # 500ms
|
register "PchPmSlpSusMinAssert" = "2" # 500ms
|
||||||
register "PchPmSlpAMinAssert" = "4" # 2s
|
register "PchPmSlpAMinAssert" = "4" # 2s
|
||||||
|
|
||||||
# Thermal
|
# Thermal
|
||||||
register "tcc_offset" = "12"
|
register "tcc_offset" = "12"
|
||||||
|
@@ -25,34 +25,23 @@ DefinitionBlock(
|
|||||||
0x20110725 // OEM revision
|
0x20110725 // OEM revision
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Some generic macros
|
|
||||||
#include <soc/intel/cannonlake/acpi/platform.asl>
|
#include <soc/intel/cannonlake/acpi/platform.asl>
|
||||||
|
|
||||||
// global NVS and variables
|
|
||||||
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
|
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
|
||||||
|
|
||||||
// CPU
|
|
||||||
#include <cpu/intel/common/acpi/cpu.asl>
|
#include <cpu/intel/common/acpi/cpu.asl>
|
||||||
|
|
||||||
Scope (\_SB) {
|
Device (\_SB.PCI0)
|
||||||
Device (PCI0)
|
{
|
||||||
{
|
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
|
||||||
#include <soc/intel/cannonlake/acpi/northbridge.asl>
|
#include <soc/intel/cannonlake/acpi/southbridge.asl>
|
||||||
#include <soc/intel/cannonlake/acpi/southbridge.asl>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chipset specific sleep states
|
|
||||||
#include <southbridge/intel/common/acpi/sleepstates.asl>
|
#include <southbridge/intel/common/acpi/sleepstates.asl>
|
||||||
|
|
||||||
Scope (\_SB.PCI0.LPCB) {
|
Scope (\_SB.PCI0.LPCB)
|
||||||
// PS/2 bus
|
{
|
||||||
#include <drivers/pc80/pc/ps2_controller.asl>
|
#include <drivers/pc80/pc/ps2_controller.asl>
|
||||||
|
#include "acpi/ec.asl"
|
||||||
// Embedded controller
|
|
||||||
#include "acpi/ec.asl"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mainboard specific
|
|
||||||
#include "acpi/mainboard.asl"
|
#include "acpi/mainboard.asl"
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
#include <arch/acpigen.h>
|
#include <arch/acpigen.h>
|
||||||
|
#include <arch/io.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <option.h>
|
#include <option.h>
|
||||||
@@ -23,7 +24,8 @@
|
|||||||
#include <soc/ramstage.h>
|
#include <soc/ramstage.h>
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
void mainboard_silicon_init_params(FSP_S_CONFIG *params) {
|
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
||||||
|
{
|
||||||
/* Configure pads prior to SiliconInit() in case there's any
|
/* Configure pads prior to SiliconInit() in case there's any
|
||||||
* dependencies during hardware initialization. */
|
* dependencies during hardware initialization. */
|
||||||
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
|
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
|
||||||
//TODO: find correct values
|
|
||||||
static const struct cnl_mb_cfg memcfg = {
|
static const struct cnl_mb_cfg memcfg = {
|
||||||
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
|
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
|
||||||
.spd[0] = {
|
.spd[0] = {
|
||||||
@@ -43,11 +42,11 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
*/
|
*/
|
||||||
.dq_map[DDR_CH0] = {
|
.dq_map[DDR_CH0] = {
|
||||||
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
|
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
|
||||||
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
||||||
},
|
},
|
||||||
.dq_map[DDR_CH1] = {
|
.dq_map[DDR_CH1] = {
|
||||||
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
|
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
|
||||||
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -81,17 +80,18 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
.dq_pins_interleaved = 1,
|
.dq_pins_interleaved = 1,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VREF_CA configuraation.
|
* VREF_CA configuration.
|
||||||
* Set to 0 VREF_CA goes to both CH_A and CH_B,
|
* Set to 0 VREF_CA goes to both CH_A and CH_B,
|
||||||
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
|
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
|
||||||
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
|
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
|
||||||
*/
|
*/
|
||||||
.vref_ca_config = 2,
|
.vref_ca_config = 2,
|
||||||
|
|
||||||
/* Early Command Training Enabled */
|
/* Early Command Training */
|
||||||
.ect = 0,
|
.ect = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd) {
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
|
{
|
||||||
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
||||||
}
|
}
|
||||||
|
@@ -13,13 +13,10 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HDA_VERB_H
|
|
||||||
#define HDA_VERB_H
|
|
||||||
|
|
||||||
#include <device/azalia_device.h>
|
#include <device/azalia_device.h>
|
||||||
|
|
||||||
const u32 cim_verb_data[] = {
|
const u32 cim_verb_data[] = {
|
||||||
/* Realtek, ALC293 */
|
/* Realtek ALC293 */
|
||||||
0x10ec0293, /* Vendor ID */
|
0x10ec0293, /* Vendor ID */
|
||||||
0x15581404, /* Subsystem ID */
|
0x15581404, /* Subsystem ID */
|
||||||
12, /* Number of entries */
|
12, /* Number of entries */
|
||||||
@@ -35,7 +32,8 @@ const u32 cim_verb_data[] = {
|
|||||||
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
||||||
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
||||||
AZALIA_PIN_CFG(0, 0x1e, 0x02451130),
|
AZALIA_PIN_CFG(0, 0x1e, 0x02451130),
|
||||||
/* Intel, KabylakeHDMI */
|
|
||||||
|
/* Intel GPU HDMI */
|
||||||
0x8086280b, /* Vendor ID */
|
0x8086280b, /* Vendor ID */
|
||||||
0x80860101, /* Subsystem ID */
|
0x80860101, /* Subsystem ID */
|
||||||
4, /* Number of entries */
|
4, /* Number of entries */
|
||||||
@@ -48,5 +46,3 @@ const u32 cim_verb_data[] = {
|
|||||||
const u32 pc_beep_verbs[] = {};
|
const u32 pc_beep_verbs[] = {};
|
||||||
|
|
||||||
AZALIA_ARRAY_SIZES;
|
AZALIA_ARRAY_SIZES;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -13,13 +13,10 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HDA_VERB_H
|
|
||||||
#define HDA_VERB_H
|
|
||||||
|
|
||||||
#include <device/azalia_device.h>
|
#include <device/azalia_device.h>
|
||||||
|
|
||||||
const u32 cim_verb_data[] = {
|
const u32 cim_verb_data[] = {
|
||||||
/* Realtek, ALC293 */
|
/* Realtek ALC293 */
|
||||||
0x10ec0293, /* Vendor ID */
|
0x10ec0293, /* Vendor ID */
|
||||||
0x15581403, /* Subsystem ID */
|
0x15581403, /* Subsystem ID */
|
||||||
12, /* Number of entries */
|
12, /* Number of entries */
|
||||||
@@ -35,7 +32,8 @@ const u32 cim_verb_data[] = {
|
|||||||
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
||||||
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
||||||
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
|
||||||
/* Intel, KabylakeHDMI */
|
|
||||||
|
/* Intel GPU HDMI */
|
||||||
0x8086280b, /* Vendor ID */
|
0x8086280b, /* Vendor ID */
|
||||||
0x80860101, /* Subsystem ID */
|
0x80860101, /* Subsystem ID */
|
||||||
4, /* Number of entries */
|
4, /* Number of entries */
|
||||||
@@ -48,5 +46,3 @@ const u32 cim_verb_data[] = {
|
|||||||
const u32 pc_beep_verbs[] = {};
|
const u32 pc_beep_verbs[] = {};
|
||||||
|
|
||||||
AZALIA_ARRAY_SIZES;
|
AZALIA_ARRAY_SIZES;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -5,7 +5,6 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select ADD_FSP_BINARIES
|
select ADD_FSP_BINARIES
|
||||||
select BOARD_ROMSIZE_KB_16384
|
select BOARD_ROMSIZE_KB_16384
|
||||||
select EC_ACPI
|
select EC_ACPI
|
||||||
select EXCLUDE_EMMC_INTERFACE
|
|
||||||
select HAVE_ACPI_RESUME
|
select HAVE_ACPI_RESUME
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
select HAVE_CMOS_DEFAULT
|
select HAVE_CMOS_DEFAULT
|
||||||
@@ -13,10 +12,10 @@ config BOARD_SPECIFIC_OPTIONS
|
|||||||
select HAVE_SMI_HANDLER
|
select HAVE_SMI_HANDLER
|
||||||
select INTEL_GMA_HAVE_VBT
|
select INTEL_GMA_HAVE_VBT
|
||||||
select INTEL_LPSS_UART_FOR_CONSOLE
|
select INTEL_LPSS_UART_FOR_CONSOLE
|
||||||
|
# Chip select 2 is not yet supported by intel fast_spi
|
||||||
# select MAINBOARD_HAS_SPI_TPM_CR50
|
# select MAINBOARD_HAS_SPI_TPM_CR50
|
||||||
# select MAINBOARD_HAS_TPM2
|
# select MAINBOARD_HAS_TPM2
|
||||||
select NO_UART_ON_SUPERIO
|
select NO_UART_ON_SUPERIO\
|
||||||
select PCIE_DEBUG_INFO
|
|
||||||
select PCIEXP_HOTPLUG
|
select PCIEXP_HOTPLUG
|
||||||
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
||||||
select SOC_INTEL_COMMON_BLOCK_HDA
|
select SOC_INTEL_COMMON_BLOCK_HDA
|
||||||
@@ -99,10 +98,11 @@ config POST_DEVICE
|
|||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
# Chip select 2 is not yet supported by intel fast_spi
|
||||||
#config DRIVER_TPM_SPI_BUS
|
#config DRIVER_TPM_SPI_BUS
|
||||||
# hex
|
# hex
|
||||||
# default 0x0
|
# default 0x0
|
||||||
|
#
|
||||||
#config DRIVER_TPM_SPI_CHIP
|
#config DRIVER_TPM_SPI_CHIP
|
||||||
# int
|
# int
|
||||||
# default 2
|
# default 2
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
bootblock-y += bootblock.c
|
bootblock-y += bootblock.c
|
||||||
ramstage-y += ramstage.c variants/$(VARIANT_DIR)/hda_verb.c
|
ramstage-y += ramstage.c
|
||||||
|
ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
|
||||||
|
@@ -15,21 +15,21 @@
|
|||||||
|
|
||||||
Device (AC)
|
Device (AC)
|
||||||
{
|
{
|
||||||
Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID
|
Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID
|
||||||
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
||||||
{
|
{
|
||||||
_SB
|
_SB
|
||||||
})
|
})
|
||||||
|
|
||||||
Name (ACFG, One)
|
Name (ACFG, One)
|
||||||
|
|
||||||
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
|
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
|
||||||
{
|
{
|
||||||
Return (ACFG)
|
Return (ACFG)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_STA, 0, NotSerialized) // _STA: Status
|
Method (_STA, 0, NotSerialized) // _STA: Status
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,169 +15,169 @@
|
|||||||
|
|
||||||
Device (BAT0)
|
Device (BAT0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID
|
||||||
Name (_UID, Zero) // _UID: Unique ID
|
Name (_UID, Zero) // _UID: Unique ID
|
||||||
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
Name (_PCL, Package (0x01) // _PCL: Power Consumer List
|
||||||
{
|
{
|
||||||
_SB
|
_SB
|
||||||
})
|
})
|
||||||
Name (BFCC, Zero)
|
Name (BFCC, Zero)
|
||||||
Method (_STA, 0, NotSerialized) // _STA: Status
|
Method (_STA, 0, NotSerialized) // _STA: Status
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Return (0x1F)
|
Return (0x1F)
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (0x0F)
|
Return (0x0F)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PBIF, Package (0x0D)
|
Name (PBIF, Package (0x0D)
|
||||||
{
|
{
|
||||||
One,
|
One,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
One,
|
One,
|
||||||
0x39D0,
|
0x39D0,
|
||||||
Zero,
|
Zero,
|
||||||
Zero,
|
Zero,
|
||||||
0x40,
|
0x40,
|
||||||
0x40,
|
0x40,
|
||||||
"BAT",
|
"BAT",
|
||||||
"0001",
|
"0001",
|
||||||
"LION",
|
"LION",
|
||||||
"Notebook"
|
"Notebook"
|
||||||
})
|
})
|
||||||
Method (IVBI, 0, NotSerialized)
|
Method (IVBI, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
PBIF [One] = 0xFFFFFFFF
|
PBIF [One] = 0xFFFFFFFF
|
||||||
PBIF [0x02] = 0xFFFFFFFF
|
PBIF [0x02] = 0xFFFFFFFF
|
||||||
PBIF [0x04] = 0xFFFFFFFF
|
PBIF [0x04] = 0xFFFFFFFF
|
||||||
PBIF [0x09] = " "
|
PBIF [0x09] = " "
|
||||||
PBIF [0x0A] = " "
|
PBIF [0x0A] = " "
|
||||||
PBIF [0x0B] = " "
|
PBIF [0x0B] = " "
|
||||||
PBIF [0x0C] = " "
|
PBIF [0x0C] = " "
|
||||||
BFCC = Zero
|
BFCC = Zero
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (UPBI, 0, NotSerialized)
|
Method (UPBI, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
|
||||||
PBIF [One] = Local0
|
PBIF [One] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
|
||||||
PBIF [0x02] = Local0
|
PBIF [0x02] = Local0
|
||||||
BFCC = Local0
|
BFCC = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
|
||||||
PBIF [0x04] = Local0
|
PBIF [0x04] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
|
||||||
PBIF [0x05] = Local0
|
PBIF [0x05] = Local0
|
||||||
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
|
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
|
||||||
PBIF [0x06] = Local0
|
PBIF [0x06] = Local0
|
||||||
PBIF [0x09] = "BAT"
|
PBIF [0x09] = "BAT"
|
||||||
PBIF [0x0A] = "0001"
|
PBIF [0x0A] = "0001"
|
||||||
PBIF [0x0B] = "LION"
|
PBIF [0x0B] = "LION"
|
||||||
PBIF [0x0C] = "Notebook"
|
PBIF [0x0C] = "Notebook"
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBI ()
|
IVBI ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_BIF, 0, NotSerialized) // _BIF: Battery Information
|
Method (_BIF, 0, NotSerialized) // _BIF: Battery Information
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
UPBI ()
|
UPBI ()
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBI ()
|
IVBI ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Return (PBIF) /* \_SB_.BAT0.PBIF */
|
Return (PBIF) /* \_SB_.BAT0.PBIF */
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (PBST, Package (0x04)
|
Name (PBST, Package (0x04)
|
||||||
{
|
{
|
||||||
Zero,
|
Zero,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0xFFFFFFFF,
|
0xFFFFFFFF,
|
||||||
0x3D90
|
0x3D90
|
||||||
})
|
})
|
||||||
Method (IVBS, 0, NotSerialized)
|
Method (IVBS, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
PBST [Zero] = Zero
|
PBST [Zero] = Zero
|
||||||
PBST [One] = 0xFFFFFFFF
|
PBST [One] = 0xFFFFFFFF
|
||||||
PBST [0x02] = 0xFFFFFFFF
|
PBST [0x02] = 0xFFFFFFFF
|
||||||
PBST [0x03] = 0x2710
|
PBST [0x03] = 0x2710
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (UPBS, 0, NotSerialized)
|
Method (UPBS, 0, NotSerialized)
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.BAT0)
|
If (^^PCI0.LPCB.EC0.BAT0)
|
||||||
{
|
{
|
||||||
Local0 = Zero
|
Local0 = Zero
|
||||||
Local1 = Zero
|
Local1 = Zero
|
||||||
If (^^AC.ACFG)
|
If (^^AC.ACFG)
|
||||||
{
|
{
|
||||||
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
|
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
|
||||||
{
|
{
|
||||||
Local0 |= 0x02
|
Local0 |= 0x02
|
||||||
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Local0 |= One
|
Local0 |= One
|
||||||
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
|
||||||
}
|
}
|
||||||
|
|
||||||
Local7 = (Local1 & 0x8000)
|
Local7 = (Local1 & 0x8000)
|
||||||
If ((Local7 == 0x8000))
|
If ((Local7 == 0x8000))
|
||||||
{
|
{
|
||||||
Local1 ^= 0xFFFF
|
Local1 ^= 0xFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
|
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
|
||||||
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
|
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
|
||||||
PBST [Zero] = Local0
|
PBST [Zero] = Local0
|
||||||
PBST [One] = Local1
|
PBST [One] = Local1
|
||||||
PBST [0x02] = Local2
|
PBST [0x02] = Local2
|
||||||
PBST [0x03] = Local3
|
PBST [0x03] = Local3
|
||||||
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
|
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
|
||||||
{
|
{
|
||||||
Notify (BAT0, 0x81) // Information Change
|
Notify (BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBS ()
|
IVBS ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_BST, 0, NotSerialized) // _BST: Battery Status
|
Method (_BST, 0, NotSerialized) // _BST: Battery Status
|
||||||
{
|
{
|
||||||
If (^^PCI0.LPCB.EC0.ECOK)
|
If (^^PCI0.LPCB.EC0.ECOK)
|
||||||
{
|
{
|
||||||
UPBS ()
|
UPBS ()
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
IVBS ()
|
IVBS ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Return (PBST) /* \_SB_.BAT0.PBST */
|
Return (PBST) /* \_SB_.BAT0.PBST */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,12 +15,12 @@
|
|||||||
|
|
||||||
Device (PWRB)
|
Device (PWRB)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0C"))
|
Name (_HID, EisaId ("PNP0C0C"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
}
|
}
|
||||||
|
|
||||||
Device (SLPB)
|
Device (SLPB)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0E"))
|
Name (_HID, EisaId ("PNP0C0E"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
}
|
}
|
||||||
|
@@ -15,217 +15,217 @@
|
|||||||
|
|
||||||
Device (EC0)
|
Device (EC0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0C09") /* Embedded Controller Device */) // _HID: Hardware ID
|
||||||
Name (_GPE, 0x50 /* GPP_E16 */) // _GPE: General Purpose Events
|
Name (_GPE, 0x50 /* GPP_E16 */) // _GPE: General Purpose Events
|
||||||
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
|
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
|
||||||
{
|
{
|
||||||
IO (Decode16,
|
IO (Decode16,
|
||||||
0x0062, // Range Minimum
|
0x0062, // Range Minimum
|
||||||
0x0062, // Range Maximum
|
0x0062, // Range Maximum
|
||||||
0x00, // Alignment
|
0x00, // Alignment
|
||||||
0x01, // Length
|
0x01, // Length
|
||||||
)
|
)
|
||||||
IO (Decode16,
|
IO (Decode16,
|
||||||
0x0066, // Range Minimum
|
0x0066, // Range Minimum
|
||||||
0x0066, // Range Maximum
|
0x0066, // Range Maximum
|
||||||
0x00, // Alignment
|
0x00, // Alignment
|
||||||
0x01, // Length
|
0x01, // Length
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
#include "acpi/ec_ram.asl"
|
#include "acpi/ec_ram.asl"
|
||||||
|
|
||||||
Name (ECOK, Zero)
|
Name (ECOK, Zero)
|
||||||
Method (_REG, 2, Serialized) // _REG: Region Availability
|
Method (_REG, 2, Serialized) // _REG: Region Availability
|
||||||
{
|
{
|
||||||
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
|
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
|
||||||
If (((Arg0 == 0x03) && (Arg1 == One))) {
|
If (((Arg0 == 0x03) && (Arg1 == One))) {
|
||||||
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
||||||
ECOS = 1
|
ECOS = 1
|
||||||
|
|
||||||
// Enable software display brightness keys
|
// Enable software display brightness keys
|
||||||
WINF = 1
|
WINF = 1
|
||||||
|
|
||||||
// Set current AC state
|
// Set current AC state
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
// Update battery information and status
|
// Update battery information and status
|
||||||
^^^^BAT0.UPBI()
|
^^^^BAT0.UPBI()
|
||||||
^^^^BAT0.UPBS()
|
^^^^BAT0.UPBS()
|
||||||
|
|
||||||
PNOT ()
|
PNOT ()
|
||||||
|
|
||||||
// EC is now available
|
// EC is now available
|
||||||
ECOK = Arg1
|
ECOK = Arg1
|
||||||
|
|
||||||
// Reset System76 Device
|
// Reset System76 Device
|
||||||
^^^^S76D.RSET()
|
^^^^S76D.RSET()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (PTS, 1, Serialized) {
|
Method (PTS, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
|
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Clear wake cause
|
// Clear wake cause
|
||||||
WFNO = Zero
|
WFNO = Zero
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (WAK, 1, Serialized) {
|
Method (WAK, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
|
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Set current AC state
|
// Set current AC state
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
|
|
||||||
// Update battery information and status
|
// Update battery information and status
|
||||||
^^^^BAT0.UPBI()
|
^^^^BAT0.UPBI()
|
||||||
^^^^BAT0.UPBS()
|
^^^^BAT0.UPBS()
|
||||||
|
|
||||||
// Notify of changes
|
// Notify of changes
|
||||||
Notify(^^^^AC, Zero)
|
Notify(^^^^AC, Zero)
|
||||||
Notify(^^^^BAT0, Zero)
|
Notify(^^^^BAT0, Zero)
|
||||||
|
|
||||||
Sleep (1000)
|
Sleep (1000)
|
||||||
|
|
||||||
// Reset System76 Device
|
// Reset System76 Device
|
||||||
^^^^S76D.RSET()
|
^^^^S76D.RSET()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Touchpad Toggle"
|
Debug = "EC: Touchpad Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Screen Toggle"
|
Debug = "EC: Screen Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0C, 0, NotSerialized) // Mute
|
Method (_Q0C, 0, NotSerialized) // Mute
|
||||||
{
|
{
|
||||||
Debug = "EC: Mute"
|
Debug = "EC: Mute"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
||||||
{
|
{
|
||||||
Debug = "EC: Keyboard Backlight"
|
Debug = "EC: Keyboard Backlight"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0E, 0, NotSerialized) // Volume Down
|
Method (_Q0E, 0, NotSerialized) // Volume Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Down"
|
Debug = "EC: Volume Down"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0F, 0, NotSerialized) // Volume Up
|
Method (_Q0F, 0, NotSerialized) // Volume Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Up"
|
Debug = "EC: Volume Up"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Switch Video Mode"
|
Debug = "EC: Switch Video Mode"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q11, 0, NotSerialized) // Brightness Down
|
Method (_Q11, 0, NotSerialized) // Brightness Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Down"
|
Debug = "EC: Brightness Down"
|
||||||
^^^^HIDD.HPEM (20)
|
^^^^HIDD.HPEM (20)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q12, 0, NotSerialized) // Brightness Up
|
Method (_Q12, 0, NotSerialized) // Brightness Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Up"
|
Debug = "EC: Brightness Up"
|
||||||
^^^^HIDD.HPEM (19)
|
^^^^HIDD.HPEM (19)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Camera Toggle"
|
Debug = "EC: Camera Toggle"
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Airplane Mode"
|
Debug = "EC: Airplane Mode"
|
||||||
// Only send HIDD message when hardware airplane mode not in use
|
// Only send HIDD message when hardware airplane mode not in use
|
||||||
If (ECOS == 2) {
|
If (ECOS == 2) {
|
||||||
^^^^HIDD.HPEM (8)
|
^^^^HIDD.HPEM (8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q15, 0, NotSerialized) // Suspend Button
|
Method (_Q15, 0, NotSerialized) // Suspend Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Suspend Button"
|
Debug = "EC: Suspend Button"
|
||||||
Notify (SLPB, 0x80)
|
Notify (SLPB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q16, 0, NotSerialized) // AC Detect
|
Method (_Q16, 0, NotSerialized) // AC Detect
|
||||||
{
|
{
|
||||||
Debug = "EC: AC Detect"
|
Debug = "EC: AC Detect"
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
Notify (AC, 0x80) // Status Change
|
Notify (AC, 0x80) // Status Change
|
||||||
Sleep (0x01F4)
|
Sleep (0x01F4)
|
||||||
If (BAT0)
|
If (BAT0)
|
||||||
{
|
{
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
Sleep (0x32)
|
Sleep (0x32)
|
||||||
Notify (^^^^BAT0, 0x80) // Status Change
|
Notify (^^^^BAT0, 0x80) // Status Change
|
||||||
Sleep (0x32)
|
Sleep (0x32)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (17)"
|
Debug = "EC: BAT0 Update (17)"
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (19)"
|
Debug = "EC: BAT0 Update (19)"
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1B, 0, NotSerialized) // Lid Close
|
Method (_Q1B, 0, NotSerialized) // Lid Close
|
||||||
{
|
{
|
||||||
Debug = "EC: Lid Close"
|
Debug = "EC: Lid Close"
|
||||||
Notify (LID0, 0x80)
|
Notify (LID0, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
||||||
{
|
{
|
||||||
Debug = "EC: Thermal Trip"
|
Debug = "EC: Thermal Trip"
|
||||||
/* TODO
|
/* TODO
|
||||||
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
||||||
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1D, 0, NotSerialized) // Power Button
|
Method (_Q1D, 0, NotSerialized) // Power Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Power Button"
|
Debug = "EC: Power Button"
|
||||||
Notify (PWRB, 0x80)
|
Notify (PWRB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q50, 0, NotSerialized) // Other Events
|
Method (_Q50, 0, NotSerialized) // Other Events
|
||||||
{
|
{
|
||||||
Local0 = OEM4
|
Local0 = OEM4
|
||||||
If (Local0 == 0x8A) {
|
If (Local0 == 0x8A) {
|
||||||
Debug = "EC: White Keyboard Backlight"
|
Debug = "EC: White Keyboard Backlight"
|
||||||
Notify (^^^^S76D, 0x80)
|
Notify (^^^^S76D, 0x80)
|
||||||
} ElseIf (Local0 == 0x9F) {
|
} ElseIf (Local0 == 0x9F) {
|
||||||
Debug = "EC: Color Keyboard Toggle"
|
Debug = "EC: Color Keyboard Toggle"
|
||||||
Notify (^^^^S76D, 0x81)
|
Notify (^^^^S76D, 0x81)
|
||||||
} ElseIf (Local0 == 0x81) {
|
} ElseIf (Local0 == 0x81) {
|
||||||
Debug = "EC: Color Keyboard Down"
|
Debug = "EC: Color Keyboard Down"
|
||||||
Notify (^^^^S76D, 0x82)
|
Notify (^^^^S76D, 0x82)
|
||||||
} ElseIf (Local0 == 0x82) {
|
} ElseIf (Local0 == 0x82) {
|
||||||
Debug = "EC: Color Keyboard Up"
|
Debug = "EC: Color Keyboard Up"
|
||||||
Notify (^^^^S76D, 0x83)
|
Notify (^^^^S76D, 0x83)
|
||||||
} ElseIf (Local0 == 0x80) {
|
} ElseIf (Local0 == 0x80) {
|
||||||
Debug = "EC: Color Keyboard Color Change"
|
Debug = "EC: Color Keyboard Color Change"
|
||||||
Notify (^^^^S76D, 0x84)
|
Notify (^^^^S76D, 0x84)
|
||||||
} Else {
|
} Else {
|
||||||
Debug = Concatenate("EC: Other: ", ToHexString(Local0))
|
Debug = Concatenate("EC: Other: ", ToHexString(Local0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -16,173 +16,173 @@
|
|||||||
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
|
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
|
||||||
Field (ERAM, ByteAcc, Lock, Preserve)
|
Field (ERAM, ByteAcc, Lock, Preserve)
|
||||||
{
|
{
|
||||||
NMSG, 8,
|
NMSG, 8,
|
||||||
SLED, 4,
|
SLED, 4,
|
||||||
Offset (0x02),
|
Offset (0x02),
|
||||||
MODE, 1,
|
MODE, 1,
|
||||||
FAN0, 1,
|
FAN0, 1,
|
||||||
TME0, 1,
|
TME0, 1,
|
||||||
TME1, 1,
|
TME1, 1,
|
||||||
FAN1, 1,
|
FAN1, 1,
|
||||||
, 2,
|
, 2,
|
||||||
Offset (0x03),
|
Offset (0x03),
|
||||||
LSTE, 1,
|
LSTE, 1,
|
||||||
LSW0, 1,
|
LSW0, 1,
|
||||||
LWKE, 1,
|
LWKE, 1,
|
||||||
WAKF, 1,
|
WAKF, 1,
|
||||||
, 2,
|
, 2,
|
||||||
PWKE, 1,
|
PWKE, 1,
|
||||||
MWKE, 1,
|
MWKE, 1,
|
||||||
AC0, 8,
|
AC0, 8,
|
||||||
PSV, 8,
|
PSV, 8,
|
||||||
CRT, 8,
|
CRT, 8,
|
||||||
TMP, 8,
|
TMP, 8,
|
||||||
AC1, 8,
|
AC1, 8,
|
||||||
BBST, 8,
|
BBST, 8,
|
||||||
Offset (0x0B),
|
Offset (0x0B),
|
||||||
Offset (0x0C),
|
Offset (0x0C),
|
||||||
Offset (0x0D),
|
Offset (0x0D),
|
||||||
Offset (0x0E),
|
Offset (0x0E),
|
||||||
SLPT, 8,
|
SLPT, 8,
|
||||||
SWEJ, 1,
|
SWEJ, 1,
|
||||||
SWCH, 1,
|
SWCH, 1,
|
||||||
Offset (0x10),
|
Offset (0x10),
|
||||||
ADP, 1,
|
ADP, 1,
|
||||||
AFLT, 1,
|
AFLT, 1,
|
||||||
BAT0, 1,
|
BAT0, 1,
|
||||||
BAT1, 1,
|
BAT1, 1,
|
||||||
, 3,
|
, 3,
|
||||||
PWOF, 1,
|
PWOF, 1,
|
||||||
WFNO, 8,
|
WFNO, 8,
|
||||||
BPU0, 32,
|
BPU0, 32,
|
||||||
BDC0, 32,
|
BDC0, 32,
|
||||||
BFC0, 32,
|
BFC0, 32,
|
||||||
BTC0, 32,
|
BTC0, 32,
|
||||||
BDV0, 32,
|
BDV0, 32,
|
||||||
BST0, 32,
|
BST0, 32,
|
||||||
BPR0, 32,
|
BPR0, 32,
|
||||||
BRC0, 32,
|
BRC0, 32,
|
||||||
BPV0, 32,
|
BPV0, 32,
|
||||||
BTP0, 16,
|
BTP0, 16,
|
||||||
BRS0, 16,
|
BRS0, 16,
|
||||||
BCW0, 32,
|
BCW0, 32,
|
||||||
BCL0, 32,
|
BCL0, 32,
|
||||||
BCG0, 32,
|
BCG0, 32,
|
||||||
BG20, 32,
|
BG20, 32,
|
||||||
BMO0, 64,
|
BMO0, 64,
|
||||||
BIF0, 64,
|
BIF0, 64,
|
||||||
BSN0, 32,
|
BSN0, 32,
|
||||||
BTY0, 64,
|
BTY0, 64,
|
||||||
Offset (0x67),
|
Offset (0x67),
|
||||||
Offset (0x68),
|
Offset (0x68),
|
||||||
ECOS, 8,
|
ECOS, 8,
|
||||||
LNXD, 8,
|
LNXD, 8,
|
||||||
ECPS, 8,
|
ECPS, 8,
|
||||||
Offset (0x6C),
|
Offset (0x6C),
|
||||||
BTMP, 16,
|
BTMP, 16,
|
||||||
EVTN, 8,
|
EVTN, 8,
|
||||||
Offset (0x72),
|
Offset (0x72),
|
||||||
PRCL, 8,
|
PRCL, 8,
|
||||||
PRC0, 8,
|
PRC0, 8,
|
||||||
PRC1, 8,
|
PRC1, 8,
|
||||||
PRCM, 8,
|
PRCM, 8,
|
||||||
PRIN, 8,
|
PRIN, 8,
|
||||||
PSTE, 8,
|
PSTE, 8,
|
||||||
PCAD, 8,
|
PCAD, 8,
|
||||||
PEWL, 8,
|
PEWL, 8,
|
||||||
PWRL, 8,
|
PWRL, 8,
|
||||||
PECD, 8,
|
PECD, 8,
|
||||||
PEHI, 8,
|
PEHI, 8,
|
||||||
PECI, 8,
|
PECI, 8,
|
||||||
PEPL, 8,
|
PEPL, 8,
|
||||||
PEPM, 8,
|
PEPM, 8,
|
||||||
PWFC, 8,
|
PWFC, 8,
|
||||||
PECC, 8,
|
PECC, 8,
|
||||||
PDT0, 8,
|
PDT0, 8,
|
||||||
PDT1, 8,
|
PDT1, 8,
|
||||||
PDT2, 8,
|
PDT2, 8,
|
||||||
PDT3, 8,
|
PDT3, 8,
|
||||||
PRFC, 8,
|
PRFC, 8,
|
||||||
PRS0, 8,
|
PRS0, 8,
|
||||||
PRS1, 8,
|
PRS1, 8,
|
||||||
PRS2, 8,
|
PRS2, 8,
|
||||||
PRS3, 8,
|
PRS3, 8,
|
||||||
PRS4, 8,
|
PRS4, 8,
|
||||||
PRCS, 8,
|
PRCS, 8,
|
||||||
PEC0, 8,
|
PEC0, 8,
|
||||||
PEC1, 8,
|
PEC1, 8,
|
||||||
PEC2, 8,
|
PEC2, 8,
|
||||||
PEC3, 8,
|
PEC3, 8,
|
||||||
CMDR, 8,
|
CMDR, 8,
|
||||||
CVRT, 8,
|
CVRT, 8,
|
||||||
GTVR, 8,
|
GTVR, 8,
|
||||||
FANT, 8,
|
FANT, 8,
|
||||||
SKNT, 8,
|
SKNT, 8,
|
||||||
AMBT, 8,
|
AMBT, 8,
|
||||||
MCRT, 8,
|
MCRT, 8,
|
||||||
DIM0, 8,
|
DIM0, 8,
|
||||||
DIM1, 8,
|
DIM1, 8,
|
||||||
PMAX, 8,
|
PMAX, 8,
|
||||||
PPDT, 8,
|
PPDT, 8,
|
||||||
PECH, 8,
|
PECH, 8,
|
||||||
PMDT, 8,
|
PMDT, 8,
|
||||||
TSD0, 8,
|
TSD0, 8,
|
||||||
TSD1, 8,
|
TSD1, 8,
|
||||||
TSD2, 8,
|
TSD2, 8,
|
||||||
TSD3, 8,
|
TSD3, 8,
|
||||||
CPUP, 16,
|
CPUP, 16,
|
||||||
MCHP, 16,
|
MCHP, 16,
|
||||||
SYSP, 16,
|
SYSP, 16,
|
||||||
CPAP, 16,
|
CPAP, 16,
|
||||||
MCAP, 16,
|
MCAP, 16,
|
||||||
SYAP, 16,
|
SYAP, 16,
|
||||||
CFSP, 16,
|
CFSP, 16,
|
||||||
CPUE, 16,
|
CPUE, 16,
|
||||||
Offset (0xC6),
|
Offset (0xC6),
|
||||||
Offset (0xC7),
|
Offset (0xC7),
|
||||||
VGAT, 8,
|
VGAT, 8,
|
||||||
OEM1, 8,
|
OEM1, 8,
|
||||||
OEM2, 8,
|
OEM2, 8,
|
||||||
OEM3, 16,
|
OEM3, 16,
|
||||||
OEM4, 8,
|
OEM4, 8,
|
||||||
Offset (0xCE),
|
Offset (0xCE),
|
||||||
DUT1, 8,
|
DUT1, 8,
|
||||||
DUT2, 8,
|
DUT2, 8,
|
||||||
RPM1, 16,
|
RPM1, 16,
|
||||||
RPM2, 16,
|
RPM2, 16,
|
||||||
RPM4, 16,
|
RPM4, 16,
|
||||||
Offset (0xD7),
|
Offset (0xD7),
|
||||||
DTHL, 8,
|
DTHL, 8,
|
||||||
DTBP, 8,
|
DTBP, 8,
|
||||||
AIRP, 8,
|
AIRP, 8,
|
||||||
WINF, 8,
|
WINF, 8,
|
||||||
RINF, 8,
|
RINF, 8,
|
||||||
Offset (0xDD),
|
Offset (0xDD),
|
||||||
INF2, 8,
|
INF2, 8,
|
||||||
MUTE, 1,
|
MUTE, 1,
|
||||||
Offset (0xE0),
|
Offset (0xE0),
|
||||||
RPM3, 16,
|
RPM3, 16,
|
||||||
ECKS, 8,
|
ECKS, 8,
|
||||||
Offset (0xE4),
|
Offset (0xE4),
|
||||||
, 4,
|
, 4,
|
||||||
XTUF, 1,
|
XTUF, 1,
|
||||||
EP12, 1,
|
EP12, 1,
|
||||||
Offset (0xE5),
|
Offset (0xE5),
|
||||||
INF3, 8,
|
INF3, 8,
|
||||||
Offset (0xE7),
|
Offset (0xE7),
|
||||||
GFOF, 8,
|
GFOF, 8,
|
||||||
Offset (0xE9),
|
Offset (0xE9),
|
||||||
KPCR, 1,
|
KPCR, 1,
|
||||||
Offset (0xEA),
|
Offset (0xEA),
|
||||||
Offset (0xF0),
|
Offset (0xF0),
|
||||||
PL1T, 16,
|
PL1T, 16,
|
||||||
PL2T, 16,
|
PL2T, 16,
|
||||||
TAUT, 8,
|
TAUT, 8,
|
||||||
Offset (0xF8),
|
Offset (0xF8),
|
||||||
FCMD, 8,
|
FCMD, 8,
|
||||||
FDAT, 8,
|
FDAT, 8,
|
||||||
FBUF, 8,
|
FBUF, 8,
|
||||||
FBF1, 8,
|
FBF1, 8,
|
||||||
FBF2, 8,
|
FBF2, 8,
|
||||||
FBF3, 8
|
FBF3, 8
|
||||||
}
|
}
|
||||||
|
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
// GPP_D9 SCI
|
// GPP_D9 SCI
|
||||||
Method (_L29, 0, Serialized) {
|
Method (_L29, 0, Serialized) {
|
||||||
Debug = Concatenate("GPE _L29: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
|
Debug = Concatenate("GPE _L29: ", ToHexString(\_SB.PCI0.LPCB.EC0.WFNO))
|
||||||
If (\_SB.PCI0.LPCB.EC0.ECOK) {
|
If (\_SB.PCI0.LPCB.EC0.ECOK) {
|
||||||
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
|
If (\_SB.PCI0.LPCB.EC0.WFNO == One) {
|
||||||
Notify(\_SB.LID0, 0x80)
|
Notify(\_SB.LID0, 0x80)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,49 +15,49 @@
|
|||||||
|
|
||||||
Device (HIDD)
|
Device (HIDD)
|
||||||
{
|
{
|
||||||
Name (_HID, "INT33D5")
|
Name (_HID, "INT33D5")
|
||||||
Name (HBSY, Zero)
|
Name (HBSY, Zero)
|
||||||
Name (HIDX, Zero)
|
Name (HIDX, Zero)
|
||||||
Name (HRDY, Zero)
|
Name (HRDY, Zero)
|
||||||
|
|
||||||
Method (HDEM, 0, Serialized)
|
Method (HDEM, 0, Serialized)
|
||||||
{
|
{
|
||||||
HBSY = Zero
|
HBSY = Zero
|
||||||
Return (HIDX)
|
Return (HIDX)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HDMM, 0, Serialized)
|
Method (HDMM, 0, Serialized)
|
||||||
{
|
{
|
||||||
Return (Zero)
|
Return (Zero)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HDSM, 1, Serialized)
|
Method (HDSM, 1, Serialized)
|
||||||
{
|
{
|
||||||
HRDY = Arg0
|
HRDY = Arg0
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (HPEM, 1, Serialized)
|
Method (HPEM, 1, Serialized)
|
||||||
{
|
{
|
||||||
HBSY = One
|
HBSY = One
|
||||||
HIDX = Arg0
|
HIDX = Arg0
|
||||||
|
|
||||||
Notify (HIDD, 0xC0)
|
Notify (HIDD, 0xC0)
|
||||||
Local0 = Zero
|
Local0 = Zero
|
||||||
While (((Local0 < 0xFA) && HBSY))
|
While (((Local0 < 0xFA) && HBSY))
|
||||||
{
|
{
|
||||||
Sleep (0x04)
|
Sleep (0x04)
|
||||||
Local0++
|
Local0++
|
||||||
}
|
}
|
||||||
|
|
||||||
If ((HBSY == One))
|
If ((HBSY == One))
|
||||||
{
|
{
|
||||||
HBSY = Zero
|
HBSY = Zero
|
||||||
HIDX = Zero
|
HIDX = Zero
|
||||||
Return (One)
|
Return (One)
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Return (Zero)
|
Return (Zero)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,22 +15,22 @@
|
|||||||
|
|
||||||
Device (LID0)
|
Device (LID0)
|
||||||
{
|
{
|
||||||
Name (_HID, EisaId ("PNP0C0D"))
|
Name (_HID, EisaId ("PNP0C0D"))
|
||||||
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
Name (_PRW, Package () { 0x29 /* GPP_D9 */, 3 })
|
||||||
|
|
||||||
Method (_LID, 0, NotSerialized) {
|
Method (_LID, 0, NotSerialized) {
|
||||||
DEBUG = "LID: _LID"
|
DEBUG = "LID: _LID"
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
Return (^^PCI0.LPCB.EC0.LSTE)
|
Return (^^PCI0.LPCB.EC0.LSTE)
|
||||||
} Else {
|
} Else {
|
||||||
Return (One)
|
Return (One)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_PSW, 1, NotSerialized) {
|
Method (_PSW, 1, NotSerialized) {
|
||||||
DEBUG = Concatenate("LID: _PSW: ", ToHexString(Arg0))
|
DEBUG = Concatenate("LID: _PSW: ", ToHexString(Arg0))
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.LWKE = Arg0
|
^^PCI0.LPCB.EC0.LWKE = Arg0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,25 +14,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_BOARD_SYSTEM76_DARP5)
|
#if defined(CONFIG_BOARD_SYSTEM76_DARP5)
|
||||||
#define COLOR_KEYBOARD 1
|
#define COLOR_KEYBOARD 1
|
||||||
#elif defined(CONFIG_BOARD_SYSTEM76_GALP3_C)
|
#elif defined(CONFIG_BOARD_SYSTEM76_GALP3_C)
|
||||||
#define COLOR_KEYBOARD 0
|
#define COLOR_KEYBOARD 0
|
||||||
#else
|
#else
|
||||||
#error Unknown Mainboard
|
#error Unknown Mainboard
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Scope (\_SB) {
|
Scope (\_SB) {
|
||||||
#include "ac.asl"
|
#include "ac.asl"
|
||||||
#include "battery.asl"
|
#include "battery.asl"
|
||||||
#include "buttons.asl"
|
#include "buttons.asl"
|
||||||
#include "hid.asl"
|
#include "hid.asl"
|
||||||
#include "lid.asl"
|
#include "lid.asl"
|
||||||
#include "s76.asl"
|
#include "s76.asl"
|
||||||
#include "sleep.asl"
|
#include "sleep.asl"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "tbt.asl"
|
#include "tbt.asl"
|
||||||
|
|
||||||
Scope (_GPE) {
|
Scope (_GPE) {
|
||||||
#include "gpe.asl"
|
#include "gpe.asl"
|
||||||
}
|
}
|
||||||
|
@@ -20,108 +20,108 @@
|
|||||||
// 0x83 - backlight up
|
// 0x83 - backlight up
|
||||||
// 0x84 - backlight color change
|
// 0x84 - backlight color change
|
||||||
Device (S76D) {
|
Device (S76D) {
|
||||||
Name (_HID, "17761776")
|
Name (_HID, "17761776")
|
||||||
Name (_UID, 0)
|
Name (_UID, 0)
|
||||||
|
|
||||||
Method (RSET, 0, Serialized) {
|
Method (RSET, 0, Serialized) {
|
||||||
Debug = "S76D: RSET"
|
Debug = "S76D: RSET"
|
||||||
SAPL(0)
|
SAPL(0)
|
||||||
SKBL(0)
|
SKBL(0)
|
||||||
#if COLOR_KEYBOARD
|
#if COLOR_KEYBOARD
|
||||||
SKBC(0xFFFFFF)
|
SKBC(0xFFFFFF)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (INIT, 0, Serialized) {
|
Method (INIT, 0, Serialized) {
|
||||||
Debug = "S76D: INIT"
|
Debug = "S76D: INIT"
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use software control
|
// Set flags to use software control
|
||||||
^^PCI0.LPCB.EC0.ECOS = 2
|
^^PCI0.LPCB.EC0.ECOS = 2
|
||||||
Return (0)
|
Return (0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (FINI, 0, Serialized) {
|
Method (FINI, 0, Serialized) {
|
||||||
Debug = "S76D: FINI"
|
Debug = "S76D: FINI"
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use hardware control
|
// Set flags to use hardware control
|
||||||
^^PCI0.LPCB.EC0.ECOS = 1
|
^^PCI0.LPCB.EC0.ECOS = 1
|
||||||
Return (0)
|
Return (0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Airplane LED
|
// Get Airplane LED
|
||||||
Method (GAPL, 0, Serialized) {
|
Method (GAPL, 0, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
|
If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
|
||||||
Return (1)
|
Return (1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Return (0)
|
Return (0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Airplane LED
|
// Set Airplane LED
|
||||||
Method (SAPL, 1, Serialized) {
|
Method (SAPL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
If (Arg0) {
|
If (Arg0) {
|
||||||
^^PCI0.LPCB.EC0.AIRP |= 0x40
|
^^PCI0.LPCB.EC0.AIRP |= 0x40
|
||||||
} Else {
|
} Else {
|
||||||
^^PCI0.LPCB.EC0.AIRP &= 0xBF
|
^^PCI0.LPCB.EC0.AIRP &= 0xBF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if COLOR_KEYBOARD
|
#if COLOR_KEYBOARD
|
||||||
// Set KB LED Brightness
|
// Set KB LED Brightness
|
||||||
Method (SKBL, 1, Serialized) {
|
Method (SKBL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = 6
|
^^PCI0.LPCB.EC0.FDAT = 6
|
||||||
^^PCI0.LPCB.EC0.FBUF = Arg0
|
^^PCI0.LPCB.EC0.FBUF = Arg0
|
||||||
^^PCI0.LPCB.EC0.FBF1 = 0
|
^^PCI0.LPCB.EC0.FBF1 = 0
|
||||||
^^PCI0.LPCB.EC0.FBF2 = Arg0
|
^^PCI0.LPCB.EC0.FBF2 = Arg0
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set Keyboard Color
|
// Set Keyboard Color
|
||||||
Method (SKBC, 1, Serialized) {
|
Method (SKBC, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = 0x3
|
^^PCI0.LPCB.EC0.FDAT = 0x3
|
||||||
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
|
^^PCI0.LPCB.EC0.FBUF = (Arg0 & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
|
^^PCI0.LPCB.EC0.FBF1 = ((Arg0 >> 16) & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
|
^^PCI0.LPCB.EC0.FBF2 = ((Arg0 >> 8) & 0xFF)
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
Return (Arg0)
|
Return (Arg0)
|
||||||
} Else {
|
} Else {
|
||||||
Return (0)
|
Return (0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Get KB LED
|
// Get KB LED
|
||||||
Method (GKBL, 0, Serialized) {
|
Method (GKBL, 0, Serialized) {
|
||||||
Local0 = 0
|
Local0 = 0
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = One
|
^^PCI0.LPCB.EC0.FDAT = One
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
Local0 = ^^PCI0.LPCB.EC0.FBUF
|
Local0 = ^^PCI0.LPCB.EC0.FBUF
|
||||||
^^PCI0.LPCB.EC0.FCMD = Zero
|
^^PCI0.LPCB.EC0.FCMD = Zero
|
||||||
}
|
}
|
||||||
Return (Local0)
|
Return (Local0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set KB Led
|
// Set KB Led
|
||||||
Method (SKBL, 1, Serialized) {
|
Method (SKBL, 1, Serialized) {
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
^^PCI0.LPCB.EC0.FDAT = Zero
|
^^PCI0.LPCB.EC0.FDAT = Zero
|
||||||
^^PCI0.LPCB.EC0.FBUF = Arg0
|
^^PCI0.LPCB.EC0.FBUF = Arg0
|
||||||
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
^^PCI0.LPCB.EC0.FCMD = 0xCA
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include <gpio.h>
|
#include <gpio.h>
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
void bootblock_mainboard_init(void) {
|
void bootblock_mainboard_init(void)
|
||||||
|
{
|
||||||
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
|
gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@ chip soc/intel/cannonlake
|
|||||||
register "SendVrMbxCmd" = "2"
|
register "SendVrMbxCmd" = "2"
|
||||||
|
|
||||||
# ACPI (soc/intel/cannonlake/acpi.c)
|
# ACPI (soc/intel/cannonlake/acpi.c)
|
||||||
# Enable s0ix
|
# Disable s0ix
|
||||||
register "s0ix_enable" = "0"
|
register "s0ix_enable" = "0"
|
||||||
|
|
||||||
# PM Timer Enabled
|
# PM Timer Enabled
|
||||||
@@ -138,7 +138,7 @@ chip soc/intel/cannonlake
|
|||||||
register "PchPmSlpS3MinAssert" = "3" # 50ms
|
register "PchPmSlpS3MinAssert" = "3" # 50ms
|
||||||
register "PchPmSlpS4MinAssert" = "1" # 1s
|
register "PchPmSlpS4MinAssert" = "1" # 1s
|
||||||
register "PchPmSlpSusMinAssert" = "2" # 500ms
|
register "PchPmSlpSusMinAssert" = "2" # 500ms
|
||||||
register "PchPmSlpAMinAssert" = "4" # 2s
|
register "PchPmSlpAMinAssert" = "4" # 2s
|
||||||
|
|
||||||
# Thermal
|
# Thermal
|
||||||
register "tcc_offset" = "12"
|
register "tcc_offset" = "12"
|
||||||
|
@@ -25,34 +25,23 @@ DefinitionBlock(
|
|||||||
0x20110725 // OEM revision
|
0x20110725 // OEM revision
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Some generic macros
|
|
||||||
#include <soc/intel/cannonlake/acpi/platform.asl>
|
#include <soc/intel/cannonlake/acpi/platform.asl>
|
||||||
|
|
||||||
// global NVS and variables
|
|
||||||
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
|
#include <soc/intel/common/block/acpi/acpi/globalnvs.asl>
|
||||||
|
|
||||||
// CPU
|
|
||||||
#include <cpu/intel/common/acpi/cpu.asl>
|
#include <cpu/intel/common/acpi/cpu.asl>
|
||||||
|
|
||||||
Scope (\_SB) {
|
Device (\_SB.PCI0)
|
||||||
Device (PCI0)
|
{
|
||||||
{
|
#include <soc/intel/common/block/acpi/acpi/northbridge.asl>
|
||||||
#include <soc/intel/cannonlake/acpi/northbridge.asl>
|
#include <soc/intel/cannonlake/acpi/southbridge.asl>
|
||||||
#include <soc/intel/cannonlake/acpi/southbridge.asl>
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chipset specific sleep states
|
|
||||||
#include <southbridge/intel/common/acpi/sleepstates.asl>
|
#include <southbridge/intel/common/acpi/sleepstates.asl>
|
||||||
|
|
||||||
Scope (\_SB.PCI0.LPCB) {
|
Scope (\_SB.PCI0.LPCB)
|
||||||
// PS/2 bus
|
{
|
||||||
#include <drivers/pc80/pc/ps2_controller.asl>
|
#include <drivers/pc80/pc/ps2_controller.asl>
|
||||||
|
#include "acpi/ec.asl"
|
||||||
// Embedded controller
|
|
||||||
#include "acpi/ec.asl"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mainboard specific
|
|
||||||
#include "acpi/mainboard.asl"
|
#include "acpi/mainboard.asl"
|
||||||
}
|
}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
#include <arch/acpigen.h>
|
#include <arch/acpigen.h>
|
||||||
|
#include <arch/io.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <option.h>
|
#include <option.h>
|
||||||
@@ -23,7 +24,8 @@
|
|||||||
#include <soc/ramstage.h>
|
#include <soc/ramstage.h>
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
void mainboard_silicon_init_params(FSP_S_CONFIG *params) {
|
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
||||||
|
{
|
||||||
/* Configure pads prior to SiliconInit() in case there's any
|
/* Configure pads prior to SiliconInit() in case there's any
|
||||||
* dependencies during hardware initialization. */
|
* dependencies during hardware initialization. */
|
||||||
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
|
cnl_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#include <soc/cnl_memcfg_init.h>
|
#include <soc/cnl_memcfg_init.h>
|
||||||
#include <soc/romstage.h>
|
#include <soc/romstage.h>
|
||||||
|
|
||||||
//TODO: find correct values
|
|
||||||
static const struct cnl_mb_cfg memcfg = {
|
static const struct cnl_mb_cfg memcfg = {
|
||||||
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
|
/* Parameters required to access SPD for CH0D0/CH0D1/CH1D0/CH1D1. */
|
||||||
.spd[0] = {
|
.spd[0] = {
|
||||||
@@ -43,11 +42,11 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
*/
|
*/
|
||||||
.dq_map[DDR_CH0] = {
|
.dq_map[DDR_CH0] = {
|
||||||
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
|
{0x0F, 0xF0}, {0x00, 0xF0}, {0x0F, 0xF0},
|
||||||
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
//{0x0F, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
||||||
},
|
},
|
||||||
.dq_map[DDR_CH1] = {
|
.dq_map[DDR_CH1] = {
|
||||||
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
|
{0x33, 0xCC}, {0x00, 0xCC}, {0x33, 0xCC},
|
||||||
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
//{0x33, 0x00}, {0xFF, 0x00}, {0xFF, 0x00}
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -81,17 +80,18 @@ static const struct cnl_mb_cfg memcfg = {
|
|||||||
.dq_pins_interleaved = 1,
|
.dq_pins_interleaved = 1,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VREF_CA configuraation.
|
* VREF_CA configuration.
|
||||||
* Set to 0 VREF_CA goes to both CH_A and CH_B,
|
* Set to 0 VREF_CA goes to both CH_A and CH_B,
|
||||||
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
|
* set to 1 VREF_CA goes to CH_A and VREF_DQ_A goes to CH_B,
|
||||||
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
|
* set to 2 VREF_CA goes to CH_A and VREF_DQ_B goes to CH_B.
|
||||||
*/
|
*/
|
||||||
.vref_ca_config = 2,
|
.vref_ca_config = 2,
|
||||||
|
|
||||||
/* Early Command Training Enabled */
|
/* Early Command Training */
|
||||||
.ect = 0,
|
.ect = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
void mainboard_memory_init_params(FSPM_UPD *memupd) {
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
|
{
|
||||||
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
cannonlake_memcfg_init(&memupd->FspmConfig, &memcfg);
|
||||||
}
|
}
|
||||||
|
@@ -13,13 +13,10 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HDA_VERB_H
|
|
||||||
#define HDA_VERB_H
|
|
||||||
|
|
||||||
#include <device/azalia_device.h>
|
#include <device/azalia_device.h>
|
||||||
|
|
||||||
const u32 cim_verb_data[] = {
|
const u32 cim_verb_data[] = {
|
||||||
/* Realtek, ALC293 */
|
/* Realtek ALC293 */
|
||||||
0x10ec0293, /* Vendor ID */
|
0x10ec0293, /* Vendor ID */
|
||||||
0x15581325, /* Subsystem ID */
|
0x15581325, /* Subsystem ID */
|
||||||
12, /* Number of entries */
|
12, /* Number of entries */
|
||||||
@@ -35,7 +32,8 @@ const u32 cim_verb_data[] = {
|
|||||||
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
||||||
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
AZALIA_PIN_CFG(0, 0x1d, 0x41738205),
|
||||||
AZALIA_PIN_CFG(0, 0x1e, 0x02451130),
|
AZALIA_PIN_CFG(0, 0x1e, 0x02451130),
|
||||||
/* Intel, KabylakeHDMI */
|
|
||||||
|
/* Intel GPU HDMI */
|
||||||
0x8086280b, /* Vendor ID */
|
0x8086280b, /* Vendor ID */
|
||||||
0x80860101, /* Subsystem ID */
|
0x80860101, /* Subsystem ID */
|
||||||
4, /* Number of entries */
|
4, /* Number of entries */
|
||||||
@@ -48,5 +46,3 @@ const u32 cim_verb_data[] = {
|
|||||||
const u32 pc_beep_verbs[] = {};
|
const u32 pc_beep_verbs[] = {};
|
||||||
|
|
||||||
AZALIA_ARRAY_SIZES;
|
AZALIA_ARRAY_SIZES;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@@ -13,13 +13,10 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HDA_VERB_H
|
|
||||||
#define HDA_VERB_H
|
|
||||||
|
|
||||||
#include <device/azalia_device.h>
|
#include <device/azalia_device.h>
|
||||||
|
|
||||||
const u32 cim_verb_data[] = {
|
const u32 cim_verb_data[] = {
|
||||||
/* Realtek, ALC293 */
|
/* Realtek ALC293 */
|
||||||
0x10ec0293, /* Vendor ID */
|
0x10ec0293, /* Vendor ID */
|
||||||
0x15581323, /* Subsystem ID */
|
0x15581323, /* Subsystem ID */
|
||||||
12, /* Number of entries */
|
12, /* Number of entries */
|
||||||
@@ -35,7 +32,8 @@ const u32 cim_verb_data[] = {
|
|||||||
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
|
||||||
AZALIA_PIN_CFG(0, 0x1d, 0x40738205),
|
AZALIA_PIN_CFG(0, 0x1d, 0x40738205),
|
||||||
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
|
AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
|
||||||
/* Intel, KabylakeHDMI */
|
|
||||||
|
/* Intel GPU HDMI */
|
||||||
0x8086280b, /* Vendor ID */
|
0x8086280b, /* Vendor ID */
|
||||||
0x80860101, /* Subsystem ID */
|
0x80860101, /* Subsystem ID */
|
||||||
4, /* Number of entries */
|
4, /* Number of entries */
|
||||||
@@ -48,5 +46,3 @@ const u32 cim_verb_data[] = {
|
|||||||
const u32 pc_beep_verbs[] = {};
|
const u32 pc_beep_verbs[] = {};
|
||||||
|
|
||||||
AZALIA_ARRAY_SIZES;
|
AZALIA_ARRAY_SIZES;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Reference in New Issue
Block a user