]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm: mediatek: add CONFIG_MTK_MEM_MAP_DDR_BASE_PHY
authorDavid Lechner <dlechner@baylibre.com>
Mon, 9 Feb 2026 16:39:32 +0000 (10:39 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 18 Feb 2026 17:57:14 +0000 (11:57 -0600)
Add a CONFIG_MTK_MEM_MAP_DDR_BASE_PHY variable to specify the DDR base
physical address for the Mediatek ARMv8 memory map. This will be used
by MT8196 in the future which has a different DDR base address than
other Mediatek SoCs.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
arch/arm/mach-mediatek/Kconfig
arch/arm/mach-mediatek/armv8-mem-map.c

index 33717a1864f58f281a91dec935a95cff512fe7db..d10aedc303bd94404b475526587823c0fcb450aa 100644 (file)
@@ -132,6 +132,12 @@ endchoice
 
 if ARM64
 
+config MTK_MEM_MAP_DDR_BASE_PHY
+       hex "DDR physical base address"
+       default 0x40000000
+       help
+               Target-specific DDR physical base address.
+
 config MTK_MEM_MAP_DDR_SIZE
        hex "DDR .size in mem_map"
        default 0x200000000 if TARGET_MT7987 || TARGET_MT7988 || TARGET_MT8188
index 3587a2a9dd26b67a0c6e48b7b49cd06d13b4493a..cbaa9b4c26703f2b0b898f0138795ae94932042b 100644 (file)
@@ -5,8 +5,8 @@
 static struct mm_region mediatek_mem_map[] = {
        {
                /* DDR */
-               .virt = 0x40000000UL,
-               .phys = 0x40000000UL,
+               .virt = CONFIG_MTK_MEM_MAP_DDR_BASE_PHY,
+               .phys = CONFIG_MTK_MEM_MAP_DDR_BASE_PHY,
                .size = CONFIG_MTK_MEM_MAP_DDR_SIZE,
                .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_OUTER_SHARE,
        }, {