summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi
blob: 5e4209d6fb42f3a30339c90c622658527a38be44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
 * Device Tree Source for the RZ/G2LC SMARC SOM common parts
 *
 * Copyright (C) 2021 Renesas Electronics Corp.
 */

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irqc-rzg2l.h>
#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>

/ {
	aliases {
		ethernet0 = &eth0;
	};

	chosen {
		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
	};

	memory@48000000 {
		device_type = "memory";
		/* first 128MB is reserved for secure area. */
		reg = <0x0 0x48000000 0x0 0x38000000>;
	};

	reg_1p8v: regulator-1p8v {
		compatible = "regulator-fixed";
		regulator-name = "fixed-1.8V";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-boot-on;
		regulator-always-on;
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "fixed-3.3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		regulator-always-on;
	};

	reg_1p1v: regulator-vdd-core {
		compatible = "regulator-fixed";
		regulator-name = "fixed-1.1V";
		regulator-min-microvolt = <1100000>;
		regulator-max-microvolt = <1100000>;
		regulator-boot-on;
		regulator-always-on;
	};

	vccq_sdhi0: regulator-vccq-sdhi0 {
		compatible = "regulator-gpio";

		regulator-name = "SDHI0 VccQ";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <3300000>;
		states = <3300000 1>, <1800000 0>;
		regulator-boot-on;
		gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
		regulator-always-on;
	};

	/* 32.768kHz crystal */
	x2: x2-clock {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <32768>;
	};
};

&eth0 {
	pinctrl-0 = <&eth0_pins>;
	pinctrl-names = "default";
	phy-handle = <&phy0>;
	phy-mode = "rgmii-id";
	status = "okay";

	phy0: ethernet-phy@7 {
		compatible = "ethernet-phy-id0022.1640",
			     "ethernet-phy-ieee802.3-c22";
		reg = <7>;
		interrupt-parent = <&irqc>;
		interrupts = <RZG2L_IRQ0 IRQ_TYPE_LEVEL_LOW>;
		rxc-skew-psec = <2400>;
		txc-skew-psec = <2400>;
		rxdv-skew-psec = <0>;
		txen-skew-psec = <0>;
		rxd0-skew-psec = <0>;
		rxd1-skew-psec = <0>;
		rxd2-skew-psec = <0>;
		rxd3-skew-psec = <0>;
		txd0-skew-psec = <0>;
		txd1-skew-psec = <0>;
		txd2-skew-psec = <0>;
		txd3-skew-psec = <0>;
	};
};

&extal_clk {
	clock-frequency = <24000000>;
};

&gpu {
	mali-supply = <&reg_1p1v>;
};

&i2c2 {
	raa215300: pmic@12 {
		compatible = "renesas,raa215300";
		reg = <0x12>, <0x6f>;
		reg-names = "main", "rtc";

		clocks = <&x2>;
		clock-names = "xin";
	};
};

&ostm1 {
	status = "okay";
};

&ostm2 {
	status = "okay";
};

&pinctrl {
	eth0_pins: eth0 {
		pinmux = <RZG2L_PORT_PINMUX(28, 1, 1)>, /* ET0_LINKSTA */
			 <RZG2L_PORT_PINMUX(27, 1, 1)>, /* ET0_MDC */
			 <RZG2L_PORT_PINMUX(28, 0, 1)>, /* ET0_MDIO */
			 <RZG2L_PORT_PINMUX(20, 0, 1)>, /* ET0_TXC */
			 <RZG2L_PORT_PINMUX(20, 1, 1)>, /* ET0_TX_CTL */
			 <RZG2L_PORT_PINMUX(20, 2, 1)>, /* ET0_TXD0 */
			 <RZG2L_PORT_PINMUX(21, 0, 1)>, /* ET0_TXD1 */
			 <RZG2L_PORT_PINMUX(21, 1, 1)>, /* ET0_TXD2 */
			 <RZG2L_PORT_PINMUX(22, 0, 1)>, /* ET0_TXD3 */
			 <RZG2L_PORT_PINMUX(24, 0, 1)>, /* ET0_RXC */
			 <RZG2L_PORT_PINMUX(24, 1, 1)>, /* ET0_RX_CTL */
			 <RZG2L_PORT_PINMUX(25, 0, 1)>, /* ET0_RXD0 */
			 <RZG2L_PORT_PINMUX(25, 1, 1)>, /* ET0_RXD1 */
			 <RZG2L_PORT_PINMUX(26, 0, 1)>, /* ET0_RXD2 */
			 <RZG2L_PORT_PINMUX(26, 1, 1)>, /* ET0_RXD3 */
			 <RZG2L_PORT_PINMUX(0, 0, 1)>;  /* IRQ0 */
	};

	gpio-sd0-pwr-en-hog {
		gpio-hog;
		gpios = <RZG2L_GPIO(18, 1) GPIO_ACTIVE_HIGH>;
		output-high;
		line-name = "gpio_sd0_pwr_en";
	};

	qspi0_pins: qspi0 {
		qspi0-data {
			pins = "QSPI0_IO0", "QSPI0_IO1", "QSPI0_IO2", "QSPI0_IO3";
			power-source = <1800>;
		};

		qspi0-ctrl {
			pins = "QSPI0_SPCLK", "QSPI0_SSL", "QSPI_RESET#";
			power-source = <1800>;
		};
	};

	/*
	 * SD0 device selection is XOR between GPIO_SD0_DEV_SEL and SW1[2]
	 * The below switch logic can be used to select the device between
	 * eMMC and microSD, after setting GPIO_SD0_DEV_SEL to high in DT.
	 * SW1[2] should be at OFF position to enable 64 GB eMMC
	 * SW1[2] should be at position ON to enable uSD card CN3
	 */
	gpio-sd0-dev-sel-hog {
		gpio-hog;
		gpios = <RZG2L_GPIO(40, 2) GPIO_ACTIVE_HIGH>;
		output-high;
		line-name = "gpio_sd0_dev_sel";
	};

	sdhi0_emmc_pins: sd0emmc {
		sd0_emmc_data {
			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3",
			       "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7";
			power-source = <1800>;
		};

		sd0_emmc_ctrl {
			pins = "SD0_CLK", "SD0_CMD";
			power-source = <1800>;
		};

		sd0_emmc_rst {
			pins = "SD0_RST#";
			power-source = <1800>;
		};
	};

	sdhi0_pins: sd0 {
		sd0_data {
			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
			power-source = <3300>;
		};

		sd0_ctrl {
			pins = "SD0_CLK", "SD0_CMD";
			power-source = <3300>;
		};

		sd0_mux {
			pinmux = <RZG2L_PORT_PINMUX(18, 0, 1)>; /* SD0_CD */
		};
	};

	sdhi0_pins_uhs: sd0_uhs {
		sd0_data_uhs {
			pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3";
			power-source = <1800>;
		};

		sd0_ctrl_uhs {
			pins = "SD0_CLK", "SD0_CMD";
			power-source = <1800>;
		};

		sd0_mux_uhs {
			pinmux = <RZG2L_PORT_PINMUX(18, 0, 1)>; /* SD0_CD */
		};
	};
};

&sbc {
	pinctrl-0 = <&qspi0_pins>;
	pinctrl-names = "default";
	status = "okay";

	flash@0 {
		compatible = "micron,mt25qu512a", "jedec,spi-nor";
		reg = <0>;
		m25p,fast-read;
		spi-max-frequency = <50000000>;
		spi-rx-bus-width = <4>;
		spi-tx-bus-width = <4>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			boot@0 {
				reg = <0x00000000 0x2000000>;
				read-only;
			};
			user@2000000 {
				reg = <0x2000000 0x2000000>;
			};
		};
	};
};

#if (!SW_SD0_DEV_SEL)
&sdhi0 {
	pinctrl-0 = <&sdhi0_pins>;
	pinctrl-1 = <&sdhi0_pins_uhs>;
	pinctrl-names = "default", "state_uhs";

	vmmc-supply = <&reg_3p3v>;
	vqmmc-supply = <&vccq_sdhi0>;
	bus-width = <4>;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	status = "okay";
};
#endif

#if SW_SD0_DEV_SEL
&sdhi0 {
	pinctrl-0 = <&sdhi0_emmc_pins>;
	pinctrl-1 = <&sdhi0_emmc_pins>;
	pinctrl-names = "default", "state_uhs";

	vmmc-supply = <&reg_3p3v>;
	vqmmc-supply = <&reg_1p8v>;
	bus-width = <8>;
	mmc-hs200-1_8v;
	non-removable;
	fixed-emmc-driver-type = <1>;
	status = "okay";
};
#endif

&wdt0 {
	status = "okay";
	timeout-sec = <60>;
};

&wdt1 {
	status = "okay";
	timeout-sec = <60>;
};