arm: mediatek: add CONFIG_MTK_MEM_MAP_DDR_BASE_PHY

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>
This commit is contained in:
David Lechner 2026-02-09 10:39:32 -06:00 committed by Tom Rini
parent 24ffbb2aa1
commit f1c0e637cd
2 changed files with 8 additions and 2 deletions

View 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

View 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,
}, {