xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/rzg2ul-smarc-som.dtsi (revision ea25b1836f57e91e2432b315727fc3f3b8c92872)
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/ {
126494e4f9SBiju Das	aliases {
136494e4f9SBiju Das		ethernet0 = &eth0;
146494e4f9SBiju Das		ethernet1 = &eth1;
156494e4f9SBiju Das	};
166494e4f9SBiju Das
17895199bcSBiju Das	chosen {
186494e4f9SBiju 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
275cf12ac9SGeert Uytterhoeven	reg_1p8v: regulator-1p8v {
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
365cf12ac9SGeert Uytterhoeven	reg_3p3v: regulator-3p3v {
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
606494e4f9SBiju Das#if (!SW_ET0_EN_N)
616494e4f9SBiju Das&eth0 {
626494e4f9SBiju Das	pinctrl-0 = <&eth0_pins>;
636494e4f9SBiju Das	pinctrl-names = "default";
646494e4f9SBiju Das	phy-handle = <&phy0>;
656494e4f9SBiju Das	phy-mode = "rgmii-id";
666494e4f9SBiju Das	status = "okay";
676494e4f9SBiju Das
686494e4f9SBiju Das	phy0: ethernet-phy@7 {
696494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
706494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
716494e4f9SBiju Das		reg = <7>;
726494e4f9SBiju Das		rxc-skew-psec = <2400>;
736494e4f9SBiju Das		txc-skew-psec = <2400>;
746494e4f9SBiju Das		rxdv-skew-psec = <0>;
756494e4f9SBiju Das		txdv-skew-psec = <0>;
766494e4f9SBiju Das		rxd0-skew-psec = <0>;
776494e4f9SBiju Das		rxd1-skew-psec = <0>;
786494e4f9SBiju Das		rxd2-skew-psec = <0>;
796494e4f9SBiju Das		rxd3-skew-psec = <0>;
806494e4f9SBiju Das		txd0-skew-psec = <0>;
816494e4f9SBiju Das		txd1-skew-psec = <0>;
826494e4f9SBiju Das		txd2-skew-psec = <0>;
836494e4f9SBiju Das		txd3-skew-psec = <0>;
846494e4f9SBiju Das	};
856494e4f9SBiju Das};
866494e4f9SBiju Das#endif
876494e4f9SBiju Das
886494e4f9SBiju Das&eth1 {
896494e4f9SBiju Das	pinctrl-0 = <&eth1_pins>;
906494e4f9SBiju Das	pinctrl-names = "default";
916494e4f9SBiju Das	phy-handle = <&phy1>;
926494e4f9SBiju Das	phy-mode = "rgmii-id";
936494e4f9SBiju Das	status = "okay";
946494e4f9SBiju Das
956494e4f9SBiju Das	phy1: ethernet-phy@7 {
966494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
976494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
986494e4f9SBiju Das		reg = <7>;
996494e4f9SBiju Das		rxc-skew-psec = <2400>;
1006494e4f9SBiju Das		txc-skew-psec = <2400>;
1016494e4f9SBiju Das		rxdv-skew-psec = <0>;
1026494e4f9SBiju Das		txdv-skew-psec = <0>;
1036494e4f9SBiju Das		rxd0-skew-psec = <0>;
1046494e4f9SBiju Das		rxd1-skew-psec = <0>;
1056494e4f9SBiju Das		rxd2-skew-psec = <0>;
1066494e4f9SBiju Das		rxd3-skew-psec = <0>;
1076494e4f9SBiju Das		txd0-skew-psec = <0>;
1086494e4f9SBiju Das		txd1-skew-psec = <0>;
1096494e4f9SBiju Das		txd2-skew-psec = <0>;
1106494e4f9SBiju Das		txd3-skew-psec = <0>;
1116494e4f9SBiju Das	};
1126494e4f9SBiju Das};
1136494e4f9SBiju Das
114895199bcSBiju Das&extal_clk {
115895199bcSBiju Das	clock-frequency = <24000000>;
116895199bcSBiju Das};
117ed8efe50SBiju Das
1180b3e18dbSBiju Das&ostm1 {
1190b3e18dbSBiju Das	status = "okay";
1200b3e18dbSBiju Das};
1210b3e18dbSBiju Das
1220b3e18dbSBiju Das&ostm2 {
1230b3e18dbSBiju Das	status = "okay";
1240b3e18dbSBiju Das};
1250b3e18dbSBiju Das
126ed8efe50SBiju Das&pinctrl {
1276494e4f9SBiju Das	eth0_pins: eth0 {
1286494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */
1296494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */
1306494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */
1316494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 0, 1)>, /* ET0_TXC */
1326494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */
1336494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */
1346494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */
1356494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */
1366494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */
1376494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */
1386494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */
1396494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */
1406494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */
1416494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */
1426494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 1, 1)>; /* ET0_RXD3 */
1436494e4f9SBiju Das	};
1446494e4f9SBiju Das
1456494e4f9SBiju Das	eth1_pins: eth1 {
1466494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */
1476494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */
1486494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */
1496494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 0, 1)>, /* ET1_TXC */
1506494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */
1516494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */
1526494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */
1536494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */
1546494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */
1556494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */
1566494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */
1576494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */
1586494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */
1596494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */
1606494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 0, 1)>; /* ET1_RXD3 */
1616494e4f9SBiju Das	};
1626494e4f9SBiju Das
163ed8efe50SBiju Das	sdhi0_emmc_pins: sd0emmc {
164ed8efe50SBiju Das		sd0_emmc_data {
165ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
166ed8efe50SBiju Das			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
167ed8efe50SBiju Das			power-source = <1800>;
168ed8efe50SBiju Das		};
169ed8efe50SBiju Das
170ed8efe50SBiju Das		sd0_emmc_ctrl {
171ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
172ed8efe50SBiju Das			power-source = <1800>;
173ed8efe50SBiju Das		};
174ed8efe50SBiju Das
175ed8efe50SBiju Das		sd0_emmc_rst {
176ed8efe50SBiju Das			pins = "SD0_RST#";
177ed8efe50SBiju Das			power-source = <1800>;
178ed8efe50SBiju Das		};
179ed8efe50SBiju Das	};
180ed8efe50SBiju Das
181ed8efe50SBiju Das	sdhi0_pins: sd0 {
182ed8efe50SBiju Das		sd0_data {
183ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
184ed8efe50SBiju Das			power-source = <3300>;
185ed8efe50SBiju Das		};
186ed8efe50SBiju Das
187ed8efe50SBiju Das		sd0_ctrl {
188ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
189ed8efe50SBiju Das			power-source = <3300>;
190ed8efe50SBiju Das		};
191ed8efe50SBiju Das
192ed8efe50SBiju Das		sd0_mux {
193ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
194ed8efe50SBiju Das		};
195ed8efe50SBiju Das	};
196ed8efe50SBiju Das
197ed8efe50SBiju Das	sdhi0_pins_uhs: sd0_uhs {
198ed8efe50SBiju Das		sd0_data_uhs {
199ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
200ed8efe50SBiju Das			power-source = <1800>;
201ed8efe50SBiju Das		};
202ed8efe50SBiju Das
203ed8efe50SBiju Das		sd0_ctrl_uhs {
204ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
205ed8efe50SBiju Das			power-source = <1800>;
206ed8efe50SBiju Das		};
207ed8efe50SBiju Das
208ed8efe50SBiju Das		sd0_mux_uhs {
209ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
210ed8efe50SBiju Das		};
211ed8efe50SBiju Das	};
212*ea25b183SBiju Das
213*ea25b183SBiju Das	spi1_pins: rspi1 {
214*ea25b183SBiju Das		pinmux = <RZG2L_PORT_PINMUX(4, 0, 2)>, /* CK */
215*ea25b183SBiju Das			 <RZG2L_PORT_PINMUX(4, 1, 2)>, /* MOSI */
216*ea25b183SBiju Das			 <RZG2L_PORT_PINMUX(4, 2, 2)>, /* MISO */
217*ea25b183SBiju Das			 <RZG2L_PORT_PINMUX(4, 3, 2)>; /* SSL */
218*ea25b183SBiju Das	};
219ed8efe50SBiju Das};
220ed8efe50SBiju Das
221ed8efe50SBiju Das#if (SW_SW0_DEV_SEL)
222ed8efe50SBiju Das&sdhi0 {
223ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_emmc_pins>;
224ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_emmc_pins>;
225ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
226ed8efe50SBiju Das
227ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
228ed8efe50SBiju Das	vqmmc-supply = <&reg_1p8v>;
229ed8efe50SBiju Das	bus-width = <8>;
230ed8efe50SBiju Das	mmc-hs200-1_8v;
231ed8efe50SBiju Das	non-removable;
232ed8efe50SBiju Das	fixed-emmc-driver-type = <1>;
233ed8efe50SBiju Das	status = "okay";
234ed8efe50SBiju Das};
235ed8efe50SBiju Das#else
236ed8efe50SBiju Das&sdhi0 {
237ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_pins>;
238ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_pins_uhs>;
239ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
240ed8efe50SBiju Das
241ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
242ed8efe50SBiju Das	vqmmc-supply = <&vccq_sdhi0>;
243ed8efe50SBiju Das	bus-width = <4>;
244ed8efe50SBiju Das	sd-uhs-sdr50;
245ed8efe50SBiju Das	sd-uhs-sdr104;
246ed8efe50SBiju Das	status = "okay";
247ed8efe50SBiju Das};
248ed8efe50SBiju Das#endif
2493f67af66SBiju Das
2503f67af66SBiju Das&wdt0 {
2513f67af66SBiju Das	status = "okay";
2523f67af66SBiju Das	timeout-sec = <60>;
2533f67af66SBiju Das};
2543f67af66SBiju Das
2553f67af66SBiju Das&wdt2 {
2563f67af66SBiju Das	status = "okay";
2573f67af66SBiju Das	timeout-sec = <60>;
2583f67af66SBiju Das};
259