Merge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
[cascardo/linux.git] / arch / arm / boot / dts / sh73a0-kzm9g-reference.dts
1 /*
2  * Device Tree Source for the KZM-A9-GT board
3  *
4  * Copyright (C) 2012 Horms Solutions Ltd.
5  *
6  * Based on sh73a0-kzm9g.dts
7  * Copyright (C) 2012 Renesas Solutions Corp.
8  *
9  * This file is licensed under the terms of the GNU General Public License
10  * version 2.  This program is licensed "as is" without any warranty of any
11  * kind, whether express or implied.
12  */
13
14 /dts-v1/;
15 #include "sh73a0.dtsi"
16 #include <dt-bindings/gpio/gpio.h>
17 #include <dt-bindings/input/input.h>
18 #include <dt-bindings/interrupt-controller/irq.h>
19
20 / {
21         model = "KZM-A9-GT";
22         compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
23
24         aliases {
25                 serial4 = &scifa4;
26         };
27
28         cpus {
29                 cpu@0 {
30                         cpu0-supply = <&vdd_dvfs>;
31                         operating-points = <
32                                 /* kHz  uV */
33                                 1196000 1315000
34                                  598000 1175000
35                                  398667 1065000
36                         >;
37                         voltage-tolerance = <1>; /* 1% */
38                 };
39         };
40
41         chosen {
42                 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
43                 stdout-path = &scifa4;
44         };
45
46         memory {
47                 device_type = "memory";
48                 reg = <0x41000000 0x1e800000>;
49         };
50
51         reg_1p8v: regulator@0 {
52                 compatible = "regulator-fixed";
53                 regulator-name = "fixed-1.8V";
54                 regulator-min-microvolt = <1800000>;
55                 regulator-max-microvolt = <1800000>;
56                 regulator-always-on;
57                 regulator-boot-on;
58         };
59
60         reg_3p3v: regulator@1 {
61                 compatible = "regulator-fixed";
62                 regulator-name = "fixed-3.3V";
63                 regulator-min-microvolt = <3300000>;
64                 regulator-max-microvolt = <3300000>;
65                 regulator-always-on;
66                 regulator-boot-on;
67         };
68
69         vmmc_sdhi0: regulator@2 {
70                 compatible = "regulator-fixed";
71                 regulator-name = "SDHI0 Vcc";
72                 regulator-min-microvolt = <3300000>;
73                 regulator-max-microvolt = <3300000>;
74                 gpio = <&pfc 15 GPIO_ACTIVE_HIGH>;
75                 enable-active-high;
76         };
77
78         vmmc_sdhi2: regulator@3 {
79                 compatible = "regulator-fixed";
80                 regulator-name = "SDHI2 Vcc";
81                 regulator-min-microvolt = <3300000>;
82                 regulator-max-microvolt = <3300000>;
83                 gpio = <&pfc 14 GPIO_ACTIVE_HIGH>;
84                 enable-active-high;
85         };
86
87         lan9220@10000000 {
88                 compatible = "smsc,lan9220", "smsc,lan9115";
89                 reg = <0x10000000 0x100>;
90                 phy-mode = "mii";
91                 interrupt-parent = <&irqpin0>;
92                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
93                 reg-io-width = <4>;
94                 smsc,irq-push-pull;
95                 smsc,save-mac-address;
96                 vddvario-supply = <&reg_1p8v>;
97                 vdd33a-supply = <&reg_3p3v>;
98         };
99
100         leds {
101                 compatible = "gpio-leds";
102                 led1 {
103                         gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
104                 };
105                 led2 {
106                         gpios = <&pfc 21 GPIO_ACTIVE_LOW>;
107                 };
108                 led3 {
109                         gpios = <&pfc 22 GPIO_ACTIVE_LOW>;
110                 };
111                 led4 {
112                         gpios = <&pfc 23 GPIO_ACTIVE_LOW>;
113                 };
114         };
115
116         gpio-keys {
117                 compatible = "gpio-keys";
118
119                 back-key {
120                         gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>;
121                         linux,code = <KEY_BACK>;
122                         label = "SW3";
123                 };
124
125                 right-key {
126                         gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>;
127                         linux,code = <KEY_RIGHT>;
128                         label = "SW2-R";
129                 };
130
131                 left-key {
132                         gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>;
133                         linux,code = <KEY_LEFT>;
134                         label = "SW2-L";
135                 };
136
137                 enter-key {
138                         gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>;
139                         linux,code = <KEY_ENTER>;
140                         label = "SW2-P";
141                 };
142
143                 up-key {
144                         gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>;
145                         linux,code = <KEY_UP>;
146                         label = "SW2-U";
147                 };
148
149                 down-key {
150                         gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>;
151                         linux,code = <KEY_DOWN>;
152                         label = "SW2-D";
153                 };
154
155                 home-key {
156                         gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
157                         linux,code = <KEY_HOME>;
158                         label = "SW1";
159                 };
160         };
161
162         sound {
163                 compatible = "simple-audio-card";
164                 simple-audio-card,format = "left_j";
165                 simple-audio-card,cpu {
166                         sound-dai = <&sh_fsi2 0>;
167                 };
168                 simple-audio-card,codec {
169                         sound-dai = <&ak4648>;
170                         bitclock-master;
171                         frame-master;
172                         system-clock-frequency = <11289600>;
173                 };
174         };
175 };
176
177 &cmt1 {
178         status = "ok";
179 };
180
181 &i2c0 {
182         status = "okay";
183         as3711@40 {
184                 compatible = "ams,as3711";
185                 reg = <0x40>;
186
187                 regulators {
188                         vdd_dvfs: sd1 {
189                                 regulator-name = "1.315V CPU";
190                                 regulator-min-microvolt = <1050000>;
191                                 regulator-max-microvolt = <1350000>;
192                                 regulator-always-on;
193                                 regulator-boot-on;
194                         };
195                         sd2 {
196                                 regulator-name = "1.8V";
197                                 regulator-min-microvolt = <1800000>;
198                                 regulator-max-microvolt = <1800000>;
199                                 regulator-always-on;
200                                 regulator-boot-on;
201                         };
202                         sd4 {
203                                 regulator-name = "1.215V";
204                                 regulator-min-microvolt = <1215000>;
205                                 regulator-max-microvolt = <1235000>;
206                                 regulator-always-on;
207                                 regulator-boot-on;
208                         };
209                         ldo2 {
210                                 regulator-name = "2.8V CPU";
211                                 regulator-min-microvolt = <2800000>;
212                                 regulator-max-microvolt = <2800000>;
213                                 regulator-always-on;
214                                 regulator-boot-on;
215                         };
216                         ldo3 {
217                                 regulator-name = "3.0V CPU";
218                                 regulator-min-microvolt = <3000000>;
219                                 regulator-max-microvolt = <3000000>;
220                                 regulator-always-on;
221                                 regulator-boot-on;
222                         };
223                         ldo4 {
224                                 regulator-name = "2.8V";
225                                 regulator-min-microvolt = <2800000>;
226                                 regulator-max-microvolt = <2800000>;
227                                 regulator-always-on;
228                                 regulator-boot-on;
229                         };
230                         ldo5 {
231                                 regulator-name = "2.8V #2";
232                                 regulator-min-microvolt = <2800000>;
233                                 regulator-max-microvolt = <2800000>;
234                                 regulator-always-on;
235                                 regulator-boot-on;
236                         };
237                         ldo7 {
238                                 regulator-name = "1.15V CPU";
239                                 regulator-min-microvolt = <1150000>;
240                                 regulator-max-microvolt = <1150000>;
241                                 regulator-always-on;
242                                 regulator-boot-on;
243                         };
244                         ldo8 {
245                                 regulator-name = "1.15V CPU #2";
246                                 regulator-min-microvolt = <1150000>;
247                                 regulator-max-microvolt = <1150000>;
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                         };
251                 };
252         };
253
254         ak4648: ak4648@0x12 {
255                 #sound-dai-cells = <0>;
256                 compatible = "asahi-kasei,ak4648";
257                 reg = <0x12>;
258         };
259 };
260
261 &i2c3 {
262         pinctrl-0 = <&i2c3_pins>;
263         pinctrl-names = "default";
264         status = "okay";
265
266         pcf8575: gpio@20 {
267                 compatible = "nxp,pcf8575";
268                 reg = <0x20>;
269                 interrupt-parent = <&irqpin2>;
270                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
271                 gpio-controller;
272                 #gpio-cells = <2>;
273                 interrupt-controller;
274                 #interrupt-cells = <2>;
275         };
276 };
277
278 &mmcif {
279         pinctrl-0 = <&mmcif_pins>;
280         pinctrl-names = "default";
281
282         bus-width = <8>;
283         vmmc-supply = <&reg_1p8v>;
284         status = "okay";
285 };
286
287 &pfc {
288         i2c3_pins: i2c3 {
289                 renesas,groups = "i2c3_1";
290                 renesas,function = "i2c3";
291         };
292
293         mmcif_pins: mmc {
294                 mux {
295                         renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
296                         renesas,function = "mmc0";
297                 };
298                 cfg {
299                         renesas,groups = "mmc0_data8_0";
300                         renesas,pins = "PORT279";
301                         bias-pull-up;
302                 };
303         };
304
305         scifa4_pins: serial4 {
306                 renesas,groups = "scifa4_data", "scifa4_ctrl";
307                 renesas,function = "scifa4";
308         };
309
310         sdhi0_pins: sd0 {
311                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp";
312                 renesas,function = "sdhi0";
313         };
314
315         sdhi2_pins: sd2 {
316                 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
317                 renesas,function = "sdhi2";
318         };
319
320         fsia_pins: sounda {
321                 renesas,groups = "fsia_mclk_in", "fsia_sclk_in",
322                                  "fsia_data_in", "fsia_data_out";
323                 renesas,function = "fsia";
324         };
325 };
326
327 &scifa4 {
328         pinctrl-0 = <&scifa4_pins>;
329         pinctrl-names = "default";
330
331         status = "okay";
332 };
333
334 &sdhi0 {
335         pinctrl-0 = <&sdhi0_pins>;
336         pinctrl-names = "default";
337
338         vmmc-supply = <&vmmc_sdhi0>;
339         bus-width = <4>;
340         status = "okay";
341 };
342
343 &sdhi2 {
344         pinctrl-0 = <&sdhi2_pins>;
345         pinctrl-names = "default";
346
347         vmmc-supply = <&vmmc_sdhi2>;
348         bus-width = <4>;
349         broken-cd;
350         status = "okay";
351 };
352
353 &sh_fsi2 {
354         pinctrl-0 = <&fsia_pins>;
355         pinctrl-names = "default";
356
357         status = "okay";
358 };