| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
// Copyright (C) 2017 Icenowy Zheng <[email protected]> |
| 3 |
|
| 4 |
/dts-v1/; |
| 5 |
#include "sun50i-h5.dtsi" |
| 6 |
|
| 7 |
#include <dt-bindings/gpio/gpio.h> |
| 8 |
|
| 9 |
/ { |
| 10 |
model = "FriendlyARM NanoPi NEO 2"; |
| 11 |
compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5"; |
| 12 |
|
| 13 |
aliases { |
| 14 |
ethernet0 = &emac; |
| 15 |
serial0 = &uart0; |
| 16 |
}; |
| 17 |
|
| 18 |
chosen { |
| 19 |
stdout-path = "serial0:115200n8"; |
| 20 |
}; |
| 21 |
|
| 22 |
leds { |
| 23 |
compatible = "gpio-leds"; |
| 24 |
|
| 25 |
led-0 { |
| 26 |
label = "nanopi:green:pwr"; |
| 27 |
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; |
| 28 |
default-state = "on"; |
| 29 |
}; |
| 30 |
|
| 31 |
led-1 { |
| 32 |
label = "nanopi:blue:status"; |
| 33 |
gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; |
| 34 |
}; |
| 35 |
}; |
| 36 |
|
| 37 |
reg_gmac_3v3: gmac-3v3 { |
| 38 |
compatible = "regulator-fixed"; |
| 39 |
regulator-name = "gmac-3v3"; |
| 40 |
regulator-min-microvolt = <3300000>; |
| 41 |
regulator-max-microvolt = <3300000>; |
| 42 |
startup-delay-us = <100000>; |
| 43 |
enable-active-high; |
| 44 |
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; |
| 45 |
}; |
| 46 |
|
| 47 |
reg_vcc3v3: vcc3v3 { |
| 48 |
compatible = "regulator-fixed"; |
| 49 |
regulator-name = "vcc3v3"; |
| 50 |
regulator-min-microvolt = <3300000>; |
| 51 |
regulator-max-microvolt = <3300000>; |
| 52 |
}; |
| 53 |
|
| 54 |
reg_usb0_vbus: usb0-vbus { |
| 55 |
compatible = "regulator-fixed"; |
| 56 |
regulator-name = "usb0-vbus"; |
| 57 |
regulator-min-microvolt = <5000000>; |
| 58 |
regulator-max-microvolt = <5000000>; |
| 59 |
enable-active-high; |
| 60 |
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ |
| 61 |
status = "okay"; |
| 62 |
}; |
| 63 |
}; |
| 64 |
|
| 65 |
&ehci0 { |
| 66 |
status = "okay"; |
| 67 |
}; |
| 68 |
|
| 69 |
&ehci3 { |
| 70 |
status = "okay"; |
| 71 |
}; |
| 72 |
|
| 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-ieee802.3-c22"; |
| 85 |
reg = <7>; |
| 86 |
}; |
| 87 |
}; |
| 88 |
|
| 89 |
&mmc0 { |
| 90 |
vmmc-supply = <®_vcc3v3>; |
| 91 |
disable-wp; |
| 92 |
bus-width = <4>; |
| 93 |
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 94 |
status = "okay"; |
| 95 |
}; |
| 96 |
|
| 97 |
&ohci0 { |
| 98 |
status = "okay"; |
| 99 |
}; |
| 100 |
|
| 101 |
&ohci3 { |
| 102 |
status = "okay"; |
| 103 |
}; |
| 104 |
|
| 105 |
&uart0 { |
| 106 |
pinctrl-names = "default"; |
| 107 |
pinctrl-0 = <&uart0_pa_pins>; |
| 108 |
status = "okay"; |
| 109 |
}; |
| 110 |
|
| 111 |
&usb_otg { |
| 112 |
dr_mode = "otg"; |
| 113 |
status = "okay"; |
| 114 |
}; |
| 115 |
|
| 116 |
&usbphy { |
| 117 |
/* USB Type-A port's VBUS is always on */ |
| 118 |
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ |
| 119 |
usb0_vbus-supply = <®_usb0_vbus>; |
| 120 |
status = "okay"; |
| 121 |
}; |