* [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs
@ 2021-12-15 15:10 Christian Gmeiner
0 siblings, 0 replies; 4+ messages in thread
From: Christian Gmeiner @ 2021-12-15 15:10 UTC (permalink / raw)
To: linux-kernel
Cc: Michael Liebert, Christian Gmeiner, Dave Gerlach, Lokesh Vutla,
Aswath Govindraju, Keerthy, u-boot
From: Michael Liebert <liebert@ibv-augsburg.de>
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>
---
arch/arm/mach-k3/am642_init.c | 3 +++
arch/arm/mach-k3/include/mach/am64_hardware.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index 533905daeb..958fa05af4 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -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);
}
/*
diff --git a/arch/arm/mach-k3/include/mach/am64_hardware.h b/arch/arm/mach-k3/include/mach/am64_hardware.h
index 96383437d5..e06e1f9532 100644
--- a/arch/arm/mach-k3/include/mach/am64_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am64_hardware.h
@@ -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
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs
2021-12-15 15:14 Christian Gmeiner
2022-01-14 19:27 ` Nishanth Menon
@ 2022-01-17 18:36 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-01-17 18:36 UTC (permalink / raw)
To: Christian Gmeiner
Cc: u-boot, Michael Liebert, Lokesh Vutla, Dave Gerlach,
Aswath Govindraju, Keerthy
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
On Wed, Dec 15, 2021 at 04:14:28PM +0100, Christian Gmeiner wrote:
> From: Michael Liebert <liebert@ibv-augsburg.de>
>
> 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>
Applied to u-boot/master, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs
2021-12-15 15:14 Christian Gmeiner
@ 2022-01-14 19:27 ` Nishanth Menon
2022-01-17 18:36 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2022-01-14 19:27 UTC (permalink / raw)
To: Christian Gmeiner, Tom Rini
Cc: u-boot, Michael Liebert, Dave Gerlach, Aswath Govindraju, Keerthy
On 16:14-20211215, Christian Gmeiner wrote:
> From: Michael Liebert <liebert@ibv-augsburg.de>
>
> 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>
> ---
> arch/arm/mach-k3/am642_init.c | 3 +++
> arch/arm/mach-k3/include/mach/am64_hardware.h | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
> index 533905daeb..958fa05af4 100644
> --- a/arch/arm/mach-k3/am642_init.c
> +++ b/arch/arm/mach-k3/am642_init.c
> @@ -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);
> }
>
> /*
> diff --git a/arch/arm/mach-k3/include/mach/am64_hardware.h b/arch/arm/mach-k3/include/mach/am64_hardware.h
> index 96383437d5..e06e1f9532 100644
> --- a/arch/arm/mach-k3/include/mach/am64_hardware.h
> +++ b/arch/arm/mach-k3/include/mach/am64_hardware.h
> @@ -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
>
Acked-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs
@ 2021-12-15 15:14 Christian Gmeiner
2022-01-14 19:27 ` Nishanth Menon
2022-01-17 18:36 ` Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Christian Gmeiner @ 2021-12-15 15:14 UTC (permalink / raw)
To: u-boot
Cc: Michael Liebert, Christian Gmeiner, Lokesh Vutla, Dave Gerlach,
Aswath Govindraju, Keerthy
From: Michael Liebert <liebert@ibv-augsburg.de>
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>
---
arch/arm/mach-k3/am642_init.c | 3 +++
arch/arm/mach-k3/include/mach/am64_hardware.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index 533905daeb..958fa05af4 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -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);
}
/*
diff --git a/arch/arm/mach-k3/include/mach/am64_hardware.h b/arch/arm/mach-k3/include/mach/am64_hardware.h
index 96383437d5..e06e1f9532 100644
--- a/arch/arm/mach-k3/include/mach/am64_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am64_hardware.h
@@ -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
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-17 18:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 15:10 [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs Christian Gmeiner
2021-12-15 15:14 Christian Gmeiner
2022-01-14 19:27 ` Nishanth Menon
2022-01-17 18:36 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.