Merge tag 'sunxi-dt-for-3.16-2' of https://github.com/mripard/linux into for-next
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / r8a7791-koelsch.dts
1 /*
2  * Device Tree Source for the Koelsch board
3  *
4  * Copyright (C) 2013 Renesas Electronics Corporation
5  * Copyright (C) 2013-2014 Renesas Solutions Corp.
6  * Copyright (C) 2014 Cogent Embedded, Inc.
7  *
8  * This file is licensed under the terms of the GNU General Public License
9  * version 2.  This program is licensed "as is" without any warranty of any
10  * kind, whether express or implied.
11  */
12
13 /dts-v1/;
14 #include "r8a7791.dtsi"
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/input.h>
17
18 / {
19         model = "Koelsch";
20         compatible = "renesas,koelsch", "renesas,r8a7791";
21
22         chosen {
23                 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
24         };
25
26         memory@40000000 {
27                 device_type = "memory";
28                 reg = <0 0x40000000 0 0x40000000>;
29         };
30
31         memory@200000000 {
32                 device_type = "memory";
33                 reg = <2 0x00000000 0 0x40000000>;
34         };
35
36         lbsc {
37                 #address-cells = <1>;
38                 #size-cells = <1>;
39         };
40
41         gpio-keys {
42                 compatible = "gpio-keys";
43
44                 key-1 {
45                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
46                         linux,code = <KEY_1>;
47                         label = "SW2-1";
48                         gpio-key,wakeup;
49                         debounce-interval = <20>;
50                 };
51                 key-2 {
52                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_2>;
54                         label = "SW2-2";
55                         gpio-key,wakeup;
56                         debounce-interval = <20>;
57                 };
58                 key-3 {
59                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
60                         linux,code = <KEY_3>;
61                         label = "SW2-3";
62                         gpio-key,wakeup;
63                         debounce-interval = <20>;
64                 };
65                 key-4 {
66                         gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
67                         linux,code = <KEY_4>;
68                         label = "SW2-4";
69                         gpio-key,wakeup;
70                         debounce-interval = <20>;
71                 };
72                 key-a {
73                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
74                         linux,code = <KEY_A>;
75                         label = "SW30";
76                         gpio-key,wakeup;
77                         debounce-interval = <20>;
78                 };
79                 key-b {
80                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
81                         linux,code = <KEY_B>;
82                         label = "SW31";
83                         gpio-key,wakeup;
84                         debounce-interval = <20>;
85                 };
86                 key-c {
87                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
88                         linux,code = <KEY_C>;
89                         label = "SW32";
90                         gpio-key,wakeup;
91                         debounce-interval = <20>;
92                 };
93                 key-d {
94                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
95                         linux,code = <KEY_D>;
96                         label = "SW33";
97                         gpio-key,wakeup;
98                         debounce-interval = <20>;
99                 };
100                 key-e {
101                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
102                         linux,code = <KEY_E>;
103                         label = "SW34";
104                         gpio-key,wakeup;
105                         debounce-interval = <20>;
106                 };
107                 key-f {
108                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
109                         linux,code = <KEY_F>;
110                         label = "SW35";
111                         gpio-key,wakeup;
112                         debounce-interval = <20>;
113                 };
114                 key-g {
115                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
116                         linux,code = <KEY_G>;
117                         label = "SW36";
118                         gpio-key,wakeup;
119                         debounce-interval = <20>;
120                 };
121         };
122
123         leds {
124                 compatible = "gpio-leds";
125                 led6 {
126                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
127                 };
128                 led7 {
129                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
130                 };
131                 led8 {
132                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
133                 };
134         };
135
136         vcc_sdhi0: regulator@0 {
137                 compatible = "regulator-fixed";
138
139                 regulator-name = "SDHI0 Vcc";
140                 regulator-min-microvolt = <3300000>;
141                 regulator-max-microvolt = <3300000>;
142
143                 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
144                 enable-active-high;
145         };
146
147         vccq_sdhi0: regulator@1 {
148                 compatible = "regulator-gpio";
149
150                 regulator-name = "SDHI0 VccQ";
151                 regulator-min-microvolt = <1800000>;
152                 regulator-max-microvolt = <3300000>;
153
154                 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
155                 gpios-states = <1>;
156                 states = <3300000 1
157                           1800000 0>;
158         };
159
160         vcc_sdhi1: regulator@2 {
161                 compatible = "regulator-fixed";
162
163                 regulator-name = "SDHI1 Vcc";
164                 regulator-min-microvolt = <3300000>;
165                 regulator-max-microvolt = <3300000>;
166
167                 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
168                 enable-active-high;
169         };
170
171         vccq_sdhi1: regulator@3 {
172                 compatible = "regulator-gpio";
173
174                 regulator-name = "SDHI1 VccQ";
175                 regulator-min-microvolt = <1800000>;
176                 regulator-max-microvolt = <3300000>;
177
178                 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
179                 gpios-states = <1>;
180                 states = <3300000 1
181                           1800000 0>;
182         };
183
184         vcc_sdhi2: regulator@4 {
185                 compatible = "regulator-fixed";
186
187                 regulator-name = "SDHI2 Vcc";
188                 regulator-min-microvolt = <3300000>;
189                 regulator-max-microvolt = <3300000>;
190
191                 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
192                 enable-active-high;
193         };
194
195         vccq_sdhi2: regulator@5 {
196                 compatible = "regulator-gpio";
197
198                 regulator-name = "SDHI2 VccQ";
199                 regulator-min-microvolt = <1800000>;
200                 regulator-max-microvolt = <3300000>;
201
202                 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
203                 gpios-states = <1>;
204                 states = <3300000 1
205                           1800000 0>;
206         };
207 };
208
209 &extal_clk {
210         clock-frequency = <20000000>;
211 };
212
213 &i2c2 {
214         pinctrl-0 = <&i2c2_pins>;
215         pinctrl-names = "default";
216
217         status = "okay";
218         clock-frequency = <400000>;
219
220         eeprom@50 {
221                 compatible = "renesas,24c02";
222                 reg = <0x50>;
223                 pagesize = <16>;
224         };
225 };
226
227 &i2c6 {
228         status = "okay";
229         clock-frequency = <100000>;
230 };
231
232 &pfc {
233         pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
234         pinctrl-names = "default";
235
236         i2c2_pins: i2c2 {
237                 renesas,groups = "i2c2";
238                 renesas,function = "i2c2";
239         };
240
241         du_pins: du {
242                 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
243                 renesas,function = "du";
244         };
245
246         scif0_pins: serial0 {
247                 renesas,groups = "scif0_data_d";
248                 renesas,function = "scif0";
249         };
250
251         scif1_pins: serial1 {
252                 renesas,groups = "scif1_data_d";
253                 renesas,function = "scif1";
254         };
255
256         ether_pins: ether {
257                 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
258                 renesas,function = "eth";
259         };
260
261         phy1_pins: phy1 {
262                 renesas,groups = "intc_irq0";
263                 renesas,function = "intc";
264         };
265
266         sdhi0_pins: sd0 {
267                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
268                 renesas,function = "sdhi0";
269         };
270
271         sdhi1_pins: sd1 {
272                 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
273                 renesas,function = "sdhi1";
274         };
275
276         sdhi2_pins: sd2 {
277                 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
278                 renesas,function = "sdhi2";
279         };
280
281         qspi_pins: spi0 {
282                 renesas,groups = "qspi_ctrl", "qspi_data4";
283                 renesas,function = "qspi";
284         };
285
286         msiof0_pins: spi1 {
287                 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
288                                  "msiof0_tx";
289                 renesas,function = "msiof0";
290         };
291 };
292
293 &ether {
294         pinctrl-0 = <&ether_pins &phy1_pins>;
295         pinctrl-names = "default";
296
297         phy-handle = <&phy1>;
298         renesas,ether-link-active-low;
299         status = "ok";
300
301         phy1: ethernet-phy@1 {
302                 reg = <1>;
303                 interrupt-parent = <&irqc0>;
304                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
305                 micrel,led-mode = <1>;
306         };
307 };
308
309 &sata0 {
310         status = "okay";
311 };
312
313 &sdhi0 {
314         pinctrl-0 = <&sdhi0_pins>;
315         pinctrl-names = "default";
316
317         vmmc-supply = <&vcc_sdhi0>;
318         vqmmc-supply = <&vccq_sdhi0>;
319         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
320         wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
321         status = "okay";
322 };
323
324 &sdhi1 {
325         pinctrl-0 = <&sdhi1_pins>;
326         pinctrl-names = "default";
327
328         vmmc-supply = <&vcc_sdhi1>;
329         vqmmc-supply = <&vccq_sdhi1>;
330         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
331         wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
332         status = "okay";
333 };
334
335 &sdhi2 {
336         pinctrl-0 = <&sdhi2_pins>;
337         pinctrl-names = "default";
338
339         vmmc-supply = <&vcc_sdhi2>;
340         vqmmc-supply = <&vccq_sdhi2>;
341         cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
342         status = "okay";
343 };
344
345 &qspi {
346         pinctrl-0 = <&qspi_pins>;
347         pinctrl-names = "default";
348
349         status = "okay";
350
351         flash: flash@0 {
352                 #address-cells = <1>;
353                 #size-cells = <1>;
354                 compatible = "spansion,s25fl512s";
355                 reg = <0>;
356                 spi-max-frequency = <30000000>;
357                 spi-tx-bus-width = <4>;
358                 spi-rx-bus-width = <4>;
359                 m25p,fast-read;
360
361                 partition@0 {
362                         label = "loader";
363                         reg = <0x00000000 0x00080000>;
364                         read-only;
365                 };
366                 partition@80000 {
367                         label = "bootenv";
368                         reg = <0x00080000 0x00080000>;
369                         read-only;
370                 };
371                 partition@100000 {
372                         label = "data";
373                         reg = <0x00100000 0x03f00000>;
374                 };
375         };
376 };
377
378 &msiof0 {
379         pinctrl-0 = <&msiof0_pins>;
380         pinctrl-names = "default";
381
382         status = "okay";
383
384         pmic: pmic@0 {
385                 compatible = "renesas,r2a11302ft";
386                 reg = <0>;
387                 spi-max-frequency = <6000000>;
388                 spi-cpol;
389                 spi-cpha;
390         };
391 };