1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) !! 1 /* 2 // Copyright (C) 2017 Icenowy Zheng <icenowy@ao !! 2 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io> >> 3 * >> 4 * This file is dual-licensed: you can use it either under the terms >> 5 * of the GPL or the X11 license, at your option. Note that this dual >> 6 * licensing only applies to this file, and not this project as a >> 7 * whole. >> 8 * >> 9 * a) This file is free software; you can redistribute it and/or >> 10 * modify it under the terms of the GNU General Public License as >> 11 * published by the Free Software Foundation; either version 2 of the >> 12 * License, or (at your option) any later version. >> 13 * >> 14 * This file is distributed in the hope that it will be useful, >> 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of >> 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> 17 * GNU General Public License for more details. >> 18 * >> 19 * Or, alternatively, >> 20 * >> 21 * b) Permission is hereby granted, free of charge, to any person >> 22 * obtaining a copy of this software and associated documentation >> 23 * files (the "Software"), to deal in the Software without >> 24 * restriction, including without limitation the rights to use, >> 25 * copy, modify, merge, publish, distribute, sublicense, and/or >> 26 * sell copies of the Software, and to permit persons to whom the >> 27 * Software is furnished to do so, subject to the following >> 28 * conditions: >> 29 * >> 30 * The above copyright notice and this permission notice shall be >> 31 * included in all copies or substantial portions of the Software. >> 32 * >> 33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> 34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES >> 35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> 36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT >> 37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, >> 38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING >> 39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR >> 40 * OTHER DEALINGS IN THE SOFTWARE. >> 41 */ 3 42 4 /dts-v1/; 43 /dts-v1/; 5 #include "sun50i-h5.dtsi" 44 #include "sun50i-h5.dtsi" 6 45 7 #include <dt-bindings/gpio/gpio.h> 46 #include <dt-bindings/gpio/gpio.h> 8 47 9 / { 48 / { 10 model = "FriendlyARM NanoPi NEO 2"; 49 model = "FriendlyARM NanoPi NEO 2"; 11 compatible = "friendlyarm,nanopi-neo2" 50 compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5"; 12 51 13 aliases { 52 aliases { 14 ethernet0 = &emac; 53 ethernet0 = &emac; 15 serial0 = &uart0; 54 serial0 = &uart0; 16 }; 55 }; 17 56 18 chosen { 57 chosen { 19 stdout-path = "serial0:115200n 58 stdout-path = "serial0:115200n8"; 20 }; 59 }; 21 60 22 leds { 61 leds { 23 compatible = "gpio-leds"; 62 compatible = "gpio-leds"; 24 63 25 led-0 { !! 64 pwr { 26 label = "nanopi:green: 65 label = "nanopi:green:pwr"; 27 gpios = <&r_pio 0 10 G 66 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 28 default-state = "on"; 67 default-state = "on"; 29 }; 68 }; 30 69 31 led-1 { !! 70 status { 32 label = "nanopi:blue:s 71 label = "nanopi:blue:status"; 33 gpios = <&pio 0 10 GPI 72 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; 34 }; 73 }; 35 }; 74 }; 36 75 37 reg_gmac_3v3: gmac-3v3 { 76 reg_gmac_3v3: gmac-3v3 { 38 compatible = "regulator-fixed" 77 compatible = "regulator-fixed"; 39 regulator-name = "gmac-3v3"; 78 regulator-name = "gmac-3v3"; 40 regulator-min-microvolt = <330 79 regulator-min-microvolt = <3300000>; 41 regulator-max-microvolt = <330 80 regulator-max-microvolt = <3300000>; 42 startup-delay-us = <100000>; 81 startup-delay-us = <100000>; 43 enable-active-high; 82 enable-active-high; 44 gpio = <&pio 3 6 GPIO_ACTIVE_H 83 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 45 }; 84 }; 46 85 47 reg_vcc3v3: vcc3v3 { 86 reg_vcc3v3: vcc3v3 { 48 compatible = "regulator-fixed" 87 compatible = "regulator-fixed"; 49 regulator-name = "vcc3v3"; 88 regulator-name = "vcc3v3"; 50 regulator-min-microvolt = <330 89 regulator-min-microvolt = <3300000>; 51 regulator-max-microvolt = <330 90 regulator-max-microvolt = <3300000>; 52 }; 91 }; 53 92 54 reg_usb0_vbus: usb0-vbus { 93 reg_usb0_vbus: usb0-vbus { 55 compatible = "regulator-fixed" 94 compatible = "regulator-fixed"; 56 regulator-name = "usb0-vbus"; 95 regulator-name = "usb0-vbus"; 57 regulator-min-microvolt = <500 96 regulator-min-microvolt = <5000000>; 58 regulator-max-microvolt = <500 97 regulator-max-microvolt = <5000000>; 59 enable-active-high; 98 enable-active-high; 60 gpio = <&r_pio 0 2 GPIO_ACTIVE 99 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 61 status = "okay"; 100 status = "okay"; 62 }; 101 }; 63 }; 102 }; 64 103 65 &ehci0 { 104 &ehci0 { 66 status = "okay"; 105 status = "okay"; 67 }; 106 }; 68 107 69 &ehci3 { 108 &ehci3 { 70 status = "okay"; 109 status = "okay"; 71 }; 110 }; 72 111 73 &emac { 112 &emac { 74 pinctrl-names = "default"; 113 pinctrl-names = "default"; 75 pinctrl-0 = <&emac_rgmii_pins>; 114 pinctrl-0 = <&emac_rgmii_pins>; 76 phy-supply = <®_gmac_3v3>; 115 phy-supply = <®_gmac_3v3>; 77 phy-handle = <&ext_rgmii_phy>; 116 phy-handle = <&ext_rgmii_phy>; 78 phy-mode = "rgmii-id"; !! 117 phy-mode = "rgmii"; 79 status = "okay"; 118 status = "okay"; 80 }; 119 }; 81 120 82 &external_mdio { 121 &external_mdio { 83 ext_rgmii_phy: ethernet-phy@7 { 122 ext_rgmii_phy: ethernet-phy@7 { 84 compatible = "ethernet-phy-iee 123 compatible = "ethernet-phy-ieee802.3-c22"; 85 reg = <7>; 124 reg = <7>; 86 }; 125 }; 87 }; 126 }; 88 127 89 &mmc0 { 128 &mmc0 { >> 129 pinctrl-names = "default"; >> 130 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; 90 vmmc-supply = <®_vcc3v3>; 131 vmmc-supply = <®_vcc3v3>; 91 bus-width = <4>; 132 bus-width = <4>; 92 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 133 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 93 status = "okay"; 134 status = "okay"; 94 }; 135 }; 95 136 96 &ohci0 { 137 &ohci0 { 97 status = "okay"; 138 status = "okay"; 98 }; 139 }; 99 140 100 &ohci3 { 141 &ohci3 { 101 status = "okay"; 142 status = "okay"; 102 }; 143 }; 103 144 104 &uart0 { 145 &uart0 { 105 pinctrl-names = "default"; 146 pinctrl-names = "default"; 106 pinctrl-0 = <&uart0_pa_pins>; !! 147 pinctrl-0 = <&uart0_pins_a>; 107 status = "okay"; 148 status = "okay"; 108 }; 149 }; 109 150 110 &usb_otg { 151 &usb_otg { 111 dr_mode = "otg"; 152 dr_mode = "otg"; 112 status = "okay"; 153 status = "okay"; 113 }; 154 }; 114 155 115 &usbphy { 156 &usbphy { 116 /* USB Type-A port's VBUS is always on 157 /* USB Type-A port's VBUS is always on */ 117 usb0_id_det-gpios = <&pio 6 12 GPIO_AC 158 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 118 usb0_vbus-supply = <®_usb0_vbus>; 159 usb0_vbus-supply = <®_usb0_vbus>; 119 status = "okay"; 160 status = "okay"; 120 }; 161 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.