ARM: dts: blanche: add DU 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         vga-encoder {
61                 compatible = "adi,adv7123";
62
63                 ports {
64                         #address-cells = <1>;
65                         #size-cells = <0>;
66
67                         port@0 {
68                                 reg = <0>;
69                                 adv7123_in: endpoint {
70                                         remote-endpoint = <&du_out_rgb1>;
71                                 };
72                         };
73                         port@1 {
74                                 reg = <1>;
75                                 adv7123_out: endpoint {
76                                         remote-endpoint = <&vga_in>;
77                                 };
78                         };
79                 };
80         };
81
82         hdmi-out {
83                 compatible = "hdmi-connector";
84                 type = "a";
85
86                 port {
87                         hdmi_con: endpoint {
88                                 remote-endpoint = <&adv7511_out>;
89                         };
90                 };
91         };
92
93         vga {
94                 compatible = "vga-connector";
95
96                 port {
97                         vga_in: endpoint {
98                                 remote-endpoint = <&adv7123_out>;
99                         };
100                 };
101         };
102
103         x1_clk: x1 {
104                 compatible = "fixed-clock";
105                 #clock-cells = <0>;
106                 clock-frequency = <74250000>;
107         };
108
109         x2_clk: x2 {
110                 compatible = "fixed-clock";
111                 #clock-cells = <0>;
112                 clock-frequency = <65000000>;
113         };
114
115         keyboard {
116                 compatible = "gpio-keys";
117
118                 key-1 {
119                         linux,code = <KEY_1>;
120                         label = "SW2-1";
121                         wakeup-source;
122                         debounce-interval = <20>;
123                         gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
124                 };
125                 key-2 {
126                         linux,code = <KEY_2>;
127                         label = "SW2-2";
128                         wakeup-source;
129                         debounce-interval = <20>;
130                         gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
131                 };
132                 key-3 {
133                         linux,code = <KEY_3>;
134                         label = "SW2-3";
135                         wakeup-source;
136                         debounce-interval = <20>;
137                         gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
138                 };
139                 key-4 {
140                         linux,code = <KEY_4>;
141                         label = "SW2-4";
142                         wakeup-source;
143                         debounce-interval = <20>;
144                         gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
145                 };
146                 key-a {
147                         linux,code = <KEY_A>;
148                         label = "SW24";
149                         wakeup-source;
150                         debounce-interval = <20>;
151                         gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
152                 };
153                 key-b {
154                         linux,code = <KEY_B>;
155                         label = "SW25";
156                         wakeup-source;
157                         debounce-interval = <20>;
158                         gpios = <&gpio11 2 GPIO_ACTIVE_LOW>;
159                 };
160         };
161
162         vcc_sdhi0: regulator-vcc-sdhi0 {
163                 compatible = "regulator-fixed";
164
165                 regulator-name = "SDHI0 Vcc";
166                 regulator-min-microvolt = <3300000>;
167                 regulator-max-microvolt = <3300000>;
168
169                 gpio = <&gpio11 12 GPIO_ACTIVE_HIGH>;
170                 enable-active-high;
171         };
172 };
173
174 &extal_clk {
175         clock-frequency = <20000000>;
176 };
177
178 &can_clk {
179         clock-frequency = <48000000>;
180 };
181
182 &pfc {
183         scif0_pins: scif0 {
184                 groups = "scif0_data";
185                 function = "scif0";
186         };
187
188         scif3_pins: scif3 {
189                 groups = "scif3_data";
190                 function = "scif3";
191         };
192
193         lan89218_pins: lan89218 {
194                 intc {
195                         groups = "intc_irq0";
196                         function = "intc";
197                 };
198                 lbsc {
199                         groups = "lbsc_ex_cs0";
200                         function = "lbsc";
201                 };
202         };
203
204         can0_pins: can0 {
205                 groups = "can0_data", "can_clk";
206                 function = "can0";
207         };
208
209         sdhi0_pins: sdhi0 {
210                 groups = "sdhi0_data4", "sdhi0_ctrl";
211                 function = "sdhi0";
212         };
213
214         du0_pins: du0 {
215                 groups = "du0_rgb888", "du0_sync", "du0_disp";
216                 function = "du0";
217         };
218
219         du1_pins: du1 {
220                 groups = "du1_rgb666", "du1_sync", "du1_disp";
221                 function = "du1";
222         };
223 };
224
225 &scif0 {
226         pinctrl-0 = <&scif0_pins>;
227         pinctrl-names = "default";
228
229         status = "okay";
230 };
231
232 &scif3 {
233         pinctrl-0 = <&scif3_pins>;
234         pinctrl-names = "default";
235
236         status = "okay";
237 };
238
239 &can0 {
240         pinctrl-0 = <&can0_pins>;
241         pinctrl-names = "default";
242
243         status = "okay";
244 };
245
246 &sdhi0 {
247         pinctrl-0 = <&sdhi0_pins>;
248         pinctrl-names = "default";
249
250         vmmc-supply = <&vcc_sdhi0>;
251         cd-gpios = <&gpio11 11 GPIO_ACTIVE_LOW>;
252         status = "okay";
253 };
254
255 &i2c1 {
256         status = "okay";
257         clock-frequency = <400000>;
258
259         hdmi@39 {
260                 compatible = "adi,adv7511w";
261                 reg = <0x39>;
262                 interrupt-parent = <&irqc>;
263                 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
264
265                 adi,input-depth = <8>;
266                 adi,input-colorspace = "rgb";
267                 adi,input-clock = "1x";
268                 adi,input-style = <1>;
269                 adi,input-justification = "evenly";
270
271                 ports {
272                         #address-cells = <1>;
273                         #size-cells = <0>;
274
275                         port@0 {
276                                 reg = <0>;
277                                 adv7511_in: endpoint {
278                                         remote-endpoint = <&du_out_rgb0>;
279                                 };
280                         };
281
282                         port@1 {
283                                 reg = <1>;
284                                 adv7511_out: endpoint {
285                                         remote-endpoint = <&hdmi_con>;
286                                 };
287                         };
288                 };
289         };
290 };
291
292 &du {
293         pinctrl-0 = <&du0_pins &du1_pins>;
294         pinctrl-names = "default";
295
296         clocks = <&mstp7_clks R8A7792_CLK_DU0>, <&mstp7_clks R8A7792_CLK_DU1>,
297                  <&x1_clk>, <&x2_clk>;
298         clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
299         status = "okay";
300
301         ports {
302                 port@0 {
303                         endpoint {
304                                 remote-endpoint = <&adv7511_in>;
305                         };
306                 };
307                 port@1 {
308                         endpoint {
309                                 remote-endpoint = <&adv7123_in>;
310                         };
311                 };
312         };
313 };