Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
0003 
0004 /dts-v1/;
0005 #include "sun50i-h5.dtsi"
0006 
0007 #include <dt-bindings/gpio/gpio.h>
0008 
0009 / {
0010         model = "FriendlyARM NanoPi NEO 2";
0011         compatible = "friendlyarm,nanopi-neo2", "allwinner,sun50i-h5";
0012 
0013         aliases {
0014                 ethernet0 = &emac;
0015                 serial0 = &uart0;
0016         };
0017 
0018         chosen {
0019                 stdout-path = "serial0:115200n8";
0020         };
0021 
0022         leds {
0023                 compatible = "gpio-leds";
0024 
0025                 led-0 {
0026                         label = "nanopi:green:pwr";
0027                         gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0028                         default-state = "on";
0029                 };
0030 
0031                 led-1 {
0032                         label = "nanopi:blue:status";
0033                         gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
0034                 };
0035         };
0036 
0037         reg_gmac_3v3: gmac-3v3 {
0038                 compatible = "regulator-fixed";
0039                 regulator-name = "gmac-3v3";
0040                 regulator-min-microvolt = <3300000>;
0041                 regulator-max-microvolt = <3300000>;
0042                 startup-delay-us = <100000>;
0043                 enable-active-high;
0044                 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
0045         };
0046 
0047         reg_vcc3v3: vcc3v3 {
0048                 compatible = "regulator-fixed";
0049                 regulator-name = "vcc3v3";
0050                 regulator-min-microvolt = <3300000>;
0051                 regulator-max-microvolt = <3300000>;
0052         };
0053 
0054         reg_usb0_vbus: usb0-vbus {
0055                 compatible = "regulator-fixed";
0056                 regulator-name = "usb0-vbus";
0057                 regulator-min-microvolt = <5000000>;
0058                 regulator-max-microvolt = <5000000>;
0059                 enable-active-high;
0060                 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
0061                 status = "okay";
0062         };
0063 };
0064 
0065 &ehci0 {
0066         status = "okay";
0067 };
0068 
0069 &ehci3 {
0070         status = "okay";
0071 };
0072 
0073 &emac {
0074         pinctrl-names = "default";
0075         pinctrl-0 = <&emac_rgmii_pins>;
0076         phy-supply = <&reg_gmac_3v3>;
0077         phy-handle = <&ext_rgmii_phy>;
0078         phy-mode = "rgmii-id";
0079         status = "okay";
0080 };
0081 
0082 &external_mdio {
0083         ext_rgmii_phy: ethernet-phy@7 {
0084                 compatible = "ethernet-phy-ieee802.3-c22";
0085                 reg = <7>;
0086         };
0087 };
0088 
0089 &mmc0 {
0090         vmmc-supply = <&reg_vcc3v3>;
0091         bus-width = <4>;
0092         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0093         status = "okay";
0094 };
0095 
0096 &ohci0 {
0097         status = "okay";
0098 };
0099 
0100 &ohci3 {
0101         status = "okay";
0102 };
0103 
0104 &uart0 {
0105         pinctrl-names = "default";
0106         pinctrl-0 = <&uart0_pa_pins>;
0107         status = "okay";
0108 };
0109 
0110 &usb_otg {
0111         dr_mode = "otg";
0112         status = "okay";
0113 };
0114 
0115 &usbphy {
0116         /* USB Type-A port's VBUS is always on */
0117         usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0118         usb0_vbus-supply = <&reg_usb0_vbus>;
0119         status = "okay";
0120 };