1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/*
3 * Device Tree Source for the RZ/V2M (r9a09g011) Evaluation Kit Board
4 *
5 * Copyright (C) 2022 Renesas Electronics Corp.
6 */
7
8/dts-v1/;
9#include "r9a09g011.dtsi"
10#include <dt-bindings/pinctrl/rzv2m-pinctrl.h>
11
12/ {
13	model = "RZ/V2M Evaluation Kit 2.0";
14	compatible = "renesas,rzv2mevk2", "renesas,r9a09g011";
15
16	aliases {
17		serial0 = &uart0;
18		ethernet0 = &avb;
19	};
20
21	chosen {
22		stdout-path = "serial0:115200n8";
23	};
24
25	connector {
26		compatible = "usb-c-connector";
27		label = "USB-C";
28		data-role = "dual";
29
30		ports {
31			#address-cells = <1>;
32			#size-cells = <0>;
33
34			port@0 {
35				reg = <0>;
36				hs_ep: endpoint {
37					remote-endpoint = <&usb3_hs_ep>;
38				};
39			};
40
41			port@1 {
42				reg = <1>;
43				ss_ep: endpoint {
44					remote-endpoint = <&hd3ss3220_in_ep>;
45				};
46			};
47		};
48	};
49
50	memory@58000000 {
51		device_type = "memory";
52		/*
53		 * first 1.25GiB is reserved for ISP Firmware,
54		 * next 128MiB is reserved for secure area.
55		 */
56		reg = <0x0 0x58000000 0x0 0x28000000>;
57	};
58
59	memory@180000000 {
60		device_type = "memory";
61		reg = <0x1 0x80000000 0x0 0x80000000>;
62	};
63};
64
65&avb {
66	renesas,no-ether-link;
67	phy-handle = <&phy0>;
68	phy-mode = "gmii";
69	status = "okay";
70
71	phy0: ethernet-phy@0 {
72		compatible = "ethernet-phy-id001c.c916",
73			     "ethernet-phy-ieee802.3-c22";
74		reg = <0>;
75	};
76};
77
78&extal_clk {
79	clock-frequency = <48000000>;
80};
81
82&i2c0 {
83	pinctrl-0 = <&i2c0_pins>;
84	pinctrl-names = "default";
85	clock-frequency = <400000>;
86	status = "okay";
87
88	hd3ss3220@47 {
89		compatible = "ti,hd3ss3220";
90		reg = <0x47>;
91
92		ports {
93			#address-cells = <1>;
94			#size-cells = <0>;
95
96			port@0 {
97				reg = <0>;
98				hd3ss3220_in_ep: endpoint {
99					remote-endpoint = <&ss_ep>;
100				};
101			};
102
103			port@1 {
104				reg = <1>;
105				hd3ss3220_out_ep: endpoint {
106					remote-endpoint = <&usb3_role_switch>;
107				};
108			};
109		};
110	};
111};
112
113&i2c2 {
114	pinctrl-0 = <&i2c2_pins>;
115	pinctrl-names = "default";
116	clock-frequency = <100000>;
117	status = "okay";
118};
119
120&pinctrl {
121	i2c0_pins: i2c0 {
122		pinmux = <RZV2M_PORT_PINMUX(5, 0, 2)>, /* SDA */
123			 <RZV2M_PORT_PINMUX(5, 1, 2)>; /* SCL */
124	};
125
126	i2c2_pins: i2c2 {
127		pinmux = <RZV2M_PORT_PINMUX(3, 8, 2)>, /* SDA */
128			 <RZV2M_PORT_PINMUX(3, 9, 2)>; /* SCL */
129	};
130};
131
132&pwc {
133	renesas,rzv2m-pwc-power;
134	status = "okay";
135};
136
137&uart0 {
138	status = "okay";
139};
140
141&usb3drd {
142	status = "okay";
143};
144
145&usb3host {
146	status = "okay";
147};
148
149&usb3peri {
150	companion = <&usb3host>;
151	status = "okay";
152	usb-role-switch;
153
154	ports {
155		#address-cells = <1>;
156		#size-cells = <0>;
157
158		port@0 {
159			reg = <0>;
160			usb3_hs_ep: endpoint {
161				remote-endpoint = <&hs_ep>;
162			};
163		};
164
165		port@1 {
166			reg = <1>;
167			usb3_role_switch: endpoint {
168				remote-endpoint = <&hd3ss3220_out_ep>;
169			};
170		};
171	};
172};
173
174&wdt0 {
175	status = "okay";
176};
177