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";
21 stdout-path = "serial2:1500000n8";
24 gmac_clk: gmac-clock {
25 compatible = "fixed-clock";
26 clock-frequency = <125000000>;
27 clock-output-names = "gmac_clkin";
32 compatible = "gpio-keys";
33 pinctrl-0 = <&reset_button_pin>;
34 pinctrl-names = "default";
38 gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 debounce-interval = <50>;
45 compatible = "gpio-leds";
46 pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
47 pinctrl-names = "default";
50 gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
51 label = "nanopi-r2s:green:lan";
55 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
56 label = "nanopi-r2s:red:sys";
61 gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
62 label = "nanopi-r2s:green:wan";
66 vcc_io_sdio: sdmmcio-regulator {
67 compatible = "regulator-gpio";
69 gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
70 pinctrl-0 = <&sdio_vcc_pin>;
71 pinctrl-names = "default";
72 regulator-name = "vcc_io_sdio";
74 regulator-min-microvolt = <1800000>;
75 regulator-max-microvolt = <3300000>;
76 regulator-settling-time-us = <5000>;
77 regulator-type = "voltage";
78 startup-delay-us = <2000>;
81 vin-supply = <&vcc_io_33>;
84 vcc_sd: sdmmc-regulator {
85 compatible = "regulator-fixed";
86 gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
87 pinctrl-0 = <&sdmmc0m1_pin>;
88 pinctrl-names = "default";
89 regulator-name = "vcc_sd";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
93 vin-supply = <&vcc_io_33>;
97 compatible = "regulator-fixed";
98 regulator-name = "vdd_5v";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
107 cpu-supply = <&vdd_arm>;
111 cpu-supply = <&vdd_arm>;
115 cpu-supply = <&vdd_arm>;
119 cpu-supply = <&vdd_arm>;
127 assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
128 assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
129 clock_in_out = "input";
130 phy-handle = <&rtl8211e>;
132 phy-supply = <&vcc_io_33>;
133 pinctrl-0 = <&rgmiim1_pins>;
134 pinctrl-names = "default";
141 compatible = "snps,dwmac-mdio";
142 #address-cells = <1>;
145 rtl8211e: ethernet-phy@1 {
147 pinctrl-0 = <ð_phy_reset_pin>;
148 pinctrl-names = "default";
149 reset-assert-us = <10000>;
150 reset-deassert-us = <50000>;
151 reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
160 compatible = "rockchip,rk805";
162 interrupt-parent = <&gpio1>;
163 interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
165 clock-output-names = "xin32k", "rk805-clkout2";
168 pinctrl-0 = <&pmic_int_l>;
169 pinctrl-names = "default";
170 rockchip,system-power-controller;
173 vcc1-supply = <&vdd_5v>;
174 vcc2-supply = <&vdd_5v>;
175 vcc3-supply = <&vdd_5v>;
176 vcc4-supply = <&vdd_5v>;
177 vcc5-supply = <&vcc_io_33>;
178 vcc6-supply = <&vdd_5v>;
182 regulator-name = "vdd_log";
185 regulator-min-microvolt = <712500>;
186 regulator-max-microvolt = <1450000>;
187 regulator-ramp-delay = <12500>;
189 regulator-state-mem {
190 regulator-on-in-suspend;
191 regulator-suspend-microvolt = <1000000>;
196 regulator-name = "vdd_arm";
199 regulator-min-microvolt = <712500>;
200 regulator-max-microvolt = <1450000>;
201 regulator-ramp-delay = <12500>;
203 regulator-state-mem {
204 regulator-on-in-suspend;
205 regulator-suspend-microvolt = <950000>;
210 regulator-name = "vcc_ddr";
214 regulator-state-mem {
215 regulator-on-in-suspend;
219 vcc_io_33: DCDC_REG4 {
220 regulator-name = "vcc_io_33";
223 regulator-min-microvolt = <3300000>;
224 regulator-max-microvolt = <3300000>;
226 regulator-state-mem {
227 regulator-on-in-suspend;
228 regulator-suspend-microvolt = <3300000>;
233 regulator-name = "vcc_18";
236 regulator-min-microvolt = <1800000>;
237 regulator-max-microvolt = <1800000>;
239 regulator-state-mem {
240 regulator-on-in-suspend;
241 regulator-suspend-microvolt = <1800000>;
245 vcc18_emmc: LDO_REG2 {
246 regulator-name = "vcc18_emmc";
249 regulator-min-microvolt = <1800000>;
250 regulator-max-microvolt = <1800000>;
252 regulator-state-mem {
253 regulator-on-in-suspend;
254 regulator-suspend-microvolt = <1800000>;
259 regulator-name = "vdd_10";
262 regulator-min-microvolt = <1000000>;
263 regulator-max-microvolt = <1000000>;
265 regulator-state-mem {
266 regulator-on-in-suspend;
267 regulator-suspend-microvolt = <1000000>;
275 pmuio-supply = <&vcc_io_33>;
276 vccio1-supply = <&vcc_io_33>;
277 vccio2-supply = <&vcc18_emmc>;
278 vccio3-supply = <&vcc_io_sdio>;
279 vccio4-supply = <&vcc_18>;
280 vccio5-supply = <&vcc_io_33>;
281 vccio6-supply = <&vcc_io_33>;
287 reset_button_pin: reset-button-pin {
288 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
293 eth_phy_reset_pin: eth-phy-reset-pin {
294 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
299 lan_led_pin: lan-led-pin {
300 rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
303 sys_led_pin: sys-led-pin {
304 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
307 wan_led_pin: wan-led-pin {
308 rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
313 pmic_int_l: pmic-int-l {
314 rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
319 sdio_vcc_pin: sdio-vcc-pin {
320 rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
333 pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
334 pinctrl-names = "default";
339 vmmc-supply = <&vcc_sd>;
340 vqmmc-supply = <&vcc_io_sdio>;
345 rockchip,hw-tshut-mode = <0>;
346 rockchip,hw-tshut-polarity = <0>;