util/intelp2m: Print the current project version
[coreboot2.git] / src / mainboard / google / cyan / acpi / codec_maxim.asl
blobf526fc12da65bbdc9a5f99f61d04e64dce7e227a
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 Scope (\_SB.PCI0.I2C2)
5         /* Maxim Audio Codec */
6         Device (MAXM)   /* Audio Codec driver I2C */
7         {
8                 Name (_HID, AUDIO_CODEC_HID)
9                 Name (_CID, AUDIO_CODEC_CID)
10                 Name (_DDN, AUDIO_CODEC_DDN)
11                 Name (_UID, 1)
12                 Name (_HRV, 0x02)
14                 /* Add DT style bindings with _DSD */
15                 Name (_DSD, Package () {
16                         ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
17                         Package () {
18                                 /* set maxim micbias to 2.8v */
19                                 Package () { "maxim,micbias", 3 },
20                         }
21                 })
23                 Method(_CRS, 0x0, Serialized)
24                 {
25                         Name(SBUF,ResourceTemplate ()
26                         {
27                                 I2CSerialBus(
28                                         AUDIO_CODEC_I2C_ADDR,   /* SlaveAddress: bus address */
29                                         ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
30                                         400000,                 /* ConnectionSpeed: in Hz */
31                                         AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
32                                         "\\_SB.PCI0.I2C2",      /* ResourceSource: I2C bus controller name */
33                                 )
35                                 /* For Linux driver */
36                                 GpioInt (Edge, ActiveHigh, ExclusiveAndWake, PullDefault,,
37                                         "\\_SB.GPSE") { BOARD_JACK_MAXIM_GPIO_INDEX }
39                                 /* For coolstar's Windows driver */
40                                 GpioIo (Exclusive, PullNone, 0x0000, 0x0000, IoRestrictionInputOnly,
41                                         "\\_SB.GPSE", 0x00, ResourceConsumer, ,)
42                                 {
43                                         BOARD_JACK_MAXIM_GPIO_INDEX
44                                 }
45                         } )
46                         Return (SBUF)
47                 }
49                 Method (_STA)
50                 {
51                         If (\S2EN == 1) {
52                                 Return (0xF)
53                         } Else {
54                                 Return (0x0)
55                         }
56                 }
57         }
58         Device (TISW)   /* TI Switch driver I2C */
59         {
60                 Name (_HID, TI_SWITCH_HID)
61                 Name (_CID, TI_SWITCH_CID)
62                 Name (_DDN, TI_SWITCH_DDN)
63                 Name (_UID, 1)
65                 /* Add DT style bindings with _DSD */
66                 Name (_DSD, Package () {
67                         ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
68                         Package () {
69                                 /* set ti micbias to 2.8v */
70                                 Package () { "ti,micbias", 7 },
71                         }
72                 })
74                 Method(_CRS, 0x0, NotSerialized)
75                 {
76                         Name(SBUF,ResourceTemplate ()
77                         {
78                                 I2CSerialBus(
79                                         TI_SWITCH_I2C_ADDR,     /* SlaveAddress: bus address */
80                                         ControllerInitiated,    /* SlaveMode: default to ControllerInitiated */
81                                         400000,                 /* ConnectionSpeed: in Hz */
82                                         AddressingMode7Bit,     /* Addressing Mode: default to 7 bit */
83                                         "\\_SB.PCI0.I2C2",      /* ResourceSource: I2C bus controller name */
84                                 )
86                                 GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault,,
87                                         "\\_SB.GPSW") { BOARD_JACK_TI_GPIO_INDEX }
89                         } )
90                         Return (SBUF)
91                 }
93                 Method (_STA)
94                 {
95                         Return (0xF)
96                 }
97         }
100 Scope (\_SB.PCI0.LPEA)
102         Name (GBUF, ResourceTemplate ()
103         {
104                 /* Jack Detect (index 0) */
105                 GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullDefault,,
106                         "\\_SB.GPSE") { BOARD_JACK_MAXIM_GPIO_INDEX }
107         })