arm: mvebu: a37xx: Add support for reading Security OTP values
authorPali Rohár <pali@kernel.org>
Wed, 23 Feb 2022 13:15:49 +0000 (14:15 +0100)
committerStefan Roese <sr@denx.de>
Thu, 21 Apr 2022 10:31:36 +0000 (12:31 +0200)
commitc8b00da69504dae6b768c1fd46fbe63641f99dd1
treed9369793e9742afba18bd347b61376c1dd323efe
parent85df8f9a211610d4406e644061220b5e2fd221c7
arm: mvebu: a37xx: Add support for reading Security OTP values

It is not possible for the A53 core (on which U-Boot is running) to read it
directly. For this purpose Marvell defined mbox API for sending OTP
commands between CM3 and A53 cores.

Implement these Marvell fuse reading mbox commands via U-Boot fuse API.

Banks 0-43 are used for accessing Security OTP (44 rows with 67 bits via 44
banks and words 0-2).

Note that of the 67 bits, the 3 upper bits are: 1 lock bit and 2
auxiliary bits (meant for testing during the manufacture of the SOC, as
I understand it).

Also note that the lock bit and the auxiliary bits are not readable
via Marvell commands.

With CZ.NIC's commands the lock bit is readable.

Write support is not implemented yet.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/armada3700/efuse.c