uboot-sunxi: add T113-S3 support
[openwrt/staging/wigyori.git] / package / boot / uboot-sunxi / patches / 4020-Kconfig-sunxi-prepare-for-using-drivers-ram-sunxi.patch
diff --git a/package/boot/uboot-sunxi/patches/4020-Kconfig-sunxi-prepare-for-using-drivers-ram-sunxi.patch b/package/boot/uboot-sunxi/patches/4020-Kconfig-sunxi-prepare-for-using-drivers-ram-sunxi.patch
new file mode 100644 (file)
index 0000000..953f894
--- /dev/null
@@ -0,0 +1,58 @@
+From 9d9fdd0d200b0af1250186186cd9061a72f4c341 Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara@arm.com>
+Date: Sat, 26 Aug 2023 16:56:03 +0200
+Subject: [PATCH 4020/4052] Kconfig: sunxi: prepare for using drivers/ram/sunxi
+
+At the moment all Allwinner DRAM initialisation routines are stored in
+arch/arm/mach-sunxi, even though those "drivers" are just a giant
+collection of writel's, without any architectural dependency.
+
+The R528/T113-s SoC (with ARM cores) and the D1/D1s Soc (with RISC-V
+cores) share the same die, so should share the same DRAM init routines as
+well.
+
+To prepare for this, add a new sunxi directory inside drivers/ram, and
+add some stub entries to prepare for the addition of the share DRAM code
+for those SoCs.
+
+The RISC-V D1(s) SoCs will probably use SPL_DM, so make this entry
+depend on that already.
+
+Signed-off-by: Andre Przywara <andre.przywara@arm.com>
+---
+ drivers/ram/Kconfig       |  1 +
+ drivers/ram/sunxi/Kconfig | 13 +++++++++++++
+ 2 files changed, 14 insertions(+)
+ create mode 100644 drivers/ram/sunxi/Kconfig
+
+diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig
+index e085119963..636374be59 100644
+--- a/drivers/ram/Kconfig
++++ b/drivers/ram/Kconfig
+@@ -112,3 +112,4 @@ source "drivers/ram/rockchip/Kconfig"
+ source "drivers/ram/sifive/Kconfig"
+ source "drivers/ram/stm32mp1/Kconfig"
+ source "drivers/ram/octeon/Kconfig"
++source "drivers/ram/sunxi/Kconfig"
+diff --git a/drivers/ram/sunxi/Kconfig b/drivers/ram/sunxi/Kconfig
+new file mode 100644
+index 0000000000..97e261de54
+--- /dev/null
++++ b/drivers/ram/sunxi/Kconfig
+@@ -0,0 +1,13 @@
++config DRAM_SUN20I_D1
++      bool "DM DRAM driver support for Allwinner D1"
++      depends on RAM && ARCH_SUNXI
++      default y
++      help
++        This enables support for DRAM drivers using the driver model
++        for Allwinner SoCs.
++
++config DRAM_SUN8I_R528
++      bool "DRAM driver support for Allwinner R528/T113s"
++      default y if MACH_SUN8I_R528
++      help
++        Select this DRAM controller driver for the R528/T113s SoCs.
+-- 
+2.20.1
+