OSDN Git Service

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