1/*
2 * Device Tree Source for the Draak board
3 *
4 * Copyright (C) 2016 Renesas Electronics Corp.
5 * Copyright (C) 2017 Glider bvba
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 "r8a77995.dtsi"
14#include <dt-bindings/gpio/gpio.h>
15
16/ {
17	model = "Renesas Draak board based on r8a77995";
18	compatible = "renesas,draak", "renesas,r8a77995";
19
20	aliases {
21		serial0 = &scif2;
22		ethernet0 = &avb;
23	};
24
25	chosen {
26		bootargs = "ignore_loglevel";
27		stdout-path = "serial0:115200n8";
28	};
29
30	vga {
31		compatible = "vga-connector";
32
33		port {
34			vga_in: endpoint {
35				remote-endpoint = <&adv7123_out>;
36			};
37		};
38	};
39
40	vga-encoder {
41		compatible = "adi,adv7123";
42
43		ports {
44			#address-cells = <1>;
45			#size-cells = <0>;
46
47			port@0 {
48				reg = <0>;
49				adv7123_in: endpoint {
50					remote-endpoint = <&du_out_rgb>;
51				};
52			};
53			port@1 {
54				reg = <1>;
55				adv7123_out: endpoint {
56					remote-endpoint = <&vga_in>;
57				};
58			};
59		};
60	};
61
62	memory@48000000 {
63		device_type = "memory";
64		/* first 128MB is reserved for secure area. */
65		reg = <0x0 0x48000000 0x0 0x18000000>;
66	};
67
68	reg_1p8v: regulator0 {
69		compatible = "regulator-fixed";
70		regulator-name = "fixed-1.8V";
71		regulator-min-microvolt = <1800000>;
72		regulator-max-microvolt = <1800000>;
73		regulator-boot-on;
74		regulator-always-on;
75	};
76
77	reg_3p3v: regulator1 {
78		compatible = "regulator-fixed";
79		regulator-name = "fixed-3.3V";
80		regulator-min-microvolt = <3300000>;
81		regulator-max-microvolt = <3300000>;
82		regulator-boot-on;
83		regulator-always-on;
84	};
85};
86
87&extal_clk {
88	clock-frequency = <48000000>;
89};
90
91&pfc {
92	avb0_pins: avb {
93		mux {
94			groups = "avb0_link", "avb0_mdio", "avb0_mii";
95			function = "avb0";
96		};
97	};
98
99	du_pins: du {
100		groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
101		function = "du";
102	};
103
104	i2c0_pins: i2c0 {
105		groups = "i2c0";
106		function = "i2c0";
107	};
108
109	i2c1_pins: i2c1 {
110		groups = "i2c1";
111		function = "i2c1";
112	};
113
114	pwm0_pins: pwm0 {
115		groups = "pwm0_c";
116		function = "pwm0";
117	};
118
119	pwm1_pins: pwm1 {
120		groups = "pwm1_c";
121		function = "pwm1";
122	};
123
124	scif2_pins: scif2 {
125		groups = "scif2_data";
126		function = "scif2";
127	};
128
129	sdhi2_pins: sd2 {
130		groups = "mmc_data8", "mmc_ctrl";
131		function = "mmc";
132		power-source = <1800>;
133	};
134
135	sdhi2_pins_uhs: sd2_uhs {
136		groups = "mmc_data8", "mmc_ctrl";
137		function = "mmc";
138		power-source = <1800>;
139	};
140
141	usb0_pins: usb0 {
142		groups = "usb0";
143		function = "usb0";
144	};
145};
146
147&i2c0 {
148	pinctrl-0 = <&i2c0_pins>;
149	pinctrl-names = "default";
150	status = "okay";
151
152	eeprom@50 {
153		compatible = "rohm,br24t01", "atmel,24c01";
154		reg = <0x50>;
155		pagesize = <8>;
156	};
157};
158
159&i2c1 {
160	pinctrl-0 = <&i2c1_pins>;
161	pinctrl-names = "default";
162	status = "okay";
163};
164
165&du {
166	pinctrl-0 = <&du_pins>;
167	pinctrl-names = "default";
168	status = "okay";
169
170	ports {
171		port@0 {
172			endpoint {
173				remote-endpoint = <&adv7123_in>;
174			};
175		};
176	};
177};
178
179&ehci0 {
180	status = "okay";
181};
182
183&ohci0 {
184	status = "okay";
185};
186
187&avb {
188	pinctrl-0 = <&avb0_pins>;
189	pinctrl-names = "default";
190	renesas,no-ether-link;
191	phy-handle = <&phy0>;
192	phy-mode = "rgmii-txid";
193	status = "okay";
194
195	phy0: ethernet-phy@0 {
196		rxc-skew-ps = <1500>;
197		reg = <0>;
198		interrupt-parent = <&gpio5>;
199		interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
200	};
201};
202
203&scif2 {
204	pinctrl-0 = <&scif2_pins>;
205	pinctrl-names = "default";
206
207	status = "okay";
208};
209
210&sdhi2 {
211	/* used for on-board eMMC */
212	pinctrl-0 = <&sdhi2_pins>;
213	pinctrl-1 = <&sdhi2_pins_uhs>;
214	pinctrl-names = "default", "state_uhs";
215
216	vmmc-supply = <&reg_3p3v>;
217	vqmmc-supply = <&reg_1p8v>;
218	bus-width = <8>;
219	mmc-hs200-1_8v;
220	non-removable;
221	status = "okay";
222};
223
224&usb2_phy0 {
225	pinctrl-0 = <&usb0_pins>;
226	pinctrl-names = "default";
227
228	status = "okay";
229};
230
231&pwm0 {
232	pinctrl-0 = <&pwm0_pins>;
233	pinctrl-names = "default";
234
235	status = "okay";
236};
237
238&pwm1 {
239	pinctrl-0 = <&pwm1_pins>;
240	pinctrl-names = "default";
241
242	status = "okay";
243};
244
245&rwdt {
246	timeout-sec = <60>;
247	status = "okay";
248};
249