fix OPiZeroPlus2-H3 to use it own DTS, not the NanoPiNeoAir
This commit is contained in:
parent
6dc6102809
commit
d1168437e4
@ -1,7 +1,7 @@
|
||||
# H3 quad core 512MB SoC Wi-Fi/BT
|
||||
BOARD_NAME="Orange Pi Zero Plus 2"
|
||||
LINUXFAMILY="sun8i"
|
||||
BOOTCONFIG="nanopi_air_defconfig"
|
||||
BOOTCONFIG="orangepi-zeroplus_defconfig"
|
||||
#
|
||||
MODULES="#w1-sunxi #w1-gpio #w1-therm #sunxi-cir hci_uart rfcomm hidp dhd g_serial"
|
||||
MODULES_NEXT="brcmfmac g_serial"
|
||||
|
||||
@ -10,6 +10,13 @@ index 48e5a5f5..f460f269 100644
|
||||
sun8i-h3-bananapi-m2-plus.dtb \
|
||||
sun8i-h3-nanopi-m1.dtb \
|
||||
sun8i-h3-nanopi-neo.dtb \
|
||||
@@ -855,5 +856,6 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-h3-orangepi-pc-plus.dtb \
|
||||
sun8i-h3-orangepi-plus.dtb \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
+ sun8i-h3-orangepi-zeroplus.dtb \
|
||||
sun8i-h3-beelink-x2.dtb \
|
||||
sun8i-r16-parrot.dtb
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
|
||||
new file mode 100644
|
||||
index 00000000..98a44240
|
||||
@ -122,3 +129,100 @@ index 00000000..98a44240
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||
new file mode 100644
|
||||
index 00000000..98a44240
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||
@@ -0,0 +1,91 @@
|
||||
+
|
||||
+#include "sun8i-h3-orangepi-one.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi Zero Plus";
|
||||
+ compatible = "xunlong,orangepi-zeroplus", "allwinner,sun8i-h3";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet1 = &brcmf;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&leds_r_opc>;
|
||||
+
|
||||
+ /delete-node/ status_led;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_pwrseq_pin_orangepi>;
|
||||
+ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>;
|
||||
+ post-power-on-delay-ms = <50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ vqmmc-supply = <®_vcc3v3>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ /delete-node/ leds_opc;
|
||||
+
|
||||
+ wifi_wake: wifi_wake@0 {
|
||||
+ allwinner,pins = "PL7";
|
||||
+ allwinner,function = "irq";
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq_pin_orangepi: wifi_pwrseq_pin@0 {
|
||||
+ allwinner,pins = "PA9";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+ spi-flash@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ compatible = "jedec,spi-nor";
|
||||
+ reg = <0>; /* Chip select 0 */
|
||||
+ spi-max-frequency = <10000000>;
|
||||
+ status = "okay";
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0x0 0x100000>;
|
||||
+ };
|
||||
+ partition@100000 {
|
||||
+ label = "env";
|
||||
+ reg = <0x100000 0x100000>;
|
||||
+ };
|
||||
+ partition@200000 {
|
||||
+ label = "data";
|
||||
+ reg = <0x200000 0x200000>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
|
||||
190
patch/u-boot/u-boot-sunxi/add-opizeroplus2-h3.patch
Normal file
190
patch/u-boot/u-boot-sunxi/add-opizeroplus2-h3.patch
Normal file
@ -0,0 +1,190 @@
|
||||
diff --git a/configs/orangepi-zeroplus_defconfig b/configs/orangepi-zeroplus_defconfig
|
||||
new file mode 100644
|
||||
index 0000000..61fe8c6
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi-zeroplus_defconfig
|
||||
@@ -0,0 +1,17 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_MACH_SUN8I_H3=y
|
||||
+CONFIG_DRAM_CLK=408
|
||||
+CONFIG_DRAM_ZQ=3881979
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-zeroplus"
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_CONSOLE_MUX=y
|
||||
+CONFIG_SPL=y
|
||||
+# CONFIG_CMD_IMLS is not set
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+# CONFIG_CMD_FPGA is not set
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_SYS_CLK_FREQ=480000000
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index eb68c20..ee14b41 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -293,6 +293,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||
sun8i-h3-orangepi-pc-plus.dtb \
|
||||
sun8i-h3-orangepi-plus.dtb \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
+ sun8i-h3-orangepi-zeroplus.dtb \
|
||||
sun8i-h3-nanopi-neo.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I) += \
|
||||
sun50i-a64-pine64-plus.dtb \
|
||||
diff --git a/arch/arm/dts/sun8i-h3-orangepi-zeroplus.dts b/arch/arm/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||
new file mode 100644
|
||||
index 0000000..61fe8c6
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun8i-h3-orangepi-zeroplus.dts
|
||||
@@ -0,0 +1,149 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
|
||||
+ *
|
||||
+ * Based on sun8i-h3-orangepi-one.dts, which is:
|
||||
+ * Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use,
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "sun8i-h3.dtsi"
|
||||
+#include "sunxi-common-regulators.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlong Orange Pi Zero Plus";
|
||||
+ compatible = "xunlong,orangepi-zeroplus", "allwinner,sun8i-h3";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
|
||||
+ ethernet1 = &brcmf;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ pwr_led {
|
||||
+ label = "orangepi:green:pwr";
|
||||
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ status_led {
|
||||
+ label = "orangepi:red:status";
|
||||
+ gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>;
|
||||
+ post-power-on-delay-ms = <50>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&emac {
|
||||
+ phy = <&phy1>;
|
||||
+ phy-mode = "mii";
|
||||
+ allwinner,use-internal-phy;
|
||||
+ allwinner,leds-active-low;
|
||||
+ status = "okay";
|
||||
+ phy1: ethernet-phy@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
|
||||
+ cd-inverted;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc1_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ vqmmc-supply = <®_vcc3v3>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ohci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ /* USB VBUS is always on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
Loading…
Reference in New Issue
Block a user