ARM: shmobile: koelsch: make i2c2-pfc node unique
[platform/adaptation/renesas_rcar/renesas_kernel.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 &pfc {
228         pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
229         pinctrl-names = "default";
230
231         i2c2_pins: i2c2 {
232                 renesas,groups = "i2c2";
233                 renesas,function = "i2c2";
234         };
235
236         du_pins: du {
237                 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
238                 renesas,function = "du";
239         };
240
241         scif0_pins: serial0 {
242                 renesas,groups = "scif0_data_d";
243                 renesas,function = "scif0";
244         };
245
246         scif1_pins: serial1 {
247                 renesas,groups = "scif1_data_d";
248                 renesas,function = "scif1";
249         };
250
251         ether_pins: ether {
252                 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
253                 renesas,function = "eth";
254         };
255
256         phy1_pins: phy1 {
257                 renesas,groups = "intc_irq0";
258                 renesas,function = "intc";
259         };
260
261         sdhi0_pins: sd0 {
262                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
263                 renesas,function = "sdhi0";
264         };
265
266         sdhi1_pins: sd1 {
267                 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
268                 renesas,function = "sdhi1";
269         };
270
271         sdhi2_pins: sd2 {
272                 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
273                 renesas,function = "sdhi2";
274         };
275
276         qspi_pins: spi0 {
277                 renesas,groups = "qspi_ctrl", "qspi_data4";
278                 renesas,function = "qspi";
279         };
280
281         msiof0_pins: spi1 {
282                 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
283                                  "msiof0_tx";
284                 renesas,function = "msiof0";
285         };
286 };
287
288 &ether {
289         pinctrl-0 = <&ether_pins &phy1_pins>;
290         pinctrl-names = "default";
291
292         phy-handle = <&phy1>;
293         renesas,ether-link-active-low;
294         status = "ok";
295
296         phy1: ethernet-phy@1 {
297                 reg = <1>;
298                 interrupt-parent = <&irqc0>;
299                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
300                 micrel,led-mode = <1>;
301         };
302 };
303
304 &sata0 {
305         status = "okay";
306 };
307
308 &sdhi0 {
309         pinctrl-0 = <&sdhi0_pins>;
310         pinctrl-names = "default";
311
312         vmmc-supply = <&vcc_sdhi0>;
313         vqmmc-supply = <&vccq_sdhi0>;
314         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
315         wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
316         status = "okay";
317 };
318
319 &sdhi1 {
320         pinctrl-0 = <&sdhi1_pins>;
321         pinctrl-names = "default";
322
323         vmmc-supply = <&vcc_sdhi1>;
324         vqmmc-supply = <&vccq_sdhi1>;
325         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
326         wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
327         status = "okay";
328 };
329
330 &sdhi2 {
331         pinctrl-0 = <&sdhi2_pins>;
332         pinctrl-names = "default";
333
334         vmmc-supply = <&vcc_sdhi2>;
335         vqmmc-supply = <&vccq_sdhi2>;
336         cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
337         status = "okay";
338 };
339
340 &qspi {
341         pinctrl-0 = <&qspi_pins>;
342         pinctrl-names = "default";
343
344         status = "okay";
345
346         flash: flash@0 {
347                 #address-cells = <1>;
348                 #size-cells = <1>;
349                 compatible = "spansion,s25fl512s";
350                 reg = <0>;
351                 spi-max-frequency = <30000000>;
352                 m25p,fast-read;
353
354                 partition@0 {
355                         label = "loader";
356                         reg = <0x00000000 0x00080000>;
357                         read-only;
358                 };
359                 partition@80000 {
360                         label = "bootenv";
361                         reg = <0x00080000 0x00080000>;
362                         read-only;
363                 };
364                 partition@100000 {
365                         label = "data";
366                         reg = <0x00100000 0x03f00000>;
367                 };
368         };
369 };
370
371 &msiof0 {
372         pinctrl-0 = <&msiof0_pins>;
373         pinctrl-names = "default";
374
375         status = "okay";
376
377         pmic: pmic@0 {
378                 compatible = "renesas,r2a11302ft";
379                 reg = <0>;
380                 spi-max-frequency = <6000000>;
381                 spi-cpol;
382                 spi-cpha;
383         };
384 };