Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / r8a7740-armadillo800eva-reference.dts
1 /*
2  * Reference Device Tree Source for the armadillo 800 eva board
3  *
4  * Copyright (C) 2012 Renesas Solutions Corp.
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 /dts-v1/;
12 #include "r8a7740.dtsi"
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/input/input.h>
15 #include <dt-bindings/interrupt-controller/irq.h>
16 #include <dt-bindings/pwm/pwm.h>
17
18 / {
19         model = "armadillo 800 eva reference";
20         compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
21
22         chosen {
23                 bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
24         };
25
26         memory {
27                 device_type = "memory";
28                 reg = <0x40000000 0x20000000>;
29         };
30
31         reg_3p3v: regulator@0 {
32                 compatible = "regulator-fixed";
33                 regulator-name = "fixed-3.3V";
34                 regulator-min-microvolt = <3300000>;
35                 regulator-max-microvolt = <3300000>;
36                 regulator-always-on;
37                 regulator-boot-on;
38         };
39
40         vcc_sdhi0: regulator@1 {
41                 compatible = "regulator-fixed";
42
43                 regulator-name = "SDHI0 Vcc";
44                 regulator-min-microvolt = <3300000>;
45                 regulator-max-microvolt = <3300000>;
46
47                 gpio = <&pfc 75 GPIO_ACTIVE_HIGH>;
48                 enable-active-high;
49         };
50
51         vccq_sdhi0: regulator@2 {
52                 compatible = "regulator-gpio";
53
54                 regulator-name = "SDHI0 VccQ";
55                 regulator-min-microvolt = <1800000>;
56                 regulator-max-microvolt = <3300000>;
57                 vin-supply = <&vcc_sdhi0>;
58
59                 enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>;
60                 gpios = <&pfc 17 GPIO_ACTIVE_HIGH>;
61                 states = <3300000 0
62                           1800000 1>;
63
64                 enable-active-high;
65         };
66
67         reg_5p0v: regulator@3 {
68                 compatible = "regulator-fixed";
69                 regulator-name = "fixed-5.0V";
70                 regulator-min-microvolt = <5000000>;
71                 regulator-max-microvolt = <5000000>;
72                 regulator-always-on;
73                 regulator-boot-on;
74         };
75
76         gpio-keys {
77                 compatible = "gpio-keys";
78
79                 power-key {
80                         gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
81                         linux,code = <KEY_POWER>;
82                         label = "SW3";
83                         gpio-key,wakeup;
84                 };
85
86                 back-key {
87                         gpios = <&pfc 100 GPIO_ACTIVE_LOW>;
88                         linux,code = <KEY_BACK>;
89                         label = "SW4";
90                 };
91
92                 menu-key {
93                         gpios = <&pfc 97 GPIO_ACTIVE_LOW>;
94                         linux,code = <KEY_MENU>;
95                         label = "SW5";
96                 };
97
98                 home-key {
99                         gpios = <&pfc 98 GPIO_ACTIVE_LOW>;
100                         linux,code = <KEY_HOME>;
101                         label = "SW6";
102                 };
103         };
104
105         leds {
106                 compatible = "gpio-leds";
107                 led1 {
108                         gpios = <&pfc 102 GPIO_ACTIVE_HIGH>;
109                 };
110                 led2 {
111                         gpios = <&pfc 111 GPIO_ACTIVE_HIGH>;
112                 };
113                 led3 {
114                         gpios = <&pfc 110 GPIO_ACTIVE_HIGH>;
115                 };
116                 led4 {
117                         gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
118                 };
119         };
120
121         i2c2: i2c@2 {
122                 #address-cells = <1>;
123                 #size-cells = <0>;
124                 compatible = "i2c-gpio";
125                 gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
126                          &pfc 91 GPIO_ACTIVE_HIGH /* scl */
127                         >;
128                 i2c-gpio,delay-us = <5>;
129         };
130
131         backlight {
132                 compatible = "pwm-backlight";
133                 pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
134                 brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
135                 default-brightness-level = <9>;
136                 pinctrl-0 = <&backlight_pins>;
137                 pinctrl-names = "default";
138                 power-supply = <&reg_5p0v>;
139                 enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
140         };
141
142         sound {
143                 compatible = "simple-audio-card";
144
145                 simple-audio-card,format = "i2s";
146
147                 simple-audio-card,cpu {
148                         sound-dai = <&sh_fsi2 0>;
149                         bitclock-inversion;
150                 };
151
152                 simple-audio-card,codec {
153                         sound-dai = <&wm8978>;
154                         bitclock-master;
155                         frame-master;
156                         system-clock-frequency = <12288000>;
157                 };
158         };
159 };
160
161 &ether {
162         pinctrl-0 = <&ether_pins>;
163         pinctrl-names = "default";
164
165         phy-handle = <&phy0>;
166         status = "ok";
167
168         phy0: ethernet-phy@0 {
169                 reg = <0>;
170         };
171 };
172
173 &i2c0 {
174         status = "okay";
175         touchscreen@55 {
176                 compatible = "sitronix,st1232";
177                 reg = <0x55>;
178                 interrupt-parent = <&irqpin1>;
179                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
180                 pinctrl-0 = <&st1232_pins>;
181                 pinctrl-names = "default";
182                 gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
183         };
184
185         wm8978: wm8978@1a {
186                 #sound-dai-cells = <0>;
187                 compatible = "wlf,wm8978";
188                 reg = <0x1a>;
189         };
190 };
191
192 &i2c2 {
193         status = "okay";
194         rtc@30 {
195                 compatible = "sii,s35390a";
196                 reg = <0x30>;
197         };
198 };
199
200 &pfc {
201         pinctrl-0 = <&scifa1_pins>;
202         pinctrl-names = "default";
203
204         ether_pins: ether {
205                 renesas,groups = "gether_mii", "gether_int";
206                 renesas,function = "gether";
207         };
208
209         scifa1_pins: serial1 {
210                 renesas,groups = "scifa1_data";
211                 renesas,function = "scifa1";
212         };
213
214         st1232_pins: touchscreen {
215                 renesas,groups = "intc_irq10";
216                 renesas,function = "intc";
217         };
218
219         backlight_pins: backlight {
220                 renesas,groups = "tpu0_to2_1";
221                 renesas,function = "tpu0";
222         };
223
224         mmc0_pins: mmc0 {
225                 renesas,groups = "mmc0_data8_1", "mmc0_ctrl_1";
226                 renesas,function = "mmc0";
227         };
228
229         sdhi0_pins: sd0 {
230                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
231                 renesas,function = "sdhi0";
232         };
233
234         fsia_pins: sounda {
235                 renesas,groups = "fsia_sclk_in", "fsia_mclk_out",
236                                  "fsia_data_in_1", "fsia_data_out_0";
237                 renesas,function = "fsia";
238         };
239 };
240
241 &tpu {
242         status = "okay";
243 };
244
245 &mmcif0 {
246         pinctrl-0 = <&mmc0_pins>;
247         pinctrl-names = "default";
248
249         vmmc-supply = <&reg_3p3v>;
250         bus-width = <8>;
251         non-removable;
252         status = "okay";
253 };
254
255 &sdhi0 {
256         pinctrl-0 = <&sdhi0_pins>;
257         pinctrl-names = "default";
258
259         vmmc-supply = <&vcc_sdhi0>;
260         vqmmc-supply = <&vccq_sdhi0>;
261         bus-width = <4>;
262         cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>;
263         status = "okay";
264 };
265
266 &sh_fsi2 {
267         pinctrl-0 = <&fsia_pins>;
268         pinctrl-names = "default";
269
270         status = "okay";
271 };