Pali Rohár | deb1e92 | 2022-02-23 14:15:47 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
Marek Behún | d63726e | 2022-06-01 17:17:06 +0200 | [diff] [blame] | 3 | * Copyright (C) 2018 Marek Behún <kabel@kernel.org> |
Pali Rohár | 0e6dce7 | 2022-02-23 14:15:48 +0100 | [diff] [blame] | 4 | * Copyright (C) 2021 Pali Rohár <pali@kernel.org> |
Pali Rohár | deb1e92 | 2022-02-23 14:15:47 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _MVEBU_MBOX_H |
| 8 | #define _MVEBU_MBOX_H |
| 9 | |
| 10 | enum mbox_cmd { |
| 11 | MBOX_CMD_GET_RANDOM = 1, |
| 12 | MBOX_CMD_BOARD_INFO, |
| 13 | MBOX_CMD_ECDSA_PUB_KEY, |
| 14 | MBOX_CMD_HASH, |
| 15 | MBOX_CMD_SIGN, |
| 16 | MBOX_CMD_VERIFY, |
| 17 | |
| 18 | MBOX_CMD_OTP_READ, |
| 19 | MBOX_CMD_OTP_WRITE, |
Pali Rohár | 0e6dce7 | 2022-02-23 14:15:48 +0100 | [diff] [blame] | 20 | |
| 21 | MBOX_CMD_REBOOT, |
| 22 | |
| 23 | /* OTP read commands supported by Marvell fuse.bin firmware */ |
| 24 | MBOX_CMD_OTP_READ_1B = 257, |
| 25 | MBOX_CMD_OTP_READ_8B, |
| 26 | MBOX_CMD_OTP_READ_32B, |
| 27 | MBOX_CMD_OTP_READ_64B, |
| 28 | MBOX_CMD_OTP_READ_256B, |
| 29 | |
| 30 | /* OTP write commands supported by Marvell fuse.bin firmware */ |
| 31 | MBOX_CMD_OTP_WRITE_1B = 513, |
| 32 | MBOX_CMD_OTP_WRITE_8B, |
| 33 | MBOX_CMD_OTP_WRITE_32B, |
| 34 | MBOX_CMD_OTP_WRITE_64B, |
| 35 | MBOX_CMD_OTP_WRITE_256B, |
Pali Rohár | deb1e92 | 2022-02-23 14:15:47 +0100 | [diff] [blame] | 36 | }; |
| 37 | |
Pali Rohár | 0e6dce7 | 2022-02-23 14:15:48 +0100 | [diff] [blame] | 38 | int mbox_do_cmd(enum mbox_cmd cmd, u32 *in, int nin, u32 *out, int nout); |
Pali Rohár | deb1e92 | 2022-02-23 14:15:47 +0100 | [diff] [blame] | 39 | |
| 40 | #endif |