xref: /openbmc/u-boot/arch/arm/dts/sun8i-h3-orangepi-plus.dts (revision 1adbf2966adebe67de3dd17094749d387604194e)
1d6e6d4b3SHans de Goede/*
2d6e6d4b3SHans de Goede * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
3d6e6d4b3SHans de Goede *
4d6e6d4b3SHans de Goede * This file is dual-licensed: you can use it either under the terms
5d6e6d4b3SHans de Goede * of the GPL or the X11 license, at your option. Note that this dual
6d6e6d4b3SHans de Goede * licensing only applies to this file, and not this project as a
7d6e6d4b3SHans de Goede * whole.
8d6e6d4b3SHans de Goede *
9d6e6d4b3SHans de Goede *  a) This file is free software; you can redistribute it and/or
10d6e6d4b3SHans de Goede *     modify it under the terms of the GNU General Public License as
11d6e6d4b3SHans de Goede *     published by the Free Software Foundation; either version 2 of the
12d6e6d4b3SHans de Goede *     License, or (at your option) any later version.
13d6e6d4b3SHans de Goede *
14d6e6d4b3SHans de Goede *     This file is distributed in the hope that it will be useful,
15d6e6d4b3SHans de Goede *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16d6e6d4b3SHans de Goede *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17d6e6d4b3SHans de Goede *     GNU General Public License for more details.
18d6e6d4b3SHans de Goede *
19d6e6d4b3SHans de Goede * Or, alternatively,
20d6e6d4b3SHans de Goede *
21d6e6d4b3SHans de Goede *  b) Permission is hereby granted, free of charge, to any person
22d6e6d4b3SHans de Goede *     obtaining a copy of this software and associated documentation
23d6e6d4b3SHans de Goede *     files (the "Software"), to deal in the Software without
24d6e6d4b3SHans de Goede *     restriction, including without limitation the rights to use,
25d6e6d4b3SHans de Goede *     copy, modify, merge, publish, distribute, sublicense, and/or
26d6e6d4b3SHans de Goede *     sell copies of the Software, and to permit persons to whom the
27d6e6d4b3SHans de Goede *     Software is furnished to do so, subject to the following
28d6e6d4b3SHans de Goede *     conditions:
29d6e6d4b3SHans de Goede *
30d6e6d4b3SHans de Goede *     The above copyright notice and this permission notice shall be
31d6e6d4b3SHans de Goede *     included in all copies or substantial portions of the Software.
32d6e6d4b3SHans de Goede *
33d6e6d4b3SHans de Goede *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34d6e6d4b3SHans de Goede *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35d6e6d4b3SHans de Goede *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36d6e6d4b3SHans de Goede *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37d6e6d4b3SHans de Goede *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38d6e6d4b3SHans de Goede *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39d6e6d4b3SHans de Goede *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40d6e6d4b3SHans de Goede *     OTHER DEALINGS IN THE SOFTWARE.
41d6e6d4b3SHans de Goede */
42d6e6d4b3SHans de Goede
43fa8a485dSHans de Goede/* The Orange Pi Plus is an extended version of the Orange Pi 2 */
44fa8a485dSHans de Goede#include "sun8i-h3-orangepi-2.dts"
45d6e6d4b3SHans de Goede
46d6e6d4b3SHans de Goede/ {
47019731a8SHans de Goede	model = "Xunlong Orange Pi Plus / Plus 2";
48d6e6d4b3SHans de Goede	compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
49d6e6d4b3SHans de Goede
50*2d0c3d6bSAndre Przywara	aliases {
51*2d0c3d6bSAndre Przywara		ethernet0 = &emac;
52*2d0c3d6bSAndre Przywara	};
53*2d0c3d6bSAndre Przywara
54860fbdd4SHans de Goede	reg_gmac_3v3: gmac-3v3 {
55860fbdd4SHans de Goede		compatible = "regulator-fixed";
56860fbdd4SHans de Goede		regulator-name = "gmac-3v3";
57860fbdd4SHans de Goede		regulator-min-microvolt = <3300000>;
58860fbdd4SHans de Goede		regulator-max-microvolt = <3300000>;
59860fbdd4SHans de Goede		startup-delay-us = <100000>;
60860fbdd4SHans de Goede		enable-active-high;
61860fbdd4SHans de Goede		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
62860fbdd4SHans de Goede	};
6380e5f83cSHans de Goede
64019731a8SHans de Goede	reg_usb3_vbus: usb3-vbus {
65019731a8SHans de Goede		compatible = "regulator-fixed";
66019731a8SHans de Goede		pinctrl-names = "default";
67019731a8SHans de Goede		pinctrl-0 = <&usb3_vbus_pin_a>;
68019731a8SHans de Goede		regulator-name = "usb3-vbus";
69019731a8SHans de Goede		regulator-min-microvolt = <5000000>;
70019731a8SHans de Goede		regulator-max-microvolt = <5000000>;
71019731a8SHans de Goede		regulator-boot-on;
72019731a8SHans de Goede		enable-active-high;
73019731a8SHans de Goede		gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
74019731a8SHans de Goede	};
75d6e6d4b3SHans de Goede};
76d6e6d4b3SHans de Goede
77d6e6d4b3SHans de Goede&ehci3 {
78d6e6d4b3SHans de Goede	status = "okay";
79d6e6d4b3SHans de Goede};
80d6e6d4b3SHans de Goede
81019731a8SHans de Goede&emac {
82019731a8SHans de Goede	pinctrl-names = "default";
83019731a8SHans de Goede	pinctrl-0 = <&emac_rgmii_pins>;
84019731a8SHans de Goede	phy-supply = <&reg_gmac_3v3>;
85*2d0c3d6bSAndre Przywara	phy-handle = <&ext_rgmii_phy>;
86019731a8SHans de Goede	phy-mode = "rgmii";
87*2d0c3d6bSAndre Przywara
88*2d0c3d6bSAndre Przywara	status = "okay";
89e88d2a57SAndre Przywara};
90e88d2a57SAndre Przywara
91e88d2a57SAndre Przywara&external_mdio {
92e88d2a57SAndre Przywara	ext_rgmii_phy: ethernet-phy@1 {
93e88d2a57SAndre Przywara		compatible = "ethernet-phy-ieee802.3-c22";
94e88d2a57SAndre Przywara		reg = <0>;
95e88d2a57SAndre Przywara	};
96019731a8SHans de Goede};
97019731a8SHans de Goede
98fa8a485dSHans de Goede&mmc2 {
99fa8a485dSHans de Goede	pinctrl-names = "default";
100fa8a485dSHans de Goede	pinctrl-0 = <&mmc2_8bit_pins>;
101fa8a485dSHans de Goede	vmmc-supply = <&reg_vcc3v3>;
102fa8a485dSHans de Goede	bus-width = <8>;
103fa8a485dSHans de Goede	non-removable;
104fa8a485dSHans de Goede	cap-mmc-hw-reset;
105fa8a485dSHans de Goede	status = "okay";
106fa8a485dSHans de Goede};
107fa8a485dSHans de Goede
108fa8a485dSHans de Goede&mmc2_8bit_pins {
109fa8a485dSHans de Goede	/* Increase drive strength for DDR modes */
110*2d0c3d6bSAndre Przywara	drive-strength = <40>;
111fa8a485dSHans de Goede	/* eMMC is missing pull-ups */
112*2d0c3d6bSAndre Przywara	bias-pull-up;
113fa8a485dSHans de Goede};
114fa8a485dSHans de Goede
115d6e6d4b3SHans de Goede&pio {
116*2d0c3d6bSAndre Przywara	usb3_vbus_pin_a: usb3_vbus_pin {
117*2d0c3d6bSAndre Przywara		pins = "PG11";
118*2d0c3d6bSAndre Przywara		function = "gpio_out";
119860fbdd4SHans de Goede	};
120d6e6d4b3SHans de Goede};
121d6e6d4b3SHans de Goede
122d6e6d4b3SHans de Goede&usbphy {
123d6e6d4b3SHans de Goede	usb3_vbus-supply = <&reg_usb3_vbus>;
124d6e6d4b3SHans de Goede};
125