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 = ð0; 156494e4f9SBiju Das ethernet1 = ð1; 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ð0 { 716494e4f9SBiju Das pinctrl-0 = <ð0_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ð1 { 1006494e4f9SBiju Das pinctrl-0 = <ð1_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 { 145*73302ad1SPaul Barker txc { 146*73302ad1SPaul Barker pinmux = <RZG2L_PORT_PINMUX(1, 0, 1)>; /* ET0_TXC */ 147*73302ad1SPaul Barker output-enable; 148*73302ad1SPaul Barker }; 149*73302ad1SPaul Barker 150*73302ad1SPaul Barker mux { 1516494e4f9SBiju Das pinmux = <RZG2L_PORT_PINMUX(4, 5, 1)>, /* ET0_LINKSTA */ 1526494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 3, 1)>, /* ET0_MDC */ 1536494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 4, 1)>, /* ET0_MDIO */ 1546494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 1, 1)>, /* ET0_TX_CTL */ 1556494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 2, 1)>, /* ET0_TXD0 */ 1566494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 3, 1)>, /* ET0_TXD1 */ 1576494e4f9SBiju Das <RZG2L_PORT_PINMUX(1, 4, 1)>, /* ET0_TXD2 */ 1586494e4f9SBiju Das <RZG2L_PORT_PINMUX(2, 0, 1)>, /* ET0_TXD3 */ 1596494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 0, 1)>, /* ET0_RXC */ 1606494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 1, 1)>, /* ET0_RX_CTL */ 1616494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 2, 1)>, /* ET0_RXD0 */ 1626494e4f9SBiju Das <RZG2L_PORT_PINMUX(3, 3, 1)>, /* ET0_RXD1 */ 1636494e4f9SBiju Das <RZG2L_PORT_PINMUX(4, 0, 1)>, /* ET0_RXD2 */ 164f4673e52SLad Prabhakar <RZG2L_PORT_PINMUX(4, 1, 1)>, /* ET0_RXD3 */ 165f4673e52SLad Prabhakar <RZG2L_PORT_PINMUX(5, 1, 7)>; /* IRQ2 */ 1666494e4f9SBiju Das }; 167*73302ad1SPaul Barker }; 1686494e4f9SBiju Das 1696494e4f9SBiju Das eth1_pins: eth1 { 170*73302ad1SPaul Barker txc { 171*73302ad1SPaul Barker pinmux = <RZG2L_PORT_PINMUX(7, 0, 1)>; /* ET1_TXC */ 172*73302ad1SPaul Barker output-enable; 173*73302ad1SPaul Barker }; 174*73302ad1SPaul Barker 175*73302ad1SPaul Barker mux { 1766494e4f9SBiju Das pinmux = <RZG2L_PORT_PINMUX(10, 4, 1)>, /* ET1_LINKSTA */ 1776494e4f9SBiju Das <RZG2L_PORT_PINMUX(10, 2, 1)>, /* ET1_MDC */ 1786494e4f9SBiju Das <RZG2L_PORT_PINMUX(10, 3, 1)>, /* ET1_MDIO */ 1796494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 1, 1)>, /* ET1_TX_CTL */ 1806494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 2, 1)>, /* ET1_TXD0 */ 1816494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 3, 1)>, /* ET1_TXD1 */ 1826494e4f9SBiju Das <RZG2L_PORT_PINMUX(7, 4, 1)>, /* ET1_TXD2 */ 1836494e4f9SBiju Das <RZG2L_PORT_PINMUX(8, 0, 1)>, /* ET1_TXD3 */ 1846494e4f9SBiju Das <RZG2L_PORT_PINMUX(8, 4, 1)>, /* ET1_RXC */ 1856494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 0, 1)>, /* ET1_RX_CTL */ 1866494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 1, 1)>, /* ET1_RXD0 */ 1876494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 2, 1)>, /* ET1_RXD1 */ 1886494e4f9SBiju Das <RZG2L_PORT_PINMUX(9, 3, 1)>, /* ET1_RXD2 */ 189f4673e52SLad Prabhakar <RZG2L_PORT_PINMUX(10, 0, 1)>, /* ET1_RXD3 */ 190f4673e52SLad Prabhakar <RZG2L_PORT_PINMUX(18, 5, 1)>; /* IRQ7 */ 1916494e4f9SBiju Das }; 192*73302ad1SPaul Barker }; 1936494e4f9SBiju Das 194ed8efe50SBiju Das sdhi0_emmc_pins: sd0emmc { 195ed8efe50SBiju Das sd0_emmc_data { 196ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3", 197ed8efe50SBiju Das "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7"; 198ed8efe50SBiju Das power-source = <1800>; 199ed8efe50SBiju Das }; 200ed8efe50SBiju Das 201ed8efe50SBiju Das sd0_emmc_ctrl { 202ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 203ed8efe50SBiju Das power-source = <1800>; 204ed8efe50SBiju Das }; 205ed8efe50SBiju Das 206ed8efe50SBiju Das sd0_emmc_rst { 207ed8efe50SBiju Das pins = "SD0_RST#"; 208ed8efe50SBiju Das power-source = <1800>; 209ed8efe50SBiju Das }; 210ed8efe50SBiju Das }; 211ed8efe50SBiju Das 212ed8efe50SBiju Das sdhi0_pins: sd0 { 213ed8efe50SBiju Das sd0_data { 214ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; 215ed8efe50SBiju Das power-source = <3300>; 216ed8efe50SBiju Das }; 217ed8efe50SBiju Das 218ed8efe50SBiju Das sd0_ctrl { 219ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 220ed8efe50SBiju Das power-source = <3300>; 221ed8efe50SBiju Das }; 222ed8efe50SBiju Das 223ed8efe50SBiju Das sd0_mux { 224ed8efe50SBiju Das pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */ 225ed8efe50SBiju Das }; 226ed8efe50SBiju Das }; 227ed8efe50SBiju Das 228ed8efe50SBiju Das sdhi0_pins_uhs: sd0_uhs { 229ed8efe50SBiju Das sd0_data_uhs { 230ed8efe50SBiju Das pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; 231ed8efe50SBiju Das power-source = <1800>; 232ed8efe50SBiju Das }; 233ed8efe50SBiju Das 234ed8efe50SBiju Das sd0_ctrl_uhs { 235ed8efe50SBiju Das pins = "SD0_CLK", "SD0_CMD"; 236ed8efe50SBiju Das power-source = <1800>; 237ed8efe50SBiju Das }; 238ed8efe50SBiju Das 239ed8efe50SBiju Das sd0_mux_uhs { 240ed8efe50SBiju Das pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */ 241ed8efe50SBiju Das }; 242ed8efe50SBiju Das }; 243ed8efe50SBiju Das}; 244ed8efe50SBiju Das 245ed8efe50SBiju Das#if (SW_SW0_DEV_SEL) 246ed8efe50SBiju Das&sdhi0 { 247ed8efe50SBiju Das pinctrl-0 = <&sdhi0_emmc_pins>; 248ed8efe50SBiju Das pinctrl-1 = <&sdhi0_emmc_pins>; 249ed8efe50SBiju Das pinctrl-names = "default", "state_uhs"; 250ed8efe50SBiju Das 251ed8efe50SBiju Das vmmc-supply = <®_3p3v>; 252ed8efe50SBiju Das vqmmc-supply = <®_1p8v>; 253ed8efe50SBiju Das bus-width = <8>; 254ed8efe50SBiju Das mmc-hs200-1_8v; 255ed8efe50SBiju Das non-removable; 256ed8efe50SBiju Das fixed-emmc-driver-type = <1>; 257ed8efe50SBiju Das status = "okay"; 258ed8efe50SBiju Das}; 259ed8efe50SBiju Das#else 260ed8efe50SBiju Das&sdhi0 { 261ed8efe50SBiju Das pinctrl-0 = <&sdhi0_pins>; 262ed8efe50SBiju Das pinctrl-1 = <&sdhi0_pins_uhs>; 263ed8efe50SBiju Das pinctrl-names = "default", "state_uhs"; 264ed8efe50SBiju Das 265ed8efe50SBiju Das vmmc-supply = <®_3p3v>; 266ed8efe50SBiju Das vqmmc-supply = <&vccq_sdhi0>; 267ed8efe50SBiju Das bus-width = <4>; 268ed8efe50SBiju Das sd-uhs-sdr50; 269ed8efe50SBiju Das sd-uhs-sdr104; 270ed8efe50SBiju Das status = "okay"; 271ed8efe50SBiju Das}; 272ed8efe50SBiju Das#endif 2733f67af66SBiju Das 2743f67af66SBiju Das&wdt0 { 2753f67af66SBiju Das status = "okay"; 2763f67af66SBiju Das timeout-sec = <60>; 2773f67af66SBiju Das}; 278