/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (C) 2021 Foundries.io Ltd
 */

#ifndef __DRIVERS_ZYNQMP_EFUSE_H__
#define __DRIVERS_ZYNQMP_EFUSE_H__

#include <util.h>

#define ZYNQMP_EFUSE_DNA_OFFSET 0xc
#define ZYNQMP_EFUSE_DNA_LENGTH 12

#define ZYNQMP_EFUSE_IP_DISABLE_OFFSET 0x18
#define ZYNQMP_EFUSE_IP_DISABLE_LENGTH 4

#define ZYNQMP_EFUSE_USER0_OFFSET 0x20
#define ZYNQMP_EFUSE_USER0_LENGTH 4

#define ZYNQMP_EFUSE_USER1_OFFSET 0x24
#define ZYNQMP_EFUSE_USER1_LENGTH 4

#define ZYNQMP_EFUSE_USER2_OFFSET 0x28
#define ZYNQMP_EFUSE_USER2_LENGTH 4

#define ZYNQMP_EFUSE_USER3_OFFSET 0x2c
#define ZYNQMP_EFUSE_USER3_LENGTH 4

#define ZYNQMP_EFUSE_USER4_OFFSET 0x30
#define ZYNQMP_EFUSE_USER4_LENGTH 4

#define ZYNQMP_EFUSE_USER5_OFFSET 0x34
#define ZYNQMP_EFUSE_USER5_LENGTH 4

#define ZYNQMP_EFUSE_USER6_OFFSET 0x38
#define ZYNQMP_EFUSE_USER6_LENGTH 4

#define ZYNQMP_EFUSE_USER7_OFFSET 0x3c
#define ZYNQMP_EFUSE_USER7_LENGTH 4

#define ZYNQMP_EFUSE_MISC_USER_CTRL_OFFSET 0x40
#define ZYNQMP_EFUSE_MISC_USER_CTRL_LENGTH 4

#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_0	BIT(0)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_1	BIT(1)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_2	BIT(2)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_3	BIT(3)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_4	BIT(4)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_5	BIT(5)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_6	BIT(6)
#define ZYNQMP_EFUSE_MISC_USER_CTRL_USR_WRLK_7	BIT(7)

#define ZYNQMP_EFUSE_SEC_CTRL_OFFSET 0x58
#define ZYNQMP_EFUSE_SEC_CTRL_LENGTH 4

#endif /*__DRIVERS_ZYNQMP_EFUSE_H__*/
