1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (C) 2021 Chukun Pan <amadeus@jmu.edu.cn>
5 * Based on sun50i-h5-nanopi-neo-plus2.dts, which is:
6 * Copyright (C) 2017 Antony Antony <antony@phenome.org>
7 * Copyright (C) 2016 ARM Ltd.
11 #include "sun50i-h5.dtsi"
12 #include "sun50i-h5-cpu-opp.dtsi"
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/input/input.h>
16 #include <dt-bindings/leds/common.h>
19 model = "FriendlyARM NanoPi R1S H5";
20 compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5";
24 ethernet1 = &rtl8189etv;
29 stdout-path = "serial0:115200n8";
33 compatible = "gpio-leds";
36 function = LED_FUNCTION_LAN;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
42 function = LED_FUNCTION_STATUS;
43 color = <LED_COLOR_ID_RED>;
44 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
45 linux,default-trigger = "heartbeat";
49 function = LED_FUNCTION_WAN;
50 color = <LED_COLOR_ID_GREEN>;
51 gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
56 compatible = "gpio-keys";
60 linux,code = <KEY_RESTART>;
61 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
65 reg_gmac_3v3: gmac-3v3 {
66 compatible = "regulator-fixed";
67 regulator-name = "gmac-3v3";
68 regulator-min-microvolt = <3300000>;
69 regulator-max-microvolt = <3300000>;
70 startup-delay-us = <100000>;
72 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
76 compatible = "regulator-fixed";
77 regulator-name = "vcc3v3";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
82 reg_usb0_vbus: usb0-vbus {
83 compatible = "regulator-fixed";
84 regulator-name = "usb0-vbus";
85 regulator-min-microvolt = <5000000>;
86 regulator-max-microvolt = <5000000>;
88 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
92 vdd_cpux: gpio-regulator {
93 compatible = "regulator-gpio";
94 regulator-name = "vdd-cpux";
95 regulator-type = "voltage";
98 regulator-min-microvolt = <1100000>;
99 regulator-max-microvolt = <1300000>;
100 regulator-ramp-delay = <50>; /* 4ms */
101 gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
102 gpios-states = <0x1>;
103 states = <1100000 0x0>, <1300000 0x1>;
106 wifi_pwrseq: wifi_pwrseq {
107 compatible = "mmc-pwrseq-simple";
108 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
109 post-power-on-delay-ms = <200>;
114 cpu-supply = <&vdd_cpux>;
126 pinctrl-names = "default";
127 pinctrl-0 = <&emac_rgmii_pins>;
128 phy-supply = <®_gmac_3v3>;
129 phy-handle = <&ext_rgmii_phy>;
130 phy-mode = "rgmii-id";
135 ext_rgmii_phy: ethernet-phy@7 {
136 compatible = "ethernet-phy-ieee802.3-c22";
145 compatible = "microchip,24c02", "atmel,24c02";
149 #address-cells = <1>;
152 eth_mac1: mac-address@fa {
159 vmmc-supply = <®_vcc3v3>;
161 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
166 vmmc-supply = <®_vcc3v3>;
167 vqmmc-supply = <®_vcc3v3>;
168 mmc-pwrseq = <&wifi_pwrseq>;
173 rtl8189etv: sdio_wifi@1 {
187 pinctrl-names = "default";
188 pinctrl-0 = <&uart0_pa_pins>;
193 dr_mode = "peripheral";
198 /* USB Type-A port's VBUS is always on */
199 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
200 usb0_vbus-supply = <®_usb0_vbus>;