xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/rzg2ul-smarc-som.dtsi (revision 6494e4f90503cb4027632dfcedcb7a683d829db0)
1895199bcSBiju Das// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2895199bcSBiju Das/*
3895199bcSBiju Das * Device Tree Source for the RZ/G2UL SMARC SOM common parts
4895199bcSBiju Das *
5895199bcSBiju Das * Copyright (C) 2022 Renesas Electronics Corp.
6895199bcSBiju Das */
7895199bcSBiju Das
8895199bcSBiju Das#include <dt-bindings/gpio/gpio.h>
9895199bcSBiju Das#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
10895199bcSBiju Das
11895199bcSBiju Das/ {
12*6494e4f9SBiju Das	aliases {
13*6494e4f9SBiju Das		ethernet0 = &eth0;
14*6494e4f9SBiju Das		ethernet1 = &eth1;
15*6494e4f9SBiju Das	};
16*6494e4f9SBiju Das
17895199bcSBiju Das	chosen {
18*6494e4f9SBiju Das		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
19895199bcSBiju Das	};
20895199bcSBiju Das
21895199bcSBiju Das	memory@48000000 {
22895199bcSBiju Das		device_type = "memory";
23895199bcSBiju Das		/* first 128MB is reserved for secure area. */
24895199bcSBiju Das		reg = <0x0 0x48000000 0x0 0x38000000>;
25895199bcSBiju Das	};
26a74a0bf3SBiju Das
27ed8efe50SBiju Das	reg_1p8v: regulator0 {
28ed8efe50SBiju Das		compatible = "regulator-fixed";
29ed8efe50SBiju Das		regulator-name = "fixed-1.8V";
30ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
31ed8efe50SBiju Das		regulator-max-microvolt = <1800000>;
32ed8efe50SBiju Das		regulator-boot-on;
33ed8efe50SBiju Das		regulator-always-on;
34ed8efe50SBiju Das	};
35ed8efe50SBiju Das
36a74a0bf3SBiju Das	reg_3p3v: regulator1 {
37a74a0bf3SBiju Das		compatible = "regulator-fixed";
38a74a0bf3SBiju Das		regulator-name = "fixed-3.3V";
39a74a0bf3SBiju Das		regulator-min-microvolt = <3300000>;
40a74a0bf3SBiju Das		regulator-max-microvolt = <3300000>;
41a74a0bf3SBiju Das		regulator-boot-on;
42a74a0bf3SBiju Das		regulator-always-on;
43a74a0bf3SBiju Das	};
44ed8efe50SBiju Das
45ed8efe50SBiju Das#if !(SW_SW0_DEV_SEL)
46ed8efe50SBiju Das	vccq_sdhi0: regulator-vccq-sdhi0 {
47ed8efe50SBiju Das		compatible = "regulator-gpio";
48ed8efe50SBiju Das
49ed8efe50SBiju Das		regulator-name = "SDHI0 VccQ";
50ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
51ed8efe50SBiju Das		regulator-max-microvolt = <3300000>;
52ed8efe50SBiju Das		states = <3300000 1>, <1800000 0>;
53ed8efe50SBiju Das		regulator-boot-on;
54ed8efe50SBiju Das		gpios = <&pinctrl RZG2L_GPIO(6, 2) GPIO_ACTIVE_HIGH>;
55ed8efe50SBiju Das		regulator-always-on;
56ed8efe50SBiju Das	};
57ed8efe50SBiju Das#endif
58895199bcSBiju Das};
59895199bcSBiju Das
60*6494e4f9SBiju Das#if (!SW_ET0_EN_N)
61*6494e4f9SBiju Das&eth0 {
62*6494e4f9SBiju Das	pinctrl-0 = <&eth0_pins>;
63*6494e4f9SBiju Das	pinctrl-names = "default";
64*6494e4f9SBiju Das	phy-handle = <&phy0>;
65*6494e4f9SBiju Das	phy-mode = "rgmii-id";
66*6494e4f9SBiju Das	status = "okay";
67*6494e4f9SBiju Das
68*6494e4f9SBiju Das	phy0: ethernet-phy@7 {
69*6494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
70*6494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
71*6494e4f9SBiju Das		reg = <7>;
72*6494e4f9SBiju Das		rxc-skew-psec = <2400>;
73*6494e4f9SBiju Das		txc-skew-psec = <2400>;
74*6494e4f9SBiju Das		rxdv-skew-psec = <0>;
75*6494e4f9SBiju Das		txdv-skew-psec = <0>;
76*6494e4f9SBiju Das		rxd0-skew-psec = <0>;
77*6494e4f9SBiju Das		rxd1-skew-psec = <0>;
78*6494e4f9SBiju Das		rxd2-skew-psec = <0>;
79*6494e4f9SBiju Das		rxd3-skew-psec = <0>;
80*6494e4f9SBiju Das		txd0-skew-psec = <0>;
81*6494e4f9SBiju Das		txd1-skew-psec = <0>;
82*6494e4f9SBiju Das		txd2-skew-psec = <0>;
83*6494e4f9SBiju Das		txd3-skew-psec = <0>;
84*6494e4f9SBiju Das	};
85*6494e4f9SBiju Das};
86*6494e4f9SBiju Das#endif
87*6494e4f9SBiju Das
88*6494e4f9SBiju Das&eth1 {
89*6494e4f9SBiju Das	pinctrl-0 = <&eth1_pins>;
90*6494e4f9SBiju Das	pinctrl-names = "default";
91*6494e4f9SBiju Das	phy-handle = <&phy1>;
92*6494e4f9SBiju Das	phy-mode = "rgmii-id";
93*6494e4f9SBiju Das	status = "okay";
94*6494e4f9SBiju Das
95*6494e4f9SBiju Das	phy1: ethernet-phy@7 {
96*6494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
97*6494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
98*6494e4f9SBiju Das		reg = <7>;
99*6494e4f9SBiju Das		rxc-skew-psec = <2400>;
100*6494e4f9SBiju Das		txc-skew-psec = <2400>;
101*6494e4f9SBiju Das		rxdv-skew-psec = <0>;
102*6494e4f9SBiju Das		txdv-skew-psec = <0>;
103*6494e4f9SBiju Das		rxd0-skew-psec = <0>;
104*6494e4f9SBiju Das		rxd1-skew-psec = <0>;
105*6494e4f9SBiju Das		rxd2-skew-psec = <0>;
106*6494e4f9SBiju Das		rxd3-skew-psec = <0>;
107*6494e4f9SBiju Das		txd0-skew-psec = <0>;
108*6494e4f9SBiju Das		txd1-skew-psec = <0>;
109*6494e4f9SBiju Das		txd2-skew-psec = <0>;
110*6494e4f9SBiju Das		txd3-skew-psec = <0>;
111*6494e4f9SBiju Das	};
112*6494e4f9SBiju Das};
113*6494e4f9SBiju Das
114895199bcSBiju Das&extal_clk {
115895199bcSBiju Das	clock-frequency = <24000000>;
116895199bcSBiju Das};
117ed8efe50SBiju Das
118ed8efe50SBiju Das&pinctrl {
119*6494e4f9SBiju Das	eth0_pins: eth0 {
120*6494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */
121*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */
122*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */
123*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 0, 1)>, /* ET0_TXC */
124*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */
125*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */
126*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */
127*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */
128*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */
129*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */
130*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */
131*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */
132*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */
133*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */
134*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 1, 1)>; /* ET0_RXD3 */
135*6494e4f9SBiju Das	};
136*6494e4f9SBiju Das
137*6494e4f9SBiju Das	eth1_pins: eth1 {
138*6494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */
139*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */
140*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */
141*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 0, 1)>, /* ET1_TXC */
142*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */
143*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */
144*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */
145*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */
146*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */
147*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */
148*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */
149*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */
150*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */
151*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */
152*6494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 0, 1)>; /* ET1_RXD3 */
153*6494e4f9SBiju Das	};
154*6494e4f9SBiju Das
155ed8efe50SBiju Das	sdhi0_emmc_pins: sd0emmc {
156ed8efe50SBiju Das		sd0_emmc_data {
157ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
158ed8efe50SBiju Das			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
159ed8efe50SBiju Das			power-source = <1800>;
160ed8efe50SBiju Das		};
161ed8efe50SBiju Das
162ed8efe50SBiju Das		sd0_emmc_ctrl {
163ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
164ed8efe50SBiju Das			power-source = <1800>;
165ed8efe50SBiju Das		};
166ed8efe50SBiju Das
167ed8efe50SBiju Das		sd0_emmc_rst {
168ed8efe50SBiju Das			pins = "SD0_RST#";
169ed8efe50SBiju Das			power-source = <1800>;
170ed8efe50SBiju Das		};
171ed8efe50SBiju Das	};
172ed8efe50SBiju Das
173ed8efe50SBiju Das	sdhi0_pins: sd0 {
174ed8efe50SBiju Das		sd0_data {
175ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
176ed8efe50SBiju Das			power-source = <3300>;
177ed8efe50SBiju Das		};
178ed8efe50SBiju Das
179ed8efe50SBiju Das		sd0_ctrl {
180ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
181ed8efe50SBiju Das			power-source = <3300>;
182ed8efe50SBiju Das		};
183ed8efe50SBiju Das
184ed8efe50SBiju Das		sd0_mux {
185ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
186ed8efe50SBiju Das		};
187ed8efe50SBiju Das	};
188ed8efe50SBiju Das
189ed8efe50SBiju Das	sdhi0_pins_uhs: sd0_uhs {
190ed8efe50SBiju Das		sd0_data_uhs {
191ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
192ed8efe50SBiju Das			power-source = <1800>;
193ed8efe50SBiju Das		};
194ed8efe50SBiju Das
195ed8efe50SBiju Das		sd0_ctrl_uhs {
196ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
197ed8efe50SBiju Das			power-source = <1800>;
198ed8efe50SBiju Das		};
199ed8efe50SBiju Das
200ed8efe50SBiju Das		sd0_mux_uhs {
201ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
202ed8efe50SBiju Das		};
203ed8efe50SBiju Das	};
204ed8efe50SBiju Das};
205ed8efe50SBiju Das
206ed8efe50SBiju Das#if (SW_SW0_DEV_SEL)
207ed8efe50SBiju Das&sdhi0 {
208ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_emmc_pins>;
209ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_emmc_pins>;
210ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
211ed8efe50SBiju Das
212ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
213ed8efe50SBiju Das	vqmmc-supply = <&reg_1p8v>;
214ed8efe50SBiju Das	bus-width = <8>;
215ed8efe50SBiju Das	mmc-hs200-1_8v;
216ed8efe50SBiju Das	non-removable;
217ed8efe50SBiju Das	fixed-emmc-driver-type = <1>;
218ed8efe50SBiju Das	status = "okay";
219ed8efe50SBiju Das};
220ed8efe50SBiju Das#else
221ed8efe50SBiju Das&sdhi0 {
222ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_pins>;
223ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_pins_uhs>;
224ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
225ed8efe50SBiju Das
226ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
227ed8efe50SBiju Das	vqmmc-supply = <&vccq_sdhi0>;
228ed8efe50SBiju Das	bus-width = <4>;
229ed8efe50SBiju Das	sd-uhs-sdr50;
230ed8efe50SBiju Das	sd-uhs-sdr104;
231ed8efe50SBiju Das	status = "okay";
232ed8efe50SBiju Das};
233ed8efe50SBiju Das#endif
234