[PATCH v2 0/3] arm: mach-k3: am62: Add core number, gpu and pru autodetection FDT fixups

Francesco Dolcini francesco at dolcini.it
Fri Jul 14 17:23:07 CEST 2023


From: Francesco Dolcini <francesco.dolcini at toradex.com>

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.

Since we start using ft_system_setup on a SoC without msmc ram and
fdt_fixup_msmc_ram function fails on those SoC (triggering a reset loop) the
first commit fix it by calling that function only on specific SoC.


v2:
 - Moved fdt common functions to to common_fdt.c and ft_system_setup function
   to specific SoC files (eg. am654_fdt.c) and compile them using relevant
   configuration
 - Add GPU and PRU fdt fixup

v1: https://lore.kernel.org/all/20230712134730.30229-1-francesco@dolcini.it/


Emanuele Ghidoli (3):
  arm: k3: Fix ft_system_setup so it can be enabled on any SoC
  arm: mach-k3: am62: Add CTRLMMR_WKUP_JTAG_DEVICE_ID register
    definition
  arm: mach-k3: am62: Fixup CPU core, gpu and pru nodes in fdt

 arch/arm/mach-k3/Makefile                     |   7 ++
 arch/arm/mach-k3/am625_fdt.c                  |  71 +++++++++++
 arch/arm/mach-k3/am654_fdt.c                  |  12 ++
 arch/arm/mach-k3/common.c                     |  91 --------------
 arch/arm/mach-k3/common_fdt.c                 | 113 ++++++++++++++++++
 arch/arm/mach-k3/common_fdt.h                 |  11 ++
 arch/arm/mach-k3/include/mach/am62_hardware.h |  22 ++++
 arch/arm/mach-k3/j721e_fdt.c                  |  12 ++
 arch/arm/mach-k3/j721s2_fdt.c                 |  12 ++
 9 files changed, 260 insertions(+), 91 deletions(-)
 create mode 100644 arch/arm/mach-k3/am625_fdt.c
 create mode 100644 arch/arm/mach-k3/am654_fdt.c
 create mode 100644 arch/arm/mach-k3/common_fdt.c
 create mode 100644 arch/arm/mach-k3/common_fdt.h
 create mode 100644 arch/arm/mach-k3/j721e_fdt.c
 create mode 100644 arch/arm/mach-k3/j721s2_fdt.c

-- 
2.25.1



More information about the U-Boot mailing list