OrangePi 3 LTS: Update u-boot defconfig
Source of defconfig additions and mmc patch: https://github.com/LibreELEC/LibreELEC.tv/tree/master/projects/Allwinner/patches/u-boot Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
This commit is contained in:
parent
09b7895004
commit
e778848389
@ -1,30 +1,42 @@
|
||||
From 75bc3e6a7c4e487fb9d2f6ac88c77e484f2f0718 Mon Sep 17 00:00:00 2001
|
||||
From 5b313cde802522040b0ae64a5475de95d7583126 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Wed, 4 Feb 2026 05:08:25 -0500
|
||||
Date: Sat, 7 Feb 2026 10:50:19 -0500
|
||||
Subject: [PATCH] Add OrangePi 3 LTS defconfig
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
---
|
||||
configs/orangepi_3_lts_defconfig | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
configs/orangepi_3_lts_defconfig | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
create mode 100644 configs/orangepi_3_lts_defconfig
|
||||
|
||||
diff --git a/configs/orangepi_3_lts_defconfig b/configs/orangepi_3_lts_defconfig
|
||||
new file mode 100644
|
||||
index 00000000000..6b64d12a197
|
||||
index 00000000000..6a908ca6454
|
||||
--- /dev/null
|
||||
+++ b/configs/orangepi_3_lts_defconfig
|
||||
@@ -0,0 +1,16 @@
|
||||
@@ -0,0 +1,28 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_SUNXI=y
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-orangepi-3-lts"
|
||||
+CONFIG_SPL=y
|
||||
+CONFIG_MACH_SUN50I_H6=y
|
||||
+CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
+CONFIG_MMC0_CD_PIN="PF6"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
+CONFIG_BLUETOOTH_DT_DEVICE_FIXUP="brcm,bcm4345c5"
|
||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_SPL_STACK=0x118000
|
||||
+CONFIG_SYS_PBSIZE=1024
|
||||
+CONFIG_SYS_BOOTM_LEN=0x2000000
|
||||
+CONFIG_CMD_KASLRSEED=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BOOT=y
|
||||
+CONFIG_LED_ACTIVITY=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_PHY_MOTORCOMM=y
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
+CONFIG_PHY_SUN50I_USB3=y
|
||||
+CONFIG_DM_RNG=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_XHCI_DWC3=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
@ -34,85 +46,3 @@ index 00000000000..6b64d12a197
|
||||
--
|
||||
2.51.0
|
||||
|
||||
From f9e65cf1b1d6cc76e04120464543e4f67703a85f Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Mon, 4 Aug 2025 19:59:23 -0400
|
||||
Subject: [PATCH] Enable KASLR
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
---
|
||||
configs/orangepi_3_lts_defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/orangepi_3_lts_defconfig b/configs/orangepi_3_lts_defconfig
|
||||
index 125137bc321..89bb7496740 100644
|
||||
--- a/configs/orangepi_3_lts_defconfig
|
||||
+++ b/configs/orangepi_3_lts_defconfig
|
||||
@@ -7,7 +7,9 @@ CONFIG_SUNXI_DRAM_H6_LPDDR3=y
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_BLUETOOTH_DT_DEVICE_FIXUP="brcm,bcm4345c5"
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
+CONFIG_CMD_KASLRSEED=y
|
||||
CONFIG_PHY_SUN50I_USB3=y
|
||||
+CONFIG_DM_RNG=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_XHCI_DWC3=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
--
|
||||
2.43.0
|
||||
|
||||
From 1c600e1b82eb4b742e655ad3ad44d85ae17a5925 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Tue, 5 Aug 2025 09:48:18 -0400
|
||||
Subject: [PATCH] Enable LED Support
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
---
|
||||
configs/orangepi_3_lts_defconfig | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/configs/orangepi_3_lts_defconfig b/configs/orangepi_3_lts_defconfig
|
||||
index 89bb7496740..02afb30960b 100644
|
||||
--- a/configs/orangepi_3_lts_defconfig
|
||||
+++ b/configs/orangepi_3_lts_defconfig
|
||||
@@ -8,6 +8,11 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_BLUETOOTH_DT_DEVICE_FIXUP="brcm,bcm4345c5"
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_CMD_KASLRSEED=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_BOOT=y
|
||||
+CONFIG_LED_ACTIVITY=y
|
||||
+CONFIG_LED_BLINK=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
CONFIG_PHY_SUN50I_USB3=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
--
|
||||
2.43.0
|
||||
|
||||
From 0d075b5c07bafc397cb5e057c52048cfee8b017a Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Yavitz <pyavitz@gmail.com>
|
||||
Date: Fri, 6 Feb 2026 07:02:58 -0500
|
||||
Subject: [PATCH] Enable PHY_MOTORCOMM and SUN8I_EMAC
|
||||
|
||||
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
|
||||
---
|
||||
configs/orangepi_3_lts_defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configs/orangepi_3_lts_defconfig b/configs/orangepi_3_lts_defconfig
|
||||
index be46ea3608b..7e74d48b326 100644
|
||||
--- a/configs/orangepi_3_lts_defconfig
|
||||
+++ b/configs/orangepi_3_lts_defconfig
|
||||
@@ -13,6 +13,8 @@ CONFIG_LED_BOOT=y
|
||||
CONFIG_LED_ACTIVITY=y
|
||||
CONFIG_LED_BLINK=y
|
||||
CONFIG_LED_GPIO=y
|
||||
+CONFIG_PHY_MOTORCOMM=y
|
||||
+CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_PHY_SUN50I_USB3=y
|
||||
CONFIG_DM_RNG=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
--
|
||||
2.51.0
|
||||
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Da Xue <da@libre.computer>
|
||||
Date: Thu, 21 Jul 2022 18:08:21 -0400
|
||||
Subject: [PATCH] mmc: increase stabilization delay from 1ms to 20ms
|
||||
|
||||
Some users experienced problems booting u-boot from SPL hanging here:
|
||||
|
||||
Trying to boot from MMC1 or Trying to boot from MMC2
|
||||
|
||||
This seems to occur with both MicroSD and eMMC modules on ALL-H3-CC.
|
||||
Increasing the delay after mmc reset fixes these boot problems.
|
||||
Some MicroSD cards are impacted more than others so it is possible that
|
||||
MicroSD internals need time to stabilize. Below is some failure data.
|
||||
|
||||
sandisk ultra 64gb 9/20 with 1ms, 20/20 with 10ms
|
||||
sandisk ultra 16gb 2/20 with 1ms, 20/20 with 10ms
|
||||
sandisk extreme 16gb 6/20 with 10ms, 20/20 with 20ms
|
||||
|
||||
A quick comparison of schematics show series resistors for ESD
|
||||
protection on the MicroSD GPIOs not present on all H3/H5 boards.
|
||||
It is not known if this is related to the issue.
|
||||
|
||||
This patch adds a fixed 20ms delay to mmc init to mitigate the problem.
|
||||
If boot time optimization is required and the platform does not require
|
||||
the delay. The delay can be replaced with:
|
||||
|
||||
writel(SUNXI_MMC_GCTRL_RESET, &priv->reg->gctrl);
|
||||
if (wait_for_bit_le32( &priv->reg->gctrl,
|
||||
SUNXI_MMC_GCTRL_RESET, false, 20, false)) {
|
||||
printf("%s: Timeout\n", __func__);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
Signed-off-by: Da Xue <da@libre.computer>
|
||||
---
|
||||
drivers/mmc/sunxi_mmc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
|
||||
index 1bb7b6d0e9..f7942b69ce 100644
|
||||
--- a/drivers/mmc/sunxi_mmc.c
|
||||
+++ b/drivers/mmc/sunxi_mmc.c
|
||||
@@ -453,7 +453,7 @@
|
||||
{
|
||||
/* Reset controller */
|
||||
writel(SUNXI_MMC_GCTRL_RESET, regs + SUNXI_MMC_GCTRL);
|
||||
- udelay(1000);
|
||||
+ udelay(20000);
|
||||
|
||||
if (IS_ENABLED(CONFIG_SUN50I_GEN_H6) || IS_ENABLED(CONFIG_SUNXI_GEN_NCAT2)) {
|
||||
/* Reset card */
|
||||
Loading…
Reference in New Issue
Block a user