1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (C) 2017 Antony Antony <antony@phenome.org> 4 * Copyright (C) 2016 ARM Ltd. 5 */ 6 7/dts-v1/; 8#include "sun50i-h5.dtsi" 9 10#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/input/input.h> 12#include <dt-bindings/pinctrl/sun4i-a10.h> 13 14/ { 15 model = "FriendlyARM NanoPi NEO Plus2"; 16 compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5"; 17 18 aliases { 19 ethernet0 = &emac; 20 serial0 = &uart0; 21 }; 22 23 chosen { 24 stdout-path = "serial0:115200n8"; 25 }; 26 27 leds { 28 compatible = "gpio-leds"; 29 30 pwr { 31 label = "nanopi:green:pwr"; 32 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 33 default-state = "on"; 34 }; 35 36 status { 37 label = "nanopi:red:status"; 38 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; 39 }; 40 }; 41 42 reg_gmac_3v3: gmac-3v3 { 43 compatible = "regulator-fixed"; 44 regulator-name = "gmac-3v3"; 45 regulator-min-microvolt = <3300000>; 46 regulator-max-microvolt = <3300000>; 47 startup-delay-us = <100000>; 48 enable-active-high; 49 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 50 }; 51 52 reg_vcc3v3: vcc3v3 { 53 compatible = "regulator-fixed"; 54 regulator-name = "vcc3v3"; 55 regulator-min-microvolt = <3300000>; 56 regulator-max-microvolt = <3300000>; 57 }; 58 59 vdd_cpux: gpio-regulator { 60 compatible = "regulator-gpio"; 61 regulator-name = "vdd-cpux"; 62 regulator-type = "voltage"; 63 regulator-boot-on; 64 regulator-always-on; 65 regulator-min-microvolt = <1100000>; 66 regulator-max-microvolt = <1300000>; 67 regulator-ramp-delay = <50>; /* 4ms */ 68 gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; 69 gpios-states = <0x1>; 70 states = <1100000 0>, <1300000 1>; 71 }; 72 73 wifi_pwrseq: wifi_pwrseq { 74 compatible = "mmc-pwrseq-simple"; 75 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 76 post-power-on-delay-ms = <200>; 77 }; 78}; 79 80&codec { 81 allwinner,audio-routing = 82 "Line Out", "LINEOUT", 83 "MIC1", "Mic", 84 "Mic", "MBIAS"; 85 status = "okay"; 86}; 87 88&ehci0 { 89 status = "okay"; 90}; 91 92&ehci3 { 93 status = "okay"; 94}; 95 96&emac { 97 pinctrl-names = "default"; 98 pinctrl-0 = <&emac_rgmii_pins>; 99 phy-supply = <®_gmac_3v3>; 100 phy-handle = <&ext_rgmii_phy>; 101 phy-mode = "rgmii"; 102 status = "okay"; 103}; 104 105&external_mdio { 106 ext_rgmii_phy: ethernet-phy@7 { 107 compatible = "ethernet-phy-ieee802.3-c22"; 108 reg = <7>; 109 }; 110}; 111 112&mmc0 { 113 vmmc-supply = <®_vcc3v3>; 114 bus-width = <4>; 115 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 116 status = "okay"; 117}; 118 119&mmc1 { 120 vmmc-supply = <®_vcc3v3>; 121 vqmmc-supply = <®_vcc3v3>; 122 mmc-pwrseq = <&wifi_pwrseq>; 123 bus-width = <4>; 124 non-removable; 125 status = "okay"; 126 127 brcmf: wifi@1 { 128 reg = <1>; 129 compatible = "brcm,bcm4329-fmac"; 130 }; 131}; 132 133&mmc2 { 134 pinctrl-names = "default"; 135 pinctrl-0 = <&mmc2_8bit_pins>; 136 vmmc-supply = <®_vcc3v3>; 137 bus-width = <8>; 138 non-removable; 139 cap-mmc-hw-reset; 140 status = "okay"; 141}; 142 143&ohci0 { 144 status = "okay"; 145}; 146 147&ohci3 { 148 status = "okay"; 149}; 150 151&uart0 { 152 pinctrl-names = "default"; 153 pinctrl-0 = <&uart0_pa_pins>; 154 status = "okay"; 155}; 156 157&usb_otg { 158 dr_mode = "host"; 159 status = "okay"; 160}; 161 162&usbphy { 163 /* USB Type-A ports' VBUS is always on */ 164 status = "okay"; 165}; 166