arm: mach-k3: am62: Fixup CPU core, gpu and pru nodes in fdt
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>
Fri, 14 Jul 2023 15:23:10 +0000 (17:23 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jul 2023 19:32:12 +0000 (15:32 -0400)
commit70aa5a94d451cc4beb7345f8fc1e777668acb816
tree66d774a3a6844269be3ee5a0494ade1335f5dc7a
parentde3db252314eaa942b7aa6abf37a62e866821fe5
arm: mach-k3: am62: Fixup CPU core, gpu and pru nodes in fdt

AM62x SoC is available in multiple variant:
- CPU cores (Cortex-A) AM62x1 (1 core), AM62x2 (2 cores), AM62x4 (4 cores)
- GPU AM625x with GPU, AM623x without GPU
- PRU (Programmable RT unit) can be present or not on AM62x2/AM62x4

Remove the relevant FDT nodes by reading the actual configuration
from the SoC registers, with that change is possible to have a single
dts/dtb file handling the different variant at runtime.
While removing GPU node and CPU nodes also the watchdog node
in the same Module Domain is removed.

A similar approach is implemented for example on i.MX8 and STM32MP1 SoC.

Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
arch/arm/mach-k3/Makefile
arch/arm/mach-k3/am625_fdt.c [new file with mode: 0644]
arch/arm/mach-k3/common_fdt.c