preliminary commit for new OrangepiWin builds
This commit is contained in:
parent
4737559130
commit
ae0fc2e757
20
config/boards/orangepiwin.conf
Normal file
20
config/boards/orangepiwin.conf
Normal file
@ -0,0 +1,20 @@
|
||||
# A64 1GB RAM
|
||||
BOARD_NAME="Orange Pi Win"
|
||||
LINUXFAMILY="sun50iw2"
|
||||
BOOTCONFIG="orangepi_win_defconfig"
|
||||
MODULES=""
|
||||
MODULES_NEXT=""
|
||||
CPUMIN="480000"
|
||||
CPUMAX="1296000"
|
||||
#
|
||||
CLI_TARGET=""
|
||||
DESKTOP_TARGET=""
|
||||
KERNEL_TARGET="dev"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET="xenial:dev"
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="https://docs.armbian.com/Hardware_Allwinner-H5-A64/"
|
||||
HARDWARE="https://linux-sunxi.org/Orange_Pi_Win_Plus"
|
||||
FORUMS="https://forum.armbian.com/index.php/forum/11-other-boards/"
|
||||
121
patch/kernel/sun50iw2-dev/add_orangepiwin_dts.patch
Normal file
121
patch/kernel/sun50iw2-dev/add_orangepiwin_dts.patch
Normal file
@ -0,0 +1,121 @@
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
index 244e8b7..65dfa1b 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/Makefile
|
||||
+++ b/arch/arm64/boot/dts/allwinner/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
|
||||
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepiwin.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
|
||||
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepiwin.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepiwin.dts
|
||||
new file mode 100644
|
||||
index 0000000..4fc6ffd
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepiwin.dts
|
||||
@@ -0,0 +1,105 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2016 ARM Ltd.
|
||||
+ *
|
||||
+ * 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 library 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 library 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.
|
||||
+ */
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+#include "sun50i-a64-pine64.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "OrangePiWin";
|
||||
+ compatible = "orangepiwin", "allwinner,sun50i-a64";
|
||||
+
|
||||
+ reg_gmac_3v3: gmac-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "gmac-3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <100000>;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_en_pin>;
|
||||
+ reset-gpios = <&pio 11 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
+ };
|
||||
+
|
||||
+ /* TODO: Camera, touchscreen, etc. */
|
||||
+};
|
||||
+
|
||||
+&emac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emac_rgmii_pins>;
|
||||
+ phy-supply = <®_gmac_3v3>;
|
||||
+ phy-mode = "rgmii";
|
||||
+};
|
||||
+
|
||||
+&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";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <11 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ wifi_en_pin: wifi_en_pin@0 {
|
||||
+ allwinner,pins = "PL8";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
@ -0,0 +1,255 @@
|
||||
diff --git a/u-boot/arch/arm/dts/sun50i-a64-orangepiwin.dts b/u-boot/arch/arm/dts/sun50i-a64-orangepiwin.dts
|
||||
new file mode 100644
|
||||
index 0000000..68f889d
|
||||
--- /dev/null
|
||||
+++ b/u-boot/arch/arm/dts/sun50i-a64-orangepiwin.dts
|
||||
@@ -0,0 +1,170 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2016 ARM Ltd.
|
||||
+ *
|
||||
+ * 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 library 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 library 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 <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
+#include "sun50i-a64.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "OrangePiWin";
|
||||
+ compatible = "orangepiwin", "allwinner,sun50i-a64";
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x40000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ ethernet0 = &emac;
|
||||
+ };
|
||||
+
|
||||
+ soc {
|
||||
+ reg_vcc3v3: vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ reg_gmac_3v3: gmac-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "gmac-3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <100000>;
|
||||
+ enable-active-high;
|
||||
+ gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&wifi_en_pin>;
|
||||
+ reset-gpios = <&pio 11 8 GPIO_ACTIVE_HIGH>; /* PL8 */
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins>, <&mmc0_default_cd_pin>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ cd-gpios = <&pio 5 6 0>;
|
||||
+ 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";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <11 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 / EINT7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pio {
|
||||
+ wifi_en_pin: wifi_en_pin@0 {
|
||||
+ allwinner,pins = "PL8";
|
||||
+ allwinner,function = "gpio_out";
|
||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c1_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ohci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ehci1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&emac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&rgmii_pins>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-supply = <®_gmac_3v3>;
|
||||
+ phy-handle = <&ext_rgmii_phy>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ mdio {
|
||||
+ ext_rgmii_phy: ethernet-phy@1 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+
|
||||
diff --git a/u-boot/arch/arm/dts/Makefile b/u-boot/arch/arm/dts/Makefile
|
||||
index 15f2a76..ad1fb3d 100644
|
||||
--- a/u-boot/arch/arm/dts/Makefile
|
||||
+++ b/u-boot/arch/arm/dts/Makefile
|
||||
@@ -284,7 +284,8 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||
sun50i-h5-orangepi-pc2.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I) += \
|
||||
sun50i-a64-pine64-plus.dtb \
|
||||
- sun50i-a64-pine64.dtb
|
||||
+ sun50i-a64-pine64.dtb \
|
||||
+ sun50i-a64-orangepiwin.dtb
|
||||
dtb-$(CONFIG_MACH_SUN9I) += \
|
||||
sun9i-a80-optimus.dtb \
|
||||
sun9i-a80-cubieboard4.dtb
|
||||
diff --git a/u-boot/configs/orangepiwin_defconfig b/u-boot/configs/orangepiwin_defconfig
|
||||
new file mode 100644
|
||||
index 0000000..68f889d
|
||||
--- /dev/null
|
||||
+++ b/u-boot/configs/orangepiwin_defconfig
|
||||
@@ -0,0 +1,13 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_MACH_SUN50I_64=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-orangepiwin"
|
||||
+# 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
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5d56b3c..9c049f1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -47,6 +47,17 @@ u_boot_a64_so:
|
||||
$(MAKE) -C u-boot ARCH=arm CROSS_COMPILE="$(ccache) aarch64-linux-gnu-"
|
||||
@cp u-boot/u-boot.bin u-boot.bin
|
||||
|
||||
+.PHONY: u_boot_a64_opiwin
|
||||
+u_boot_a64_opiwin:
|
||||
+ $(MAKE) -C u-boot clean
|
||||
+ $(MAKE) -C u-boot ARCH=arm CROSS_COMPILE="$(ccache) arm-linux-gnueabihf-" sun50i_spl32_defconfig
|
||||
+ $(MAKE) -C u-boot ARCH=arm CROSS_COMPILE="$(ccache) arm-linux-gnueabihf-"
|
||||
+ @cp u-boot/spl/sunxi-spl.bin sunxi-spl.bin
|
||||
+ $(MAKE) -C u-boot clean
|
||||
+ $(MAKE) -C u-boot ARCH=arm CROSS_COMPILE="$(ccache) aarch64-linux-gnu-" orangepiwin_defconfig
|
||||
+ $(MAKE) -C u-boot ARCH=arm CROSS_COMPILE="$(ccache) aarch64-linux-gnu-"
|
||||
+ @cp u-boot/u-boot.bin u-boot.bin
|
||||
+
|
||||
.PHONY: arm_trusted_firmware
|
||||
arm_trusted_firmware:
|
||||
$(MAKE) -C arm-trusted-firmware PLAT=sun50iw1p1 DEBUG=1 CROSS_COMPILE="$(ccache) aarch64-linux-gnu-" bl31
|
||||
@@ -72,6 +83,11 @@ pine64so: u_boot_a64_so arm_trusted_firmware
|
||||
@u-boot/tools/mkimage -E -f config.its u-boot.itb
|
||||
@aarch64-linux-gnu-objcopy --gap-fill=0xff -j .text -j .rodata -j .data -j .u_boot_list -j .rela.dyn -j .efi_runtime -j .efi_runtime_rel -I binary -O binary --pad-to=32768 --gap-fill=0xff sunxi-spl.bin u-boot-sunxi-with-spl.bin && cat u-boot.itb >> u-boot-sunxi-with-spl.bin
|
||||
|
||||
+.PHONY: orangepiwin
|
||||
+orangepiwin: u_boot_a64_opiwin arm_trusted_firmware
|
||||
+ @u-boot/tools/mkimage -E -f config.its u-boot.itb
|
||||
+ @aarch64-linux-gnu-objcopy --gap-fill=0xff -j .text -j .rodata -j .data -j .u_boot_list -j .rela.dyn -j .efi_runtime -j .efi_runtime_rel -I binary -O binary --pad-to=32768 --gap-fill=0xff sunxi-spl.bin u-boot-sunxi-with-spl.bin && cat u-boot.itb >> u-boot-sunxi-with-spl.bin
|
||||
+
|
||||
.PHONY: clean
|
||||
clean:
|
||||
[ -f u-boot/Makefile ] && $(MAKE) -C u-boot ARCH=arm clean
|
||||
@@ -86,6 +102,10 @@ pine64_plus_defconfig:
|
||||
pine64_so_defconfig:
|
||||
@cp blobs/sun50i_a64.its config.its
|
||||
|
||||
+.PHONY: orangepi_win_defconfig
|
||||
+orangepi_win_defconfig:
|
||||
+ @cp blobs/sun50i_a64_opiwin.its config.its
|
||||
+
|
||||
.PHONY: orangepi_pc2_defconfig
|
||||
orangepi_pc2_defconfig:
|
||||
@cp blobs/sun50i_h5.its config.its
|
||||
Loading…
Reference in New Issue
Block a user