arm: mach-k3: am642_init: Unlock MCU PADCFG regs
authorMichael Liebert <liebert@ibv-augsburg.de>
Wed, 15 Dec 2021 15:14:28 +0000 (16:14 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 15 Jan 2022 15:38:26 +0000 (10:38 -0500)
Currently only the PADCFG registers of the main domain are unlocked.
Also unlock PADCFG registers of MCU domain, so MCU pin muxing can be configured by u-boot or Linux.

Signed-off-by: Michael Liebert <liebert@ibv-augsburg.de>
Tested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Nishanth Menon <nm@ti.com>
arch/arm/mach-k3/am642_init.c
arch/arm/mach-k3/include/mach/am64_hardware.h

index 533905d..958fa05 100644 (file)
@@ -37,6 +37,9 @@ static void ctrl_mmr_unlock(void)
        mmr_unlock(CTRL_MMR0_BASE, 3);
        mmr_unlock(CTRL_MMR0_BASE, 5);
        mmr_unlock(CTRL_MMR0_BASE, 6);
+
+       /* Unlock all MCU_PADCFG_MMR1 module registers */
+       mmr_unlock(MCU_PADCFG_MMR1_BASE, 1);
 }
 
 /*
index 9638343..e06e1f9 100644 (file)
@@ -12,6 +12,8 @@
 
 #define PADCFG_MMR1_BASE                               0xf0000
 
+#define MCU_PADCFG_MMR1_BASE                           0x04080000
+
 #define MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK             0x00000078
 #define MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT            3