1ad1bd2bfSPhil Edworthy// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2ad1bd2bfSPhil Edworthy/*
3ad1bd2bfSPhil Edworthy * Device Tree Source for the RZ/V2M (r9a09g011) Evaluation Kit Board
4ad1bd2bfSPhil Edworthy *
5ad1bd2bfSPhil Edworthy * Copyright (C) 2022 Renesas Electronics Corp.
6ad1bd2bfSPhil Edworthy */
7ad1bd2bfSPhil Edworthy
8ad1bd2bfSPhil Edworthy/dts-v1/;
9ad1bd2bfSPhil Edworthy#include "r9a09g011.dtsi"
10b6c0be72SFabrizio Castro#include <dt-bindings/gpio/gpio.h>
1139ffd330SPhil Edworthy#include <dt-bindings/pinctrl/rzv2m-pinctrl.h>
12ad1bd2bfSPhil Edworthy
13ad1bd2bfSPhil Edworthy/ {
14ad1bd2bfSPhil Edworthy	model = "RZ/V2M Evaluation Kit 2.0";
15ad1bd2bfSPhil Edworthy	compatible = "renesas,rzv2mevk2", "renesas,r9a09g011";
16ad1bd2bfSPhil Edworthy
17ad1bd2bfSPhil Edworthy	aliases {
18ad1bd2bfSPhil Edworthy		serial0 = &uart0;
19dc242571SPhil Edworthy		ethernet0 = &avb;
20ad1bd2bfSPhil Edworthy	};
21ad1bd2bfSPhil Edworthy
22ad1bd2bfSPhil Edworthy	chosen {
23ad1bd2bfSPhil Edworthy		stdout-path = "serial0:115200n8";
24ad1bd2bfSPhil Edworthy	};
25ad1bd2bfSPhil Edworthy
26a17039b6SBiju Das	connector {
27a17039b6SBiju Das		compatible = "usb-c-connector";
28a17039b6SBiju Das		label = "USB-C";
29a17039b6SBiju Das		data-role = "dual";
30a17039b6SBiju Das
31a17039b6SBiju Das		ports {
32a17039b6SBiju Das			#address-cells = <1>;
33a17039b6SBiju Das			#size-cells = <0>;
34a17039b6SBiju Das
35a17039b6SBiju Das			port@0 {
36a17039b6SBiju Das				reg = <0>;
37a17039b6SBiju Das				hs_ep: endpoint {
38a17039b6SBiju Das					remote-endpoint = <&usb3_hs_ep>;
39a17039b6SBiju Das				};
40a17039b6SBiju Das			};
41a17039b6SBiju Das
42a17039b6SBiju Das			port@1 {
43a17039b6SBiju Das				reg = <1>;
44a17039b6SBiju Das				ss_ep: endpoint {
45a17039b6SBiju Das					remote-endpoint = <&hd3ss3220_in_ep>;
46a17039b6SBiju Das				};
47a17039b6SBiju Das			};
48a17039b6SBiju Das		};
49a17039b6SBiju Das	};
50a17039b6SBiju Das
51ad1bd2bfSPhil Edworthy	memory@58000000 {
52ad1bd2bfSPhil Edworthy		device_type = "memory";
53ad1bd2bfSPhil Edworthy		/*
54ad1bd2bfSPhil Edworthy		 * first 1.25GiB is reserved for ISP Firmware,
55ad1bd2bfSPhil Edworthy		 * next 128MiB is reserved for secure area.
56ad1bd2bfSPhil Edworthy		 */
57ad1bd2bfSPhil Edworthy		reg = <0x0 0x58000000 0x0 0x28000000>;
58ad1bd2bfSPhil Edworthy	};
59ad1bd2bfSPhil Edworthy
60ad1bd2bfSPhil Edworthy	memory@180000000 {
61ad1bd2bfSPhil Edworthy		device_type = "memory";
62ad1bd2bfSPhil Edworthy		reg = <0x1 0x80000000 0x0 0x80000000>;
63ad1bd2bfSPhil Edworthy	};
64b6c0be72SFabrizio Castro
65b6c0be72SFabrizio Castro	reg_1v8: regulator-1v8 {
66b6c0be72SFabrizio Castro		compatible = "regulator-fixed";
67b6c0be72SFabrizio Castro		regulator-name = "fixed-1.8V";
68b6c0be72SFabrizio Castro		regulator-min-microvolt = <1800000>;
69b6c0be72SFabrizio Castro		regulator-max-microvolt = <1800000>;
70b6c0be72SFabrizio Castro		regulator-boot-on;
71b6c0be72SFabrizio Castro		regulator-always-on;
72b6c0be72SFabrizio Castro	};
73b6c0be72SFabrizio Castro
74b6c0be72SFabrizio Castro	reg_3v3: regulator-3v3 {
75b6c0be72SFabrizio Castro		compatible = "regulator-fixed";
76b6c0be72SFabrizio Castro		regulator-name = "fixed-3.3V";
77b6c0be72SFabrizio Castro		regulator-min-microvolt = <3300000>;
78b6c0be72SFabrizio Castro		regulator-max-microvolt = <3300000>;
79b6c0be72SFabrizio Castro		regulator-boot-on;
80b6c0be72SFabrizio Castro		regulator-always-on;
81b6c0be72SFabrizio Castro	};
82b6c0be72SFabrizio Castro
83b6c0be72SFabrizio Castro	vccq_sdhi0: regulator-vccq-sdhi0 {
84b6c0be72SFabrizio Castro		compatible = "regulator-gpio";
85b6c0be72SFabrizio Castro
86b6c0be72SFabrizio Castro		regulator-name = "SDHI0 VccQ";
87b6c0be72SFabrizio Castro		regulator-min-microvolt = <1800000>;
88b6c0be72SFabrizio Castro		regulator-max-microvolt = <3300000>;
89b6c0be72SFabrizio Castro
90b6c0be72SFabrizio Castro		gpios = <&pwc 0 GPIO_ACTIVE_HIGH>;
91b6c0be72SFabrizio Castro		gpios-states = <1>;
92b6c0be72SFabrizio Castro		states = <3300000 0>, <1800000 1>;
93b6c0be72SFabrizio Castro	};
94ad1bd2bfSPhil Edworthy};
95ad1bd2bfSPhil Edworthy
96dc242571SPhil Edworthy&avb {
97dc242571SPhil Edworthy	renesas,no-ether-link;
98dc242571SPhil Edworthy	phy-handle = <&phy0>;
99dc242571SPhil Edworthy	phy-mode = "gmii";
100dc242571SPhil Edworthy	status = "okay";
101dc242571SPhil Edworthy
102dc242571SPhil Edworthy	phy0: ethernet-phy@0 {
103dc242571SPhil Edworthy		compatible = "ethernet-phy-id001c.c916",
104dc242571SPhil Edworthy			     "ethernet-phy-ieee802.3-c22";
105dc242571SPhil Edworthy		reg = <0>;
106dc242571SPhil Edworthy	};
107dc242571SPhil Edworthy};
108dc242571SPhil Edworthy
109b6c0be72SFabrizio Castro&emmc {
110b6c0be72SFabrizio Castro	pinctrl-0 = <&emmc_pins>;
111b6c0be72SFabrizio Castro	pinctrl-1 = <&emmc_pins>;
112b6c0be72SFabrizio Castro	pinctrl-names = "default", "state_uhs";
113b6c0be72SFabrizio Castro
114b6c0be72SFabrizio Castro	vmmc-supply = <&reg_3v3>;
115b6c0be72SFabrizio Castro	vqmmc-supply = <&reg_1v8>;
116b6c0be72SFabrizio Castro	bus-width = <8>;
117b6c0be72SFabrizio Castro	mmc-hs200-1_8v;
118b6c0be72SFabrizio Castro	no-sd;
119b6c0be72SFabrizio Castro	no-sdio;
120b6c0be72SFabrizio Castro	non-removable;
121b6c0be72SFabrizio Castro	fixed-emmc-driver-type = <1>;
122b6c0be72SFabrizio Castro	max-frequency = <200000000>;
123b6c0be72SFabrizio Castro	status = "okay";
124b6c0be72SFabrizio Castro};
125b6c0be72SFabrizio Castro
126ad1bd2bfSPhil Edworthy&extal_clk {
127ad1bd2bfSPhil Edworthy	clock-frequency = <48000000>;
128ad1bd2bfSPhil Edworthy};
129ad1bd2bfSPhil Edworthy
13039ffd330SPhil Edworthy&i2c0 {
13139ffd330SPhil Edworthy	pinctrl-0 = <&i2c0_pins>;
13239ffd330SPhil Edworthy	pinctrl-names = "default";
13339ffd330SPhil Edworthy	clock-frequency = <400000>;
13439ffd330SPhil Edworthy	status = "okay";
135a17039b6SBiju Das
136a17039b6SBiju Das	hd3ss3220@47 {
137a17039b6SBiju Das		compatible = "ti,hd3ss3220";
138a17039b6SBiju Das		reg = <0x47>;
139a17039b6SBiju Das
140a17039b6SBiju Das		ports {
141a17039b6SBiju Das			#address-cells = <1>;
142a17039b6SBiju Das			#size-cells = <0>;
143a17039b6SBiju Das
144a17039b6SBiju Das			port@0 {
145a17039b6SBiju Das				reg = <0>;
146a17039b6SBiju Das				hd3ss3220_in_ep: endpoint {
147a17039b6SBiju Das					remote-endpoint = <&ss_ep>;
148a17039b6SBiju Das				};
149a17039b6SBiju Das			};
150a17039b6SBiju Das
151a17039b6SBiju Das			port@1 {
152a17039b6SBiju Das				reg = <1>;
153a17039b6SBiju Das				hd3ss3220_out_ep: endpoint {
154a17039b6SBiju Das					remote-endpoint = <&usb3_role_switch>;
155a17039b6SBiju Das				};
156a17039b6SBiju Das			};
157a17039b6SBiju Das		};
158a17039b6SBiju Das	};
15939ffd330SPhil Edworthy};
16039ffd330SPhil Edworthy
16139ffd330SPhil Edworthy&i2c2 {
16239ffd330SPhil Edworthy	pinctrl-0 = <&i2c2_pins>;
16339ffd330SPhil Edworthy	pinctrl-names = "default";
16439ffd330SPhil Edworthy	clock-frequency = <100000>;
16539ffd330SPhil Edworthy	status = "okay";
16639ffd330SPhil Edworthy};
16739ffd330SPhil Edworthy
16839ffd330SPhil Edworthy&pinctrl {
169b6c0be72SFabrizio Castro	emmc_pins: emmc {
170b6c0be72SFabrizio Castro		data {
171b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(0, 0, 2)>, /* MMDAT0 */
172b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 1, 2)>, /* MMDAT1 */
173b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 2, 2)>, /* MMDAT2 */
174b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 3, 2)>, /* MMDAT3 */
175b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 4, 2)>, /* MMDAT4 */
176b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 5, 2)>, /* MMDAT5 */
177b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 6, 2)>, /* MMDAT6 */
178b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 7, 2)>; /* MMDAT7 */
179b6c0be72SFabrizio Castro			power-source = <1800>;
180b6c0be72SFabrizio Castro		};
181b6c0be72SFabrizio Castro
182b6c0be72SFabrizio Castro		ctrl {
183b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(0, 10, 2)>, /* MMCMD */
184b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 11, 2)>; /* MMCLK */
185b6c0be72SFabrizio Castro			power-source = <1800>;
186b6c0be72SFabrizio Castro		};
187b6c0be72SFabrizio Castro	};
188b6c0be72SFabrizio Castro
18939ffd330SPhil Edworthy	i2c0_pins: i2c0 {
19039ffd330SPhil Edworthy		pinmux = <RZV2M_PORT_PINMUX(5, 0, 2)>, /* SDA */
19139ffd330SPhil Edworthy			 <RZV2M_PORT_PINMUX(5, 1, 2)>; /* SCL */
19239ffd330SPhil Edworthy	};
19339ffd330SPhil Edworthy
19439ffd330SPhil Edworthy	i2c2_pins: i2c2 {
19539ffd330SPhil Edworthy		pinmux = <RZV2M_PORT_PINMUX(3, 8, 2)>, /* SDA */
19639ffd330SPhil Edworthy			 <RZV2M_PORT_PINMUX(3, 9, 2)>; /* SCL */
19739ffd330SPhil Edworthy	};
198b6c0be72SFabrizio Castro
199b6c0be72SFabrizio Castro	sdhi0_pins: sd0 {
200b6c0be72SFabrizio Castro		data {
201b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 2, 1)>, /* SD0DAT0 */
202b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 3, 1)>, /* SD0DAT1 */
203b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 4, 1)>, /* SD0DAT2 */
204b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 5, 1)>; /* SD0DAT3 */
205b6c0be72SFabrizio Castro			power-source = <3300>;
206b6c0be72SFabrizio Castro		};
207b6c0be72SFabrizio Castro
208b6c0be72SFabrizio Castro		ctrl {
209b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 0, 1)>, /* SD0CMD */
210b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 1, 1)>; /* SD0CLK */
211b6c0be72SFabrizio Castro			power-source = <3300>;
212b6c0be72SFabrizio Castro		};
213b6c0be72SFabrizio Castro
214b6c0be72SFabrizio Castro		cd {
215b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 7, 1)>; /* SD0CD */
216b6c0be72SFabrizio Castro			power-source = <3300>;
217b6c0be72SFabrizio Castro		};
218b6c0be72SFabrizio Castro	};
219b6c0be72SFabrizio Castro
220b6c0be72SFabrizio Castro	sdhi0_pins_uhs: sd0-uhs {
221b6c0be72SFabrizio Castro		data {
222b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 2, 1)>, /* SD0DAT0 */
223b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 3, 1)>, /* SD0DAT1 */
224b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 4, 1)>, /* SD0DAT2 */
225b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 5, 1)>; /* SD0DAT3 */
226b6c0be72SFabrizio Castro			power-source = <1800>;
227b6c0be72SFabrizio Castro		};
228b6c0be72SFabrizio Castro
229b6c0be72SFabrizio Castro		ctrl {
230b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 0, 1)>, /* SD0CMD */
231b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 1, 1)>; /* SD0CLK */
232b6c0be72SFabrizio Castro			power-source = <1800>;
233b6c0be72SFabrizio Castro		};
234b6c0be72SFabrizio Castro
235b6c0be72SFabrizio Castro		cd {
236b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 7, 1)>; /* SD0CD */
237b6c0be72SFabrizio Castro			power-source = <1800>;
238b6c0be72SFabrizio Castro		};
239b6c0be72SFabrizio Castro	};
240*6ec57913SBiju Das
241*6ec57913SBiju Das	uart0_pins: uart0 {
242*6ec57913SBiju Das		pinmux = <RZV2M_PORT_PINMUX(3, 0, 2)>, /* UATX0 */
243*6ec57913SBiju Das			 <RZV2M_PORT_PINMUX(3, 1, 2)>, /* UARX0 */
244*6ec57913SBiju Das			 <RZV2M_PORT_PINMUX(3, 2, 2)>, /* UACTS0N */
245*6ec57913SBiju Das			 <RZV2M_PORT_PINMUX(3, 3, 2)>; /* UARTS0N */
246*6ec57913SBiju Das	};
24739ffd330SPhil Edworthy};
24839ffd330SPhil Edworthy
2493d28ccb9SFabrizio Castro&pwc {
2503d28ccb9SFabrizio Castro	renesas,rzv2m-pwc-power;
2513d28ccb9SFabrizio Castro	status = "okay";
2523d28ccb9SFabrizio Castro};
2533d28ccb9SFabrizio Castro
254b6c0be72SFabrizio Castro&sdhi0 {
255b6c0be72SFabrizio Castro	pinctrl-0 = <&sdhi0_pins>;
256b6c0be72SFabrizio Castro	pinctrl-1 = <&sdhi0_pins_uhs>;
257b6c0be72SFabrizio Castro	pinctrl-names = "default", "state_uhs";
258b6c0be72SFabrizio Castro
259b6c0be72SFabrizio Castro	vmmc-supply = <&reg_3v3>;
260b6c0be72SFabrizio Castro	vqmmc-supply = <&vccq_sdhi0>;
261b6c0be72SFabrizio Castro	bus-width = <4>;
262b6c0be72SFabrizio Castro	sd-uhs-sdr50;
263b6c0be72SFabrizio Castro	sd-uhs-sdr104;
264b6c0be72SFabrizio Castro	status = "okay";
265b6c0be72SFabrizio Castro};
266b6c0be72SFabrizio Castro
267ad1bd2bfSPhil Edworthy&uart0 {
268*6ec57913SBiju Das	pinctrl-0 = <&uart0_pins>;
269*6ec57913SBiju Das	pinctrl-names = "default";
270*6ec57913SBiju Das
271*6ec57913SBiju Das	uart-has-rtscts;
272ad1bd2bfSPhil Edworthy	status = "okay";
273ad1bd2bfSPhil Edworthy};
274594edf2cSFabrizio Castro
275967219e5SBiju Das&usb3drd {
276967219e5SBiju Das	status = "okay";
277967219e5SBiju Das};
278967219e5SBiju Das
279967219e5SBiju Das&usb3host {
280967219e5SBiju Das	status = "okay";
281967219e5SBiju Das};
282967219e5SBiju Das
283967219e5SBiju Das&usb3peri {
284a17039b6SBiju Das	companion = <&usb3host>;
285967219e5SBiju Das	status = "okay";
286a17039b6SBiju Das	usb-role-switch;
287a17039b6SBiju Das
288a17039b6SBiju Das	ports {
289a17039b6SBiju Das		#address-cells = <1>;
290a17039b6SBiju Das		#size-cells = <0>;
291a17039b6SBiju Das
292a17039b6SBiju Das		port@0 {
293a17039b6SBiju Das			reg = <0>;
294a17039b6SBiju Das			usb3_hs_ep: endpoint {
295a17039b6SBiju Das				remote-endpoint = <&hs_ep>;
296a17039b6SBiju Das			};
297a17039b6SBiju Das		};
298a17039b6SBiju Das
299a17039b6SBiju Das		port@1 {
300a17039b6SBiju Das			reg = <1>;
301a17039b6SBiju Das			usb3_role_switch: endpoint {
302a17039b6SBiju Das				remote-endpoint = <&hd3ss3220_out_ep>;
303a17039b6SBiju Das			};
304a17039b6SBiju Das		};
305a17039b6SBiju Das	};
306967219e5SBiju Das};
307967219e5SBiju Das
308594edf2cSFabrizio Castro&wdt0 {
309594edf2cSFabrizio Castro	status = "okay";
310594edf2cSFabrizio Castro};
311