0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2017 Antony Antony <antony@phenome.org>
0003 // Copyright (C) 2016 ARM Ltd.
0004
0005 /dts-v1/;
0006 #include "sun50i-h5.dtsi"
0007
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include <dt-bindings/input/input.h>
0010 #include <dt-bindings/pinctrl/sun4i-a10.h>
0011
0012 / {
0013 model = "FriendlyARM NanoPi NEO Plus2";
0014 compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5";
0015
0016 aliases {
0017 ethernet0 = &emac;
0018 serial0 = &uart0;
0019 };
0020
0021 chosen {
0022 stdout-path = "serial0:115200n8";
0023 };
0024
0025 leds {
0026 compatible = "gpio-leds";
0027
0028 led-0 {
0029 label = "nanopi:green:pwr";
0030 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0031 default-state = "on";
0032 };
0033
0034 led-1 {
0035 label = "nanopi:red:status";
0036 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
0037 };
0038 };
0039
0040 reg_gmac_3v3: gmac-3v3 {
0041 compatible = "regulator-fixed";
0042 regulator-name = "gmac-3v3";
0043 regulator-min-microvolt = <3300000>;
0044 regulator-max-microvolt = <3300000>;
0045 startup-delay-us = <100000>;
0046 enable-active-high;
0047 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
0048 };
0049
0050 reg_vcc3v3: vcc3v3 {
0051 compatible = "regulator-fixed";
0052 regulator-name = "vcc3v3";
0053 regulator-min-microvolt = <3300000>;
0054 regulator-max-microvolt = <3300000>;
0055 };
0056
0057 vdd_cpux: gpio-regulator {
0058 compatible = "regulator-gpio";
0059 regulator-name = "vdd-cpux";
0060 regulator-type = "voltage";
0061 regulator-boot-on;
0062 regulator-always-on;
0063 regulator-min-microvolt = <1100000>;
0064 regulator-max-microvolt = <1300000>;
0065 regulator-ramp-delay = <50>; /* 4ms */
0066 gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
0067 gpios-states = <0x1>;
0068 states = <1100000 0>, <1300000 1>;
0069 };
0070
0071 wifi_pwrseq: wifi_pwrseq {
0072 compatible = "mmc-pwrseq-simple";
0073 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
0074 post-power-on-delay-ms = <200>;
0075 };
0076 };
0077
0078 &codec {
0079 allwinner,audio-routing =
0080 "Line Out", "LINEOUT",
0081 "MIC1", "Mic",
0082 "Mic", "MBIAS";
0083 status = "okay";
0084 };
0085
0086 &ehci0 {
0087 status = "okay";
0088 };
0089
0090 &ehci3 {
0091 status = "okay";
0092 };
0093
0094 &emac {
0095 pinctrl-names = "default";
0096 pinctrl-0 = <&emac_rgmii_pins>;
0097 phy-supply = <®_gmac_3v3>;
0098 phy-handle = <&ext_rgmii_phy>;
0099 phy-mode = "rgmii-id";
0100 status = "okay";
0101 };
0102
0103 &external_mdio {
0104 ext_rgmii_phy: ethernet-phy@7 {
0105 compatible = "ethernet-phy-ieee802.3-c22";
0106 reg = <7>;
0107 };
0108 };
0109
0110 &mmc0 {
0111 vmmc-supply = <®_vcc3v3>;
0112 bus-width = <4>;
0113 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0114 status = "okay";
0115 };
0116
0117 &mmc1 {
0118 vmmc-supply = <®_vcc3v3>;
0119 vqmmc-supply = <®_vcc3v3>;
0120 mmc-pwrseq = <&wifi_pwrseq>;
0121 bus-width = <4>;
0122 non-removable;
0123 status = "okay";
0124
0125 brcmf: wifi@1 {
0126 reg = <1>;
0127 compatible = "brcm,bcm4329-fmac";
0128 };
0129 };
0130
0131 &mmc2 {
0132 pinctrl-names = "default";
0133 pinctrl-0 = <&mmc2_8bit_pins>;
0134 vmmc-supply = <®_vcc3v3>;
0135 bus-width = <8>;
0136 non-removable;
0137 cap-mmc-hw-reset;
0138 status = "okay";
0139 };
0140
0141 &ohci0 {
0142 status = "okay";
0143 };
0144
0145 &ohci3 {
0146 status = "okay";
0147 };
0148
0149 &uart0 {
0150 pinctrl-names = "default";
0151 pinctrl-0 = <&uart0_pa_pins>;
0152 status = "okay";
0153 };
0154
0155 &usb_otg {
0156 dr_mode = "host";
0157 status = "okay";
0158 };
0159
0160 &usbphy {
0161 /* USB Type-A ports' VBUS is always on */
0162 status = "okay";
0163 };