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"
10*b6c0be72SFabrizio 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	};
64*b6c0be72SFabrizio Castro
65*b6c0be72SFabrizio Castro	reg_1v8: regulator-1v8 {
66*b6c0be72SFabrizio Castro		compatible = "regulator-fixed";
67*b6c0be72SFabrizio Castro		regulator-name = "fixed-1.8V";
68*b6c0be72SFabrizio Castro		regulator-min-microvolt = <1800000>;
69*b6c0be72SFabrizio Castro		regulator-max-microvolt = <1800000>;
70*b6c0be72SFabrizio Castro		regulator-boot-on;
71*b6c0be72SFabrizio Castro		regulator-always-on;
72*b6c0be72SFabrizio Castro	};
73*b6c0be72SFabrizio Castro
74*b6c0be72SFabrizio Castro	reg_3v3: regulator-3v3 {
75*b6c0be72SFabrizio Castro		compatible = "regulator-fixed";
76*b6c0be72SFabrizio Castro		regulator-name = "fixed-3.3V";
77*b6c0be72SFabrizio Castro		regulator-min-microvolt = <3300000>;
78*b6c0be72SFabrizio Castro		regulator-max-microvolt = <3300000>;
79*b6c0be72SFabrizio Castro		regulator-boot-on;
80*b6c0be72SFabrizio Castro		regulator-always-on;
81*b6c0be72SFabrizio Castro	};
82*b6c0be72SFabrizio Castro
83*b6c0be72SFabrizio Castro	vccq_sdhi0: regulator-vccq-sdhi0 {
84*b6c0be72SFabrizio Castro		compatible = "regulator-gpio";
85*b6c0be72SFabrizio Castro
86*b6c0be72SFabrizio Castro		regulator-name = "SDHI0 VccQ";
87*b6c0be72SFabrizio Castro		regulator-min-microvolt = <1800000>;
88*b6c0be72SFabrizio Castro		regulator-max-microvolt = <3300000>;
89*b6c0be72SFabrizio Castro
90*b6c0be72SFabrizio Castro		gpios = <&pwc 0 GPIO_ACTIVE_HIGH>;
91*b6c0be72SFabrizio Castro		gpios-states = <1>;
92*b6c0be72SFabrizio Castro		states = <3300000 0>, <1800000 1>;
93*b6c0be72SFabrizio 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
109*b6c0be72SFabrizio Castro&emmc {
110*b6c0be72SFabrizio Castro	pinctrl-0 = <&emmc_pins>;
111*b6c0be72SFabrizio Castro	pinctrl-1 = <&emmc_pins>;
112*b6c0be72SFabrizio Castro	pinctrl-names = "default", "state_uhs";
113*b6c0be72SFabrizio Castro
114*b6c0be72SFabrizio Castro	vmmc-supply = <&reg_3v3>;
115*b6c0be72SFabrizio Castro	vqmmc-supply = <&reg_1v8>;
116*b6c0be72SFabrizio Castro	bus-width = <8>;
117*b6c0be72SFabrizio Castro	mmc-hs200-1_8v;
118*b6c0be72SFabrizio Castro	no-sd;
119*b6c0be72SFabrizio Castro	no-sdio;
120*b6c0be72SFabrizio Castro	non-removable;
121*b6c0be72SFabrizio Castro	fixed-emmc-driver-type = <1>;
122*b6c0be72SFabrizio Castro	max-frequency = <200000000>;
123*b6c0be72SFabrizio Castro	status = "okay";
124*b6c0be72SFabrizio Castro};
125*b6c0be72SFabrizio 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 {
169*b6c0be72SFabrizio Castro	emmc_pins: emmc {
170*b6c0be72SFabrizio Castro		data {
171*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(0, 0, 2)>, /* MMDAT0 */
172*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 1, 2)>, /* MMDAT1 */
173*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 2, 2)>, /* MMDAT2 */
174*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 3, 2)>, /* MMDAT3 */
175*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 4, 2)>, /* MMDAT4 */
176*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 5, 2)>, /* MMDAT5 */
177*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 6, 2)>, /* MMDAT6 */
178*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 7, 2)>; /* MMDAT7 */
179*b6c0be72SFabrizio Castro			power-source = <1800>;
180*b6c0be72SFabrizio Castro		};
181*b6c0be72SFabrizio Castro
182*b6c0be72SFabrizio Castro		ctrl {
183*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(0, 10, 2)>, /* MMCMD */
184*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(0, 11, 2)>; /* MMCLK */
185*b6c0be72SFabrizio Castro			power-source = <1800>;
186*b6c0be72SFabrizio Castro		};
187*b6c0be72SFabrizio Castro	};
188*b6c0be72SFabrizio 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	};
198*b6c0be72SFabrizio Castro
199*b6c0be72SFabrizio Castro	sdhi0_pins: sd0 {
200*b6c0be72SFabrizio Castro		data {
201*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 2, 1)>, /* SD0DAT0 */
202*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 3, 1)>, /* SD0DAT1 */
203*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 4, 1)>, /* SD0DAT2 */
204*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 5, 1)>; /* SD0DAT3 */
205*b6c0be72SFabrizio Castro			power-source = <3300>;
206*b6c0be72SFabrizio Castro		};
207*b6c0be72SFabrizio Castro
208*b6c0be72SFabrizio Castro		ctrl {
209*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 0, 1)>, /* SD0CMD */
210*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 1, 1)>; /* SD0CLK */
211*b6c0be72SFabrizio Castro			power-source = <3300>;
212*b6c0be72SFabrizio Castro		};
213*b6c0be72SFabrizio Castro
214*b6c0be72SFabrizio Castro		cd {
215*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 7, 1)>; /* SD0CD */
216*b6c0be72SFabrizio Castro			power-source = <3300>;
217*b6c0be72SFabrizio Castro		};
218*b6c0be72SFabrizio Castro	};
219*b6c0be72SFabrizio Castro
220*b6c0be72SFabrizio Castro	sdhi0_pins_uhs: sd0-uhs {
221*b6c0be72SFabrizio Castro		data {
222*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 2, 1)>, /* SD0DAT0 */
223*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 3, 1)>, /* SD0DAT1 */
224*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 4, 1)>, /* SD0DAT2 */
225*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 5, 1)>; /* SD0DAT3 */
226*b6c0be72SFabrizio Castro			power-source = <1800>;
227*b6c0be72SFabrizio Castro		};
228*b6c0be72SFabrizio Castro
229*b6c0be72SFabrizio Castro		ctrl {
230*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 0, 1)>, /* SD0CMD */
231*b6c0be72SFabrizio Castro				 <RZV2M_PORT_PINMUX(8, 1, 1)>; /* SD0CLK */
232*b6c0be72SFabrizio Castro			power-source = <1800>;
233*b6c0be72SFabrizio Castro		};
234*b6c0be72SFabrizio Castro
235*b6c0be72SFabrizio Castro		cd {
236*b6c0be72SFabrizio Castro			pinmux = <RZV2M_PORT_PINMUX(8, 7, 1)>; /* SD0CD */
237*b6c0be72SFabrizio Castro			power-source = <1800>;
238*b6c0be72SFabrizio Castro		};
239*b6c0be72SFabrizio Castro	};
24039ffd330SPhil Edworthy};
24139ffd330SPhil Edworthy
2423d28ccb9SFabrizio Castro&pwc {
2433d28ccb9SFabrizio Castro	renesas,rzv2m-pwc-power;
2443d28ccb9SFabrizio Castro	status = "okay";
2453d28ccb9SFabrizio Castro};
2463d28ccb9SFabrizio Castro
247*b6c0be72SFabrizio Castro&sdhi0 {
248*b6c0be72SFabrizio Castro	pinctrl-0 = <&sdhi0_pins>;
249*b6c0be72SFabrizio Castro	pinctrl-1 = <&sdhi0_pins_uhs>;
250*b6c0be72SFabrizio Castro	pinctrl-names = "default", "state_uhs";
251*b6c0be72SFabrizio Castro
252*b6c0be72SFabrizio Castro	vmmc-supply = <&reg_3v3>;
253*b6c0be72SFabrizio Castro	vqmmc-supply = <&vccq_sdhi0>;
254*b6c0be72SFabrizio Castro	bus-width = <4>;
255*b6c0be72SFabrizio Castro	sd-uhs-sdr50;
256*b6c0be72SFabrizio Castro	sd-uhs-sdr104;
257*b6c0be72SFabrizio Castro	status = "okay";
258*b6c0be72SFabrizio Castro};
259*b6c0be72SFabrizio Castro
260ad1bd2bfSPhil Edworthy&uart0 {
261ad1bd2bfSPhil Edworthy	status = "okay";
262ad1bd2bfSPhil Edworthy};
263594edf2cSFabrizio Castro
264967219e5SBiju Das&usb3drd {
265967219e5SBiju Das	status = "okay";
266967219e5SBiju Das};
267967219e5SBiju Das
268967219e5SBiju Das&usb3host {
269967219e5SBiju Das	status = "okay";
270967219e5SBiju Das};
271967219e5SBiju Das
272967219e5SBiju Das&usb3peri {
273a17039b6SBiju Das	companion = <&usb3host>;
274967219e5SBiju Das	status = "okay";
275a17039b6SBiju Das	usb-role-switch;
276a17039b6SBiju Das
277a17039b6SBiju Das	ports {
278a17039b6SBiju Das		#address-cells = <1>;
279a17039b6SBiju Das		#size-cells = <0>;
280a17039b6SBiju Das
281a17039b6SBiju Das		port@0 {
282a17039b6SBiju Das			reg = <0>;
283a17039b6SBiju Das			usb3_hs_ep: endpoint {
284a17039b6SBiju Das				remote-endpoint = <&hs_ep>;
285a17039b6SBiju Das			};
286a17039b6SBiju Das		};
287a17039b6SBiju Das
288a17039b6SBiju Das		port@1 {
289a17039b6SBiju Das			reg = <1>;
290a17039b6SBiju Das			usb3_role_switch: endpoint {
291a17039b6SBiju Das				remote-endpoint = <&hd3ss3220_out_ep>;
292a17039b6SBiju Das			};
293a17039b6SBiju Das		};
294a17039b6SBiju Das	};
295967219e5SBiju Das};
296967219e5SBiju Das
297594edf2cSFabrizio Castro&wdt0 {
298594edf2cSFabrizio Castro	status = "okay";
299594edf2cSFabrizio Castro};
300