From 52b7a7c6faf27b4cc3c244c5fceb31070fa4ebe9 Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:32:59 +0300 Subject: [PATCH] u-boot-sunxi: Fix loading of bananapim3 board from eMMC Add the A83T processor to the sunxi_mmc_can_calibrate logic function for proper configuration. Return the default settings of DRAM_CLK. This code has been tested for bootloader v2024.01 and later. --- ...Add-MACH_SUN8I_A83T-to-can-calibrate.patch | 27 +++++++++++++++++++ .../adjust-default-dram-clockspeeds.patch | 13 --------- 2 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 patch/u-boot/u-boot-sunxi/board_bananapim3/Add-MACH_SUN8I_A83T-to-can-calibrate.patch delete mode 100644 patch/u-boot/u-boot-sunxi/board_bananapim3/adjust-default-dram-clockspeeds.patch diff --git a/patch/u-boot/u-boot-sunxi/board_bananapim3/Add-MACH_SUN8I_A83T-to-can-calibrate.patch b/patch/u-boot/u-boot-sunxi/board_bananapim3/Add-MACH_SUN8I_A83T-to-can-calibrate.patch new file mode 100644 index 000000000000..c71fd4d45b9f --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/board_bananapim3/Add-MACH_SUN8I_A83T-to-can-calibrate.patch @@ -0,0 +1,27 @@ +From 335c35e6f56b87397d5b6ba74d7676e37269636b Mon Sep 17 00:00:00 2001 +From: leo +Date: Sun, 15 Sep 2024 10:50:38 +0300 +Subject: [PATCH 1/2] Add MACH_SUN8I_A83T to can calibrate + +Add the A83T processor to the sunxi_mmc_can_calibrate +logic function for proper configuration. + +--- + drivers/mmc/sunxi_mmc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c +index 9534f9ac35..9493bd8639 100644 +--- a/drivers/mmc/sunxi_mmc.c ++++ b/drivers/mmc/sunxi_mmc.c +@@ -62,6 +62,7 @@ static bool sunxi_mmc_can_calibrate(void) + IS_ENABLED(CONFIG_MACH_SUN50I_H5) || + IS_ENABLED(CONFIG_SUN50I_GEN_H6) || + IS_ENABLED(CONFIG_SUNXI_GEN_NCAT2) || ++ IS_ENABLED(CONFIG_MACH_SUN8I_A83T) || + IS_ENABLED(CONFIG_MACH_SUN8I_R40); + } + +-- +2.35.3 + diff --git a/patch/u-boot/u-boot-sunxi/board_bananapim3/adjust-default-dram-clockspeeds.patch b/patch/u-boot/u-boot-sunxi/board_bananapim3/adjust-default-dram-clockspeeds.patch deleted file mode 100644 index 0cb7c681ade4..000000000000 --- a/patch/u-boot/u-boot-sunxi/board_bananapim3/adjust-default-dram-clockspeeds.patch +++ /dev/null @@ -1,13 +0,0 @@ -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