mb/google/nissa/var/pujjo: Add new supported memory part
[coreboot2.git] / src / mainboard / system76 / kbl-u / acpi / s76.asl
blob53bb801ff4dd4ceba4331f2a7bb9e8943deb0414
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 // Notifications:
4 //   0x80 - hardware backlight toggle
5 //   0x81 - backlight toggle
6 //   0x82 - backlight down
7 //   0x83 - backlight up
8 //   0x84 - backlight color change
9 Device (S76D) {
10         Name (_HID, "17761776")
11         Name (_UID, 0)
13         Method (RSET, 0, Serialized) {
14                 Printf ("S76D: RSET")
15                 SAPL(0)
16                 SKBL(0)
17         }
19         Method (INIT, 0, Serialized) {
20                 Printf ("S76D: INIT")
21                 RSET()
22                 If (^^PCI0.LPCB.EC0.ECOK) {
23                         // Set flags to use software control
24                         ^^PCI0.LPCB.EC0.ECOS = 2
25                         Return (0)
26                 } Else {
27                         Return (1)
28                 }
29         }
31         Method (FINI, 0, Serialized) {
32                 Printf ("S76D: FINI")
33                 RSET()
34                 If (^^PCI0.LPCB.EC0.ECOK) {
35                         // Set flags to use hardware control
36                         ^^PCI0.LPCB.EC0.ECOS = 1
37                         Return (0)
38                 } Else {
39                         Return (1)
40                 }
41         }
43         // Get Airplane LED
44         Method (GAPL, 0, Serialized) {
45                 If (^^PCI0.LPCB.EC0.ECOK) {
46                         If (^^PCI0.LPCB.EC0.AIRP & 0x40) {
47                                 Return (1)
48                         }
49                 }
50                 Return (0)
51         }
53         // Set Airplane LED
54         Method (SAPL, 1, Serialized) {
55                 If (^^PCI0.LPCB.EC0.ECOK) {
56                         If (Arg0) {
57                                 ^^PCI0.LPCB.EC0.AIRP |= 0x40
58                         } Else {
59                                 ^^PCI0.LPCB.EC0.AIRP &= 0xBF
60                         }
61                 }
62         }
64         // Get KB LED
65         Method (GKBL, 0, Serialized) {
66                 Local0 = 0
67                 If (^^PCI0.LPCB.EC0.ECOK) {
68                         ^^PCI0.LPCB.EC0.FDAT = 1
69                         ^^PCI0.LPCB.EC0.FCMD = 0xCA
70                         Local0 = ^^PCI0.LPCB.EC0.FBUF
71                         ^^PCI0.LPCB.EC0.FCMD = 0
72                 }
73                 Return (Local0)
74         }
76         // Set KB Led
77         Method (SKBL, 1, Serialized) {
78                 If (^^PCI0.LPCB.EC0.ECOK) {
79                         ^^PCI0.LPCB.EC0.FDAT = 0
80                         ^^PCI0.LPCB.EC0.FBUF = Arg0
81                         ^^PCI0.LPCB.EC0.FCMD = 0xCA
82                 }
83         }