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