mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-06 23:36:59 +02:00
Add a driver for the BIST module that support triggering of both PBIST (Memory BIST) and LBIST (Logic BIST) tests. Also expose the relevant operations and functions that would be required for an end user to trigger the tests. Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Texas Instruments' BIST (Built-In Self-Test) driver
|
|
*
|
|
* Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
|
|
* Neha Malcom Francis <n-francis@ti.com>
|
|
*
|
|
*/
|
|
|
|
#ifndef _INCLUDE_BIST_H_
|
|
#define _INCLUDE_BIST_H_
|
|
|
|
#define PROC_BOOT_CTRL_FLAG_R5_CORE_HALT 0x00000001
|
|
#define PROC_ID_MCU_R5FSS2_CORE0 0x0A
|
|
#define PROC_ID_MCU_R5FSS2_CORE1 0x0B
|
|
#define PROC_BOOT_CTRL_FLAG_R5_LPSC 0x00000002
|
|
|
|
#define TISCI_DEV_PBIST14 237
|
|
#define TISCI_DEV_R5FSS2_CORE0 343
|
|
#define TISCI_DEV_R5FSS2_CORE1 344
|
|
|
|
#define TISCI_MSG_VALUE_DEVICE_SW_STATE_AUTO_OFF 0
|
|
#define TISCI_MSG_VALUE_DEVICE_SW_STATE_RETENTION 1
|
|
#define TISCI_MSG_VALUE_DEVICE_SW_STATE_ON 2
|
|
|
|
#define TISCI_BIT(n) ((1) << (n))
|
|
|
|
struct bist_ops {
|
|
int (*run_lbist)(void);
|
|
int (*run_lbist_post)(void);
|
|
int (*run_pbist_post)(void);
|
|
int (*run_pbist_neg)(void);
|
|
int (*run_pbist_rom)(void);
|
|
int (*run_pbist)(void);
|
|
};
|
|
|
|
void lbist_enable_isolation(void);
|
|
void lbist_disable_isolation(void);
|
|
int prepare_pbist(struct ti_sci_handle *handle);
|
|
int deprepare_pbist(struct ti_sci_handle *handle);
|
|
int prepare_lbist(struct ti_sci_handle *handle);
|
|
int deprepare_lbist(struct ti_sci_handle *handle);
|
|
|
|
#endif /* _INCLUDE_BIST_H_ */
|