5 #ifndef OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_DRIVERS_OTP_H_
6 #define OPENTITAN_SW_DEVICE_SILICON_CREATOR_LIB_DRIVERS_OTP_H_
12 #include "sw/device/silicon_creator/lib/error.h"
14 #include "otp_ctrl_regs.h"
35 kOtpSecMmioCreatorSwCfgLockDown = 1,
66 typedef enum otp_partition {
67 kOtpPartitionCreatorSwCfg = 0,
68 kOtpPartitionOwnerSwCfg = 1,
69 kOtpPartitionRotCreatorAuthCodesign = 2,
70 kOtpPartitionRotCreatorAuthState = 3,
71 kOtpPartitionHwCfg0 = 4,
72 kOtpPartitionHwCfg1 = 5,
73 kOtpPartitionNumPartitions = 6,
89 uint32_t otp_read32(uint32_t address);
99 uint64_t otp_read64(uint32_t address);
109 void otp_read(uint32_t address, uint32_t *data,
size_t num_words);
117 uint64_t otp_partition_digest_read(otp_partition_t partition);
131 uint32_t otp_dai_read32(otp_partition_t partition, uint32_t address);
145 uint64_t otp_dai_read64(otp_partition_t partition, uint32_t address);
159 rom_error_t otp_dai_read(otp_partition_t partition, uint32_t address,
160 uint32_t *data,
size_t num_words);
168 void otp_creator_sw_cfg_lockdown(
void);