.. | .. |
---|
6 | 6 | * Copyright (C) 2017 Cogent Embedded, Inc. |
---|
7 | 7 | */ |
---|
8 | 8 | |
---|
| 9 | +/* |
---|
| 10 | + * SSI-PCM3168A |
---|
| 11 | + * aplay -D plughw:0,2 xxx.wav |
---|
| 12 | + * arecord -D plughw:0,3 xxx.wav |
---|
| 13 | + */ |
---|
| 14 | + |
---|
9 | 15 | / { |
---|
10 | 16 | aliases { |
---|
11 | 17 | serial1 = &hscif0; |
---|
12 | 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; |
---|
13 | 53 | }; |
---|
14 | 54 | }; |
---|
15 | 55 | |
---|
.. | .. |
---|
44 | 84 | }; |
---|
45 | 85 | |
---|
46 | 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 */ |
---|
47 | 138 | gpio_exp_74: gpio@74 { |
---|
48 | 139 | compatible = "ti,tca9539"; |
---|
49 | 140 | reg = <0x74>; |
---|
.. | .. |
---|
52 | 143 | interrupt-controller; |
---|
53 | 144 | interrupt-parent = <&gpio6>; |
---|
54 | 145 | 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 | + }; |
---|
55 | 153 | |
---|
56 | 154 | hub_pwen { |
---|
57 | 155 | gpio-hog; |
---|
.. | .. |
---|
67 | 165 | line-name = "HUB rst"; |
---|
68 | 166 | }; |
---|
69 | 167 | |
---|
| 168 | + otg_extlpn { |
---|
| 169 | + gpio-hog; |
---|
| 170 | + gpios = <9 GPIO_ACTIVE_HIGH>; |
---|
| 171 | + output-high; |
---|
| 172 | + line-name = "OTG EXTLPn"; |
---|
| 173 | + }; |
---|
| 174 | + |
---|
70 | 175 | otg_offvbusn { |
---|
71 | 176 | gpio-hog; |
---|
72 | 177 | gpios = <8 GPIO_ACTIVE_HIGH>; |
---|
.. | .. |
---|
74 | 179 | line-name = "OTG OFFVBUSn"; |
---|
75 | 180 | }; |
---|
76 | 181 | |
---|
77 | | - otg_extlpn { |
---|
| 182 | + sd-wifi-mux { |
---|
78 | 183 | 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 */ |
---|
80 | 192 | output-high; |
---|
81 | | - line-name = "OTG EXTLPn"; |
---|
| 193 | + line-name = "SND_RST"; |
---|
82 | 194 | }; |
---|
83 | 195 | }; |
---|
84 | 196 | |
---|
| 197 | + /* U5 */ |
---|
85 | 198 | gpio_exp_75: gpio@75 { |
---|
86 | 199 | compatible = "ti,tca9539"; |
---|
87 | 200 | reg = <0x75>; |
---|
.. | .. |
---|
91 | 204 | interrupt-parent = <&gpio6>; |
---|
92 | 205 | interrupts = <4 IRQ_TYPE_EDGE_FALLING>; |
---|
93 | 206 | }; |
---|
| 207 | +}; |
---|
94 | 208 | |
---|
95 | | - i2cswitch2: i2c-switch@71 { |
---|
| 209 | +&i2c4 { |
---|
| 210 | + i2cswitch4: i2c-switch@71 { |
---|
96 | 211 | compatible = "nxp,pca9548"; |
---|
97 | 212 | #address-cells = <1>; |
---|
98 | 213 | #size-cells = <0>; |
---|
99 | 214 | reg = <0x71>; |
---|
100 | | - reset-gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; |
---|
| 215 | + reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; |
---|
101 | 216 | }; |
---|
102 | | -}; |
---|
103 | 217 | |
---|
104 | | -&i2c4 { |
---|
105 | 218 | gpio_exp_76: gpio@76 { |
---|
106 | 219 | compatible = "ti,tca9539"; |
---|
107 | 220 | reg = <0x76>; |
---|
.. | .. |
---|
120 | 233 | interrupt-controller; |
---|
121 | 234 | interrupt-parent = <&gpio5>; |
---|
122 | 235 | 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>; |
---|
131 | 236 | }; |
---|
132 | 237 | }; |
---|
133 | 238 | |
---|
.. | .. |
---|
165 | 270 | }; |
---|
166 | 271 | |
---|
167 | 272 | scif1_pins: scif1 { |
---|
168 | | - groups = "scif1_data_b", "scif1_ctrl"; |
---|
| 273 | + groups = "scif1_data_b"; |
---|
169 | 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"; |
---|
170 | 286 | }; |
---|
171 | 287 | |
---|
172 | 288 | usb0_pins: usb0 { |
---|
.. | .. |
---|
175 | 291 | }; |
---|
176 | 292 | }; |
---|
177 | 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 | + |
---|
178 | 330 | &scif1 { |
---|
179 | 331 | pinctrl-0 = <&scif1_pins>; |
---|
180 | 332 | pinctrl-names = "default"; |
---|
181 | | - uart-has-rtscts; |
---|
182 | 333 | |
---|
183 | 334 | status = "okay"; |
---|
184 | 335 | }; |
---|
185 | 336 | |
---|
| 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 | + |
---|
186 | 373 | &usb2_phy0 { |
---|
187 | 374 | pinctrl-0 = <&usb0_pins>; |
---|
188 | 375 | pinctrl-names = "default"; |
---|