1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (C) 2021 Chukun Pan <amadeus@jmu.e 3 * Copyright (C) 2021 Chukun Pan <amadeus@jmu.edu.cn> 4 * 4 * 5 * Based on sun50i-h5-nanopi-neo-plus2.dts, wh 5 * Based on sun50i-h5-nanopi-neo-plus2.dts, which is: 6 * Copyright (C) 2017 Antony Antony <antony@p 6 * Copyright (C) 2017 Antony Antony <antony@phenome.org> 7 * Copyright (C) 2016 ARM Ltd. 7 * Copyright (C) 2016 ARM Ltd. 8 */ 8 */ 9 9 10 /dts-v1/; 10 /dts-v1/; 11 #include "sun50i-h5.dtsi" 11 #include "sun50i-h5.dtsi" 12 #include "sun50i-h5-cpu-opp.dtsi" 12 #include "sun50i-h5-cpu-opp.dtsi" 13 13 14 #include <dt-bindings/gpio/gpio.h> 14 #include <dt-bindings/gpio/gpio.h> 15 #include <dt-bindings/input/input.h> 15 #include <dt-bindings/input/input.h> 16 #include <dt-bindings/leds/common.h> 16 #include <dt-bindings/leds/common.h> 17 17 18 / { 18 / { 19 model = "FriendlyARM NanoPi R1S H5"; 19 model = "FriendlyARM NanoPi R1S H5"; 20 compatible = "friendlyarm,nanopi-r1s-h 20 compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5"; 21 21 22 aliases { 22 aliases { 23 ethernet0 = &emac; 23 ethernet0 = &emac; 24 ethernet1 = &rtl8189etv; 24 ethernet1 = &rtl8189etv; 25 serial0 = &uart0; 25 serial0 = &uart0; 26 }; 26 }; 27 27 28 chosen { 28 chosen { 29 stdout-path = "serial0:115200n 29 stdout-path = "serial0:115200n8"; 30 }; 30 }; 31 31 32 leds { 32 leds { 33 compatible = "gpio-leds"; 33 compatible = "gpio-leds"; 34 34 35 led-0 { 35 led-0 { 36 function = LED_FUNCTIO 36 function = LED_FUNCTION_LAN; 37 color = <LED_COLOR_ID_ 37 color = <LED_COLOR_ID_GREEN>; 38 gpios = <&pio 0 9 GPIO 38 gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; 39 }; 39 }; 40 40 41 led-1 { 41 led-1 { 42 function = LED_FUNCTIO 42 function = LED_FUNCTION_STATUS; 43 color = <LED_COLOR_ID_ 43 color = <LED_COLOR_ID_RED>; 44 gpios = <&pio 0 10 GPI 44 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; 45 linux,default-trigger 45 linux,default-trigger = "heartbeat"; 46 }; 46 }; 47 47 48 led-2 { 48 led-2 { 49 function = LED_FUNCTIO 49 function = LED_FUNCTION_WAN; 50 color = <LED_COLOR_ID_ 50 color = <LED_COLOR_ID_GREEN>; 51 gpios = <&pio 6 11 GPI 51 gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; 52 }; 52 }; 53 }; 53 }; 54 54 55 gpio-keys { !! 55 r-gpio-keys { 56 compatible = "gpio-keys"; 56 compatible = "gpio-keys"; 57 57 58 key-reset { !! 58 reset { 59 label = "reset"; 59 label = "reset"; 60 linux,code = <KEY_REST 60 linux,code = <KEY_RESTART>; 61 gpios = <&r_pio 0 3 GP 61 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; 62 }; 62 }; 63 }; 63 }; 64 64 65 reg_gmac_3v3: gmac-3v3 { 65 reg_gmac_3v3: gmac-3v3 { 66 compatible = "regulator-fixed" 66 compatible = "regulator-fixed"; 67 regulator-name = "gmac-3v3"; 67 regulator-name = "gmac-3v3"; 68 regulator-min-microvolt = <330 68 regulator-min-microvolt = <3300000>; 69 regulator-max-microvolt = <330 69 regulator-max-microvolt = <3300000>; 70 startup-delay-us = <100000>; 70 startup-delay-us = <100000>; 71 enable-active-high; 71 enable-active-high; 72 gpio = <&pio 3 6 GPIO_ACTIVE_H 72 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 73 }; 73 }; 74 74 75 reg_vcc3v3: vcc3v3 { 75 reg_vcc3v3: vcc3v3 { 76 compatible = "regulator-fixed" 76 compatible = "regulator-fixed"; 77 regulator-name = "vcc3v3"; 77 regulator-name = "vcc3v3"; 78 regulator-min-microvolt = <330 78 regulator-min-microvolt = <3300000>; 79 regulator-max-microvolt = <330 79 regulator-max-microvolt = <3300000>; 80 }; 80 }; 81 81 82 reg_usb0_vbus: usb0-vbus { 82 reg_usb0_vbus: usb0-vbus { 83 compatible = "regulator-fixed" 83 compatible = "regulator-fixed"; 84 regulator-name = "usb0-vbus"; 84 regulator-name = "usb0-vbus"; 85 regulator-min-microvolt = <500 85 regulator-min-microvolt = <5000000>; 86 regulator-max-microvolt = <500 86 regulator-max-microvolt = <5000000>; 87 enable-active-high; 87 enable-active-high; 88 gpio = <&r_pio 0 2 GPIO_ACTIVE 88 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 89 status = "okay"; 89 status = "okay"; 90 }; 90 }; 91 91 92 vdd_cpux: gpio-regulator { 92 vdd_cpux: gpio-regulator { 93 compatible = "regulator-gpio"; 93 compatible = "regulator-gpio"; 94 regulator-name = "vdd-cpux"; 94 regulator-name = "vdd-cpux"; 95 regulator-type = "voltage"; 95 regulator-type = "voltage"; 96 regulator-boot-on; 96 regulator-boot-on; 97 regulator-always-on; 97 regulator-always-on; 98 regulator-min-microvolt = <110 98 regulator-min-microvolt = <1100000>; 99 regulator-max-microvolt = <130 99 regulator-max-microvolt = <1300000>; 100 regulator-ramp-delay = <50>; / 100 regulator-ramp-delay = <50>; /* 4ms */ 101 gpios = <&r_pio 0 6 GPIO_ACTIV 101 gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; 102 gpios-states = <0x1>; 102 gpios-states = <0x1>; 103 states = <1100000 0x0>, <13000 103 states = <1100000 0x0>, <1300000 0x1>; 104 }; 104 }; 105 105 106 wifi_pwrseq: pwrseq { !! 106 wifi_pwrseq: wifi_pwrseq { 107 compatible = "mmc-pwrseq-simpl 107 compatible = "mmc-pwrseq-simple"; 108 reset-gpios = <&r_pio 0 7 GPIO 108 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 109 post-power-on-delay-ms = <200> 109 post-power-on-delay-ms = <200>; 110 }; 110 }; 111 }; 111 }; 112 112 113 &cpu0 { 113 &cpu0 { 114 cpu-supply = <&vdd_cpux>; 114 cpu-supply = <&vdd_cpux>; 115 }; 115 }; 116 116 117 &ehci1 { 117 &ehci1 { 118 status = "okay"; 118 status = "okay"; 119 }; 119 }; 120 120 121 &ehci2 { 121 &ehci2 { 122 status = "okay"; 122 status = "okay"; 123 }; 123 }; 124 124 125 &emac { 125 &emac { 126 pinctrl-names = "default"; 126 pinctrl-names = "default"; 127 pinctrl-0 = <&emac_rgmii_pins>; 127 pinctrl-0 = <&emac_rgmii_pins>; 128 phy-supply = <®_gmac_3v3>; 128 phy-supply = <®_gmac_3v3>; 129 phy-handle = <&ext_rgmii_phy>; 129 phy-handle = <&ext_rgmii_phy>; 130 phy-mode = "rgmii-id"; 130 phy-mode = "rgmii-id"; 131 status = "okay"; 131 status = "okay"; 132 }; 132 }; 133 133 134 &external_mdio { 134 &external_mdio { 135 ext_rgmii_phy: ethernet-phy@7 { 135 ext_rgmii_phy: ethernet-phy@7 { 136 compatible = "ethernet-phy-iee 136 compatible = "ethernet-phy-ieee802.3-c22"; 137 reg = <7>; 137 reg = <7>; 138 }; 138 }; 139 }; 139 }; 140 140 141 &i2c0 { 141 &i2c0 { 142 status = "okay"; 142 status = "okay"; 143 143 144 eeprom@51 { 144 eeprom@51 { 145 compatible = "microchip,24c02" 145 compatible = "microchip,24c02", "atmel,24c02"; 146 reg = <0x51>; 146 reg = <0x51>; 147 pagesize = <16>; 147 pagesize = <16>; 148 read-only; 148 read-only; 149 #address-cells = <1>; 149 #address-cells = <1>; 150 #size-cells = <1>; 150 #size-cells = <1>; 151 151 152 eth_mac1: mac-address@fa { 152 eth_mac1: mac-address@fa { 153 reg = <0xfa 0x06>; 153 reg = <0xfa 0x06>; 154 }; 154 }; 155 }; 155 }; 156 }; 156 }; 157 157 158 &mmc0 { 158 &mmc0 { 159 vmmc-supply = <®_vcc3v3>; 159 vmmc-supply = <®_vcc3v3>; 160 bus-width = <4>; 160 bus-width = <4>; 161 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 161 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 162 status = "okay"; 162 status = "okay"; 163 }; 163 }; 164 164 165 &mmc1 { 165 &mmc1 { 166 vmmc-supply = <®_vcc3v3>; 166 vmmc-supply = <®_vcc3v3>; 167 vqmmc-supply = <®_vcc3v3>; 167 vqmmc-supply = <®_vcc3v3>; 168 mmc-pwrseq = <&wifi_pwrseq>; 168 mmc-pwrseq = <&wifi_pwrseq>; 169 bus-width = <4>; 169 bus-width = <4>; 170 non-removable; 170 non-removable; 171 status = "okay"; 171 status = "okay"; 172 172 173 rtl8189etv: wifi@1 { !! 173 rtl8189etv: sdio_wifi@1 { 174 reg = <1>; 174 reg = <1>; 175 }; 175 }; 176 }; 176 }; 177 177 178 &ohci1 { 178 &ohci1 { 179 status = "okay"; 179 status = "okay"; 180 }; 180 }; 181 181 182 &ohci2 { 182 &ohci2 { 183 status = "okay"; 183 status = "okay"; 184 }; 184 }; 185 185 186 &uart0 { 186 &uart0 { 187 pinctrl-names = "default"; 187 pinctrl-names = "default"; 188 pinctrl-0 = <&uart0_pa_pins>; 188 pinctrl-0 = <&uart0_pa_pins>; 189 status = "okay"; 189 status = "okay"; 190 }; 190 }; 191 191 192 &usb_otg { 192 &usb_otg { 193 dr_mode = "peripheral"; 193 dr_mode = "peripheral"; 194 status = "okay"; 194 status = "okay"; 195 }; 195 }; 196 196 197 &usbphy { 197 &usbphy { 198 /* USB Type-A port's VBUS is always on 198 /* USB Type-A port's VBUS is always on */ 199 usb0_id_det-gpios = <&pio 6 12 GPIO_AC 199 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 200 usb0_vbus-supply = <®_usb0_vbus>; 200 usb0_vbus-supply = <®_usb0_vbus>; 201 status = "okay"; 201 status = "okay"; 202 }; 202 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.