731835eb6f523e183956ac5422e77c5e88f8e805
[openwrt/openwrt.git] / package / boot / uboot-sunxi / patches / 400-ARM-dts-orange-pi-zero-plus.patch
1 --- a/arch/arm/dts/Makefile
2 +++ b/arch/arm/dts/Makefile
3 @@ -372,6 +372,7 @@ dtb-$(CONFIG_MACH_SUN8I_V3S) += \
4 dtb-$(CONFIG_MACH_SUN50I_H5) += \
5 sun50i-h5-nanopi-neo2.dtb \
6 sun50i-h5-nanopi-neo-plus2.dtb \
7 + sun50i-h5-orangepi-zero-plus.dtb \
8 sun50i-h5-orangepi-pc2.dtb \
9 sun50i-h5-orangepi-prime.dtb \
10 sun50i-h5-orangepi-zero-plus2.dtb
11 --- /dev/null
12 +++ b/configs/orangepi_zero_plus_defconfig
13 @@ -0,0 +1,19 @@
14 +CONFIG_ARM=y
15 +CONFIG_ARCH_SUNXI=y
16 +CONFIG_MACH_SUN50I_H5=y
17 +CONFIG_DRAM_CLK=624
18 +CONFIG_DRAM_ZQ=3881977
19 +CONFIG_MACPWR="PD6"
20 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
21 +CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus"
22 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
23 +CONFIG_SPL=y
24 +# CONFIG_CMD_IMLS is not set
25 +# CONFIG_CMD_FLASH is not set
26 +# CONFIG_CMD_FPGA is not set
27 +# CONFIG_SPL_DOS_PARTITION is not set
28 +# CONFIG_SPL_ISO_PARTITION is not set
29 +# CONFIG_SPL_EFI_PARTITION is not set
30 +CONFIG_SPL_SPI_SUNXI=y
31 +CONFIG_SUN8I_EMAC=y
32 +CONFIG_USB_EHCI_HCD=y
33 --- /dev/null
34 +++ b/arch/arm/dts/sun50i-h5-orangepi-zero-plus.dts
35 @@ -0,0 +1,113 @@
36 +/*
37 + * Copyright (C) 2017 Antony Antony <antony@phenome.org>
38 + * Copyright (c) 2016 ARM Ltd.
39 + *
40 + * This file is dual-licensed: you can use it either under the terms
41 + * of the GPL or the X11 license, at your option. Note that this dual
42 + * licensing only applies to this file, and not this project as a
43 + * whole.
44 + *
45 + * a) This library is free software; you can redistribute it and/or
46 + * modify it under the terms of the GNU General Public License as
47 + * published by the Free Software Foundation; either version 2 of the
48 + * License, or (at your option) any later version.
49 + *
50 + * This library is distributed in the hope that it will be useful,
51 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
52 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53 + * GNU General Public License for more details.
54 + *
55 + * Or, alternatively,
56 + *
57 + * b) Permission is hereby granted, free of charge, to any person
58 + * obtaining a copy of this software and associated documentation
59 + * files (the "Software"), to deal in the Software without
60 + * restriction, including without limitation the rights to use,
61 + * copy, modify, merge, publish, distribute, sublicense, and/or
62 + * sell copies of the Software, and to permit persons to whom the
63 + * Software is furnished to do so, subject to the following
64 + * conditions:
65 + *
66 + * The above copyright notice and this permission notice shall be
67 + * included in all copies or substantial portions of the Software.
68 + *
69 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
70 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
71 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
72 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
73 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
74 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
75 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
76 + * OTHER DEALINGS IN THE SOFTWARE.
77 + */
78 +
79 +/dts-v1/;
80 +
81 +#include "sun50i-h5.dtsi"
82 +
83 +#include <dt-bindings/gpio/gpio.h>
84 +
85 +/ {
86 + model = "Xunlong Orange Pi Zero Plus";
87 + compatible = "xunlong,orangepizero-zero-plus", "allwinner,sun50i-h5";
88 +
89 + aliases {
90 + serial0 = &uart0;
91 + };
92 +
93 + chosen {
94 + stdout-path = "serial0:115200n8";
95 + };
96 +
97 + memory {
98 + reg = <0x40000000 0x40000000>;
99 + };
100 +
101 + reg_vcc3v3: vcc3v3 {
102 + compatible = "regulator-fixed";
103 + regulator-name = "vcc3v3";
104 + regulator-min-microvolt = <3300000>;
105 + regulator-max-microvolt = <3300000>;
106 + };
107 +};
108 +
109 +&ehci1 {
110 + status = "okay";
111 +};
112 +
113 +&mmc0 {
114 + compatible = "allwinner,sun50i-h5-mmc",
115 + "allwinner,sun50i-a64-mmc",
116 + "allwinner,sun5i-a13-mmc";
117 + pinctrl-names = "default";
118 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
119 + vmmc-supply = <&reg_vcc3v3>;
120 + bus-width = <4>;
121 + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
122 + cd-inverted;
123 + status = "okay";
124 +};
125 +
126 +&mmc2 {
127 + pinctrl-names = "default";
128 + pinctrl-0 = <&mmc2_8bit_pins>;
129 + vmmc-supply = <&reg_vcc3v3>;
130 + bus-width = <8>;
131 + non-removable;
132 + cap-mmc-hw-reset;
133 + status = "okay";
134 +};
135 +
136 +&ohci1 {
137 + status = "okay";
138 +};
139 +
140 +&uart0 {
141 + pinctrl-names = "default";
142 + pinctrl-0 = <&uart0_pins_a>;
143 + status = "okay";
144 +};
145 +
146 +&usbphy {
147 + status = "okay";
148 +};