Skip to content

Commit e136c50

Browse files
chadmedmarcan
authored andcommitted
arm64: dts: apple: describe shared SDZ GPIO for tas2764
machines with the tas2764 amp codec share a GPIO line for asserting/deasserting the SDZ pin on the chips. describe this as a regulator to facilitate chip reset on suspend/resume Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
1 parent 31b5b88 commit e136c50

4 files changed

Lines changed: 54 additions & 22 deletions

File tree

arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,24 @@
185185
};
186186
};
187187

188+
/* Virtual regulator representing the shared shutdown GPIO */
189+
/ {
190+
speaker_sdz: fixed-regulator-sn012776-sdz {
191+
compatible = "regulator-fixed";
192+
regulator-name = "sn012776-sdz";
193+
startup-delay-us = <5000>;
194+
gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
195+
enable-active-high;
196+
};
197+
};
198+
188199
&i2c1 {
189200
status = "okay";
190201

191202
speaker_left_tweet: codec@3a {
192203
compatible = "ti,sn012776", "ti,tas2764";
193204
reg = <0x3a>;
194-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
205+
SDZ-supply = <&speaker_sdz>;
195206
#sound-dai-cells = <0>;
196207
sound-name-prefix = "Left Tweeter";
197208
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;
@@ -202,7 +213,7 @@
202213
speaker_left_woof1: codec@38 {
203214
compatible = "ti,sn012776", "ti,tas2764";
204215
reg = <0x38>;
205-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
216+
SDZ-supply = <&speaker_sdz>;
206217
#sound-dai-cells = <0>;
207218
sound-name-prefix = "Left Woofer 1";
208219
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;
@@ -214,7 +225,7 @@
214225
speaker_left_woof2: codec@39 {
215226
compatible = "ti,sn012776", "ti,tas2764";
216227
reg = <0x39>;
217-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
228+
SDZ-supply = <&speaker_sdz>;
218229
#sound-dai-cells = <0>;
219230
sound-name-prefix = "Left Woofer 2";
220231
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;
@@ -242,7 +253,7 @@
242253
speaker_right_tweet: codec@3d {
243254
compatible = "ti,sn012776", "ti,tas2764";
244255
reg = <0x3d>;
245-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
256+
SDZ-supply = <&speaker_sdz>;
246257
#sound-dai-cells = <0>;
247258
sound-name-prefix = "Right Tweeter";
248259
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;
@@ -253,7 +264,7 @@
253264
speaker_right_woof1: codec@3b {
254265
compatible = "ti,sn012776", "ti,tas2764";
255266
reg = <0x3b>;
256-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
267+
SDZ-supply = <&speaker_sdz>;
257268
#sound-dai-cells = <0>;
258269
sound-name-prefix = "Right Woofer 1";
259270
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;
@@ -265,7 +276,7 @@
265276
speaker_right_woof2: codec@3c {
266277
compatible = "ti,sn012776", "ti,tas2764";
267278
reg = <0x3c>;
268-
shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
279+
SDZ-supply = <&speaker_sdz>;
269280
#sound-dai-cells = <0>;
270281
sound-name-prefix = "Right Woofer 2";
271282
interrupts-extended = <&pinctrl_ap 179 IRQ_TYPE_LEVEL_LOW>;

arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,32 @@
4646
interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
4747
};
4848

49+
/* Redefine GPIO for SDZ */
50+
&speaker_sdz {
51+
gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
52+
};
53+
4954
&speaker_left_tweet {
50-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
5155
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
5256
};
5357

5458
&speaker_left_woof1 {
55-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
5659
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
5760
};
5861

5962
&speaker_left_woof2 {
60-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
6163
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
6264
};
6365

6466
&speaker_right_tweet {
65-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
6667
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
6768
};
6869

6970
&speaker_right_woof1 {
70-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
7171
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
7272
};
7373

7474
&speaker_right_woof2 {
75-
shutdown-gpios = <&pinctrl_ap 57 GPIO_ACTIVE_HIGH>;
7675
interrupts-extended = <&pinctrl_ap 58 IRQ_TYPE_LEVEL_LOW>;
7776
};
7877

arch/arm64/boot/dts/apple/t8112-j415.dts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,22 @@
9595
};
9696
};
9797

98+
/* Virtual regulator representing the shared shutdown GPIO */
99+
/ {
100+
speaker_sdz: fixed-regulator-sn012776-sdz {
101+
compatible = "regulator-fixed";
102+
regulator-name = "sn012776-sdz";
103+
startup-delay-us = <5000>;
104+
gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
105+
enable-active-high;
106+
};
107+
};
108+
98109
&i2c1 {
99110
speaker_left_woof1: codec@38 {
100111
compatible = "ti,sn012776", "ti,tas2764";
101112
reg = <0x38>;
102-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
113+
SDZ-supply = <&speaker_sdz>;
103114
#sound-dai-cells = <0>;
104115
sound-name-prefix = "Left Woofer 1";
105116
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -111,7 +122,7 @@
111122
speaker_left_tweet: codec@39 {
112123
compatible = "ti,sn012776", "ti,tas2764";
113124
reg = <0x39>;
114-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
125+
SDZ-supply = <&speaker_sdz>;
115126
#sound-dai-cells = <0>;
116127
sound-name-prefix = "Left Tweeter";
117128
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -122,7 +133,7 @@
122133
speaker_left_woof2: codec@3a {
123134
compatible = "ti,sn012776", "ti,tas2764";
124135
reg = <0x3a>;
125-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
136+
SDZ-supply = <&speaker_sdz>;
126137
#sound-dai-cells = <0>;
127138
sound-name-prefix = "Left Woofer 2";
128139
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -135,7 +146,7 @@
135146
speaker_right_woof1: codec@3b {
136147
compatible = "ti,sn012776", "ti,tas2764";
137148
reg = <0x3b>;
138-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
149+
SDZ-supply = <&speaker_sdz>;
139150
#sound-dai-cells = <0>;
140151
sound-name-prefix = "Right Woofer 1";
141152
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -147,7 +158,7 @@
147158
speaker_right_tweet: codec@3c {
148159
compatible = "ti,sn012776", "ti,tas2764";
149160
reg = <0x3c>;
150-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
161+
SDZ-supply = <&speaker_sdz>;
151162
#sound-dai-cells = <0>;
152163
sound-name-prefix = "Right Tweeter";
153164
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -158,7 +169,7 @@
158169
speaker_right_woof2: codec@3d {
159170
compatible = "ti,sn012776", "ti,tas2764";
160171
reg = <0x3d>;
161-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
172+
SDZ-supply = <&speaker_sdz>;
162173
#sound-dai-cells = <0>;
163174
sound-name-prefix = "Right Woofer 2";
164175
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;

arch/arm64/boot/dts/apple/t8112-j493.dts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,22 @@
9999
label = "USB-C Left-front";
100100
};
101101

102+
/* Virtual regulator representing the shared shutdown GPIO */
103+
/ {
104+
speaker_sdz: fixed-regulator-sn012776-sdz {
105+
compatible = "regulator-fixed";
106+
regulator-name = "sn012776-sdz";
107+
startup-delay-us = <5000>;
108+
gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
109+
enable-active-high;
110+
};
111+
};
112+
102113
&i2c1 {
103114
speaker_left_rear: codec@38 {
104115
compatible = "ti,sn012776", "ti,tas2764";
105116
reg = <0x38>;
106-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
117+
SDZ-supply = <&speaker_sdz>;
107118
#sound-dai-cells = <0>;
108119
sound-name-prefix = "Left Rear";
109120
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -114,7 +125,7 @@
114125
speaker_left_front: codec@39 {
115126
compatible = "ti,sn012776", "ti,tas2764";
116127
reg = <0x39>;
117-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
128+
SDZ-supply = <&speaker_sdz>;
118129
#sound-dai-cells = <0>;
119130
sound-name-prefix = "Left Front";
120131
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -128,7 +139,7 @@
128139
speaker_right_rear: codec@3b {
129140
compatible = "ti,sn012776", "ti,tas2764";
130141
reg = <0x3b>;
131-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
142+
SDZ-supply = <&speaker_sdz>;
132143
#sound-dai-cells = <0>;
133144
sound-name-prefix = "Right Rear";
134145
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;
@@ -139,7 +150,7 @@
139150
speaker_right_front: codec@3c {
140151
compatible = "ti,sn012776", "ti,tas2764";
141152
reg = <0x3c>;
142-
shutdown-gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>;
153+
SDZ-supply = <&speaker_sdz>;
143154
#sound-dai-cells = <0>;
144155
sound-name-prefix = "Right Front";
145156
interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>;

0 commit comments

Comments
 (0)