diff options
| author | Yuval Adam <_@yuv.al> | 2017-08-30 08:25:59 +0000 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2017-08-30 08:25:59 +0000 |
| commit | 8e4bff4cab0ddac6060645b0715210484d02ff40 (patch) | |
| tree | 3a5c3024371a04692a3a6d9974d001cdff8ebf84 /drivers/misc/sprd_otp/__regs_ana_efuse.h | |
Diffstat (limited to 'drivers/misc/sprd_otp/__regs_ana_efuse.h')
| -rw-r--r-- | drivers/misc/sprd_otp/__regs_ana_efuse.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/drivers/misc/sprd_otp/__regs_ana_efuse.h b/drivers/misc/sprd_otp/__regs_ana_efuse.h new file mode 100644 index 00000000..5a4d6cd0 --- /dev/null +++ b/drivers/misc/sprd_otp/__regs_ana_efuse.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013 Spreadtrum Communications Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + ************************************************* + * Automatically generated C header: do not edit * + ************************************************* + */ + +#ifndef __ANA_REGS_EFUSE_H__ +#define __ANA_REGS_EFUSE_H__ + +#define ANA_REGS_EFUSE + +/* registers definitions for controller ANA_REGS_EFUSE */ +#define ANA_REG_EFUSE_GLB_CTRL SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0000) +#define ANA_REG_EFUSE_DATA_RD SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0004) +#define ANA_REG_EFUSE_DATA_WR SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0008) +#define ANA_REG_EFUSE_BLOCK_INDEX SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x000c) +#define ANA_REG_EFUSE_MODE_CTRL SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0010) +#define ANA_REG_EFUSE_STATUS SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0014) +#define ANA_REG_EFUSE_WR_TIMING_CTRL SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0028) +#define ANA_REG_EFUSE_RD_TIMING_CTRL SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x002c) +#define ANA_REG_EFUSE_EFUSE_DEB_CTRL SCI_ADDR(ANA_REGS_EFUSE_BASE, 0x0030) + +/* bits definitions for register ANA_REG_EFUSE_GLB_CTRL */ +/* Efuse SW programme enable. + */ +#define BIT_EFUSE_PGM_EN ( BIT(0) ) +/* Efuse type select, 00:TSMC, 01, 1x reserved. + */ +#define BITS_EFUSE_TYPE(_x_) ( (_x_) << 1 & (BIT(1)|BIT(2)) ) + +/* bits definitions for register ANA_REG_EFUSE_DATA_RD */ +#define BITS_EFUSE_DATA_RD(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) ) + +/* bits definitions for register ANA_REG_EFUSE_DATA_WR */ +#define BITS_EFUSE_DATA_WR(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) ) + +/* bits definitions for register ANA_REG_EFUSE_BLOCK_INDEX */ +#define BITS_READ_WRITE_INDEX(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)) ) + +#define SHFT_READ_WRITE_INDEX ( 0 ) +#define MASK_READ_WRITE_INDEX ( BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4) ) + +/* bits definitions for register ANA_REG_EFUSE_MODE_CTRL */ +/* Write 1 to this bit start A_PGM mode(array PGM mode). + * This bit is self-clear, read this bit will always get 0. + */ +#define BIT_PG_START ( BIT(0) ) +#define BIT_RD_START ( BIT(1) ) +#define BIT_STANDBY_START ( BIT(2) ) + +/* bits definitions for register ANA_REG_EFUSE_STATUS */ +#define BIT_PGM_BUSY ( BIT(0) ) +#define BIT_READ_BUSY ( BIT(1) ) +#define BIT_STANDBY_BUSY ( BIT(2) ) + +/* bits definitions for register ANA_REG_EFUSE_WR_TIMING_CTRL */ +#define BITS_EFUSE_WR_TIMING(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)) ) + +/* bits definitions for register ANA_REG_EFUSE_RD_TIMING_CTRL */ +#define BITS_EFUSE_RD_TIMING(_x_) ( (_x_) << 0 & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)) ) + +/* bits definitions for register ANA_REG_EFUSE_EFUSE_DEB_CTRL */ +#define BIT_MARGIN_MODE_EN ( BIT(1) ) +#define BIT_DOUBLE_BIT_DISABLE ( BIT(0) ) + +/* vars definitions for controller ANA_REGS_EFUSE */ +#define EFUSE_MAGIC_NUMBER ( 0x2723 ) + +#endif /* __ANA_REGS_EFUSE_H__ */ |
