1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
10 #include "rk3328.dtsi"
13 model = "FriendlyElec NanoPi R2S";
14 compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
22 stdout-path = "serial2:1500000n8";
25 gmac_clk: gmac-clock {
26 compatible = "fixed-clock";
27 clock-frequency = <125000000>;
28 clock-output-names = "gmac_clkin";
33 compatible = "gpio-keys";
34 pinctrl-0 = <&reset_button_pin>;
35 pinctrl-names = "default";
39 gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 debounce-interval = <50>;
46 compatible = "gpio-leds";
47 pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
48 pinctrl-names = "default";
51 gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
52 label = "nanopi-r2s:green:lan";
56 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
57 label = "nanopi-r2s:red:sys";
62 gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
63 label = "nanopi-r2s:green:wan";
67 vcc_io_sdio: sdmmcio-regulator {
68 compatible = "regulator-gpio";
70 gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
71 pinctrl-0 = <&sdio_vcc_pin>;
72 pinctrl-names = "default";
73 regulator-name = "vcc_io_sdio";
75 regulator-min-microvolt = <1800000>;
76 regulator-max-microvolt = <3300000>;
77 regulator-settling-time-us = <5000>;
78 regulator-type = "voltage";
79 startup-delay-us = <2000>;
80 states = <1800000 0x1>,
82 vin-supply = <&vcc_io_33>;
85 vcc_sd: sdmmc-regulator {
86 compatible = "regulator-fixed";
87 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
88 pinctrl-0 = <&sdmmc0m1_pin>;
89 pinctrl-names = "default";
90 regulator-name = "vcc_sd";
92 regulator-min-microvolt = <3300000>;
93 regulator-max-microvolt = <3300000>;
94 vin-supply = <&vcc_io_33>;
98 compatible = "regulator-fixed";
99 regulator-name = "vdd_5v";
102 regulator-min-microvolt = <5000000>;
103 regulator-max-microvolt = <5000000>;
106 vdd_5v_lan: vdd-5v-lan {
107 compatible = "regulator-fixed";
109 gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
110 pinctrl-0 = <&lan_vdd_pin>;
111 pinctrl-names = "default";
112 regulator-name = "vdd_5v_lan";
115 vin-supply = <&vdd_5v>;
120 cpu-supply = <&vdd_arm>;
124 cpu-supply = <&vdd_arm>;
128 cpu-supply = <&vdd_arm>;
132 cpu-supply = <&vdd_arm>;
140 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
141 assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
142 clock_in_out = "input";
143 phy-handle = <&rtl8211e>;
145 phy-supply = <&vcc_io_33>;
146 pinctrl-0 = <&rgmiim1_pins>;
147 pinctrl-names = "default";
154 compatible = "snps,dwmac-mdio";
155 #address-cells = <1>;
158 rtl8211e: ethernet-phy@1 {
160 pinctrl-0 = <ð_phy_reset_pin>;
161 pinctrl-names = "default";
162 reset-assert-us = <10000>;
163 reset-deassert-us = <50000>;
164 reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
173 compatible = "rockchip,rk805";
175 interrupt-parent = <&gpio1>;
176 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
178 clock-output-names = "xin32k", "rk805-clkout2";
181 pinctrl-0 = <&pmic_int_l>;
182 pinctrl-names = "default";
183 rockchip,system-power-controller;
186 vcc1-supply = <&vdd_5v>;
187 vcc2-supply = <&vdd_5v>;
188 vcc3-supply = <&vdd_5v>;
189 vcc4-supply = <&vdd_5v>;
190 vcc5-supply = <&vcc_io_33>;
191 vcc6-supply = <&vdd_5v>;
195 regulator-name = "vdd_log";
198 regulator-min-microvolt = <712500>;
199 regulator-max-microvolt = <1450000>;
200 regulator-ramp-delay = <12500>;
202 regulator-state-mem {
203 regulator-on-in-suspend;
204 regulator-suspend-microvolt = <1000000>;
209 regulator-name = "vdd_arm";
212 regulator-min-microvolt = <712500>;
213 regulator-max-microvolt = <1450000>;
214 regulator-ramp-delay = <12500>;
216 regulator-state-mem {
217 regulator-on-in-suspend;
218 regulator-suspend-microvolt = <950000>;
223 regulator-name = "vcc_ddr";
227 regulator-state-mem {
228 regulator-on-in-suspend;
232 vcc_io_33: DCDC_REG4 {
233 regulator-name = "vcc_io_33";
236 regulator-min-microvolt = <3300000>;
237 regulator-max-microvolt = <3300000>;
239 regulator-state-mem {
240 regulator-on-in-suspend;
241 regulator-suspend-microvolt = <3300000>;
246 regulator-name = "vcc_18";
249 regulator-min-microvolt = <1800000>;
250 regulator-max-microvolt = <1800000>;
252 regulator-state-mem {
253 regulator-on-in-suspend;
254 regulator-suspend-microvolt = <1800000>;
258 vcc18_emmc: LDO_REG2 {
259 regulator-name = "vcc18_emmc";
262 regulator-min-microvolt = <1800000>;
263 regulator-max-microvolt = <1800000>;
265 regulator-state-mem {
266 regulator-on-in-suspend;
267 regulator-suspend-microvolt = <1800000>;
272 regulator-name = "vdd_10";
275 regulator-min-microvolt = <1000000>;
276 regulator-max-microvolt = <1000000>;
278 regulator-state-mem {
279 regulator-on-in-suspend;
280 regulator-suspend-microvolt = <1000000>;
288 pmuio-supply = <&vcc_io_33>;
289 vccio1-supply = <&vcc_io_33>;
290 vccio2-supply = <&vcc18_emmc>;
291 vccio3-supply = <&vcc_io_sdio>;
292 vccio4-supply = <&vcc_18>;
293 vccio5-supply = <&vcc_io_33>;
294 vccio6-supply = <&vcc_io_33>;
300 reset_button_pin: reset-button-pin {
301 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
306 eth_phy_reset_pin: eth-phy-reset-pin {
307 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
312 lan_led_pin: lan-led-pin {
313 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
316 sys_led_pin: sys-led-pin {
317 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
320 wan_led_pin: wan-led-pin {
321 rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
326 lan_vdd_pin: lan-vdd-pin {
327 rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
332 pmic_int_l: pmic-int-l {
333 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
338 sdio_vcc_pin: sdio-vcc-pin {
339 rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
352 pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
353 pinctrl-names = "default";
358 vmmc-supply = <&vcc_sd>;
359 vqmmc-supply = <&vcc_io_sdio>;
364 rockchip,hw-tshut-mode = <0>;
365 rockchip,hw-tshut-polarity = <0>;
393 #address-cells = <1>;
396 /* Second port is for USB 3.0 */
398 compatible = "usbbda,8153";