Home
last modified time | relevance | path

Searched +full:otp +full:- +full:2 (Results 1 – 25 of 183) sorted by relevance

12345678

/Linux-v6.1/drivers/nvmem/
Drockchip-otp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Rockchip OTP Driver
6 * Author: Finley Xiao <finley.xiao@rock-chips.com>
15 #include <linux/nvmem-provider.h>
22 /* OTP Register Offsets */
35 /* OTP Register bits and masks */
42 #define OTPC_USER_DONE BIT(2)
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()
[all …]
Dlpc18xx_otp.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * NXP LPC18xx/43xx OTP memory NVMEM driver
10 * TODO: add support for writing OTP register via API in boot ROM.
15 #include <linux/nvmem-provider.h>
22 * LPC18xx OTP memory contains 4 banks with 4 32-bit words. Bank 0 starts
27 * Bank 1/2 is generale purpose or AES key storage for secure devices.
44 struct lpc18xx_otp *otp = context; in lpc18xx_otp_read() local
45 unsigned int count = bytes >> 2; in lpc18xx_otp_read()
46 u32 index = offset >> 2; in lpc18xx_otp_read()
50 if (count > (LPC18XX_OTP_SIZE - index)) in lpc18xx_otp_read()
[all …]
Dsunplus-ocotp.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <linux/nvmem-provider.h>
21 * OTP memory
47 #define OTP_READ BIT(2)
55 #define OTP_LOAD_SECURE_DONE_MASK ~BIT(2)
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()
[all …]
Dlan9662-otpc.c1 // SPDX-License-Identifier: GPL-2.0
5 #include <linux/nvmem-provider.h>
24 #define OTP_OTP_PASS_FAIL_OTP_WRITE_PROHIBITED BIT(2)
47 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()
55 return -ETIMEDOUT; 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()
67 return -ETIMEDOUT; in lan9662_otp_execute()
[all …]
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
33 calibration data required for the PCIe or the USB-C PHY.
36 be called nvmem-apple-efuses.
39 tristate "Broadcom On-Chip OTP Controller support"
44 Say y here to enable read/write access to the Broadcom OTP
48 will be called nvmem-bcm-ocotp.
67 will be called nvmem-imx-iim.
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
75 i.MX6 SoCs, providing access to 4 Kbits of one-time programmable
[all …]
Dimx-ocotp.c1 // SPDX-License-Identifier: GPL-2.0-only
14 * Copyright (C) 2010-2013 Freescale Semiconductor, Inc
21 #include <linux/nvmem-provider.h>
29 * OTP Bank0 Word0
32 * of two consecutive OTP words.
108 void __iomem *base = priv->base; in imx_ocotp_wait_for_busy()
110 bm_ctrl_busy = priv->params->ctrl.bm_busy; in imx_ocotp_wait_for_busy()
111 bm_ctrl_error = priv->params->ctrl.bm_error; in imx_ocotp_wait_for_busy()
115 for (count = 10000; count >= 0; count--) { in imx_ocotp_wait_for_busy()
125 * - A write is performed to a shadow register during a shadow in imx_ocotp_wait_for_busy()
[all …]
Dstm32-romem.c1 // SPDX-License-Identifier: GPL-2.0
3 * STM32 Factory-programmed memory read access driver
5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
9 #include <linux/arm-smccc.h>
12 #include <linux/nvmem-provider.h>
15 /* BSEC secure service access from non-secure */
25 /* 32 (x 32-bits) lower shadow registers */
45 *buf8++ = readb_relaxed(priv->base + i); in stm32_romem_read()
50 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()
[all …]
/Linux-v6.1/drivers/net/wireless/intel/iwlwifi/
Diwl-eeprom-read.c1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2005-2014, 2018-2019, 2021 Intel Corporation
9 #include "iwl-drv.h"
10 #include "iwl-debug.h"
11 #include "iwl-eeprom-read.h"
12 #include "iwl-io.h"
13 #include "iwl-prph.h"
14 #include "iwl-csr.h"
22 * Driver reads 16-bit value from bits 31-16 of CSR_EEPROM_REG.
52 IWL_DEBUG_EEPROM(trans->dev, in iwl_eeprom_acquire_semaphore()
[all …]
Diwl-agn-hw.h1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2005-2014 Intel Corporation
6 * Please use this file (iwl-agn-hw.h) only for hardware-related definitions.
18 #define IWLAGN_RTC_INST_SIZE (IWLAGN_RTC_INST_UPPER_BOUND - \
20 #define IWLAGN_RTC_DATA_SIZE (IWLAGN_RTC_DATA_UPPER_BOUND - \
28 (IWL60_RTC_INST_UPPER_BOUND - IWL60_RTC_INST_LOWER_BOUND)
30 (IWL60_RTC_DATA_UPPER_BOUND - IWL60_RTC_DATA_LOWER_BOUND)
51 #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 */
[all …]
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7615/
Deeprom.c1 // SPDX-License-Identifier: ISC
25 return -ETIMEDOUT; in mt7615_efuse_read()
27 udelay(2); in mt7615_efuse_read()
54 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()
57 return -ENOMEM; in mt7615_efuse_init()
59 buf = dev->mt76.otp.data; in mt7615_efuse_init()
75 ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_FULL_SIZE); in mt7615_eeprom_load()
84 u16 val = get_unaligned_le16(dev->eeprom.data); in mt7615_check_eeprom()
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/mtd/
Dmtd.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Miquel Raynal <miquel.raynal@bootlin.com>
11 - Richard Weinberger <richard@nod.at>
19 User-defined MTD device name. Can be used to assign user friendly
25 "^otp(-[0-9]+)?$":
30 An OTP memory region. Some flashes provide a one-time-programmable
32 pre-programmed by the factory. Some flashes might provide both.
37 - user-otp
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/nvmem/
Dnintendo-otp.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/nvmem/nintendo-otp.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.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,
11 which contains common and per-console keys, signatures and related data
14 See https://wiiubrew.org/wiki/Hardware/OTP
17 - Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
20 - $ref: "nvmem.yaml#"
[all …]
Dst,stm32-romem.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/nvmem/st,stm32-romem.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectronics STM32 Factory-programmed data bindings
10 This represents STM32 Factory-programmed read only non-volatile area: locked
11 flash, OTP, read-only HW regs... This contains various information such as:
16 - Fabrice Gasnier <fabrice.gasnier@foss.st.com>
19 - $ref: "nvmem.yaml#"
24 - st,stm32f4-otp
[all …]
Dmicrochip,lan9662-otpc.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/nvmem/microchip,lan9662-otpc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microchip LAN9662 OTP Controller (OTPC)
10 - Horatiu Vultur <horatiu.vultur@microchip.com>
13 OTP controller drives a NVMEM memory where system specific data
18 - $ref: nvmem.yaml#
23 - items:
24 - const: microchip,lan9668-otpc
[all …]
Dsunplus,sp7021-ocotp.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 ---
5 $id: http://devicetree.org/schemas/nvmem/sunplus,sp7021-ocotp.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: On-Chip OTP Memory for Sunplus SP7021
11 - Vincent Shih <vincent.sunplus@gmail.com>
14 - $ref: "nvmem.yaml#"
18 const: sunplus,sp7021-ocotp
21 maxItems: 2
23 reg-names:
[all …]
/Linux-v6.1/drivers/mtd/spi-nor/
Dotp.c1 // SPDX-License-Identifier: GPL-2.0
3 * OTP support for SPI NOR flashes
10 #include <linux/mtd/spi-nor.h>
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)
18 * spi_nor_otp_read_secr() - read security register
27 * an one-time-programmable memory area, consisting of multiple bytes (usually
28 * 256). Thus one "security register" maps to one OTP region.
34 * Return: number of bytes read successfully, -errno otherwise
43 read_opcode = nor->read_opcode; in spi_nor_otp_read_secr()
[all …]
Dcore.h1 /* SPDX-License-Identifier: GPL-2.0 */
97 SPI_MEM_OP_DATA_IN(2, NULL, 0))
103 SPI_MEM_OP_DATA_OUT(2, NULL, 0))
121 SNOR_F_BROKEN_RESET = BIT(2),
192 * struct spi_nor_erase_type - Structure to describe a SPI NOR erase type
194 * JEDEC JESD216B imposes erase sizes to be a power of 2.
195 * @size_shift: @size is a power of 2, the shift is stored in
213 * struct spi_nor_erase_command - Used for non-uniform erases
216 * are run-length encoded.
231 * struct spi_nor_erase_region - Structure to describe a SPI NOR erase region
[all …]
/Linux-v6.1/include/linux/mfd/wm831x/
Dotp.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * include/linux/mfd/wm831x/otp.h -- OTP interface for WM831x
17 * R30720 (0x7800) - Unique ID 1
19 #define WM831X_UNIQUE_ID_MASK 0xFFFF /* UNIQUE_ID - [15:0] */
20 #define WM831X_UNIQUE_ID_SHIFT 0 /* UNIQUE_ID - [15:0] */
21 #define WM831X_UNIQUE_ID_WIDTH 16 /* UNIQUE_ID - [15:0] */
24 * R30721 (0x7801) - Unique ID 2
26 #define WM831X_UNIQUE_ID_MASK 0xFFFF /* UNIQUE_ID - [15:0] */
27 #define WM831X_UNIQUE_ID_SHIFT 0 /* UNIQUE_ID - [15:0] */
28 #define WM831X_UNIQUE_ID_WIDTH 16 /* UNIQUE_ID - [15:0] */
[all …]
/Linux-v6.1/drivers/mtd/nand/onenand/
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
45 bool "OneNAND OTP Support"
48 a One-Time Programmable Block memory area.
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.
58 bool "OneNAND 2X program support"
60 The 2X Program is an extension of Program Operation.
61 Since the device is equipped with two DataRAMs, and two-plane NAND
/Linux-v6.1/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dpcie.c1 // SPDX-License-Identifier: ISC
49 BRCMF_FW_DEF(43602, "brcmfmac43602-pcie");
50 BRCMF_FW_DEF(4350, "brcmfmac4350-pcie");
51 BRCMF_FW_DEF(4350C, "brcmfmac4350c2-pcie");
52 BRCMF_FW_CLM_DEF(4356, "brcmfmac4356-pcie");
53 BRCMF_FW_CLM_DEF(43570, "brcmfmac43570-pcie");
54 BRCMF_FW_DEF(4358, "brcmfmac4358-pcie");
55 BRCMF_FW_DEF(4359, "brcmfmac4359-pcie");
56 BRCMF_FW_DEF(4364, "brcmfmac4364-pcie");
57 BRCMF_FW_DEF(4365B, "brcmfmac4365b-pcie");
[all …]
/Linux-v6.1/drivers/net/wireless/mediatek/mt76/mt7603/
Deeprom.c1 // SPDX-License-Identifier: ISC
21 return -ETIMEDOUT; in mt7603_efuse_read()
23 udelay(2); in mt7603_efuse_read()
51 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()
54 return -ENOMEM; in mt7603_efuse_init()
56 buf = dev->mt76.otp.data; in mt7603_efuse_init()
104 struct device_node *np = dev->mt76.dev->of_node; in mt7603_apply_cal_free_data()
105 u8 *eeprom = dev->mt76.eeprom.data; in mt7603_apply_cal_free_data()
[all …]
/Linux-v6.1/include/linux/ssb/
Dssb_driver_chipcommon.h1 /* SPDX-License-Identifier: GPL-2.0-only */
8 * jtag, 0/1/2 uarts, clock frequency control, a watchdog interrupt timer,
30 #define SSB_CHIPCO_CAP_UARTGPIO 0x00000020 /* UARTs on GPIO 15-12 */
41 #define SSB_PLLTYPE_3 0x00030000 /* 25Mhz, 2 dividers */
47 #define SSB_CHIPCO_CAP_OTPS 0x00380000 /* OTP size */
52 #define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */
61 #define SSB_CHIPCO_OTPS 0x0010 /* OTP status */
67 #define SSB_CHIPCO_OTPC 0x0014 /* OTP control */
74 #define SSB_CHIPCO_OTPP 0x0018 /* OTP prog */
116 #define SSB_CHIPCO_JCTL_EXT_EN 2 /* Enable external targets */
[all …]
/Linux-v6.1/include/uapi/mtd/
Dmtd-abi.h1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
3 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> et al.
7 * the Free Software Foundation; either version 2 of the License, or
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
55 * @MTD_OPS_RAW: data are transferred as-is, with no error correction;
65 MTD_OPS_RAW = 2,
69 * struct mtd_write_req - data structure for requesting a write operation
74 * @usr_data: user-provided data buffer
75 * @usr_oob: user-provided OOB buffer
80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/regulator/
Dpalmas-pmic.txt3 The tps659038 for the AM57x class have OTP spins that
5 is not a need to add the OTP spins to the palmas driver. The
11 - compatible : Should be from the list
12 ti,twl6035-pmic
13 ti,twl6036-pmic
14 ti,twl6037-pmic
15 ti,tps65913-pmic
16 ti,tps65914-pmic
17 ti,tps65917-pmic
18 ti,tps659038-pmic
[all …]
/Linux-v6.1/drivers/mfd/
Dwm831x-otp.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * wm831x-otp.c -- OTP for Wolfson WM831x PMICs
19 #include <linux/mfd/wm831x/otp.h>
29 for (i = 0; i < WM831X_UNIQUE_ID_LEN / 2; i++) { in wm831x_unique_id_read()
34 id[i * 2] = (val >> 8) & 0xff; in wm831x_unique_id_read()
35 id[(i * 2) + 1] = val & 0xff; in wm831x_unique_id_read()
62 ret = device_create_file(wm831x->dev, &dev_attr_unique_id); in wm831x_otp_init()
64 dev_err(wm831x->dev, "Unique ID attribute not created: %d\n", in wm831x_otp_init()
71 dev_err(wm831x->dev, "Failed to read UUID: %d\n", ret); in wm831x_otp_init()
78 device_remove_file(wm831x->dev, &dev_attr_unique_id); in wm831x_otp_exit()

12345678