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 = ð0; 146494e4f9SBiju Das ethernet1 = ð1; 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 60*52271d32SBiju Das#if (SW_SW0_DEV_SEL) 61*52271d32SBiju Das&adc { 62*52271d32SBiju Das pinctrl-0 = <&adc_pins>; 63*52271d32SBiju Das pinctrl-names = "default"; 64*52271d32SBiju Das status = "okay"; 65*52271d32SBiju Das}; 66*52271d32SBiju Das#endif 67*52271d32SBiju Das 686494e4f9SBiju Das#if (!SW_ET0_EN_N) 696494e4f9SBiju Dasð0 { 706494e4f9SBiju Das pinctrl-0 = <ð0_pins>; 716494e4f9SBiju Das pinctrl-names = "default"; 726494e4f9SBiju Das phy-handle = <&phy0>; 736494e4f9SBiju Das phy-mode = "rgmii-id"; 746494e4f9SBiju Das status = "okay"; 756494e4f9SBiju Das 766494e4f9SBiju Das phy0: ethernet-phy@7 { 776494e4f9SBiju Das compatible = "ethernet-phy-id0022.1640", 786494e4f9SBiju Das "ethernet-phy-ieee802.3-c22"; 796494e4f9SBiju Das reg = <7>; 806494e4f9SBiju Das rxc-skew-psec = <2400>; 816494e4f9SBiju Das txc-skew-psec = <2400>; 826494e4f9SBiju Das rxdv-skew-psec = <0>; 836494e4f9SBiju Das txdv-skew-psec = <0>; 846494e4f9SBiju Das rxd0-skew-psec = <0>; 856494e4f9SBiju Das rxd1-skew-psec = <0>; 866494e4f9SBiju Das rxd2-skew-psec = <0>; 876494e4f9SBiju Das rxd3-skew-psec = <0>; 886494e4f9SBiju Das txd0-skew-psec = <0>; 896494e4f9SBiju Das txd1-skew-psec = <0>; 906494e4f9SBiju Das txd2-skew-psec = <0>; 916494e4f9SBiju Das txd3-skew-psec = <0>; 926494e4f9SBiju Das }; 936494e4f9SBiju Das}; 946494e4f9SBiju Das#endif 956494e4f9SBiju Das 966494e4f9SBiju Dasð1 { 976494e4f9SBiju Das pinctrl-0 = <ð1_pins>; 986494e4f9SBiju Das pinctrl-names = "default"; 996494e4f9SBiju Das phy-handle = <&phy1>; 1006494e4f9SBiju Das phy-mode = "rgmii-id"; 1016494e4f9SBiju Das status = "okay"; 1026494e4f9SBiju Das 1036494e4f9SBiju Das phy1: ethernet-phy@7 { 1046494e4f9SBiju Das compatible = "ethernet-phy-id0022.1640", 1056494e4f9SBiju Das "ethernet-phy-ieee802.3-c22"; 1066494e4f9SBiju Das reg = <7>; 1076494e4f9SBiju Das rxc-skew-psec = <2400>; 1086494e4f9SBiju Das txc-skew-psec = <2400>; 1096494e4f9SBiju Das rxdv-skew-psec = <0>; 1106494e4f9SBiju Das txdv-skew-psec = <0>; 1116494e4f9SBiju Das rxd0-skew-psec = <0>; 1126494e4f9SBiju Das rxd1-skew-psec = <0>; 1136494e4f9SBiju Das rxd2-skew-psec = <0>; 1146494e4f9SBiju Das rxd3-skew-psec = <0>; 1156494e4f9SBiju Das txd0-skew-psec = <0>; 1166494e4f9SBiju Das txd1-skew-psec = <0>; 1176494e4f9SBiju Das txd2-skew-psec = <0>; 1186494e4f9SBiju Das txd3-skew-psec = <0>; 1196494e4f9SBiju Das }; 1206494e4f9SBiju Das}; 1216494e4f9SBiju Das 122895199bcSBiju Das&extal_clk { 123895199bcSBiju Das clock-frequency = <24000000>; 124895199bcSBiju Das}; 125ed8efe50SBiju Das 1260b3e18dbSBiju Das&ostm1 { 1270b3e18dbSBiju Das status = "okay"; 1280b3e18dbSBiju Das}; 1290b3e18dbSBiju Das 1300b3e18dbSBiju Das&ostm2 { 1310b3e18dbSBiju Das status = "okay"; 1320b3e18dbSBiju Das}; 1330b3e18dbSBiju Das 134ed8efe50SBiju Das&pinctrl { 135*52271d32SBiju Das adc_pins: adc { 136*52271d32SBiju Das pinmux = <RZG2L_PORT_PINMUX(6, 2, 1)>; /* ADC_TRG */ 137*52271d32SBiju Das }; 138*52271d32SBiju Das 1396494e4f9SBiju Das eth0_pins: eth0 { 1406494e4f9SBiju Das pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */ 1416494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */ 1426494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */ 1436494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 0, 1)>, /* ET0_TXC */ 1446494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */ 1456494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */ 1466494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */ 1476494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */ 1486494e4f9SBiju Das <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */ 1496494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */ 1506494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */ 1516494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */ 1526494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */ 1536494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */ 1546494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 1, 1)>; /* ET0_RXD3 */ 1556494e4f9SBiju Das }; 1566494e4f9SBiju Das 1576494e4f9SBiju Das eth1_pins: eth1 { 1586494e4f9SBiju Das pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */ 1596494e4f9SBiju Das <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */ 1606494e4f9SBiju Das <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */ 1616494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 0, 1)>, /* ET1_TXC */ 1626494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */ 1636494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */ 1646494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */ 1656494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */ 1666494e4f9SBiju Das <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */ 1676494e4f9SBiju Das <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */ 1686494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */ 1696494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */ 1706494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */ 1716494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */ 1726494e4f9SBiju Das <RZG2L_PORT_PINMUX(10, 0, 1)>; /* ET1_RXD3 */ 1736494e4f9SBiju Das }; 1746494e4f9SBiju Das 175ed8efe50SBiju Das sdhi0_emmc_pins: sd0emmc { 176ed8efe50SBiju Das sd0_emmc_data { 177ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3", 178ed8efe50SBiju Das "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7"; 179ed8efe50SBiju Das power-source = <1800>; 180ed8efe50SBiju Das }; 181ed8efe50SBiju Das 182ed8efe50SBiju Das sd0_emmc_ctrl { 183ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 184ed8efe50SBiju Das power-source = <1800>; 185ed8efe50SBiju Das }; 186ed8efe50SBiju Das 187ed8efe50SBiju Das sd0_emmc_rst { 188ed8efe50SBiju Das pins = "SD0_RST#"; 189ed8efe50SBiju Das power-source = <1800>; 190ed8efe50SBiju Das }; 191ed8efe50SBiju Das }; 192ed8efe50SBiju Das 193ed8efe50SBiju Das sdhi0_pins: sd0 { 194ed8efe50SBiju Das sd0_data { 195ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; 196ed8efe50SBiju Das power-source = <3300>; 197ed8efe50SBiju Das }; 198ed8efe50SBiju Das 199ed8efe50SBiju Das sd0_ctrl { 200ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 201ed8efe50SBiju Das power-source = <3300>; 202ed8efe50SBiju Das }; 203ed8efe50SBiju Das 204ed8efe50SBiju Das sd0_mux { 205ed8efe50SBiju Das pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */ 206ed8efe50SBiju Das }; 207ed8efe50SBiju Das }; 208ed8efe50SBiju Das 209ed8efe50SBiju Das sdhi0_pins_uhs: sd0_uhs { 210ed8efe50SBiju Das sd0_data_uhs { 211ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; 212ed8efe50SBiju Das power-source = <1800>; 213ed8efe50SBiju Das }; 214ed8efe50SBiju Das 215ed8efe50SBiju Das sd0_ctrl_uhs { 216ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 217ed8efe50SBiju Das power-source = <1800>; 218ed8efe50SBiju Das }; 219ed8efe50SBiju Das 220ed8efe50SBiju Das sd0_mux_uhs { 221ed8efe50SBiju Das pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */ 222ed8efe50SBiju Das }; 223ed8efe50SBiju Das }; 224ea25b183SBiju Das 225ea25b183SBiju Das spi1_pins: rspi1 { 226ea25b183SBiju Das pinmux = <RZG2L_PORT_PINMUX(4, 0, 2)>, /* CK */ 227ea25b183SBiju Das <RZG2L_PORT_PINMUX(4, 1, 2)>, /* MOSI */ 228ea25b183SBiju Das <RZG2L_PORT_PINMUX(4, 2, 2)>, /* MISO */ 229ea25b183SBiju Das <RZG2L_PORT_PINMUX(4, 3, 2)>; /* SSL */ 230ea25b183SBiju 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 = <®_3p3v>; 240ed8efe50SBiju Das vqmmc-supply = <®_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 = <®_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}; 2663f67af66SBiju Das 2673f67af66SBiju Das&wdt2 { 2683f67af66SBiju Das status = "okay"; 2693f67af66SBiju Das timeout-sec = <60>; 2703f67af66SBiju Das}; 271