Home
last modified time | relevance | path

Searched full:otp (Results 1 – 25 of 212) sorted by relevance

123456789

/Linux-v6.1/drivers/nvmem/
Drockchip-otp.c3 * Rockchip OTP Driver
22 /* OTP Register Offsets */
35 /* OTP Register bits and masks */
67 "otp", "apb_pclk", "phy",
74 static int rockchip_otp_reset(struct rockchip_otp *otp) in rockchip_otp_reset() argument
78 ret = reset_control_assert(otp->rst); in rockchip_otp_reset()
80 dev_err(otp->dev, "failed to assert otp phy %d\n", ret); in rockchip_otp_reset()
86 ret = reset_control_deassert(otp->rst); in rockchip_otp_reset()
88 dev_err(otp->dev, "failed to deassert otp phy %d\n", ret); in rockchip_otp_reset()
95 static int rockchip_otp_wait_status(struct rockchip_otp *otp, u32 flag) in rockchip_otp_wait_status() argument
[all …]
Dlan9662-otpc.c47 static int lan9662_otp_power(struct lan9662_otp *otp, bool up) in lan9662_otp_power() argument
49 void __iomem *pwrdn = OTP_OTP_PWR_DN(otp->base); in lan9662_otp_power()
53 if (lan9662_otp_wait_flag_clear(OTP_OTP_STATUS(otp->base), in lan9662_otp_power()
63 static int lan9662_otp_execute(struct lan9662_otp *otp) in lan9662_otp_execute() argument
65 if (lan9662_otp_wait_flag_clear(OTP_OTP_CMD_GO(otp->base), in lan9662_otp_execute()
69 if (lan9662_otp_wait_flag_clear(OTP_OTP_STATUS(otp->base), in lan9662_otp_execute()
76 static void lan9662_otp_set_address(struct lan9662_otp *otp, u32 offset) in lan9662_otp_set_address() argument
78 writel(0xff & (offset >> 8), OTP_OTP_ADDR_HI(otp->base)); in lan9662_otp_set_address()
79 writel(0xff & offset, OTP_OTP_ADDR_LO(otp->base)); in lan9662_otp_set_address()
82 static int lan9662_otp_read_byte(struct lan9662_otp *otp, u32 offset, u8 *dst) in lan9662_otp_read_byte() argument
[all …]
Dsunplus-ocotp.c21 * OTP memory
78 static int sp_otp_read_real(struct sp_ocotp_priv *otp, int addr, char *value) in sp_otp_read_real() argument
94 writel(readl(otp->base[OTPRX] + OTP_STATUS) & OTP_READ_DONE_MASK & in sp_otp_read_real()
95 OTP_LOAD_SECURE_DONE_MASK, otp->base[OTPRX] + OTP_STATUS); in sp_otp_read_real()
96 writel(addr, otp->base[OTPRX] + OTP_READ_ADDRESS); in sp_otp_read_real()
97 writel(readl(otp->base[OTPRX] + OTP_CONTROL_2) | OTP_READ, in sp_otp_read_real()
98 otp->base[OTPRX] + OTP_CONTROL_2); in sp_otp_read_real()
99 writel(readl(otp->base[OTPRX] + OTP_CONTROL_2) & SEL_BAK_KEY2_MASK & SW_TRIM_EN_MASK in sp_otp_read_real()
101 otp->base[OTPRX] + OTP_CONTROL_2); in sp_otp_read_real()
102 writel((readl(otp->base[OTPRX] + OTP_CONTROL_2) & OTP_RD_PERIOD_MASK) | CPU_CLOCK, in sp_otp_read_real()
[all …]
Dmxs-ocotp.c3 * Freescale MXS On-Chip OTP driver
36 static int mxs_ocotp_wait(struct mxs_ocotp *otp) in mxs_ocotp_wait() argument
42 status = readl(otp->base); in mxs_ocotp_wait()
61 struct mxs_ocotp *otp = context; in mxs_ocotp_read() local
65 ret = clk_enable(otp->clk); in mxs_ocotp_read()
69 writel(BM_OCOTP_CTRL_ERROR, otp->base + STMP_OFFSET_REG_CLR); in mxs_ocotp_read()
71 ret = mxs_ocotp_wait(otp); in mxs_ocotp_read()
76 writel(BM_OCOTP_CTRL_RD_BANK_OPEN, otp->base + STMP_OFFSET_REG_SET); in mxs_ocotp_read()
81 ret = mxs_ocotp_wait(otp); in mxs_ocotp_read()
90 *buf++ = readl(otp->base + offset); in mxs_ocotp_read()
[all …]
Dlpc18xx_otp.c3 * NXP LPC18xx/43xx OTP memory NVMEM driver
10 * TODO: add support for writing OTP register via API in boot ROM.
22 * LPC18xx OTP memory contains 4 banks with 4 32-bit words. Bank 0 starts
44 struct lpc18xx_otp *otp = context; in lpc18xx_otp_read() local
54 *buf++ = readl(otp->base + i * LPC18XX_OTP_WORD_SIZE); in lpc18xx_otp_read()
60 .name = "lpc18xx-otp",
70 struct lpc18xx_otp *otp; in lpc18xx_otp_probe() local
73 otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL); in lpc18xx_otp_probe()
74 if (!otp) in lpc18xx_otp_probe()
78 otp->base = devm_ioremap_resource(&pdev->dev, res); in lpc18xx_otp_probe()
[all …]
DKconfig39 tristate "Broadcom On-Chip OTP Controller support"
44 Say y here to enable read/write access to the Broadcom OTP
70 tristate "i.MX 6/7/8 On-Chip OTP Controller support"
74 This is a driver for the On-Chip OTP Controller (OCOTP) available on
82 tristate "i.MX8 SCU On-Chip OTP Controller support"
86 This is a driver for the SCU On-Chip OTP Controller (OCOTP)
102 tristate "Microchip LAN9662 OTP controller support"
106 This driver enables the OTP controller available on Microchip LAN9662
107 SoCs. It controls the access to the OTP memory connected to it.
133 tristate "NXP LPC18XX OTP Memory Support"
[all …]
Dnintendo-otp.c3 * Nintendo Wii and Wii U OTP driver
5 * This is a driver exposing the OTP of a Nintendo Wii or Wii U console.
10 * Based on reversed documentation from https://wiiubrew.org/wiki/Hardware/OTP
39 .name = "wii-otp",
44 .name = "wiiu-otp",
68 { .compatible = "nintendo,hollywood-otp", .data = &hollywood_otp_data },
69 { .compatible = "nintendo,latte-otp", .data = &latte_otp_data },
117 .name = "nintendo-otp",
123 MODULE_DESCRIPTION("Nintendo Wii and Wii U OTP driver");
Dimx-ocotp.c29 * OTP Bank0 Word0
32 * of two consecutive OTP words.
253 * ipg_clk. OTP writes will work at maximum bus frequencies as long in imx_ocotp_set_imx6_timing()
256 * Note: there are minimum timings required to ensure an OTP fuse burns in imx_ocotp_set_imx6_timing()
265 * - Minimum STROBE_READ i.e. the time to wait post OTP fuse burn before in imx_ocotp_set_imx6_timing()
275 * value will mess up a re-load of the shadow registers post OTP in imx_ocotp_set_imx6_timing()
328 /* allow only writing one complete OTP word at a time */ in imx_ocotp_write()
366 * In banked/i.MX7 mode the OTP register bank goes into waddr in imx_ocotp_write()
376 * OTP write/read address specifies one of 128 word address in imx_ocotp_write()
392 * protect programming same OTP bit twice, before program OCOTP will in imx_ocotp_write()
[all …]
DMakefile42 obj-$(CONFIG_NVMEM_NINTENDO_OTP) += nvmem-nintendo-otp.o
43 nvmem-nintendo-otp-y := nintendo-otp.o
52 obj-$(CONFIG_NVMEM_ROCKCHIP_OTP) += nvmem-rockchip-otp.o
53 nvmem-rockchip-otp-y := rockchip-otp.o
Dstm32-romem.c50 static int stm32_bsec_smc(u8 op, u32 otp, u32 data, u32 *result) in stm32_bsec_smc() argument
55 arm_smccc_smc(STM32_SMC_BSEC, op, otp, data, 0, 0, 0, 0, &res); in stm32_bsec_smc()
86 u32 otp = i >> 2; in stm32_bsec_read() local
88 if (otp < STM32MP15_BSEC_NUM_LOWER) { in stm32_bsec_read()
93 ret = stm32_bsec_smc(STM32_SMC_READ_SHADOW, otp, 0, in stm32_bsec_read()
96 dev_err(dev, "Can't read data%d (%d)\n", otp, in stm32_bsec_read()
182 { .compatible = "st,stm32f4-otp", }, {
/Linux-v6.1/drivers/net/wireless/intel/iwlwifi/
Diwl-eeprom-read.c85 IWL_ERR(trans, "OTP with bad signature: 0x%08x\n", gp); in iwl_eeprom_verify_signature()
92 "bad EEPROM/OTP signature, type=%s, EEPROM_GP=0x%08x\n", in iwl_eeprom_verify_signature()
93 nvm_is_otp ? "OTP" : "EEPROM", gp); in iwl_eeprom_verify_signature()
100 * OTP related functions
116 /* OTP only valid for CP/PP and after */ in iwl_nvm_is_otp()
150 * this is only applicable for HW with OTP shadow RAM in iwl_init_otp_access()
173 IWL_ERR(trans, "Time out reading OTP[%d]\n", addr); in iwl_read_otp_word()
181 /* set the uncorrectable OTP ECC bit for acknowledgment */ in iwl_read_otp_word()
184 IWL_ERR(trans, "Uncorrectable OTP ECC error, abort OTP read\n"); in iwl_read_otp_word()
189 /* set the correctable OTP ECC bit for acknowledgment */ in iwl_read_otp_word()
[all …]
Diwl-agn-hw.h51 #define OTP_MAX_LL_ITEMS_1000 (3) /* OTP blocks for 1000 */
52 #define OTP_MAX_LL_ITEMS_6x00 (4) /* OTP blocks for 6x00 */
53 #define OTP_MAX_LL_ITEMS_6x50 (7) /* OTP blocks for 6x50 */
54 #define OTP_MAX_LL_ITEMS_2x00 (4) /* OTP blocks for 2x00 */
/Linux-v6.1/drivers/mtd/spi-nor/
Dotp.c3 * OTP support for SPI NOR flashes
14 #define spi_nor_otp_region_len(nor) ((nor)->params->otp.org->len)
15 #define spi_nor_otp_n_regions(nor) ((nor)->params->otp.org->n_regions)
28 * 256). Thus one "security register" maps to one OTP region.
166 * spi_nor_otp_lock_sr2() - lock the OTP region
168 * @region: OTP region
170 * Lock the OTP region by writing the status register-2. This method is used on
198 * spi_nor_otp_is_locked_sr2() - get the OTP region lock status
200 * @region: OTP region
202 * Retrieve the OTP region lock bit by reading the status register-2. This
[all …]
Dcore.h292 * struct spi_nor_otp_organization - Structure to describe the SPI NOR OTP regions
293 * @len: size of one OTP region in bytes.
294 * @base: start address of the OTP area.
295 * @offset: offset between consecutive OTP regions if there are more
297 * @n_regions: number of individual OTP regions.
307 * struct spi_nor_otp_ops - SPI NOR OTP methods
308 * @read: read from the SPI NOR OTP area.
309 * @write: write to the SPI NOR OTP area.
310 * @lock: lock an OTP region.
311 * @erase: erase an OTP region.
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/nvmem/
Dnintendo-otp.yaml4 $id: http://devicetree.org/schemas/nvmem/nintendo-otp.yaml#
7 title: Nintendo Wii and Wii U OTP
10 This binding represents the OTP memory as found on a Nintendo Wii or Wii U,
14 See https://wiiubrew.org/wiki/Hardware/OTP
25 - nintendo,hollywood-otp
26 - nintendo,latte-otp
39 otp@d8001ec {
40 compatible = "nintendo,latte-otp";
Drockchip-otp.txt1 Rockchip internal OTP (One Time Programmable) memory device tree bindings
5 - "rockchip,px30-otp" - for PX30 SoCs.
6 - "rockchip,rk3308-otp" - for RK3308 SoCs.
9 - clock-names: Should be "otp", "apb_pclk" and "phy".
17 otp: otp@ff290000 {
18 compatible = "rockchip,px30-otp";
24 clock-names = "otp", "apb_pclk", "phy";
Dlpc1850-otp.txt1 * NXP LPC18xx OTP memory
3 Internal OTP (One Time Programmable) memory for NXP LPC18xx/43xx devices.
6 - compatible: Should be "nxp,lpc1850-otp"
15 otp: otp@40045000 {
16 compatible = "nxp,lpc1850-otp";
Dst,stm32-romem.yaml11 flash, OTP, read-only HW regs... This contains various information such as:
24 - st,stm32f4-otp
35 st,non-secure-otp:
53 compatible = "st,stm32f4-otp";
64 st,non-secure-otp;
Dbrcm,ocotp.txt1 Broadcom OTP memory controller
8 - reg: Base address of the OTP controller.
13 otp: otp@301c800 {
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7615/
Deeprom.c54 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7615_efuse_init()
55 dev->mt76.otp.size = len; in mt7615_efuse_init()
56 if (!dev->mt76.otp.data) in mt7615_efuse_init()
59 buf = dev->mt76.otp.data; in mt7615_efuse_init()
273 u8 *otp = dev->mt76.otp.data; in mt7615_apply_cal_free_data() local
276 if (!otp) in mt7615_apply_cal_free_data()
280 if (!otp[ical[i]]) in mt7615_apply_cal_free_data()
284 eeprom[ical[i]] = otp[ical[i]]; in mt7615_apply_cal_free_data()
287 eeprom[ical_nocheck[i]] = otp[ical_nocheck[i]]; in mt7615_apply_cal_free_data()
296 u8 *otp = dev->mt76.otp.data; in mt7622_apply_cal_free_data() local
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/mtd/
Dmtd.yaml25 "^otp(-[0-9]+)?$":
30 An OTP memory region. Some flashes provide a one-time-programmable
37 - user-otp
38 - factory-otp
67 otp-1 {
68 compatible = "factory-otp";
77 otp-2 {
78 compatible = "user-otp";
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7603/
Deeprom.c51 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7603_efuse_init()
52 dev->mt76.otp.size = len; in mt7603_efuse_init()
53 if (!dev->mt76.otp.data) in mt7603_efuse_init()
56 buf = dev->mt76.otp.data; in mt7603_efuse_init()
109 if (!np || !of_property_read_bool(np, "mediatek,eeprom-merge-otp")) in mt7603_apply_cal_free_data()
165 if (dev->mt76.otp.data) { in mt7603_eeprom_init()
167 mt7603_apply_cal_free_data(dev, dev->mt76.otp.data); in mt7603_eeprom_init()
169 memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data, in mt7603_eeprom_init()
/Linux-v6.1/include/linux/mfd/wm831x/
Dotp.h3 * include/linux/mfd/wm831x/otp.h -- OTP interface for WM831x
73 * R30728 (0x7808) - Factory OTP ID
84 * R30729 (0x7809) - Factory OTP 1
97 * R30730 (0x780A) - Factory OTP 2
104 * R30731 (0x780B) - Factory OTP 3
117 * R30732 (0x780C) - Factory OTP 4
128 * R30733 (0x780D) - Factory OTP 5
135 * R30736 (0x7810) - Customer OTP ID
/Linux-v6.1/drivers/mtd/nand/onenand/
DKconfig45 bool "OneNAND OTP Support"
49 Also, 1st Block of NAND Flash Array can be used as OTP.
51 The OTP block can be read, programmed and locked using the same
53 OTP block cannot be erased.
55 OTP block is fully-guaranteed to be a valid block.
/Linux-v6.1/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dpcie.c342 struct brcmf_otp_params otp; member
1875 brcmf_dbg(PCIE, "OTP: chip_params='%s' board_params='%s'\n", in brcmf_pcie_parse_otp_sys_vendor()
1898 strscpy(devinfo->otp.module, p, len + 1); in brcmf_pcie_parse_otp_sys_vendor()
1901 strscpy(devinfo->otp.vendor, p, len + 1); in brcmf_pcie_parse_otp_sys_vendor()
1904 strscpy(devinfo->otp.version, p, len + 1); in brcmf_pcie_parse_otp_sys_vendor()
1912 brcmf_dbg(PCIE, "OTP: module=%s vendor=%s version=%s\n", in brcmf_pcie_parse_otp_sys_vendor()
1913 devinfo->otp.module, devinfo->otp.vendor, in brcmf_pcie_parse_otp_sys_vendor()
1914 devinfo->otp.version); in brcmf_pcie_parse_otp_sys_vendor()
1916 if (!devinfo->otp.module[0] || in brcmf_pcie_parse_otp_sys_vendor()
1917 !devinfo->otp.vendor[0] || in brcmf_pcie_parse_otp_sys_vendor()
[all …]

123456789