ARM: dts: blanche: add SDHI0 support
[cascardo/linux.git] / arch / arm / boot / dts / r8a7792-blanche.dts
1 /*
2  * Device Tree Source for the Blanche board
3  *
4  * Copyright (C) 2014 Renesas Electronics Corporation
5  * Copyright (C) 2016 Cogent  Embedded, Inc.
6  *
7  * This file is licensed under the terms of the GNU General Public License
8  * version 2.  This program is licensed "as is" without any warranty of any
9  * kind, whether express or implied.
10  */
11
12 /dts-v1/;
13 #include "r8a7792.dtsi"
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/input/input.h>
16
17 / {
18         model = "Blanche";
19         compatible = "renesas,blanche", "renesas,r8a7792";
20
21         aliases {
22                 serial0 = &scif0;
23                 serial1 = &scif3;
24         };
25
26         chosen {
27                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
28                 stdout-path = "serial0:115200n8";
29         };
30
31         memory@40000000 {
32                 device_type = "memory";
33                 reg = <0 0x40000000 0 0x40000000>;
34         };
35
36         d3_3v: regulator-3v3 {
37                 compatible = "regulator-fixed";
38                 regulator-name = "D3.3V";
39                 regulator-min-microvolt = <3300000>;
40                 regulator-max-microvolt = <3300000>;
41                 regulator-boot-on;
42                 regulator-always-on;
43         };
44
45         ethernet@18000000 {
46                 compatible = "smsc,lan89218", "smsc,lan9115";
47                 reg = <0 0x18000000 0 0x100>;
48                 phy-mode = "mii";
49                 interrupt-parent = <&irqc>;
50                 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
51                 smsc,irq-push-pull;
52                 reg-io-width = <4>;
53                 vddvario-supply = <&d3_3v>;
54                 vdd33a-supply = <&d3_3v>;
55
56                 pinctrl-0 = <&lan89218_pins>;
57                 pinctrl-names = "default";
58         };
59
60         keyboard {
61                 compatible = "gpio-keys";
62
63                 key-1 {
64                         linux,code = <KEY_1>;
65                         label = "SW2-1";
66                         wakeup-source;
67                         debounce-interval = <20>;
68                         gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
69                 };
70                 key-2 {
71                         linux,code = <KEY_2>;
72                         label = "SW2-2";
73                         wakeup-source;
74                         debounce-interval = <20>;
75                         gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
76                 };
77                 key-3 {
78                         linux,code = <KEY_3>;
79                         label = "SW2-3";
80                         wakeup-source;
81                         debounce-interval = <20>;
82                         gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
83                 };
84                 key-4 {
85                         linux,code = <KEY_4>;
86                         label = "SW2-4";
87                         wakeup-source;
88                         debounce-interval = <20>;
89                         gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
90                 };
91                 key-a {
92                         linux,code = <KEY_A>;
93                         label = "SW24";
94                         wakeup-source;
95                         debounce-interval = <20>;
96                         gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
97                 };
98                 key-b {
99                         linux,code = <KEY_B>;
100                         label = "SW25";
101                         wakeup-source;
102                         debounce-interval = <20>;
103                         gpios = <&gpio11 2 GPIO_ACTIVE_LOW>;
104                 };
105         };
106
107         vcc_sdhi0: regulator-vcc-sdhi0 {
108                 compatible = "regulator-fixed";
109
110                 regulator-name = "SDHI0 Vcc";
111                 regulator-min-microvolt = <3300000>;
112                 regulator-max-microvolt = <3300000>;
113
114                 gpio = <&gpio11 12 GPIO_ACTIVE_HIGH>;
115                 enable-active-high;
116         };
117 };
118
119 &extal_clk {
120         clock-frequency = <20000000>;
121 };
122
123 &can_clk {
124         clock-frequency = <48000000>;
125 };
126
127 &pfc {
128         scif0_pins: scif0 {
129                 groups = "scif0_data";
130                 function = "scif0";
131         };
132
133         scif3_pins: scif3 {
134                 groups = "scif3_data";
135                 function = "scif3";
136         };
137
138         lan89218_pins: lan89218 {
139                 intc {
140                         groups = "intc_irq0";
141                         function = "intc";
142                 };
143                 lbsc {
144                         groups = "lbsc_ex_cs0";
145                         function = "lbsc";
146                 };
147         };
148
149         can0_pins: can0 {
150                 groups = "can0_data", "can_clk";
151                 function = "can0";
152         };
153
154         sdhi0_pins: sdhi0 {
155                 groups = "sdhi0_data4", "sdhi0_ctrl";
156                 function = "sdhi0";
157         };
158 };
159
160 &scif0 {
161         pinctrl-0 = <&scif0_pins>;
162         pinctrl-names = "default";
163
164         status = "okay";
165 };
166
167 &scif3 {
168         pinctrl-0 = <&scif3_pins>;
169         pinctrl-names = "default";
170
171         status = "okay";
172 };
173
174 &can0 {
175         pinctrl-0 = <&can0_pins>;
176         pinctrl-names = "default";
177
178         status = "okay";
179 };
180
181 &sdhi0 {
182         pinctrl-0 = <&sdhi0_pins>;
183         pinctrl-names = "default";
184
185         vmmc-supply = <&vcc_sdhi0>;
186         cd-gpios = <&gpio11 11 GPIO_ACTIVE_LOW>;
187         status = "okay";
188 };