hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
....@@ -6,10 +6,50 @@
66 * Copyright (C) 2017 Cogent Embedded, Inc.
77 */
88
9
+/*
10
+ * SSI-PCM3168A
11
+ * aplay -D plughw:0,2 xxx.wav
12
+ * arecord -D plughw:0,3 xxx.wav
13
+ */
14
+
915 / {
1016 aliases {
1117 serial1 = &hscif0;
1218 serial2 = &scif1;
19
+ mmc2 = &sdhi3;
20
+ };
21
+
22
+ clksndsel: clksndsel {
23
+ #clock-cells = <0>;
24
+ compatible = "gpio-mux-clock";
25
+ clocks = <&cs2000>, <&audio_clk_a>; /* clk8snd, clksnd */
26
+ select-gpios = <&gpio_exp_75 13 GPIO_ACTIVE_HIGH>;
27
+ };
28
+
29
+ snd_3p3v: regulator-snd_3p3v {
30
+ compatible = "regulator-fixed";
31
+ regulator-name = "snd-3.3v";
32
+ regulator-min-microvolt = <3300000>;
33
+ regulator-max-microvolt = <3300000>;
34
+ };
35
+
36
+ snd_vcc5v: regulator-snd_vcc5v {
37
+ compatible = "regulator-fixed";
38
+ regulator-name = "snd-vcc5v";
39
+ regulator-min-microvolt = <5000000>;
40
+ regulator-max-microvolt = <5000000>;
41
+ };
42
+
43
+ wlan_en: regulator-wlan_en {
44
+ compatible = "regulator-fixed";
45
+ regulator-name = "wlan-en-regulator";
46
+
47
+ regulator-min-microvolt = <3300000>;
48
+ regulator-max-microvolt = <3300000>;
49
+
50
+ gpio = <&gpio_exp_74 4 GPIO_ACTIVE_HIGH>;
51
+ startup-delay-us = <70000>;
52
+ enable-active-high;
1353 };
1454 };
1555
....@@ -44,6 +84,57 @@
4484 };
4585
4686 &i2c2 {
87
+ i2cswitch2: i2c-switch@71 {
88
+ compatible = "nxp,pca9548";
89
+ #address-cells = <1>;
90
+ #size-cells = <0>;
91
+ reg = <0x71>;
92
+ reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
93
+
94
+ /* Audio_SDA, Audio_SCL */
95
+ i2c@7 {
96
+ #address-cells = <1>;
97
+ #size-cells = <0>;
98
+ reg = <7>;
99
+
100
+ pcm3168a: audio-codec@44 {
101
+ #sound-dai-cells = <0>;
102
+ compatible = "ti,pcm3168a";
103
+ reg = <0x44>;
104
+ clocks = <&clksndsel>;
105
+ clock-names = "scki";
106
+
107
+ VDD1-supply = <&snd_3p3v>;
108
+ VDD2-supply = <&snd_3p3v>;
109
+ VCCAD1-supply = <&snd_vcc5v>;
110
+ VCCAD2-supply = <&snd_vcc5v>;
111
+ VCCDA1-supply = <&snd_vcc5v>;
112
+ VCCDA2-supply = <&snd_vcc5v>;
113
+
114
+ ports {
115
+ #address-cells = <1>;
116
+ #size-cells = <0>;
117
+ mclk-fs = <512>;
118
+ port@0 {
119
+ reg = <0>;
120
+ pcm3168a_endpoint_p: endpoint {
121
+ remote-endpoint = <&rsnd_for_pcm3168a_play>;
122
+ clocks = <&clksndsel>;
123
+ };
124
+ };
125
+ port@1 {
126
+ reg = <1>;
127
+ pcm3168a_endpoint_c: endpoint {
128
+ remote-endpoint = <&rsnd_for_pcm3168a_capture>;
129
+ clocks = <&clksndsel>;
130
+ };
131
+ };
132
+ };
133
+ };
134
+ };
135
+ };
136
+
137
+ /* U11 */
47138 gpio_exp_74: gpio@74 {
48139 compatible = "ti,tca9539";
49140 reg = <0x74>;
....@@ -52,6 +143,13 @@
52143 interrupt-controller;
53144 interrupt-parent = <&gpio6>;
54145 interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
146
+
147
+ audio_out_off {
148
+ gpio-hog;
149
+ gpios = <0 GPIO_ACTIVE_HIGH>; /* P00 */
150
+ output-high;
151
+ line-name = "Audio_Out_OFF";
152
+ };
55153
56154 hub_pwen {
57155 gpio-hog;
....@@ -67,6 +165,13 @@
67165 line-name = "HUB rst";
68166 };
69167
168
+ otg_extlpn {
169
+ gpio-hog;
170
+ gpios = <9 GPIO_ACTIVE_HIGH>;
171
+ output-high;
172
+ line-name = "OTG EXTLPn";
173
+ };
174
+
70175 otg_offvbusn {
71176 gpio-hog;
72177 gpios = <8 GPIO_ACTIVE_HIGH>;
....@@ -74,14 +179,22 @@
74179 line-name = "OTG OFFVBUSn";
75180 };
76181
77
- otg_extlpn {
182
+ sd-wifi-mux {
78183 gpio-hog;
79
- gpios = <9 GPIO_ACTIVE_HIGH>;
184
+ gpios = <5 GPIO_ACTIVE_HIGH>;
185
+ output-low; /* Connect WL1837 */
186
+ line-name = "SD WiFi mux";
187
+ };
188
+
189
+ snd_rst {
190
+ gpio-hog;
191
+ gpios = <15 GPIO_ACTIVE_HIGH>; /* P17 */
80192 output-high;
81
- line-name = "OTG EXTLPn";
193
+ line-name = "SND_RST";
82194 };
83195 };
84196
197
+ /* U5 */
85198 gpio_exp_75: gpio@75 {
86199 compatible = "ti,tca9539";
87200 reg = <0x75>;
....@@ -91,17 +204,17 @@
91204 interrupt-parent = <&gpio6>;
92205 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
93206 };
207
+};
94208
95
- i2cswitch2: i2c-switch@71 {
209
+&i2c4 {
210
+ i2cswitch4: i2c-switch@71 {
96211 compatible = "nxp,pca9548";
97212 #address-cells = <1>;
98213 #size-cells = <0>;
99214 reg = <0x71>;
100
- reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
215
+ reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
101216 };
102
-};
103217
104
-&i2c4 {
105218 gpio_exp_76: gpio@76 {
106219 compatible = "ti,tca9539";
107220 reg = <0x76>;
....@@ -120,14 +233,6 @@
120233 interrupt-controller;
121234 interrupt-parent = <&gpio5>;
122235 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
123
- };
124
-
125
- i2cswitch4: i2c-switch@71 {
126
- compatible = "nxp,pca9548";
127
- #address-cells = <1>;
128
- #size-cells = <0>;
129
- reg = <0x71>;
130
- reset-gpios= <&gpio3 15 GPIO_ACTIVE_LOW>;
131236 };
132237 };
133238
....@@ -165,8 +270,19 @@
165270 };
166271
167272 scif1_pins: scif1 {
168
- groups = "scif1_data_b", "scif1_ctrl";
273
+ groups = "scif1_data_b";
169274 function = "scif1";
275
+ };
276
+
277
+ sdhi3_pins: sdhi3 {
278
+ groups = "sdhi3_data4", "sdhi3_ctrl";
279
+ function = "sdhi3";
280
+ power-source = <3300>;
281
+ };
282
+
283
+ sound_pcm_pins: sound-pcm {
284
+ groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
285
+ function = "ssi";
170286 };
171287
172288 usb0_pins: usb0 {
....@@ -175,14 +291,85 @@
175291 };
176292 };
177293
294
+&rcar_sound {
295
+ pinctrl-0 = <&sound_pins
296
+ &sound_clk_pins
297
+ &sound_pcm_pins>;
298
+
299
+ ports {
300
+ /* rsnd_port0/1 are on salvator-common */
301
+ rsnd_port2: port@2 {
302
+ reg = <2>;
303
+ rsnd_for_pcm3168a_play: endpoint {
304
+ remote-endpoint = <&pcm3168a_endpoint_p>;
305
+
306
+ dai-format = "i2s";
307
+ bitclock-master = <&rsnd_for_pcm3168a_play>;
308
+ frame-master = <&rsnd_for_pcm3168a_play>;
309
+ dai-tdm-slot-num = <8>;
310
+
311
+ playback = <&ssi3>;
312
+ };
313
+ };
314
+ rsnd_port3: port@3 {
315
+ reg = <3>;
316
+ rsnd_for_pcm3168a_capture: endpoint {
317
+ remote-endpoint = <&pcm3168a_endpoint_c>;
318
+
319
+ dai-format = "i2s";
320
+ bitclock-master = <&rsnd_for_pcm3168a_capture>;
321
+ frame-master = <&rsnd_for_pcm3168a_capture>;
322
+ dai-tdm-slot-num = <6>;
323
+
324
+ capture = <&ssi4>;
325
+ };
326
+ };
327
+ };
328
+};
329
+
178330 &scif1 {
179331 pinctrl-0 = <&scif1_pins>;
180332 pinctrl-names = "default";
181
- uart-has-rtscts;
182333
183334 status = "okay";
184335 };
185336
337
+&sdhi3 {
338
+ pinctrl-0 = <&sdhi3_pins>;
339
+ pinctrl-names = "default";
340
+
341
+ vmmc-supply = <&wlan_en>;
342
+ vqmmc-supply = <&wlan_en>;
343
+ bus-width = <4>;
344
+ no-1-8-v;
345
+ non-removable;
346
+ cap-power-off-card;
347
+ keep-power-in-suspend;
348
+ max-frequency = <26000000>;
349
+ status = "okay";
350
+
351
+ #address-cells = <1>;
352
+ #size-cells = <0>;
353
+ wlcore: wlcore@2 {
354
+ compatible = "ti,wl1837";
355
+ reg = <2>;
356
+ interrupt-parent = <&gpio1>;
357
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
358
+ };
359
+};
360
+
361
+&sound_card {
362
+ dais = <&rsnd_port0 /* ak4613 */
363
+ &rsnd_port1 /* HDMI0 */
364
+ &rsnd_port2 /* pcm3168a playback */
365
+ &rsnd_port3 /* pcm3168a capture */
366
+ >;
367
+};
368
+
369
+&ssi4 {
370
+ shared-pin;
371
+};
372
+
186373 &usb2_phy0 {
187374 pinctrl-0 = <&usb0_pins>;
188375 pinctrl-names = "default";