arm: mvebu: Add support for programming LD0 and LD1 eFuse
authorPali Rohár <pali@kernel.org>
Thu, 22 Sep 2022 11:43:44 +0000 (13:43 +0200)
committerStefan Roese <sr@denx.de>
Thu, 6 Oct 2022 08:15:35 +0000 (10:15 +0200)
commit3b44b3fdf2b01f1d50a4325460a36550821ff920
treeb2899dba68f126334d2cd3c77486bf6a1752a649
parent37bb396669b27aa62fe8bc5eeb6bfde92e09c2d3
arm: mvebu: Add support for programming LD0 and LD1 eFuse

This patch implements LD eFuse programming support. Armada 385 contains two
LD eFuse lines, each is 256 bit long with one additional lock bit. LD 0
line is mapped to U-Boot fuse bank 64 and LD 1 line to fuse bank 65. U-Boot
32-bit fuse words 0-8 are mapped to LD eFuse line bits 0-255. U-Boot fuse
word 9 is mapped to LD eFuse line lock bit.

So to program LD 1 General Purpose Data line, use U-Boot fuse command:

    => fuse prog -y 65 0 0x76543210
    => fuse prog -y 65 1 0xfedcba98
    => fuse prog -y 65 2 0x76543210
    => fuse prog -y 65 3 0xfedcba98
    => fuse prog -y 65 4 0x76543210
    => fuse prog -y 65 5 0xfedcba98
    => fuse prog -y 65 6 0x76543210
    => fuse prog -y 65 7 0xfedcba98
    => fuse prog -y 65 8 0x1

Signed-off-by: Pali Rohár <pali@kernel.org>
arch/arm/mach-mvebu/efuse.c
arch/arm/mach-mvebu/include/mach/efuse.h