From c0319cf3cc349102b82c0974d74023946ff7454b Mon Sep 17 00:00:00 2001 From: Martin Ayotte Date: Wed, 9 Jan 2019 18:37:12 -0500 Subject: [PATCH] tweak DT file naming convention of OPiZero+2 to match the one from Megous branch --- .../sunxi-dev/add-orangepi-zeroplus2.patch | 204 ++++-------------- .../add-orangepi-zeroplus2_h3.patch | 8 +- 2 files changed, 44 insertions(+), 168 deletions(-) diff --git a/patch/kernel/sunxi-dev/add-orangepi-zeroplus2.patch b/patch/kernel/sunxi-dev/add-orangepi-zeroplus2.patch index cf27d0423..a7aeb4adb 100644 --- a/patch/kernel/sunxi-dev/add-orangepi-zeroplus2.patch +++ b/patch/kernel/sunxi-dev/add-orangepi-zeroplus2.patch @@ -1,81 +1,18 @@ -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 4b17f35d..6a6639ab 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -918,6 +918,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ - sun8i-h3-orangepi-pc-plus.dtb \ - sun8i-h3-orangepi-plus.dtb \ - sun8i-h3-orangepi-plus2e.dtb \ -+ sun8i-h3-orangepi-zeroplus2.dtb \ - sun8i-r16-bananapi-m2m.dtb \ - sun8i-r16-parrot.dtb \ - sun8i-v3s-licheepi-zero.dtb \ -diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus2.dts -new file mode 100644 -index 0000000..9856052 ---- /dev/null -+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zeroplus2.dts -@@ -0,0 +1,229 @@ -+/* -+ * Copyright (C) Armbian -+ * -+ * 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 -+#include -+ -+/ { -+ model = "Xunlong Orange Pi Zero Plus 2"; -+ compatible = "xunlong,orangepi-zeroplus", "allwinner,sun8i-h3"; -+ -+ aliases { +diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +index c834048..ab55698 100644 +--- a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts ++++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts +@@ -53,12 +53,29 @@ + + aliases { + serial0 = &uart0; + ethernet1 = &brcmf; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + @@ -92,52 +29,25 @@ index 0000000..9856052 + }; + }; + -+ connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ /delete-node/ reg_vcc_wifi; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; -+ post-power-on-delay-ms = <50>; -+ }; -+ -+ reg_usb1_vbus: usb1-vbus { -+ /delete-property/ gpio; -+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+ }; -+ -+}; -+ -+&de { -+ status = "okay"; -+}; -+ + connector { + compatible = "hdmi-connector"; + type = "a"; +@@ -89,6 +106,11 @@ + status = "okay"; + }; + +&ehci0 { + status = "okay"; +}; + + -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ + &hdmi { + status = "okay"; + }; +@@ -99,6 +121,22 @@ + }; + }; + +&sound_hdmi { + status = "okay"; +}; @@ -154,47 +64,13 @@ index 0000000..9856052 + status = "okay"; +}; + -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins>; -+ 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>; -+ vmmc-supply = <®_vcc3v3>; -+ vqmmc-supply = <®_vcc3v3>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ /delete-node/ sdio_wifi@1; -+ -+ 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"; -+ }; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_8bit_pins>; -+ vmmc-supply = <®_vcc3v3>; -+ bus-width = <8>; -+ non-removable; -+ cap-mmc-hw-reset; -+ status = "okay"; -+}; -+ + &mmc0 { + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; +@@ -133,8 +171,53 @@ + status = "okay"; + }; + +&pio { + bt_pwr_pin: bt_pwr_pin@0 { + pins = "PA10"; @@ -219,11 +95,11 @@ index 0000000..9856052 + }; +}; + -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; + }; + +&uart1 { + pinctrl-names = "default"; diff --git a/patch/u-boot/u-boot-sunxi/add-orangepi-zeroplus2_h3.patch b/patch/u-boot/u-boot-sunxi/add-orangepi-zeroplus2_h3.patch index 2e19639cd..f44674df9 100644 --- a/patch/u-boot/u-boot-sunxi/add-orangepi-zeroplus2_h3.patch +++ b/patch/u-boot/u-boot-sunxi/add-orangepi-zeroplus2_h3.patch @@ -6,15 +6,15 @@ index 9cc5c1e0aa..a3ef6854c2 100644 sun8i-h3-orangepi-pc-plus.dtb \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ -+ sun8i-h3-orangepi-zeroplus2.dtb \ ++ sun8i-h3-orangepi-zero-plus2.dtb \ sun8i-h3-nanopi-m1.dtb \ sun8i-h3-nanopi-m1-plus.dtb \ sun8i-h3-nanopi-neo.dtb \ -diff --git a/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts b/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts +diff --git a/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts new file mode 100644 index 0000000000..b03e3a51a2 --- /dev/null -+++ b/arch/arm/dts/sun8i-h3-orangepi-zeroplus2.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-zero-plus2.dts @@ -0,0 +1,175 @@ +/* + * Copyright (C) 2016 Icenowy Zheng @@ -204,7 +204,7 @@ index 0000000000..9257b7c1ed +CONFIG_DRAM_CLK=408 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y -+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-zeroplus2" ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-orangepi-zero-plus2" +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y