Merge tag 'docs-5.15' of git://git.lwn.net/linux
[linux-2.6-microblaze.git] / arch / arm64 / boot / dts / renesas / ulcb-kf.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Device Tree Source for the Kingfisher (ULCB extension) board
4  *
5  * Copyright (C) 2017 Renesas Electronics Corp.
6  * Copyright (C) 2017 Cogent Embedded, Inc.
7  */
8
9 /*
10  * SSI-PCM3168A
11  *      aplay   -D plughw:0,2 xxx.wav
12  *      arecord -D plughw:0,3 xxx.wav
13  */
14
15 / {
16         aliases {
17                 serial1 = &hscif0;
18                 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;
53         };
54 };
55
56 &can0 {
57         pinctrl-0 = <&can0_pins>;
58         pinctrl-names = "default";
59         status = "okay";
60 };
61
62 &can1 {
63         pinctrl-0 = <&can1_pins>;
64         pinctrl-names = "default";
65         status = "okay";
66 };
67
68 &ehci0 {
69         dr_mode = "otg";
70         status = "okay";
71 };
72
73 &hscif0 {
74         pinctrl-0 = <&hscif0_pins>;
75         pinctrl-names = "default";
76         uart-has-rtscts;
77
78         status = "okay";
79 };
80
81 &hsusb {
82         dr_mode = "otg";
83         status = "okay";
84 };
85
86 &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 */
138         gpio_exp_74: gpio@74 {
139                 compatible = "ti,tca9539";
140                 reg = <0x74>;
141                 gpio-controller;
142                 #gpio-cells = <2>;
143                 interrupt-controller;
144                 interrupt-parent = <&gpio6>;
145                 interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
146
147                 audio-out-off-hog {
148                         gpio-hog;
149                         gpios = <0 GPIO_ACTIVE_HIGH>; /* P00 */
150                         output-high;
151                         line-name = "Audio_Out_OFF";
152                 };
153
154                 hub-pwen-hog {
155                         gpio-hog;
156                         gpios = <6 GPIO_ACTIVE_HIGH>;
157                         output-high;
158                         line-name = "HUB pwen";
159                 };
160
161                 hub-rst-hog {
162                         gpio-hog;
163                         gpios = <7 GPIO_ACTIVE_HIGH>;
164                         output-high;
165                         line-name = "HUB rst";
166                 };
167
168                 otg-extlpn-hog {
169                         gpio-hog;
170                         gpios = <9 GPIO_ACTIVE_HIGH>;
171                         output-high;
172                         line-name = "OTG EXTLPn";
173                 };
174
175                 otg-offvbusn-hog {
176                         gpio-hog;
177                         gpios = <8 GPIO_ACTIVE_HIGH>;
178                         output-low;
179                         line-name = "OTG OFFVBUSn";
180                 };
181
182                 sd-wifi-mux-hog {
183                         gpio-hog;
184                         gpios = <5 GPIO_ACTIVE_HIGH>;
185                         output-low;     /* Connect WL1837 */
186                         line-name = "SD WiFi mux";
187                 };
188
189                 snd-rst-hog {
190                         gpio-hog;
191                         gpios = <15 GPIO_ACTIVE_HIGH>; /* P17 */
192                         output-high;
193                         line-name = "SND_RST";
194                 };
195         };
196
197         /* U5 */
198         gpio_exp_75: gpio@75 {
199                 compatible = "ti,tca9539";
200                 reg = <0x75>;
201                 gpio-controller;
202                 #gpio-cells = <2>;
203                 interrupt-controller;
204                 interrupt-parent = <&gpio6>;
205                 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
206         };
207 };
208
209 &i2c4 {
210         i2cswitch4: i2c-switch@71 {
211                 compatible = "nxp,pca9548";
212                 #address-cells = <1>;
213                 #size-cells = <0>;
214                 reg = <0x71>;
215                 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
216         };
217
218         gpio_exp_76: gpio@76 {
219                 compatible = "ti,tca9539";
220                 reg = <0x76>;
221                 gpio-controller;
222                 #gpio-cells = <2>;
223                 interrupt-controller;
224                 interrupt-parent = <&gpio7>;
225                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
226         };
227
228         gpio_exp_77: gpio@77 {
229                 compatible = "ti,tca9539";
230                 reg = <0x77>;
231                 gpio-controller;
232                 #gpio-cells = <2>;
233                 interrupt-controller;
234                 interrupt-parent = <&gpio5>;
235                 interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
236         };
237 };
238
239 &ohci0 {
240         dr_mode = "otg";
241         status = "okay";
242 };
243
244 &pcie_bus_clk {
245         clock-frequency = <100000000>;
246 };
247
248 &pciec0 {
249         status = "okay";
250 };
251
252 &pciec1 {
253         status = "okay";
254 };
255
256 &pfc {
257         can0_pins: can0 {
258                 groups = "can0_data_a";
259                 function = "can0";
260         };
261
262         can1_pins: can1 {
263                 groups = "can1_data";
264                 function = "can1";
265         };
266
267         hscif0_pins: hscif0 {
268                 groups = "hscif0_data", "hscif0_ctrl";
269                 function = "hscif0";
270         };
271
272         scif1_pins: scif1 {
273                 groups = "scif1_data_b", "scif1_ctrl";
274                 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";
286         };
287
288         usb0_pins: usb0 {
289                 groups = "usb0";
290                 function = "usb0";
291         };
292 };
293
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
330 &scif1 {
331         pinctrl-0 = <&scif1_pins>;
332         pinctrl-names = "default";
333         uart-has-rtscts;
334
335         status = "okay";
336 };
337
338 &sdhi3 {
339         pinctrl-0 = <&sdhi3_pins>;
340         pinctrl-names = "default";
341
342         vmmc-supply = <&wlan_en>;
343         vqmmc-supply = <&wlan_en>;
344         bus-width = <4>;
345         no-1-8-v;
346         non-removable;
347         cap-power-off-card;
348         keep-power-in-suspend;
349         max-frequency = <26000000>;
350         status = "okay";
351
352         #address-cells = <1>;
353         #size-cells = <0>;
354         wlcore: wlcore@2 {
355                 compatible = "ti,wl1837";
356                 reg = <2>;
357                 interrupt-parent = <&gpio1>;
358                 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
359         };
360 };
361
362 &sound_card {
363         dais = <&rsnd_port0     /* ak4613 */
364                 &rsnd_port1     /* HDMI0  */
365                 &rsnd_port2     /* pcm3168a playback */
366                 &rsnd_port3     /* pcm3168a capture  */
367                 >;
368 };
369
370 &ssi4 {
371         shared-pin;
372 };
373
374 &usb2_phy0 {
375         pinctrl-0 = <&usb0_pins>;
376         pinctrl-names = "default";
377
378         status = "okay";
379 };
380
381 &xhci0 {
382         status = "okay";
383 };