xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/rzg2ul-smarc-som.dtsi (revision f4673e52dbab9d890d236ed75264653bcd43bac1)
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>
9*f4673e52SLad Prabhakar#include <dt-bindings/interrupt-controller/irqc-rzg2l.h>
10895199bcSBiju Das#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
11895199bcSBiju Das
12895199bcSBiju Das/ {
136494e4f9SBiju Das	aliases {
146494e4f9SBiju Das		ethernet0 = &eth0;
156494e4f9SBiju Das		ethernet1 = &eth1;
166494e4f9SBiju Das	};
176494e4f9SBiju Das
18895199bcSBiju Das	chosen {
196494e4f9SBiju Das		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
20895199bcSBiju Das	};
21895199bcSBiju Das
22895199bcSBiju Das	memory@48000000 {
23895199bcSBiju Das		device_type = "memory";
24895199bcSBiju Das		/* first 128MB is reserved for secure area. */
25895199bcSBiju Das		reg = <0x0 0x48000000 0x0 0x38000000>;
26895199bcSBiju Das	};
27a74a0bf3SBiju Das
285cf12ac9SGeert Uytterhoeven	reg_1p8v: regulator-1p8v {
29ed8efe50SBiju Das		compatible = "regulator-fixed";
30ed8efe50SBiju Das		regulator-name = "fixed-1.8V";
31ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
32ed8efe50SBiju Das		regulator-max-microvolt = <1800000>;
33ed8efe50SBiju Das		regulator-boot-on;
34ed8efe50SBiju Das		regulator-always-on;
35ed8efe50SBiju Das	};
36ed8efe50SBiju Das
375cf12ac9SGeert Uytterhoeven	reg_3p3v: regulator-3p3v {
38a74a0bf3SBiju Das		compatible = "regulator-fixed";
39a74a0bf3SBiju Das		regulator-name = "fixed-3.3V";
40a74a0bf3SBiju Das		regulator-min-microvolt = <3300000>;
41a74a0bf3SBiju Das		regulator-max-microvolt = <3300000>;
42a74a0bf3SBiju Das		regulator-boot-on;
43a74a0bf3SBiju Das		regulator-always-on;
44a74a0bf3SBiju Das	};
45ed8efe50SBiju Das
46ed8efe50SBiju Das#if !(SW_SW0_DEV_SEL)
47ed8efe50SBiju Das	vccq_sdhi0: regulator-vccq-sdhi0 {
48ed8efe50SBiju Das		compatible = "regulator-gpio";
49ed8efe50SBiju Das
50ed8efe50SBiju Das		regulator-name = "SDHI0 VccQ";
51ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
52ed8efe50SBiju Das		regulator-max-microvolt = <3300000>;
53ed8efe50SBiju Das		states = <3300000 1>, <1800000 0>;
54ed8efe50SBiju Das		regulator-boot-on;
55ed8efe50SBiju Das		gpios = <&pinctrl RZG2L_GPIO(6, 2) GPIO_ACTIVE_HIGH>;
56ed8efe50SBiju Das		regulator-always-on;
57ed8efe50SBiju Das	};
58ed8efe50SBiju Das#endif
59895199bcSBiju Das};
60895199bcSBiju Das
6152271d32SBiju Das#if (SW_SW0_DEV_SEL)
6252271d32SBiju Das&adc {
6352271d32SBiju Das	pinctrl-0 = <&adc_pins>;
6452271d32SBiju Das	pinctrl-names = "default";
6552271d32SBiju Das	status = "okay";
6652271d32SBiju Das};
6752271d32SBiju Das#endif
6852271d32SBiju Das
696494e4f9SBiju Das#if (!SW_ET0_EN_N)
706494e4f9SBiju Das&eth0 {
716494e4f9SBiju Das	pinctrl-0 = <&eth0_pins>;
726494e4f9SBiju Das	pinctrl-names = "default";
736494e4f9SBiju Das	phy-handle = <&phy0>;
746494e4f9SBiju Das	phy-mode = "rgmii-id";
756494e4f9SBiju Das	status = "okay";
766494e4f9SBiju Das
776494e4f9SBiju Das	phy0: ethernet-phy@7 {
786494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
796494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
806494e4f9SBiju Das		reg = <7>;
81*f4673e52SLad Prabhakar		interrupt-parent = <&irqc>;
82*f4673e52SLad Prabhakar		interrupts = <RZG2L_IRQ2 IRQ_TYPE_LEVEL_LOW>;
836494e4f9SBiju Das		rxc-skew-psec = <2400>;
846494e4f9SBiju Das		txc-skew-psec = <2400>;
856494e4f9SBiju Das		rxdv-skew-psec = <0>;
866494e4f9SBiju Das		txdv-skew-psec = <0>;
876494e4f9SBiju Das		rxd0-skew-psec = <0>;
886494e4f9SBiju Das		rxd1-skew-psec = <0>;
896494e4f9SBiju Das		rxd2-skew-psec = <0>;
906494e4f9SBiju Das		rxd3-skew-psec = <0>;
916494e4f9SBiju Das		txd0-skew-psec = <0>;
926494e4f9SBiju Das		txd1-skew-psec = <0>;
936494e4f9SBiju Das		txd2-skew-psec = <0>;
946494e4f9SBiju Das		txd3-skew-psec = <0>;
956494e4f9SBiju Das	};
966494e4f9SBiju Das};
976494e4f9SBiju Das#endif
986494e4f9SBiju Das
996494e4f9SBiju Das&eth1 {
1006494e4f9SBiju Das	pinctrl-0 = <&eth1_pins>;
1016494e4f9SBiju Das	pinctrl-names = "default";
1026494e4f9SBiju Das	phy-handle = <&phy1>;
1036494e4f9SBiju Das	phy-mode = "rgmii-id";
1046494e4f9SBiju Das	status = "okay";
1056494e4f9SBiju Das
1066494e4f9SBiju Das	phy1: ethernet-phy@7 {
1076494e4f9SBiju Das		compatible = "ethernet-phy-id0022.1640",
1086494e4f9SBiju Das			     "ethernet-phy-ieee802.3-c22";
1096494e4f9SBiju Das		reg = <7>;
110*f4673e52SLad Prabhakar		interrupt-parent = <&irqc>;
111*f4673e52SLad Prabhakar		interrupts = <RZG2L_IRQ7 IRQ_TYPE_LEVEL_LOW>;
1126494e4f9SBiju Das		rxc-skew-psec = <2400>;
1136494e4f9SBiju Das		txc-skew-psec = <2400>;
1146494e4f9SBiju Das		rxdv-skew-psec = <0>;
1156494e4f9SBiju Das		txdv-skew-psec = <0>;
1166494e4f9SBiju Das		rxd0-skew-psec = <0>;
1176494e4f9SBiju Das		rxd1-skew-psec = <0>;
1186494e4f9SBiju Das		rxd2-skew-psec = <0>;
1196494e4f9SBiju Das		rxd3-skew-psec = <0>;
1206494e4f9SBiju Das		txd0-skew-psec = <0>;
1216494e4f9SBiju Das		txd1-skew-psec = <0>;
1226494e4f9SBiju Das		txd2-skew-psec = <0>;
1236494e4f9SBiju Das		txd3-skew-psec = <0>;
1246494e4f9SBiju Das	};
1256494e4f9SBiju Das};
1266494e4f9SBiju Das
127895199bcSBiju Das&extal_clk {
128895199bcSBiju Das	clock-frequency = <24000000>;
129895199bcSBiju Das};
130ed8efe50SBiju Das
1310b3e18dbSBiju Das&ostm1 {
1320b3e18dbSBiju Das	status = "okay";
1330b3e18dbSBiju Das};
1340b3e18dbSBiju Das
1350b3e18dbSBiju Das&ostm2 {
1360b3e18dbSBiju Das	status = "okay";
1370b3e18dbSBiju Das};
1380b3e18dbSBiju Das
139ed8efe50SBiju Das&pinctrl {
14052271d32SBiju Das	adc_pins: adc {
14152271d32SBiju Das		pinmux = <RZG2L_PORT_PINMUX(6, 2, 1)>; /* ADC_TRG */
14252271d32SBiju Das	};
14352271d32SBiju Das
1446494e4f9SBiju Das	eth0_pins: eth0 {
1456494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */
1466494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */
1476494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */
1486494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 0, 1)>, /* ET0_TXC */
1496494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */
1506494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */
1516494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */
1526494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */
1536494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */
1546494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */
1556494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */
1566494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */
1576494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */
1586494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */
159*f4673e52SLad Prabhakar			 <RZG2L_PORT_PINMUX(4, 1, 1)>, /* ET0_RXD3 */
160*f4673e52SLad Prabhakar			 <RZG2L_PORT_PINMUX(5, 1, 7)>; /* IRQ2 */
1616494e4f9SBiju Das	};
1626494e4f9SBiju Das
1636494e4f9SBiju Das	eth1_pins: eth1 {
1646494e4f9SBiju Das		pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */
1656494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */
1666494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */
1676494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 0, 1)>, /* ET1_TXC */
1686494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */
1696494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */
1706494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */
1716494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */
1726494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */
1736494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */
1746494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */
1756494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */
1766494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */
1776494e4f9SBiju Das			 <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */
178*f4673e52SLad Prabhakar			 <RZG2L_PORT_PINMUX(10, 0, 1)>, /* ET1_RXD3 */
179*f4673e52SLad Prabhakar			 <RZG2L_PORT_PINMUX(18, 5, 1)>; /* IRQ7 */
1806494e4f9SBiju Das	};
1816494e4f9SBiju Das
182ed8efe50SBiju Das	sdhi0_emmc_pins: sd0emmc {
183ed8efe50SBiju Das		sd0_emmc_data {
184ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
185ed8efe50SBiju Das			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
186ed8efe50SBiju Das			power-source = <1800>;
187ed8efe50SBiju Das		};
188ed8efe50SBiju Das
189ed8efe50SBiju Das		sd0_emmc_ctrl {
190ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
191ed8efe50SBiju Das			power-source = <1800>;
192ed8efe50SBiju Das		};
193ed8efe50SBiju Das
194ed8efe50SBiju Das		sd0_emmc_rst {
195ed8efe50SBiju Das			pins = "SD0_RST#";
196ed8efe50SBiju Das			power-source = <1800>;
197ed8efe50SBiju Das		};
198ed8efe50SBiju Das	};
199ed8efe50SBiju Das
200ed8efe50SBiju Das	sdhi0_pins: sd0 {
201ed8efe50SBiju Das		sd0_data {
202ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
203ed8efe50SBiju Das			power-source = <3300>;
204ed8efe50SBiju Das		};
205ed8efe50SBiju Das
206ed8efe50SBiju Das		sd0_ctrl {
207ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
208ed8efe50SBiju Das			power-source = <3300>;
209ed8efe50SBiju Das		};
210ed8efe50SBiju Das
211ed8efe50SBiju Das		sd0_mux {
212ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
213ed8efe50SBiju Das		};
214ed8efe50SBiju Das	};
215ed8efe50SBiju Das
216ed8efe50SBiju Das	sdhi0_pins_uhs: sd0_uhs {
217ed8efe50SBiju Das		sd0_data_uhs {
218ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
219ed8efe50SBiju Das			power-source = <1800>;
220ed8efe50SBiju Das		};
221ed8efe50SBiju Das
222ed8efe50SBiju Das		sd0_ctrl_uhs {
223ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
224ed8efe50SBiju Das			power-source = <1800>;
225ed8efe50SBiju Das		};
226ed8efe50SBiju Das
227ed8efe50SBiju Das		sd0_mux_uhs {
228ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
229ed8efe50SBiju Das		};
230ed8efe50SBiju Das	};
231ed8efe50SBiju Das};
232ed8efe50SBiju Das
233ed8efe50SBiju Das#if (SW_SW0_DEV_SEL)
234ed8efe50SBiju Das&sdhi0 {
235ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_emmc_pins>;
236ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_emmc_pins>;
237ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
238ed8efe50SBiju Das
239ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
240ed8efe50SBiju Das	vqmmc-supply = <&reg_1p8v>;
241ed8efe50SBiju Das	bus-width = <8>;
242ed8efe50SBiju Das	mmc-hs200-1_8v;
243ed8efe50SBiju Das	non-removable;
244ed8efe50SBiju Das	fixed-emmc-driver-type = <1>;
245ed8efe50SBiju Das	status = "okay";
246ed8efe50SBiju Das};
247ed8efe50SBiju Das#else
248ed8efe50SBiju Das&sdhi0 {
249ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_pins>;
250ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_pins_uhs>;
251ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
252ed8efe50SBiju Das
253ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
254ed8efe50SBiju Das	vqmmc-supply = <&vccq_sdhi0>;
255ed8efe50SBiju Das	bus-width = <4>;
256ed8efe50SBiju Das	sd-uhs-sdr50;
257ed8efe50SBiju Das	sd-uhs-sdr104;
258ed8efe50SBiju Das	status = "okay";
259ed8efe50SBiju Das};
260ed8efe50SBiju Das#endif
2613f67af66SBiju Das
2623f67af66SBiju Das&wdt0 {
2633f67af66SBiju Das	status = "okay";
2643f67af66SBiju Das	timeout-sec = <60>;
2653f67af66SBiju Das};
266