Import several small fixes from Orangepi u-boot (#4411)
* Import several small fixes from Xunlong u-boot Affected: Orangepi 3 LTS and Zero 2 * Remove not needed patch
This commit is contained in:
parent
d0d8a35db8
commit
d4d04b6978
@ -3,6 +3,10 @@ From: afaulkner420 <afaulkner420@gmail.com>
|
||||
Date: Fri, 1 Apr 2022 21:58:07 +0100
|
||||
Subject: [PATCH] add orange pi 3 lts support
|
||||
|
||||
+ Set dcdcd to 980mv
|
||||
|
||||
|
||||
|
||||
---
|
||||
arch/arm/dts/Makefile | 1 +
|
||||
arch/arm/dts/sun50i-h6-orangepi-3-lts.dts | 179 ++++++++++++++++++++++
|
||||
@ -28,7 +32,7 @@ new file mode 100644
|
||||
index 00000000..94e3c5b5
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts
|
||||
@@ -0,0 +1,179 @@
|
||||
@@ -0,0 +1,180 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
|
||||
+/*
|
||||
+ * Copyright (C) 2018 Amarula Solutions
|
||||
@ -113,6 +117,7 @@ index 00000000..94e3c5b5
|
||||
+ };
|
||||
+
|
||||
+ reg_aldo2: aldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-name = "vcc-ac200";
|
||||
@ -184,8 +189,8 @@ index 00000000..94e3c5b5
|
||||
+
|
||||
+ reg_dcdcd: dcdcd {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <960000>;
|
||||
+ regulator-max-microvolt = <960000>;
|
||||
+ regulator-min-microvolt = <980000>;
|
||||
+ regulator-max-microvolt = <980000>;
|
||||
+ regulator-name = "vdd-sys";
|
||||
+ };
|
||||
+
|
||||
@ -213,7 +218,7 @@ new file mode 100644
|
||||
index 00000000..f119c349
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi_3_lts_defconfig
|
||||
@@ -0,0 +1,18 @@
|
||||
@@ -0,0 +1,20 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_MACH_SUN50I_H6=y
|
||||
@ -227,6 +232,8 @@ index 00000000..f119c349
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-orangepi-3-lts"
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_SPL_I2C=y
|
||||
+CONFIG_R_I2C_ENABLE=y
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+# CONFIG_CMD_FPGA is not set
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From cd7f9f0b6387aba37e9717c9a5c335bd642c7e3b Mon Sep 17 00:00:00 2001
|
||||
From: orangepi-xunlong <258384131@qq.com>
|
||||
Date: Tue, 16 Aug 2022 20:00:46 +0800
|
||||
Subject: [PATCH] orangepizero2: dts: Set bldo2 to 1.8v
|
||||
|
||||
---
|
||||
arch/arm/dts/sun50i-h616-orangepi-zero2.dts | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/sun50i-h616-orangepi-zero2.dts b/arch/arm/dts/sun50i-h616-orangepi-zero2.dts
|
||||
index e6de49f89..e45a083f5 100644
|
||||
--- a/arch/arm/dts/sun50i-h616-orangepi-zero2.dts
|
||||
+++ b/arch/arm/dts/sun50i-h616-orangepi-zero2.dts
|
||||
@@ -154,8 +154,11 @@
|
||||
regulator-name = "vcc1v8";
|
||||
};
|
||||
|
||||
- bldo2 {
|
||||
- /* unused */
|
||||
+ reg_bldo2: bldo2 {
|
||||
+ regulator-always-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-name = "vcc1v8";
|
||||
};
|
||||
|
||||
bldo3 {
|
||||
@ -0,0 +1,66 @@
|
||||
From b32893e22426625fa0d32460a93d26b152a19849 Mon Sep 17 00:00:00 2001
|
||||
From: orangepi-xunlong <258384131@qq.com>
|
||||
Date: Mon, 18 Apr 2022 10:43:17 +0800
|
||||
Subject: [PATCH] sunxi: orangepizero2: light up red led
|
||||
|
||||
---
|
||||
arch/arm/mach-sunxi/Kconfig | 7 +++++++
|
||||
board/sunxi/board.c | 10 +++++++++-
|
||||
configs/orangepi_zero2_defconfig | 1 +
|
||||
3 files changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
|
||||
index 14c0f3b6a..0be3bd390 100644
|
||||
--- a/arch/arm/mach-sunxi/Kconfig
|
||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
||||
@@ -645,6 +645,13 @@ config MACPWR
|
||||
Set the pin used to power the MAC. This takes a string in the format
|
||||
understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
|
||||
|
||||
+config PWRLED
|
||||
+ string "Power led pin"
|
||||
+ default ""
|
||||
+ help
|
||||
+ Set the pin used to power the led. This takes a string in the format
|
||||
+ understood by sunxi_name_to_gpio, e.g. PC12 for pin 1 of port H.
|
||||
+
|
||||
config MMC0_CD_PIN
|
||||
string "Card detect pin for mmc0"
|
||||
default "PF6" if MACH_SUN8I_A83T || MACH_SUNXI_H3_H5 || MACH_SUN50I
|
||||
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
|
||||
index 31e08c3ba..c7df86695 100644
|
||||
--- a/board/sunxi/board.c
|
||||
+++ b/board/sunxi/board.c
|
||||
@@ -233,7 +233,7 @@ static void mmc_pinmux_setup(int sdc);
|
||||
/* add board specific code here */
|
||||
int board_init(void)
|
||||
{
|
||||
- __maybe_unused int id_pfr1, ret, satapwr_pin, macpwr_pin;
|
||||
+ __maybe_unused int id_pfr1, ret, satapwr_pin, macpwr_pin, pwrled_pin;
|
||||
|
||||
gd->bd->bi_boot_params = (PHYS_SDRAM_0 + 0x100);
|
||||
|
||||
@@ -293,6 +293,14 @@ int board_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
+ if (CONFIG_PWRLED[0]) {
|
||||
+ pwrled_pin = sunxi_name_to_gpio(CONFIG_PWRLED);
|
||||
+ if (pwrled_pin >= 0) {
|
||||
+ gpio_request(pwrled_pin, "pwrled");
|
||||
+ gpio_direction_output(pwrled_pin, 1);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
#if CONFIG_MACH_SUN50I_H616
|
||||
/*
|
||||
* The bit[16] of register reg[0x03000000] must be zero for the THS
|
||||
diff --git a/configs/orangepi_zero2_defconfig b/configs/orangepi_zero2_defconfig
|
||||
index 5334ff7bc..02ac272be 100644
|
||||
--- a/configs/orangepi_zero2_defconfig
|
||||
+++ b/configs/orangepi_zero2_defconfig
|
||||
@@ -13,3 +13,4 @@ CONFIG_R_I2C_ENABLE=y
|
||||
CONFIG_PHY_REALTEK=y
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_SPI=y
|
||||
+CONFIG_PWRLED="PC12"
|
||||
Loading…
Reference in New Issue
Block a user