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; << 15 serial0 = &uart0; 53 serial0 = &uart0; 16 }; 54 }; 17 55 18 chosen { 56 chosen { 19 stdout-path = "serial0:115200n 57 stdout-path = "serial0:115200n8"; 20 }; 58 }; 21 59 22 leds { 60 leds { 23 compatible = "gpio-leds"; 61 compatible = "gpio-leds"; 24 62 25 led-0 { !! 63 pwr { 26 label = "nanopi:green: 64 label = "nanopi:green:pwr"; 27 gpios = <&r_pio 0 10 G 65 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 28 default-state = "on"; 66 default-state = "on"; 29 }; 67 }; 30 68 31 led-1 { !! 69 status { 32 label = "nanopi:blue:s 70 label = "nanopi:blue:status"; 33 gpios = <&pio 0 10 GPI 71 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; 34 }; 72 }; 35 }; 73 }; 36 74 37 reg_gmac_3v3: gmac-3v3 { 75 reg_gmac_3v3: gmac-3v3 { 38 compatible = "regulator-fixed" 76 compatible = "regulator-fixed"; 39 regulator-name = "gmac-3v3"; 77 regulator-name = "gmac-3v3"; 40 regulator-min-microvolt = <330 78 regulator-min-microvolt = <3300000>; 41 regulator-max-microvolt = <330 79 regulator-max-microvolt = <3300000>; 42 startup-delay-us = <100000>; 80 startup-delay-us = <100000>; 43 enable-active-high; 81 enable-active-high; 44 gpio = <&pio 3 6 GPIO_ACTIVE_H 82 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 45 }; 83 }; 46 84 47 reg_vcc3v3: vcc3v3 { 85 reg_vcc3v3: vcc3v3 { 48 compatible = "regulator-fixed" 86 compatible = "regulator-fixed"; 49 regulator-name = "vcc3v3"; 87 regulator-name = "vcc3v3"; 50 regulator-min-microvolt = <330 88 regulator-min-microvolt = <3300000>; 51 regulator-max-microvolt = <330 89 regulator-max-microvolt = <3300000>; 52 }; 90 }; 53 91 54 reg_usb0_vbus: usb0-vbus { 92 reg_usb0_vbus: usb0-vbus { 55 compatible = "regulator-fixed" 93 compatible = "regulator-fixed"; 56 regulator-name = "usb0-vbus"; 94 regulator-name = "usb0-vbus"; 57 regulator-min-microvolt = <500 95 regulator-min-microvolt = <5000000>; 58 regulator-max-microvolt = <500 96 regulator-max-microvolt = <5000000>; 59 enable-active-high; 97 enable-active-high; 60 gpio = <&r_pio 0 2 GPIO_ACTIVE 98 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 61 status = "okay"; 99 status = "okay"; 62 }; 100 }; 63 }; 101 }; 64 102 65 &ehci0 { 103 &ehci0 { 66 status = "okay"; 104 status = "okay"; 67 }; 105 }; 68 106 69 &ehci3 { 107 &ehci3 { 70 status = "okay"; 108 status = "okay"; 71 }; 109 }; 72 110 73 &emac { << 74 pinctrl-names = "default"; << 75 pinctrl-0 = <&emac_rgmii_pins>; << 76 phy-supply = <®_gmac_3v3>; << 77 phy-handle = <&ext_rgmii_phy>; << 78 phy-mode = "rgmii-id"; << 79 status = "okay"; << 80 }; << 81 << 82 &external_mdio { << 83 ext_rgmii_phy: ethernet-phy@7 { << 84 compatible = "ethernet-phy-iee << 85 reg = <7>; << 86 }; << 87 }; << 88 << 89 &mmc0 { 111 &mmc0 { >> 112 pinctrl-names = "default"; >> 113 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; 90 vmmc-supply = <®_vcc3v3>; 114 vmmc-supply = <®_vcc3v3>; 91 bus-width = <4>; 115 bus-width = <4>; 92 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 116 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 93 status = "okay"; 117 status = "okay"; 94 }; 118 }; 95 119 96 &ohci0 { 120 &ohci0 { 97 status = "okay"; 121 status = "okay"; 98 }; 122 }; 99 123 100 &ohci3 { 124 &ohci3 { 101 status = "okay"; 125 status = "okay"; 102 }; 126 }; 103 127 104 &uart0 { 128 &uart0 { 105 pinctrl-names = "default"; 129 pinctrl-names = "default"; 106 pinctrl-0 = <&uart0_pa_pins>; !! 130 pinctrl-0 = <&uart0_pins_a>; 107 status = "okay"; 131 status = "okay"; 108 }; 132 }; 109 133 110 &usb_otg { 134 &usb_otg { 111 dr_mode = "otg"; 135 dr_mode = "otg"; 112 status = "okay"; 136 status = "okay"; 113 }; 137 }; 114 138 115 &usbphy { 139 &usbphy { 116 /* USB Type-A port's VBUS is always on 140 /* USB Type-A port's VBUS is always on */ 117 usb0_id_det-gpios = <&pio 6 12 GPIO_AC 141 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 118 usb0_vbus-supply = <®_usb0_vbus>; 142 usb0_vbus-supply = <®_usb0_vbus>; 119 status = "okay"; 143 status = "okay"; 120 }; 144 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.