xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/rzg2ul-smarc-som.dtsi (revision ed8efe50b76e751791a9aa4ce1f95fe3d9d794ac)
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/ {
12895199bcSBiju Das	chosen {
13895199bcSBiju Das		bootargs = "ignore_loglevel";
14895199bcSBiju Das	};
15895199bcSBiju Das
16895199bcSBiju Das	memory@48000000 {
17895199bcSBiju Das		device_type = "memory";
18895199bcSBiju Das		/* first 128MB is reserved for secure area. */
19895199bcSBiju Das		reg = <0x0 0x48000000 0x0 0x38000000>;
20895199bcSBiju Das	};
21a74a0bf3SBiju Das
22*ed8efe50SBiju Das	reg_1p8v: regulator0 {
23*ed8efe50SBiju Das		compatible = "regulator-fixed";
24*ed8efe50SBiju Das		regulator-name = "fixed-1.8V";
25*ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
26*ed8efe50SBiju Das		regulator-max-microvolt = <1800000>;
27*ed8efe50SBiju Das		regulator-boot-on;
28*ed8efe50SBiju Das		regulator-always-on;
29*ed8efe50SBiju Das	};
30*ed8efe50SBiju Das
31a74a0bf3SBiju Das	reg_3p3v: regulator1 {
32a74a0bf3SBiju Das		compatible = "regulator-fixed";
33a74a0bf3SBiju Das		regulator-name = "fixed-3.3V";
34a74a0bf3SBiju Das		regulator-min-microvolt = <3300000>;
35a74a0bf3SBiju Das		regulator-max-microvolt = <3300000>;
36a74a0bf3SBiju Das		regulator-boot-on;
37a74a0bf3SBiju Das		regulator-always-on;
38a74a0bf3SBiju Das	};
39*ed8efe50SBiju Das
40*ed8efe50SBiju Das#if !(SW_SW0_DEV_SEL)
41*ed8efe50SBiju Das	vccq_sdhi0: regulator-vccq-sdhi0 {
42*ed8efe50SBiju Das		compatible = "regulator-gpio";
43*ed8efe50SBiju Das
44*ed8efe50SBiju Das		regulator-name = "SDHI0 VccQ";
45*ed8efe50SBiju Das		regulator-min-microvolt = <1800000>;
46*ed8efe50SBiju Das		regulator-max-microvolt = <3300000>;
47*ed8efe50SBiju Das		states = <3300000 1>, <1800000 0>;
48*ed8efe50SBiju Das		regulator-boot-on;
49*ed8efe50SBiju Das		gpios = <&pinctrl RZG2L_GPIO(6, 2) GPIO_ACTIVE_HIGH>;
50*ed8efe50SBiju Das		regulator-always-on;
51*ed8efe50SBiju Das	};
52*ed8efe50SBiju Das#endif
53895199bcSBiju Das};
54895199bcSBiju Das
55895199bcSBiju Das&extal_clk {
56895199bcSBiju Das	clock-frequency = <24000000>;
57895199bcSBiju Das};
58*ed8efe50SBiju Das
59*ed8efe50SBiju Das&pinctrl {
60*ed8efe50SBiju Das	sdhi0_emmc_pins: sd0emmc {
61*ed8efe50SBiju Das		sd0_emmc_data {
62*ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
63*ed8efe50SBiju Das			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
64*ed8efe50SBiju Das			power-source = <1800>;
65*ed8efe50SBiju Das		};
66*ed8efe50SBiju Das
67*ed8efe50SBiju Das		sd0_emmc_ctrl {
68*ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
69*ed8efe50SBiju Das			power-source = <1800>;
70*ed8efe50SBiju Das		};
71*ed8efe50SBiju Das
72*ed8efe50SBiju Das		sd0_emmc_rst {
73*ed8efe50SBiju Das			pins = "SD0_RST#";
74*ed8efe50SBiju Das			power-source = <1800>;
75*ed8efe50SBiju Das		};
76*ed8efe50SBiju Das	};
77*ed8efe50SBiju Das
78*ed8efe50SBiju Das	sdhi0_pins: sd0 {
79*ed8efe50SBiju Das		sd0_data {
80*ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
81*ed8efe50SBiju Das			power-source = <3300>;
82*ed8efe50SBiju Das		};
83*ed8efe50SBiju Das
84*ed8efe50SBiju Das		sd0_ctrl {
85*ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
86*ed8efe50SBiju Das			power-source = <3300>;
87*ed8efe50SBiju Das		};
88*ed8efe50SBiju Das
89*ed8efe50SBiju Das		sd0_mux {
90*ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
91*ed8efe50SBiju Das		};
92*ed8efe50SBiju Das	};
93*ed8efe50SBiju Das
94*ed8efe50SBiju Das	sdhi0_pins_uhs: sd0_uhs {
95*ed8efe50SBiju Das		sd0_data_uhs {
96*ed8efe50SBiju Das			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
97*ed8efe50SBiju Das			power-source = <1800>;
98*ed8efe50SBiju Das		};
99*ed8efe50SBiju Das
100*ed8efe50SBiju Das		sd0_ctrl_uhs {
101*ed8efe50SBiju Das			pins = "SD0_CLK", "SD0_CMD";
102*ed8efe50SBiju Das			power-source = <1800>;
103*ed8efe50SBiju Das		};
104*ed8efe50SBiju Das
105*ed8efe50SBiju Das		sd0_mux_uhs {
106*ed8efe50SBiju Das			pinmux = <RZG2L_PORT_PINMUX(0, 0, 1)>; /* SD0_CD */
107*ed8efe50SBiju Das		};
108*ed8efe50SBiju Das	};
109*ed8efe50SBiju Das};
110*ed8efe50SBiju Das
111*ed8efe50SBiju Das#if (SW_SW0_DEV_SEL)
112*ed8efe50SBiju Das&sdhi0 {
113*ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_emmc_pins>;
114*ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_emmc_pins>;
115*ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
116*ed8efe50SBiju Das
117*ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
118*ed8efe50SBiju Das	vqmmc-supply = <&reg_1p8v>;
119*ed8efe50SBiju Das	bus-width = <8>;
120*ed8efe50SBiju Das	mmc-hs200-1_8v;
121*ed8efe50SBiju Das	non-removable;
122*ed8efe50SBiju Das	fixed-emmc-driver-type = <1>;
123*ed8efe50SBiju Das	status = "okay";
124*ed8efe50SBiju Das};
125*ed8efe50SBiju Das#else
126*ed8efe50SBiju Das&sdhi0 {
127*ed8efe50SBiju Das	pinctrl-0 = <&sdhi0_pins>;
128*ed8efe50SBiju Das	pinctrl-1 = <&sdhi0_pins_uhs>;
129*ed8efe50SBiju Das	pinctrl-names = "default", "state_uhs";
130*ed8efe50SBiju Das
131*ed8efe50SBiju Das	vmmc-supply = <&reg_3p3v>;
132*ed8efe50SBiju Das	vqmmc-supply = <&vccq_sdhi0>;
133*ed8efe50SBiju Das	bus-width = <4>;
134*ed8efe50SBiju Das	sd-uhs-sdr50;
135*ed8efe50SBiju Das	sd-uhs-sdr104;
136*ed8efe50SBiju Das	status = "okay";
137*ed8efe50SBiju Das};
138*ed8efe50SBiju Das#endif
139