xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/rzg2ul-smarc-som.dtsi (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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>
9f4673e52SLad 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>;
81f4673e52SLad Prabhakar		interrupt-parent = <&irqc>;
82f4673e52SLad 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>;
86db673457SChris Paterson		txen-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>;
110f4673e52SLad Prabhakar		interrupt-parent = <&irqc>;
111f4673e52SLad 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>;
115db673457SChris Paterson		txen-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 {
14573302ad1SPaul Barker		txc {
14673302ad1SPaul Barker			pinmux = <RZG2L_PORT_PINMUX(1, 0, 1)>; /* ET0_TXC */
147*d9812149SPaul Barker			power-source = <1800>;
14873302ad1SPaul Barker			output-enable;
14973302ad1SPaul Barker		};
15073302ad1SPaul Barker
15173302ad1SPaul Barker		mux {
1526494e4f9SBiju Das			pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */
1536494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */
1546494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */
1556494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */
1566494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */
1576494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */
1586494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */
1596494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */
1606494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */
1616494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */
1626494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */
1636494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */
1646494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */
165*d9812149SPaul Barker				 <RZG2L_PORT_PINMUX(4, 1, 1)>; /* ET0_RXD3 */
166*d9812149SPaul Barker			power-source = <1800>;
167*d9812149SPaul Barker		};
168*d9812149SPaul Barker
169*d9812149SPaul Barker		irq {
170*d9812149SPaul Barker			pinmux = <RZG2L_PORT_PINMUX(5, 1, 7)>; /* IRQ2 */
1716494e4f9SBiju Das		};
17273302ad1SPaul Barker	};
1736494e4f9SBiju Das
1746494e4f9SBiju Das	eth1_pins: eth1 {
17573302ad1SPaul Barker		txc {
17673302ad1SPaul Barker			pinmux = <RZG2L_PORT_PINMUX(7, 0, 1)>; /* ET1_TXC */
177*d9812149SPaul Barker			power-source = <1800>;
17873302ad1SPaul Barker			output-enable;
17973302ad1SPaul Barker		};
18073302ad1SPaul Barker
18173302ad1SPaul Barker		mux {
1826494e4f9SBiju Das			pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */
1836494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */
1846494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */
1856494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */
1866494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */
1876494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */
1886494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */
1896494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */
1906494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */
1916494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */
1926494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */
1936494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */
1946494e4f9SBiju Das				 <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */
195*d9812149SPaul Barker				 <RZG2L_PORT_PINMUX(10, 0, 1)>; /* ET1_RXD3 */
196*d9812149SPaul Barker			power-source = <1800>;
197*d9812149SPaul Barker		};
198*d9812149SPaul Barker
199*d9812149SPaul Barker		irq {
200*d9812149SPaul Barker			pinmux = <RZG2L_PORT_PINMUX(18, 5, 1)>; /* IRQ7 */
2016494e4f9SBiju Das		};
20273302ad1SPaul Barker	};
2036494e4f9SBiju Das
204ed8efe50SBiju Das	sdhi0_emmc_pins: sd0emmc {
205ed8efe50SBiju Das		sd0_emmc_data {
206ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
207ed8efe50SBiju Das			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
208ed8efe50SBiju Das			power-source = <1800>;
209ed8efe50SBiju Das		};
210ed8efe50SBiju Das
211ed8efe50SBiju Das		sd0_emmc_ctrl {
212ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
213ed8efe50SBiju Das			power-source = <1800>;
214ed8efe50SBiju Das		};
215ed8efe50SBiju Das
216ed8efe50SBiju Das		sd0_emmc_rst {
217ed8efe50SBiju Das			pins = "SD0_RST#";
218ed8efe50SBiju Das			power-source = <1800>;
219ed8efe50SBiju Das		};
220ed8efe50SBiju Das	};
221ed8efe50SBiju Das
222ed8efe50SBiju Das	sdhi0_pins: sd0 {
223ed8efe50SBiju Das		sd0_data {
224ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
225ed8efe50SBiju Das			power-source = <3300>;
226ed8efe50SBiju Das		};
227ed8efe50SBiju Das
228ed8efe50SBiju Das		sd0_ctrl {
229ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
230ed8efe50SBiju Das			power-source = <3300>;
231ed8efe50SBiju Das		};
232ed8efe50SBiju Das
233ed8efe50SBiju Das		sd0_mux {
234ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
235ed8efe50SBiju Das		};
236ed8efe50SBiju Das	};
237ed8efe50SBiju Das
238ed8efe50SBiju Das	sdhi0_pins_uhs: sd0_uhs {
239ed8efe50SBiju Das		sd0_data_uhs {
240ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
241ed8efe50SBiju Das			power-source = <1800>;
242ed8efe50SBiju Das		};
243ed8efe50SBiju Das
244ed8efe50SBiju Das		sd0_ctrl_uhs {
245ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
246ed8efe50SBiju Das			power-source = <1800>;
247ed8efe50SBiju Das		};
248ed8efe50SBiju Das
249ed8efe50SBiju Das		sd0_mux_uhs {
250ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
251ed8efe50SBiju Das		};
252ed8efe50SBiju Das	};
253ed8efe50SBiju Das};
254ed8efe50SBiju Das
255ed8efe50SBiju Das#if (SW_SW0_DEV_SEL)
256ed8efe50SBiju Das&sdhi0 {
257ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_emmc_pins>;
258ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_emmc_pins>;
259ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
260ed8efe50SBiju Das
261ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
262ed8efe50SBiju Das	vqmmc-supply = <&reg_1p8v>;
263ed8efe50SBiju Das	bus-width = <8>;
264ed8efe50SBiju Das	mmc-hs200-1_8v;
265ed8efe50SBiju Das	non-removable;
266ed8efe50SBiju Das	fixed-emmc-driver-type = <1>;
267ed8efe50SBiju Das	status = "okay";
268ed8efe50SBiju Das};
269ed8efe50SBiju Das#else
270ed8efe50SBiju Das&sdhi0 {
271ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_pins>;
272ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_pins_uhs>;
273ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
274ed8efe50SBiju Das
275ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
276ed8efe50SBiju Das	vqmmc-supply = <&vccq_sdhi0>;
277ed8efe50SBiju Das	bus-width = <4>;
278ed8efe50SBiju Das	sd-uhs-sdr50;
279ed8efe50SBiju Das	sd-uhs-sdr104;
280ed8efe50SBiju Das	status = "okay";
281ed8efe50SBiju Das};
282ed8efe50SBiju Das#endif
2833f67af66SBiju Das
2843f67af66SBiju Das&wdt0 {
2853f67af66SBiju Das	status = "okay";
2863f67af66SBiju Das	timeout-sec = <60>;
2873f67af66SBiju Das};
288