1 /* SPDX-License-Identifier: GPL-2.0-only */
5 /* Maxim Audio Codec */
6 Device (MAXM) /* Audio Codec driver I2C */
8 Name (_HID, AUDIO_CODEC_HID)
9 Name (_CID, AUDIO_CODEC_CID)
10 Name (_DDN, AUDIO_CODEC_DDN)
14 /* Add DT style bindings with _DSD */
15 Name (_DSD, Package () {
16 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
18 /* set maxim micbias to 2.8v */
19 Package () { "maxim,micbias", 3 },
23 Method(_CRS, 0x0, Serialized)
25 Name(SBUF,ResourceTemplate ()
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 */
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, ,)
43 BOARD_JACK_MAXIM_GPIO_INDEX
58 Device (TISW) /* TI Switch driver I2C */
60 Name (_HID, TI_SWITCH_HID)
61 Name (_CID, TI_SWITCH_CID)
62 Name (_DDN, TI_SWITCH_DDN)
65 /* Add DT style bindings with _DSD */
66 Name (_DSD, Package () {
67 ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
69 /* set ti micbias to 2.8v */
70 Package () { "ti,micbias", 7 },
74 Method(_CRS, 0x0, NotSerialized)
76 Name(SBUF,ResourceTemplate ()
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 */
86 GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault,,
87 "\\_SB.GPSW") { BOARD_JACK_TI_GPIO_INDEX }
100 Scope (\_SB.PCI0.LPEA)
102 Name (GBUF, ResourceTemplate ()
104 /* Jack Detect (index 0) */
105 GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullDefault,,
106 "\\_SB.GPSE") { BOARD_JACK_MAXIM_GPIO_INDEX }