remoteproc: renesas: Add Renesas R-Car Gen4 remote processor driver
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 20 Dec 2024 00:02:14 +0000 (01:02 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sun, 29 Dec 2024 15:55:31 +0000 (16:55 +0100)
commit5769328fab44af21ee3c4ef1297494a367a3dce8
tree95a01663d2e85274b7c226b57df944991c573921
parenteaf2ed4eb42fb08fe3ab3ef04b18b7da2f6c5f41
remoteproc: renesas: Add Renesas R-Car Gen4 remote processor driver

Add R-Car Gen4 APMU controller remoteproc driver capable of starting
the Cortex-R52 cores in Renesas R8A779G0 V4H/V4M SoC. The APMU IP is
in fact a power management unit capable of additional operations, but
those are not used by U-Boot so far.

This requires slight adjustment to the SPL entry point code, as that
is being executed on the Cortex-R52 #0 and the Cortex-R52 #0 enters an
endless loop once it starts the rest of the SPL on Cortex-A76 core.
The endless loop now checks for content of APMU CRBARP registers and
tests whether valid VLD_BARP and BAREN_VALID bits are set, if so, the
Cortex-R52 core exits the endless loop and jumps to address started
in CRBARP[31:18] register in ARM mode, which is a trampoline code to
jump to the final entry point.

The trampoline code is in place to avoid limitation of CRBARP[31:18]
address field, which limits the core start address to memory addresses
aligned to 0x40000 or 256 kiB . The trampoline is placed at 0x40000
aligned address and jumps to the final entry point, which can be at
an address with arbitrary alignment at instruction granularity.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
arch/arm/mach-renesas/include/mach/boot0.h
drivers/remoteproc/Kconfig
drivers/remoteproc/Makefile
drivers/remoteproc/renesas_apmu.c [new file with mode: 0644]