Bump Allwinner u-boot to 2021.04 (#2745)
* Adjusted patches so they align with 2021.04 - briefly tested on Lime A64 and BPI M3 * Move to RC5 * Move away from RC branch
This commit is contained in:
parent
fc47e24f21
commit
8277822add
@ -1,7 +1,7 @@
|
||||
ARCH=arm64
|
||||
ATF_TARGET_MAP="PLAT=$ATF_PLAT DEBUG=1 bl31;;build/$ATF_PLAT/debug/bl31.bin"
|
||||
BOOTDELAY=1
|
||||
BOOTBRANCH='tag:v2020.10'
|
||||
BOOTBRANCH='tag:v2021.04'
|
||||
BOOTPATCHDIR='u-boot-sunxi'
|
||||
BOOTENV_FILE='sunxi.txt'
|
||||
UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
ARCH=armhf
|
||||
BOOTDELAY=1
|
||||
BOOTBRANCH='tag:v2020.10'
|
||||
BOOTBRANCH='tag:v2021.04'
|
||||
BOOTPATCHDIR='u-boot-sunxi'
|
||||
UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin'
|
||||
BOOTSCRIPT="boot-sunxi.cmd:boot.cmd"
|
||||
|
||||
@ -27,20 +27,10 @@ index b0c64f7..50d921f 100644
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
@@ -170,6 +181,24 @@
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
+
|
||||
+ brcmf: wifi@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ interrupt-parent = <&r_pio>;
|
||||
+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
|
||||
+ interrupt-names = "host-wake";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
@@ -197,6 +197,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins>;
|
||||
@ -48,10 +38,12 @@ index b0c64f7..50d921f 100644
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/configs/orangepi_win_defconfig b/configs/orangepi_win_defconfig
|
||||
index 2839503..5b0780d 100644
|
||||
--- a/configs/orangepi_win_defconfig
|
||||
|
||||
@ -1,222 +0,0 @@
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index dda4e59..6d3cca2 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -403,7 +403,8 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||
sun50i-h5-orangepi-prime.dtb \
|
||||
sun50i-h5-orangepi-zero-plus2.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I_H6) += \
|
||||
sun50i-h6-beelink-gs1.dtb \
|
||||
+ sun50i-h6-orangepi-3.dtb \
|
||||
sun50i-h6-orangepi-lite2.dtb \
|
||||
sun50i-h6-orangepi-one-plus.dtb \
|
||||
sun50i-h6-pine-h64.dtb
|
||||
diff --git a/arch/arm/dts/sun50i-h6-orangepi-3.dts b/arch/arm/dts/sun50i-h6-orangepi-3.dts
|
||||
new file mode 100644
|
||||
index 0000000..dffd648
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun50i-h6-orangepi-3.dts
|
||||
@@ -0,0 +1,179 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Amarula Solutions
|
||||
+ * Author: Jagan Teki <jagan@amarulasolutions.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "sun50i-h6.dtsi"
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "OrangePi 3";
|
||||
+ compatible = "xunlong,orangepi-3", "allwinner,sun50i-h6";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart0;
|
||||
+ ethernet0 = &emac;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&emac {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&ext_rgmii_pins>;
|
||||
+ phy-mode = "rgmii";
|
||||
+ phy-handle = <&ext_rgmii_phy>;
|
||||
+ phy-supply = <®_aldo2>;
|
||||
+ allwinner,rx-delay-ps = <200>;
|
||||
+ allwinner,tx-delay-ps = <200>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ ext_rgmii_phy: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc0_pins>;
|
||||
+ vmmc-supply = <®_cldo1>;
|
||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
+ bus-width = <4>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins>;
|
||||
+ vmmc-supply = <®_cldo1>;
|
||||
+ non-removable;
|
||||
+ cap-mmc-hw-reset;
|
||||
+ bus-width = <8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&r_i2c {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ axp805: pmic@36 {
|
||||
+ compatible = "x-powers,axp805", "x-powers,axp806";
|
||||
+ reg = <0x36>;
|
||||
+ interrupt-parent = <&r_intc>;
|
||||
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ interrupt-controller;
|
||||
+ #interrupt-cells = <1>;
|
||||
+ x-powers,self-working-mode;
|
||||
+
|
||||
+ regulators {
|
||||
+ reg_aldo1: aldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-pl";
|
||||
+ };
|
||||
+
|
||||
+ reg_aldo2: aldo2 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-ac200";
|
||||
+ };
|
||||
+
|
||||
+ reg_aldo3: aldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc25-dram";
|
||||
+ };
|
||||
+
|
||||
+ reg_bldo1: bldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-bias-pll";
|
||||
+ };
|
||||
+
|
||||
+ reg_bldo2: bldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-efuse-pcie-hdmi-io";
|
||||
+ };
|
||||
+
|
||||
+ reg_bldo3: bldo3 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc-dcxoio";
|
||||
+ };
|
||||
+
|
||||
+ bldo4 {
|
||||
+ /* unused */
|
||||
+ };
|
||||
+
|
||||
+ reg_cldo1: cldo1 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-3v3";
|
||||
+ };
|
||||
+
|
||||
+ reg_cldo2: cldo2 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi-1";
|
||||
+ };
|
||||
+
|
||||
+ reg_cldo3: cldo3 {
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-wifi-2";
|
||||
+ };
|
||||
+
|
||||
+ reg_dcdca: dcdca {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <810000>;
|
||||
+ regulator-max-microvolt = <1080000>;
|
||||
+ regulator-name = "vdd-cpu";
|
||||
+ };
|
||||
+
|
||||
+ reg_dcdcc: dcdcc {
|
||||
+ regulator-min-microvolt = <810000>;
|
||||
+ regulator-max-microvolt = <1080000>;
|
||||
+ regulator-name = "vdd-gpu";
|
||||
+ };
|
||||
+
|
||||
+ reg_dcdcd: dcdcd {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <960000>;
|
||||
+ regulator-max-microvolt = <960000>;
|
||||
+ regulator-name = "vdd-sys";
|
||||
+ };
|
||||
+
|
||||
+ reg_dcdce: dcdce {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1200000>;
|
||||
+ regulator-max-microvolt = <1200000>;
|
||||
+ regulator-name = "vcc-dram";
|
||||
+ };
|
||||
+
|
||||
+ sw {
|
||||
+ /* unused */
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&uart0_ph_pins>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/configs/orangepi_3_defconfig b/configs/orangepi_3_defconfig
|
||||
new file mode 100644
|
||||
index 0000000..187818e
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi_3_defconfig
|
||||
@@ -0,0 +1,18 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_MACH_SUN50I_H6=y
|
||||
+CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
+CONFIG_SUNXI_DRAM_DDR3=n
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
+CONFIG_MMC0_CD_PIN="PF6"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
+CONFIG_HDMI_DDC_EN="PH2"
|
||||
+# CONFIG_PSCI_RESET is not set
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-orangepi-3"
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_SPL=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+# CONFIG_CMD_FPGA is not set
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+# CONFIG_SPL_ISO_PARTITION is not set
|
||||
+# CONFIG_SPL_EFI_PARTITION is not set
|
||||
@ -1,80 +0,0 @@
|
||||
From cec206360cf1183a1206a9f1b8bcf91456c2ee35 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 26 Oct 2020 22:02:44 +0800
|
||||
Subject: [PATCH 7/7] sunxi: add PineCube board
|
||||
|
||||
PineCube is an IP camera development kit released by Pine64.
|
||||
|
||||
It comes with the following compoents:
|
||||
|
||||
- A mainboard with Sochip S3 SoC, a 16MByte SPI Flash, AXP209 PMIC,
|
||||
a power-only microUSB connector, a USB Type-A connector, a 10/100Mbps
|
||||
Ethernet port and FPC connectors for camera and daughter board.
|
||||
- An OV5640-based camera module which is connected to the parallel CSI
|
||||
bus of the mainboard.
|
||||
- A daughterboard with several buttons, a SD slot, some IR LEDs, a
|
||||
microphone and a speaker connector.
|
||||
|
||||
As the device tree is synchronized in a previous commit, just add it to
|
||||
Makefile, create a new MAINTAINER item and provide a defconfig.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
board/sunxi/MAINTAINERS | 5 +++++
|
||||
configs/pinecube_defconfig | 15 +++++++++++++++
|
||||
3 files changed, 21 insertions(+)
|
||||
create mode 100644 configs/pinecube_defconfig
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index f8f529435b..5fb5cb29a4 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -578,6 +578,7 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \
|
||||
sun8i-r40-bananapi-m2-ultra.dtb \
|
||||
sun8i-v40-bananapi-m2-berry.dtb
|
||||
dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||
+ sun8i-s3-pinecube.dtb \
|
||||
sun8i-v3s-licheepi-zero.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
||||
sun50i-h5-bananapi-m2-plus.dtb \
|
||||
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
|
||||
index 1180b86db3..5c53b2c878 100644
|
||||
--- a/board/sunxi/MAINTAINERS
|
||||
+++ b/board/sunxi/MAINTAINERS
|
||||
@@ -440,6 +440,11 @@ M: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
S: Maintained
|
||||
F: configs/pinebook_defconfig
|
||||
|
||||
+PINECUBE BOARD:
|
||||
+M: Icenowy Zheng <icenowy@aosc.io>
|
||||
+S: Maintained
|
||||
+F: configs/pinecube_defconfig
|
||||
+
|
||||
PINE64 BOARDS
|
||||
M: Andre Przywara <andre.przywara@arm.com>
|
||||
S: Maintained
|
||||
diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..a8c404f6b1
|
||||
--- /dev/null
|
||||
+++ b/configs/pinecube_defconfig
|
||||
@@ -0,0 +1,15 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_MACH_SUN8I_V3S=y
|
||||
+CONFIG_SUNXI_DRAM_DDR3_1333=y
|
||||
+CONFIG_DRAM_CLK=504
|
||||
+CONFIG_DRAM_ODT_EN=y
|
||||
+CONFIG_I2C0_ENABLE=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-s3-pinecube"
|
||||
+CONFIG_SPL_I2C_SUPPORT=y
|
||||
+# CONFIG_NETDEVICES is not set
|
||||
+CONFIG_AXP209_POWER=y
|
||||
+CONFIG_AXP_DCDC2_VOLT=1250
|
||||
+CONFIG_AXP_DCDC3_VOLT=3300
|
||||
+CONFIG_CONS_INDEX=3
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@ -38,9 +38,9 @@ index 7a791cba..e74adc94 100644
|
||||
sun50i-h6-beelink-gs1.dtb \
|
||||
sun50i-h6-orangepi-lite2.dtb \
|
||||
sun50i-h6-orangepi-one-plus.dtb \
|
||||
- sun50i-h6-pine-h64.dtb
|
||||
- sun50i-h6-pine-h64.dtb \
|
||||
+ sun50i-h6-pine-h64.dtb \
|
||||
+ sun50i-h6-pine-h64-model-b.dtb
|
||||
+ sun50i-h6-pine-h64-model-b.dtb \
|
||||
sun50i-h6-tanix-tx6.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I) += \
|
||||
sun50i-a64-amarula-relic.dtb \
|
||||
sun50i-a64-bananapi-m64.dtb \
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig
|
||||
index fbd7766c..5fc51706 100644
|
||||
--- a/configs/Sinovoip_BPI_M3_defconfig
|
||||
+++ b/configs/Sinovoip_BPI_M3_defconfig
|
||||
@@ -3,7 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_A83T=y
|
||||
CONFIG_DRAM_TYPE=7
|
||||
-CONFIG_DRAM_CLK=480
|
||||
+CONFIG_DRAM_CLK=384
|
||||
CONFIG_DRAM_ZQ=15355
|
||||
CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
|
||||
index fe75eef513..74bcfc64af 100644
|
||||
--- a/configs/Bananapi_defconfig
|
||||
|
||||
@ -13,8 +13,8 @@ index 53eae8953e..1e931a0eb0 100644
|
||||
imply CMD_DM
|
||||
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||
index d6d130edfa..46ed3a9d76 100644
|
||||
--- a/cmd/Kconfig
|
||||
+++ b/cmd/Kconfig
|
||||
--- a/common/Kconfig.boot
|
||||
+++ b/common/Kconfig.boot
|
||||
@@ -51,7 +51,7 @@ config AUTOBOOT_KEYED
|
||||
config AUTOBOOT_PROMPT
|
||||
string "Autoboot stop prompt"
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
diff --git a/Kconfig b/Kconfig
|
||||
index 883e3f71..e872c640 100644
|
||||
--- a/Kconfig
|
||||
+++ b/Kconfig
|
||||
@@ -200,7 +200,7 @@ config SYS_MALLOC_F_LEN
|
||||
default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
|
||||
ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
|
||||
ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
|
||||
- ARCH_LS1046A || ARCH_QEMU)
|
||||
+ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI)
|
||||
default 0x400
|
||||
help
|
||||
Before relocation, memory is very limited on many platforms. Still,
|
||||
@ -1,92 +0,0 @@
|
||||
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
|
||||
index 40a3f845..f37a2759 100644
|
||||
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
|
||||
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
|
||||
@@ -188,6 +188,7 @@ enum sunxi_gpio_number {
|
||||
#define SUN8I_GPG_SDC1 2
|
||||
#define SUN6I_GPG_TWI3 2
|
||||
#define SUN5I_GPG_UART1 4
|
||||
+#define SUN8I_H3_GPG_UART1 2
|
||||
|
||||
#define SUN6I_GPH_PWM 2
|
||||
#define SUN8I_GPH_PWM 2
|
||||
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
|
||||
index f17b8029..c1901cbb 100644
|
||||
--- a/arch/arm/mach-sunxi/board.c
|
||||
+++ b/arch/arm/mach-sunxi/board.c
|
||||
@@ -27,6 +27,10 @@
|
||||
|
||||
#include <linux/compiler.h>
|
||||
|
||||
+#if (CONFIG_CONS_INDEX > 1) && defined(CONFIG_MACH_SUN8I_H3)
|
||||
+#include <ns16550.h>
|
||||
+#endif
|
||||
+
|
||||
struct fel_stash {
|
||||
uint32_t sp;
|
||||
uint32_t lr;
|
||||
@@ -133,6 +137,10 @@ static int gpio_init(void)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
|
||||
sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
|
||||
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN8I_H3)
|
||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN8I_H3_GPG_UART1);
|
||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN8I_H3_GPG_UART1);
|
||||
+ sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
|
||||
#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
|
||||
@@ -277,6 +285,18 @@ void board_init_f(ulong dummy)
|
||||
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
|
||||
#endif
|
||||
sunxi_board_init();
|
||||
+
|
||||
+#if (CONFIG_CONS_INDEX > 1) && defined(CONFIG_MACH_SUN8I_H3)
|
||||
+ /* the sunxi kernel needs uart0 to be initialized by the bootloader */
|
||||
+
|
||||
+ /* configure uart0 GPIOs */
|
||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPA(4), SUN8I_H3_GPA_UART0);
|
||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPA(5), SUN8I_H3_GPA_UART0);
|
||||
+ sunxi_gpio_set_pull(SUNXI_GPA(5), SUNXI_GPIO_PULL_UP);
|
||||
+
|
||||
+ /* initialize uart0 */
|
||||
+ NS16550_init((NS16550_t)(SUNXI_UART0_BASE), CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
|
||||
+#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/clock_sun6i.c b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
index ca2b982b..9b9df521 100644
|
||||
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||
@@ -100,6 +100,17 @@ void clock_init_uart(void)
|
||||
setbits_le32(&ccm->apb2_reset_cfg,
|
||||
1 << (APB2_RESET_UART_SHIFT +
|
||||
CONFIG_CONS_INDEX - 1));
|
||||
+
|
||||
+#if (CONFIG_CONS_INDEX > 1) && defined(CONFIG_MACH_SUN8I_H3)
|
||||
+ /* the sunxi kernel requires uart0 to be initialized by the bootloader */
|
||||
+
|
||||
+ /* open the clock for uart0 */
|
||||
+ setbits_le32(&ccm->apb2_gate, CLK_GATE_OPEN << APB2_GATE_UART_SHIFT);
|
||||
+
|
||||
+ /* deassert uart0 reset */
|
||||
+ setbits_le32(&ccm->apb2_reset_cfg, 1 << APB2_RESET_UART_SHIFT);
|
||||
+#endif
|
||||
+
|
||||
#else
|
||||
/* enable R_PIO and R_UART clocks, and de-assert resets */
|
||||
prcm_apb0_enable(PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_UART);
|
||||
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
|
||||
index d8109439..3247c614 100644
|
||||
--- a/include/configs/sunxi-common.h
|
||||
+++ b/include/configs/sunxi-common.h
|
||||
@@ -242,7 +242,7 @@ extern int soft_i2c_gpio_scl;
|
||||
#else
|
||||
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28000:115200"
|
||||
#endif
|
||||
-#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
|
||||
+#elif CONFIG_CONS_INDEX == 2 && (defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN8I))
|
||||
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200"
|
||||
#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
|
||||
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user