Field return handling was only implemented for the i.MX8* processors. Extend this with support for i.MX6 and extend the hab command with an option to burn the field return fuse in case the field return sticky bit might be unlocked.
Signed-off-by: Fabian Pflug <[email protected]> --- Changes in v4: - Change order of patches. Fix first, then new features. - Link to v3: https://lore.barebox.org/barebox/20251219-v2025-11-0-topic-imx6-field-return-v3-0-690fdeb78...@pengutronix.de Changes in v3: - Fix nitpick by Marco - Added reviewed-by - Fix broken mainline version of UID in CST. (Tested on i.MX6Q) - Change wording for hab command help. - Link to v2: https://lore.barebox.org/barebox/20251219-v2025-11-0-topic-imx6-field-return-v2-0-2696ac61a...@pengutronix.de Changes in v2: - Added reviewed-by - Added imx6_hab_field_return_ocotp and reintroduced the imx8m_hab_field_return_ocotp, but also add a new helperfunction for both to call. - Implemented Marcos changes for commands/hab.c, but changed indentation. - Link to v1: https://lore.kernel.org/r/20251218-v2025-11-0-topic-imx6-field-return-v1-0-378114319...@pengutronix.de --- Fabian Pflug (5): i.MX: HAB: fix field return unlock fuse uid arm: mach-imx6: use kconfig for field return nvmem: ocotp: extend support to query the sticky bit i.MX: HAB: extend field_return support to imx6 commands: hab: extend by field_return fuse burn arch/arm/mach-imx/Kconfig | 35 +++++++++++++++------------ commands/hab.c | 24 +++++++++++++++--- drivers/hab/hab.c | 34 ++++++++++++++++---------- drivers/nvmem/ocotp.c | 12 ++++++--- include/mach/imx/habv4-imx6-gencsf-template.h | 11 +++------ include/mach/imx/habv4-imx8-gencsf.h | 2 +- include/mach/imx/ocotp-fusemap.h | 1 + scripts/Makefile.lib | 2 +- 8 files changed, 74 insertions(+), 47 deletions(-) --- base-commit: d6f0974673c0e3da00f8d0789d6302a43f3e478d change-id: 20251218-v2025-11-0-topic-imx6-field-return-d3b4f2e55afb Best regards, -- Fabian Pflug <[email protected]>
