]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/r8a7793-gose.dts
Merge tag 'nomadik-dts-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[karo-tx-linux.git] / arch / arm / boot / dts / r8a7793-gose.dts
1 /*
2  * Device Tree Source for the Gose board
3  *
4  * Copyright (C) 2014-2015 Renesas Electronics Corporation
5  *
6  * This file is licensed under the terms of the GNU General Public License
7  * version 2.  This program is licensed "as is" without any warranty of any
8  * kind, whether express or implied.
9  */
10
11 /*
12  * SSI-AK4643
13  *
14  * SW1: 1: AK4643
15  *      2: CN22
16  *      3: ADV7511
17  *
18  * This command is required when Playback/Capture
19  *
20  *      amixer set "LINEOUT Mixer DACL" on
21  *      amixer set "DVC Out" 100%
22  *      amixer set "DVC In" 100%
23  *
24  * You can use Mute
25  *
26  *      amixer set "DVC Out Mute" on
27  *      amixer set "DVC In Mute" on
28  *
29  * You can use Volume Ramp
30  *
31  *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
32  *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
33  *      amixer set "DVC Out Ramp" on
34  *      aplay xxx.wav &
35  *      amixer set "DVC Out"  80%  // Volume Down
36  *      amixer set "DVC Out" 100%  // Volume Up
37  */
38
39 /dts-v1/;
40 #include "r8a7793.dtsi"
41 #include <dt-bindings/gpio/gpio.h>
42 #include <dt-bindings/input/input.h>
43
44 / {
45         model = "Gose";
46         compatible = "renesas,gose", "renesas,r8a7793";
47
48         aliases {
49                 serial0 = &scif0;
50                 serial1 = &scif1;
51         };
52
53         chosen {
54                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
55                 stdout-path = "serial0:115200n8";
56         };
57
58         memory@40000000 {
59                 device_type = "memory";
60                 reg = <0 0x40000000 0 0x40000000>;
61         };
62
63         gpio-keys {
64                 compatible = "gpio-keys";
65
66                 key-1 {
67                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
68                         linux,code = <KEY_1>;
69                         label = "SW2-1";
70                         wakeup-source;
71                         debounce-interval = <20>;
72                 };
73                 key-2 {
74                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
75                         linux,code = <KEY_2>;
76                         label = "SW2-2";
77                         wakeup-source;
78                         debounce-interval = <20>;
79                 };
80                 key-3 {
81                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
82                         linux,code = <KEY_3>;
83                         label = "SW2-3";
84                         wakeup-source;
85                         debounce-interval = <20>;
86                 };
87                 key-4 {
88                         gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
89                         linux,code = <KEY_4>;
90                         label = "SW2-4";
91                         wakeup-source;
92                         debounce-interval = <20>;
93                 };
94                 key-a {
95                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
96                         linux,code = <KEY_A>;
97                         label = "SW30";
98                         wakeup-source;
99                         debounce-interval = <20>;
100                 };
101                 key-b {
102                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
103                         linux,code = <KEY_B>;
104                         label = "SW31";
105                         wakeup-source;
106                         debounce-interval = <20>;
107                 };
108                 key-c {
109                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
110                         linux,code = <KEY_C>;
111                         label = "SW32";
112                         wakeup-source;
113                         debounce-interval = <20>;
114                 };
115                 key-d {
116                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
117                         linux,code = <KEY_D>;
118                         label = "SW33";
119                         wakeup-source;
120                         debounce-interval = <20>;
121                 };
122                 key-e {
123                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
124                         linux,code = <KEY_E>;
125                         label = "SW34";
126                         wakeup-source;
127                         debounce-interval = <20>;
128                 };
129                 key-f {
130                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
131                         linux,code = <KEY_F>;
132                         label = "SW35";
133                         wakeup-source;
134                         debounce-interval = <20>;
135                 };
136                 key-g {
137                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
138                         linux,code = <KEY_G>;
139                         label = "SW36";
140                         wakeup-source;
141                         debounce-interval = <20>;
142                 };
143         };
144
145         leds {
146                 compatible = "gpio-leds";
147                 led6 {
148                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
149                         label = "LED6";
150                 };
151                 led7 {
152                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
153                         label = "LED7";
154                 };
155                 led8 {
156                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
157                         label = "LED8";
158                 };
159         };
160
161         audio_clock: audio_clock {
162                 compatible = "fixed-clock";
163                 #clock-cells = <0>;
164                 clock-frequency = <11289600>;
165         };
166
167         rsnd_ak4643: sound {
168                 compatible = "simple-audio-card";
169
170                 simple-audio-card,format = "left_j";
171                 simple-audio-card,bitclock-master = <&sndcodec>;
172                 simple-audio-card,frame-master = <&sndcodec>;
173
174                 sndcpu: simple-audio-card,cpu {
175                         sound-dai = <&rcar_sound>;
176                 };
177
178                 sndcodec: simple-audio-card,codec {
179                         sound-dai = <&ak4643>;
180                         clocks = <&audio_clock>;
181                 };
182         };
183
184         hdmi-out {
185                 compatible = "hdmi-connector";
186                 type = "a";
187
188                 port {
189                         hdmi_con: endpoint {
190                                 remote-endpoint = <&adv7511_out>;
191                         };
192                 };
193         };
194
195         x2_clk: x2-clock {
196                 compatible = "fixed-clock";
197                 #clock-cells = <0>;
198                 clock-frequency = <74250000>;
199         };
200
201         x13_clk: x13-clock {
202                 compatible = "fixed-clock";
203                 #clock-cells = <0>;
204                 clock-frequency = <148500000>;
205         };
206 };
207
208 &du {
209         pinctrl-0 = <&du_pins>;
210         pinctrl-names = "default";
211         status = "okay";
212
213         clocks = <&mstp7_clks R8A7793_CLK_DU0>,
214                  <&mstp7_clks R8A7793_CLK_DU1>,
215                  <&mstp7_clks R8A7793_CLK_LVDS0>,
216                  <&x13_clk>, <&x2_clk>;
217         clock-names = "du.0", "du.1", "lvds.0",
218                       "dclkin.0", "dclkin.1";
219
220         ports {
221                 port@0 {
222                         endpoint {
223                                 remote-endpoint = <&adv7511_in>;
224                         };
225                 };
226                 port@1 {
227                         lvds_connector: endpoint {
228                         };
229                 };
230         };
231 };
232
233 &extal_clk {
234         clock-frequency = <20000000>;
235 };
236
237 &pfc {
238         pinctrl-0 = <&scif_clk_pins>;
239         pinctrl-names = "default";
240
241         i2c2_pins: i2c2 {
242                 groups = "i2c2";
243                 function = "i2c2";
244         };
245
246         du_pins: du {
247                 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
248                 function = "du";
249         };
250
251         scif0_pins: serial0 {
252                 groups = "scif0_data_d";
253                 function = "scif0";
254         };
255
256         scif1_pins: serial1 {
257                 groups = "scif1_data_d";
258                 function = "scif1";
259         };
260
261         scif_clk_pins: scif_clk {
262                 groups = "scif_clk";
263                 function = "scif_clk";
264         };
265
266         ether_pins: ether {
267                 groups = "eth_link", "eth_mdio", "eth_rmii";
268                 function = "eth";
269         };
270
271         phy1_pins: phy1 {
272                 groups = "intc_irq0";
273                 function = "intc";
274         };
275
276         qspi_pins: spi0 {
277                 groups = "qspi_ctrl", "qspi_data4";
278                 function = "qspi";
279         };
280
281         sound_pins: sound {
282                 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
283                 function = "ssi";
284         };
285
286         sound_clk_pins: sound_clk {
287                 groups = "audio_clk_a";
288                 function = "audio_clk";
289         };
290 };
291
292 &ether {
293         pinctrl-0 = <&ether_pins &phy1_pins>;
294         pinctrl-names = "default";
295
296         phy-handle = <&phy1>;
297         renesas,ether-link-active-low;
298         status = "okay";
299
300         phy1: ethernet-phy@1 {
301                 reg = <1>;
302                 interrupt-parent = <&irqc0>;
303                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
304                 micrel,led-mode = <1>;
305         };
306 };
307
308 &cmt0 {
309         status = "okay";
310 };
311
312 &scif0 {
313         pinctrl-0 = <&scif0_pins>;
314         pinctrl-names = "default";
315
316         status = "okay";
317 };
318
319 &scif1 {
320         pinctrl-0 = <&scif1_pins>;
321         pinctrl-names = "default";
322
323         status = "okay";
324 };
325
326 &scif_clk {
327         clock-frequency = <14745600>;
328         status = "okay";
329 };
330
331 &qspi {
332         pinctrl-0 = <&qspi_pins>;
333         pinctrl-names = "default";
334
335         status = "okay";
336
337         flash@0 {
338                 compatible = "spansion,s25fl512s", "jedec,spi-nor";
339                 reg = <0>;
340                 spi-max-frequency = <30000000>;
341                 spi-tx-bus-width = <4>;
342                 spi-rx-bus-width = <4>;
343                 spi-cpol;
344                 spi-cpha;
345                 m25p,fast-read;
346
347                 partitions {
348                         compatible = "fixed-partitions";
349                         #address-cells = <1>;
350                         #size-cells = <1>;
351
352                         partition@0 {
353                                 label = "loader";
354                                 reg = <0x00000000 0x00040000>;
355                                 read-only;
356                         };
357                         partition@40000 {
358                                 label = "user";
359                                 reg = <0x00040000 0x00400000>;
360                                 read-only;
361                         };
362                         partition@440000 {
363                                 label = "flash";
364                                 reg = <0x00440000 0x03bc0000>;
365                         };
366                 };
367         };
368 };
369
370 &i2c2 {
371         pinctrl-0 = <&i2c2_pins>;
372         pinctrl-names = "default";
373
374         status = "okay";
375         clock-frequency = <100000>;
376
377         ak4643: codec@12 {
378                 compatible = "asahi-kasei,ak4643";
379                 #sound-dai-cells = <0>;
380                 reg = <0x12>;
381         };
382
383         hdmi@39 {
384                 compatible = "adi,adv7511w";
385                 reg = <0x39>;
386                 interrupt-parent = <&gpio3>;
387                 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
388
389                 adi,input-depth = <8>;
390                 adi,input-colorspace = "rgb";
391                 adi,input-clock = "1x";
392                 adi,input-style = <1>;
393                 adi,input-justification = "evenly";
394
395                 ports {
396                         #address-cells = <1>;
397                         #size-cells = <0>;
398
399                         port@0 {
400                                 reg = <0>;
401                                 adv7511_in: endpoint {
402                                         remote-endpoint = <&du_out_rgb>;
403                                 };
404                         };
405
406                         port@1 {
407                                 reg = <1>;
408                                 adv7511_out: endpoint {
409                                         remote-endpoint = <&hdmi_con>;
410                                 };
411                         };
412                 };
413         };
414
415         eeprom@50 {
416                 compatible = "renesas,r1ex24002", "atmel,24c02";
417                 reg = <0x50>;
418                 pagesize = <16>;
419         };
420 };
421
422 &rcar_sound {
423         pinctrl-0 = <&sound_pins &sound_clk_pins>;
424         pinctrl-names = "default";
425
426         /* Single DAI */
427         #sound-dai-cells = <0>;
428
429         status = "okay";
430
431         rcar_sound,dai {
432                 dai0 {
433                         playback = <&ssi0 &src2 &dvc0>;
434                         capture  = <&ssi1 &src3 &dvc1>;
435                 };
436         };
437 };
438
439 &ssi1 {
440         shared-pin;
441 };