0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2016 ARM Ltd.
0003 // Copyright (C) 2018 Hauke Mehrtens <hauke@hauke-m.de>
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 = "Xunlong Orange Pi Zero Plus";
0014 compatible = "xunlong,orangepi-zero-plus", "allwinner,sun50i-h5";
0015
0016 reg_vcc3v3: vcc3v3 {
0017 compatible = "regulator-fixed";
0018 regulator-name = "vcc3v3";
0019 regulator-min-microvolt = <3300000>;
0020 regulator-max-microvolt = <3300000>;
0021 };
0022
0023 aliases {
0024 ethernet0 = &emac;
0025 ethernet1 = &rtl8189ftv;
0026 serial0 = &uart0;
0027 };
0028
0029 chosen {
0030 stdout-path = "serial0:115200n8";
0031 };
0032
0033 leds {
0034 compatible = "gpio-leds";
0035
0036 led-0 {
0037 label = "orangepi:green:pwr";
0038 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
0039 default-state = "on";
0040 };
0041
0042 led-1 {
0043 label = "orangepi:red:status";
0044 gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
0045 };
0046 };
0047
0048 reg_gmac_3v3: gmac-3v3 {
0049 compatible = "regulator-fixed";
0050 regulator-name = "gmac-3v3";
0051 regulator-min-microvolt = <3300000>;
0052 regulator-max-microvolt = <3300000>;
0053 startup-delay-us = <100000>;
0054 enable-active-high;
0055 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
0056 };
0057 };
0058
0059 &ehci0 {
0060 status = "okay";
0061 };
0062
0063 &ehci1 {
0064 status = "okay";
0065 };
0066
0067 &emac {
0068 pinctrl-names = "default";
0069 pinctrl-0 = <&emac_rgmii_pins>;
0070 phy-supply = <®_gmac_3v3>;
0071 phy-handle = <&ext_rgmii_phy>;
0072 phy-mode = "rgmii-id";
0073 status = "okay";
0074 };
0075
0076 &external_mdio {
0077 ext_rgmii_phy: ethernet-phy@1 {
0078 compatible = "ethernet-phy-ieee802.3-c22";
0079 reg = <1>;
0080 };
0081 };
0082
0083 &mmc0 {
0084 vmmc-supply = <®_vcc3v3>;
0085 bus-width = <4>;
0086 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0087 status = "okay";
0088 };
0089
0090 &mmc1 {
0091 vmmc-supply = <®_vcc3v3>;
0092 bus-width = <4>;
0093 non-removable;
0094 status = "okay";
0095
0096 /*
0097 * Explicitly define the sdio device, so that we can add an ethernet
0098 * alias for it (which e.g. makes u-boot set a mac-address).
0099 */
0100 rtl8189ftv: sdio_wifi@1 {
0101 reg = <1>;
0102 };
0103 };
0104
0105 &spi0 {
0106 status = "okay";
0107
0108 flash@0 {
0109 #address-cells = <1>;
0110 #size-cells = <1>;
0111 compatible = "mxicy,mx25l1606e", "winbond,w25q128";
0112 reg = <0>;
0113 spi-max-frequency = <40000000>;
0114 };
0115 };
0116
0117 &ohci0 {
0118 status = "okay";
0119 };
0120
0121 &ohci1 {
0122 status = "okay";
0123 };
0124
0125 &uart0 {
0126 pinctrl-names = "default";
0127 pinctrl-0 = <&uart0_pa_pins>;
0128 status = "okay";
0129 };
0130
0131 &usb_otg {
0132 dr_mode = "peripheral";
0133 status = "okay";
0134 };
0135
0136 &usbphy {
0137 /* USB Type-A ports' VBUS is always on */
0138 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0139 status = "okay";
0140 };