xref: /openbmc/u-boot/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts (revision 6f443330186676004148930b4dd77f1c2735bd36)
1*76d69eb0SHauke Mehrtens/*
2*76d69eb0SHauke Mehrtens * Copyright (C) 2016 ARM Ltd.
3*76d69eb0SHauke Mehrtens * Copyright (C) 2018 Hauke Mehrtens <hauke@hauke-m.de>
4*76d69eb0SHauke Mehrtens *
5*76d69eb0SHauke Mehrtens * SPDX-License-Identifier: (GPL-2.0+ OR X11)
6*76d69eb0SHauke Mehrtens */
7*76d69eb0SHauke Mehrtens
8*76d69eb0SHauke Mehrtens/dts-v1/;
9*76d69eb0SHauke Mehrtens#include "sun50i-h5.dtsi"
10*76d69eb0SHauke Mehrtens
11*76d69eb0SHauke Mehrtens#include <dt-bindings/gpio/gpio.h>
12*76d69eb0SHauke Mehrtens#include <dt-bindings/input/input.h>
13*76d69eb0SHauke Mehrtens#include <dt-bindings/pinctrl/sun4i-a10.h>
14*76d69eb0SHauke Mehrtens
15*76d69eb0SHauke Mehrtens/ {
16*76d69eb0SHauke Mehrtens	model = "Xunlong Orange Pi Zero Plus";
17*76d69eb0SHauke Mehrtens	compatible = "xunlong,orangepi-zero-plus", "allwinner,sun50i-h5";
18*76d69eb0SHauke Mehrtens
19*76d69eb0SHauke Mehrtens	reg_vcc3v3: vcc3v3 {
20*76d69eb0SHauke Mehrtens		compatible = "regulator-fixed";
21*76d69eb0SHauke Mehrtens		regulator-name = "vcc3v3";
22*76d69eb0SHauke Mehrtens		regulator-min-microvolt = <3300000>;
23*76d69eb0SHauke Mehrtens		regulator-max-microvolt = <3300000>;
24*76d69eb0SHauke Mehrtens	};
25*76d69eb0SHauke Mehrtens
26*76d69eb0SHauke Mehrtens	aliases {
27*76d69eb0SHauke Mehrtens		ethernet0 = &emac;
28*76d69eb0SHauke Mehrtens		ethernet1 = &rtl8189ftv;
29*76d69eb0SHauke Mehrtens		serial0 = &uart0;
30*76d69eb0SHauke Mehrtens	};
31*76d69eb0SHauke Mehrtens
32*76d69eb0SHauke Mehrtens	chosen {
33*76d69eb0SHauke Mehrtens		stdout-path = "serial0:115200n8";
34*76d69eb0SHauke Mehrtens	};
35*76d69eb0SHauke Mehrtens
36*76d69eb0SHauke Mehrtens	leds {
37*76d69eb0SHauke Mehrtens		compatible = "gpio-leds";
38*76d69eb0SHauke Mehrtens
39*76d69eb0SHauke Mehrtens		pwr {
40*76d69eb0SHauke Mehrtens			label = "orangepi:green:pwr";
41*76d69eb0SHauke Mehrtens			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
42*76d69eb0SHauke Mehrtens			default-state = "on";
43*76d69eb0SHauke Mehrtens		};
44*76d69eb0SHauke Mehrtens
45*76d69eb0SHauke Mehrtens		status {
46*76d69eb0SHauke Mehrtens			label = "orangepi:red:status";
47*76d69eb0SHauke Mehrtens			gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
48*76d69eb0SHauke Mehrtens		};
49*76d69eb0SHauke Mehrtens	};
50*76d69eb0SHauke Mehrtens
51*76d69eb0SHauke Mehrtens	reg_gmac_3v3: gmac-3v3 {
52*76d69eb0SHauke Mehrtens		compatible = "regulator-fixed";
53*76d69eb0SHauke Mehrtens		regulator-name = "gmac-3v3";
54*76d69eb0SHauke Mehrtens		regulator-min-microvolt = <3300000>;
55*76d69eb0SHauke Mehrtens		regulator-max-microvolt = <3300000>;
56*76d69eb0SHauke Mehrtens		startup-delay-us = <100000>;
57*76d69eb0SHauke Mehrtens		enable-active-high;
58*76d69eb0SHauke Mehrtens		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
59*76d69eb0SHauke Mehrtens	};
60*76d69eb0SHauke Mehrtens};
61*76d69eb0SHauke Mehrtens
62*76d69eb0SHauke Mehrtens&ehci0 {
63*76d69eb0SHauke Mehrtens	status = "okay";
64*76d69eb0SHauke Mehrtens};
65*76d69eb0SHauke Mehrtens
66*76d69eb0SHauke Mehrtens&ehci1 {
67*76d69eb0SHauke Mehrtens	status = "okay";
68*76d69eb0SHauke Mehrtens};
69*76d69eb0SHauke Mehrtens
70*76d69eb0SHauke Mehrtens&emac {
71*76d69eb0SHauke Mehrtens	pinctrl-names = "default";
72*76d69eb0SHauke Mehrtens	pinctrl-0 = <&emac_rgmii_pins>;
73*76d69eb0SHauke Mehrtens	phy-supply = <&reg_gmac_3v3>;
74*76d69eb0SHauke Mehrtens	phy-handle = <&ext_rgmii_phy>;
75*76d69eb0SHauke Mehrtens	phy-mode = "rgmii";
76*76d69eb0SHauke Mehrtens	status = "okay";
77*76d69eb0SHauke Mehrtens};
78*76d69eb0SHauke Mehrtens
79*76d69eb0SHauke Mehrtens&external_mdio {
80*76d69eb0SHauke Mehrtens	ext_rgmii_phy: ethernet-phy@1 {
81*76d69eb0SHauke Mehrtens		compatible = "ethernet-phy-ieee802.3-c22";
82*76d69eb0SHauke Mehrtens		reg = <1>;
83*76d69eb0SHauke Mehrtens	};
84*76d69eb0SHauke Mehrtens};
85*76d69eb0SHauke Mehrtens
86*76d69eb0SHauke Mehrtens&mmc0 {
87*76d69eb0SHauke Mehrtens	vmmc-supply = <&reg_vcc3v3>;
88*76d69eb0SHauke Mehrtens	bus-width = <4>;
89*76d69eb0SHauke Mehrtens	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
90*76d69eb0SHauke Mehrtens	status = "okay";
91*76d69eb0SHauke Mehrtens};
92*76d69eb0SHauke Mehrtens
93*76d69eb0SHauke Mehrtens&mmc1 {
94*76d69eb0SHauke Mehrtens	vmmc-supply = <&reg_vcc3v3>;
95*76d69eb0SHauke Mehrtens	bus-width = <4>;
96*76d69eb0SHauke Mehrtens	non-removable;
97*76d69eb0SHauke Mehrtens	status = "okay";
98*76d69eb0SHauke Mehrtens
99*76d69eb0SHauke Mehrtens	/*
100*76d69eb0SHauke Mehrtens	 * Explicitly define the sdio device, so that we can add an ethernet
101*76d69eb0SHauke Mehrtens	 * alias for it (which e.g. makes u-boot set a mac-address).
102*76d69eb0SHauke Mehrtens	 */
103*76d69eb0SHauke Mehrtens	rtl8189ftv: sdio_wifi@1 {
104*76d69eb0SHauke Mehrtens		reg = <1>;
105*76d69eb0SHauke Mehrtens	};
106*76d69eb0SHauke Mehrtens};
107*76d69eb0SHauke Mehrtens
108*76d69eb0SHauke Mehrtens&spi0  {
109*76d69eb0SHauke Mehrtens	status = "okay";
110*76d69eb0SHauke Mehrtens
111*76d69eb0SHauke Mehrtens	flash@0 {
112*76d69eb0SHauke Mehrtens		#address-cells = <1>;
113*76d69eb0SHauke Mehrtens		#size-cells = <1>;
114*76d69eb0SHauke Mehrtens		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
115*76d69eb0SHauke Mehrtens		reg = <0>;
116*76d69eb0SHauke Mehrtens		spi-max-frequency = <40000000>;
117*76d69eb0SHauke Mehrtens	};
118*76d69eb0SHauke Mehrtens};
119*76d69eb0SHauke Mehrtens
120*76d69eb0SHauke Mehrtens&ohci0 {
121*76d69eb0SHauke Mehrtens	status = "okay";
122*76d69eb0SHauke Mehrtens};
123*76d69eb0SHauke Mehrtens
124*76d69eb0SHauke Mehrtens&ohci1 {
125*76d69eb0SHauke Mehrtens	status = "okay";
126*76d69eb0SHauke Mehrtens};
127*76d69eb0SHauke Mehrtens
128*76d69eb0SHauke Mehrtens&uart0 {
129*76d69eb0SHauke Mehrtens	pinctrl-names = "default";
130*76d69eb0SHauke Mehrtens	pinctrl-0 = <&uart0_pins_a>;
131*76d69eb0SHauke Mehrtens	status = "okay";
132*76d69eb0SHauke Mehrtens};
133*76d69eb0SHauke Mehrtens
134*76d69eb0SHauke Mehrtens&usb_otg {
135*76d69eb0SHauke Mehrtens	dr_mode = "peripheral";
136*76d69eb0SHauke Mehrtens	status = "okay";
137*76d69eb0SHauke Mehrtens};
138*76d69eb0SHauke Mehrtens
139*76d69eb0SHauke Mehrtens&usbphy {
140*76d69eb0SHauke Mehrtens	/* USB Type-A ports' VBUS is always on */
141*76d69eb0SHauke Mehrtens	usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
142*76d69eb0SHauke Mehrtens	status = "okay";
143*76d69eb0SHauke Mehrtens};
144