This series implements a driver for the BIST (Built-In Self Test) module for K3 devices. The BIST driver must ideally support triggering of BIST tests, both PBIST (Memory BIST) and LBIST (Logic BIST) on a core. Both tests are destructive in nature. Please see links [1] and [2] for further information regarding the two.
At boot up, BIST is executed by hardware for the MCU domain automatically as part of HW POST. So BIST has been checked only for the MCU domain when U-Boot comes up in the usual U-Boot to Linux boot flow. To facilitate the use-case where some safe firmware is intended to be run on a safe core, it is best to have triggered the BIST tests on that core. As an example, we take triggering the BIST tests on the MAIN R52_x cores. The triggering patch is kept as DONOTMERGE. The general procedure for triggering BIST on a core is: 1. Power on the core under test following a sequence 2. Trigger the BIST test 3. Reset the core under test following a sequence BIST tests are triggered from A72 SPL where the DM (Device Manager firmware that handles power management) is already up and can perform these power sequences for us. Boot logs (with LOG_DEBUG and CONFIG_K3_BIST enabled): https://gist.github.com/nehamalcom/48d966cf1f962ae6f51fc2ee099d6413 Changes since v1: https://lore.kernel.org/all/20241127145346.2609868-1-n-fran...@ti.com/ - Udit - alignment and macro naming corrections - move debug prints to printf for errors - split to separate SoC BIST header file - drop enabling CONFIG_K3_BIST by default (patch 3/4) - unmark triggering of BIST as a DONOTMERGE patch RFC: https://lore.kernel.org/all/20240903114402.2155740-1-n-fran...@ti.com/ [1] https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/sdl/sdl_docs/userguide/j721e/modules/pbist.html#introduction [2] https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/sdl/sdl_docs/userguide/j721e/modules/lbist.html#introduction Neha Malcom Francis (3): drivers: misc: k3_bist: Add K3 BIST driver DONOTMERGE: arm: dts: k3-j784s4-main: Add PBIST_14 node arm: mach-k3: j784s4_init: Trigger LBIST and PBIST on MAIN R5 2_0 arch/arm/mach-k3/j784s4/j784s4_init.c | 47 + drivers/misc/Kconfig | 8 + drivers/misc/Makefile | 1 + drivers/misc/k3_bist.c | 847 ++++++++++++++++++ drivers/misc/k3_bist_static_data.h | 673 ++++++++++++++ drivers/misc/k3_j784s4_bist_static_data.h | 357 ++++++++ dts/upstream/src/arm64/ti/k3-j784s4-main.dtsi | 12 + include/k3_bist.h | 44 + 8 files changed, 1989 insertions(+) create mode 100644 drivers/misc/k3_bist.c create mode 100644 drivers/misc/k3_bist_static_data.h create mode 100644 drivers/misc/k3_j784s4_bist_static_data.h create mode 100644 include/k3_bist.h -- 2.34.1