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