/openbmc/linux/drivers/misc/eeprom/ |
H A D | eeprom_93cx6.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (C) 2004 - 2006 rt2x00 SourceForge Project 7 * Abstract: EEPROM reader routines for 93cx6 chipsets. 18 MODULE_DESCRIPTION("EEPROM 93cx6 chip driver"); 21 static inline void eeprom_93cx6_pulse_high(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_high() argument 23 eeprom->reg_data_clock = 1; in eeprom_93cx6_pulse_high() 24 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_high() 34 static inline void eeprom_93cx6_pulse_low(struct eeprom_93cx6 *eeprom) in eeprom_93cx6_pulse_low() argument 36 eeprom->reg_data_clock = 0; in eeprom_93cx6_pulse_low() 37 eeprom->register_write(eeprom); in eeprom_93cx6_pulse_low() [all …]
|
H A D | idt_89hpesx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2016 T-Platforms. All Rights Reserved. 5 * IDT PCIe-switch NTB Linux driver 8 * Serge Semin <fancer.lancer@gmail.com>, <Sergey.Semin@t-platforms.ru> 11 * NOTE of the IDT 89HPESx SMBus-slave interface driver 12 * This driver primarily is developed to have an access to EEPROM device of 13 * IDT PCIe-switches. IDT provides a simple SMBus interface to perform IO- 14 * operations from/to EEPROM, which is located at private (so called Master) 16 * binary sysfs-file in the device directory: 17 * /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom [all …]
|
H A D | max6875.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max6875.c - driver for MAX6874/MAX6875 7 * Based on eeprom.c 9 * The MAX6875 has a bank of registers and two banks of EEPROM. 11 * * 0x0000 - 0x0046 = configuration registers 12 * * 0x8000 - 0x8046 = configuration EEPROM 13 * * 0x8100 - 0x82FF = user EEPROM 15 * This driver makes the user EEPROM available for read. 17 * The registers & config EEPROM should be accessed via i2c-dev. 20 * two addresses - 0x50/0x51 and 0x52/0x53. [all …]
|
H A D | eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> 23 /* Size of EEPROM in bytes */ 26 /* possible types of eeprom devices */ 32 /* Each client has this additional data */ 37 u8 data[EEPROM_SIZE]; /* Register values */ member 44 struct eeprom_data *data = i2c_get_clientdata(client); in eeprom_update_client() local 47 mutex_lock(&data->update_lock); in eeprom_update_client() 49 if (!(data->valid & (1 << slice)) || in eeprom_update_client() 50 time_after(jiffies, data->last_updated[slice] + 300 * HZ)) { in eeprom_update_client() [all …]
|
/openbmc/linux/drivers/nvmem/ |
H A D | rave-sp-eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * EEPROM driver for RAVE SP 10 #include <linux/mfd/rave-sp.h> 12 #include <linux/nvmem-provider.h> 18 * enum rave_sp_eeprom_access_type - Supported types of EEPROM access 20 * @RAVE_SP_EEPROM_WRITE: EEPROM write 21 * @RAVE_SP_EEPROM_READ: EEPROM read 29 * enum rave_sp_eeprom_header_size - EEPROM command header sizes 31 * @RAVE_SP_EEPROM_HEADER_SMALL: EEPROM header size for "small" devices (< 8K) 32 * @RAVE_SP_EEPROM_HEADER_BIG: EEPROM header size for "big" devices (> 8K) [all …]
|
/openbmc/qemu/hw/nvram/ |
H A D | eeprom93xx.c | 2 * QEMU EEPROM 93xx emulation 4 * Copyright (c) 2006-2007 Stefan Weil 21 * NMC93C06 256-Bit (16 x 16) 22 * NMC93C46 1024-Bit (64 x 16) 28 * eeprom93xx_new - add a new EEPROM (with 16, 64 or 256 words) 29 * eeprom93xx_free - destroy EEPROM 30 * eeprom93xx_read - read data from the EEPROM 31 * eeprom93xx_write - write data to the EEPROM 32 * eeprom93xx_data - get EEPROM data array for external manipulation 35 * - No emulation of EEPROM timings. [all …]
|
/openbmc/linux/include/linux/ |
H A D | eeprom_93cx6.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 Copyright (C) 2004 - 2006 rt2x00 SourceForge Project 10 Abstract: EEPROM reader datastructures for 93cx6 chipsets. 17 * EEPROM operation defines. 31 * struct eeprom_93cx6 - control structure for setting the commands 32 * for reading the eeprom data. 33 * @data: private pointer for the driver. 34 * @register_read(struct eeprom_93cx6 *eeprom): handler to 35 * read the eeprom register, this function should set all reg_* fields. 36 * @register_write(struct eeprom_93cx6 *eeprom): handler to [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 8 #include "eeprom.h" 12 u8 *eeprom = dev->mt76.eeprom.data; in mt7996_check_eeprom() local 13 u16 val = get_unaligned_le16(eeprom); in mt7996_check_eeprom() 19 return -EINVAL; in mt7996_check_eeprom() 32 u8 *eeprom = dev->mt76.eeprom.data; in mt7996_eeprom_load_default() local 36 ret = request_firmware(&fw, mt7996_eeprom_name(dev), dev->mt76.dev); in mt7996_eeprom_load_default() 40 if (!fw || !fw->data) { in mt7996_eeprom_load_default() 41 dev_err(dev->mt76.dev, "Invalid default bin\n"); in mt7996_eeprom_load_default() 42 ret = -EINVAL; in mt7996_eeprom_load_default() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000e/ |
H A D | nvm.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 7 * e1000_raise_eec_clk - Raise EEPROM clock 9 * @eecd: pointer to the EEPROM 11 * Enable/Raise the EEPROM clock bit. 18 udelay(hw->nvm.delay_usec); in e1000_raise_eec_clk() 22 * e1000_lower_eec_clk - Lower EEPROM clock 24 * @eecd: pointer to the EEPROM 26 * Clear/Lower the EEPROM clock bit. 33 udelay(hw->nvm.delay_usec); in e1000_lower_eec_clk() [all …]
|
/openbmc/linux/drivers/net/wireless/intel/iwlwifi/ |
H A D | iwl-eeprom-parse.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 3 * Copyright (C) 2005-2014, 2018-2020 Intel Corporation 9 #include "iwl-drv.h" 10 #include "iwl-modparams.h" 11 #include "iwl-eeprom-parse.h" 14 /* EEPROM offset definitions */ 29 /* corresponding link offsets in EEPROM */ 65 /* SKU Capabilities (actual values from EEPROM definition) */ 74 /* radio config bits (actual values from EEPROM definition) */ 75 #define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */ [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_nvm.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 11 * igb_raise_eec_clk - Raise EEPROM clock 13 * @eecd: pointer to the EEPROM 15 * Enable/Raise the EEPROM clock bit. 22 udelay(hw->nvm.delay_usec); in igb_raise_eec_clk() 26 * igb_lower_eec_clk - Lower EEPROM clock 28 * @eecd: pointer to the EEPROM 30 * Clear/Lower the EEPROM clock bit. 37 udelay(hw->nvm.delay_usec); in igb_lower_eec_clk() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 6 #include "eeprom.h" 10 struct mt76_dev *mdev = &dev->mt76; in mt7915_eeprom_load_precal() 11 u8 *eeprom = mdev->eeprom.data; in mt7915_eeprom_load_precal() local 12 u32 val = eeprom[MT_EE_DO_PRE_CAL]; in mt7915_eeprom_load_precal() 15 if (!dev->flash_mode) in mt7915_eeprom_load_precal() 22 dev->cal = devm_kzalloc(mdev->dev, val, GFP_KERNEL); in mt7915_eeprom_load_precal() 23 if (!dev->cal) in mt7915_eeprom_load_precal() 24 return -ENOMEM; in mt7915_eeprom_load_precal() 26 offs = is_mt7915(&dev->mt76) ? MT_EE_PRECAL : MT_EE_PRECAL_V2; in mt7915_eeprom_load_precal() [all …]
|
/openbmc/qemu/hw/i2c/ |
H A D | smbus_eeprom.c | 2 * QEMU SMBus EEPROM device 31 #include "hw/qdev-properties.h" 38 #define TYPE_SMBUS_EEPROM "smbus-eeprom" 46 uint8_t data[SMBUS_EEPROM_SIZE]; member 54 SMBusEEPROMDevice *eeprom = SMBUS_EEPROM(dev); in eeprom_receive_byte() local 55 uint8_t *data = eeprom->data; in eeprom_receive_byte() local 56 uint8_t val = data[eeprom->offset++]; in eeprom_receive_byte() 58 eeprom->accessed = true; in eeprom_receive_byte() 61 dev->i2c.address, val); in eeprom_receive_byte() 68 SMBusEEPROMDevice *eeprom = SMBUS_EEPROM(dev); in eeprom_write_data() local [all …]
|
/openbmc/u-boot/board/ti/common/ |
H A D | board_detect.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * Library to support early TI EVM EEPROM handling 5 * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com 11 /* TI EEPROM MAGIC Header identifier */ 23 * struct ti_am_eeprom - This structure holds data read in from the 30 * @mac_addr: Any MAC addresses written in the EEPROM 32 * The data is this structure is read from the EEPROM on the board. 35 * TI boards with a single MLO and u-boot. 46 /* DRA7 EEPROM MAGIC Header identifier */ 52 * struct dra7_eeprom - This structure holds data read in from the DRA7 EVM [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7603/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 5 #include "eeprom.h" 8 mt7603_efuse_read(struct mt7603_dev *dev, u32 base, u16 addr, u8 *data) in mt7603_efuse_read() argument 21 return -ETIMEDOUT; in mt7603_efuse_read() 28 memset(data, 0xff, 16); in mt7603_efuse_read() 34 put_unaligned_le32(val, data + 4 * i); 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() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt7601u/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 #include "eeprom.h" 32 mt7601u_efuse_read(struct mt7601u_dev *dev, u16 addr, u8 *data, in mt7601u_efuse_read() argument 47 return -ETIMEDOUT; in mt7601u_efuse_read() 51 /* Parts of eeprom not in the usage map (0x80-0xc0,0xf0) in mt7601u_efuse_read() 52 * will not return valid data but it's ok. in mt7601u_efuse_read() 54 memset(data, 0xff, 16); in mt7601u_efuse_read() 60 put_unaligned_le32(val, data + 4 * i); in mt7601u_efuse_read() 70 u8 data[round_up(MT_EFUSE_USAGE_MAP_SIZE, 16)]; in mt7601u_efuse_physical_size_check() local 76 data + i * 16, MT_EE_PHYSICAL_READ); in mt7601u_efuse_physical_size_check() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 10 #include "eeprom.h" 13 u16 addr, u8 *data) in mt7615_efuse_read() argument 25 return -ETIMEDOUT; in mt7615_efuse_read() 32 memset(data, 0x0, 16); in mt7615_efuse_read() 38 put_unaligned_le32(val, data + 4 * i); in mt7615_efuse_read() 50 if (is_mt7663(&dev->mt76)) in mt7615_efuse_init() 57 dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL); in mt7615_efuse_init() 58 dev->mt76.otp.size = len; in mt7615_efuse_init() 59 if (!dev->mt76.otp.data) in mt7615_efuse_init() [all …]
|
/openbmc/entity-manager/docs/ |
H A D | address_size_detection_modes.md | 1 # EEPROM address size detection modes 4 address byte(s) needed for a given EEPROM device. 6 ## MODE-1 8 The existing upstream function isDevice16Bit() bases on sending 1-byte write 9 operation (with a STOP condition) and 8 subsequent 1-byte read operations with 12 ### This MODE-1 expects the following logic 14 - If the device requires 1 address byte, it EXPECTS that the data will be read 16 - If the device requires 2 address bytes, it EXPECTS that the data will be read 20 ### Issue and potential issue with this MODE-1 22 - If any "2 address bytes" EEPROM from any vendor has the same data in all [all …]
|
/openbmc/u-boot/drivers/net/ |
H A D | e1000_spi.c | 6 /*----------------------------------------------------------------------- 15 * input data overwrites the output data (since both are buffered by 18 * This may be interrupted with Ctrl-C if "intr" is true, otherwise it will 31 /* Pre-read the control register */ in e1000_spi_xfer() 38 return -1; in e1000_spi_xfer() 69 din[i >> 3] &= ~((mask << 1) - 1); in e1000_spi_xfer() 91 if (hw->eeprom.type != e1000_eeprom_spi) { in spi_setup_slave() 92 E1000_ERR(hw, "No attached SPI EEPROM found!\n"); in spi_setup_slave() 102 E1000_ERR(hw, "Only SPI MODE-0 is supported!\n"); in spi_setup_slave() 107 E1000_DBG(hw->nic, "EEPROM SPI access requested\n"); in spi_setup_slave() [all …]
|
/openbmc/linux/drivers/net/usb/ |
H A D | asix_common.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright (C) 2003-2006 David Hollis <dhollis@davehollis.com> 7 * Copyright (c) 2002-2003 TiVo Inc. 15 u16 size, void *data, int in_pm) in asix_read_cmd() argument 28 value, index, data, size); in asix_read_cmd() 31 ret = ret < 0 ? ret : -ENODATA; in asix_read_cmd() 33 netdev_warn(dev->net, "Failed to read reg index 0x%04x: %d\n", in asix_read_cmd() 41 u16 size, void *data, int in_pm) in asix_write_cmd() argument 54 value, index, data, size); in asix_write_cmd() 57 netdev_warn(dev->net, "Failed to write reg index 0x%04x: %d\n", in asix_write_cmd() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_common.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 18 static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data, 28 u16 words, u16 *data); 30 u16 words, u16 *data); 41 * ixgbe_device_supports_autoneg_fc - Check if phy supports autoneg flow 55 switch (hw->phy.media_type) { in ixgbe_device_supports_autoneg_fc() 58 switch (hw->device_id) { in ixgbe_device_supports_autoneg_fc() 64 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_device_supports_autoneg_fc() 74 if (hw->device_id == IXGBE_DEV_ID_X550EM_X_XFI) in ixgbe_device_supports_autoneg_fc() [all …]
|
H A D | ixgbe_x540.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 31 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_get_invariants_X540() 32 struct ixgbe_phy_info *phy = &hw->phy; in ixgbe_get_invariants_X540() 35 phy->ops.set_phy_power = ixgbe_set_copper_phy_power; in ixgbe_get_invariants_X540() 37 mac->mcft_size = IXGBE_X540_MC_TBL_SIZE; in ixgbe_get_invariants_X540() 38 mac->vft_size = IXGBE_X540_VFT_TBL_SIZE; in ixgbe_get_invariants_X540() 39 mac->num_rar_entries = IXGBE_X540_RAR_ENTRIES; in ixgbe_get_invariants_X540() 40 mac->rx_pb_size = IXGBE_X540_RX_PB_SIZE; in ixgbe_get_invariants_X540() 41 mac->max_rx_queues = IXGBE_X540_MAX_RX_QUEUES; in ixgbe_get_invariants_X540() [all …]
|
/openbmc/linux/drivers/net/ethernet/wangxun/txgbe/ |
H A D | txgbe_hw.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2015 - 2022 Beijing WangXun Technology Co., Ltd. */ 17 * txgbe_disable_sec_tx_path - Stops the transmit data path 20 * Stops the transmit data path and waits for the HW to internally empty 33 * txgbe_enable_sec_tx_path - Enables the transmit data path 36 * Enables the transmit data path. 45 * txgbe_init_thermal_sensor_thresh - Inits thermal sensor thresholds 53 struct wx_thermal_sensor_data *data = &wx->mac.sensor; in txgbe_init_thermal_sensor_thresh() local 55 memset(data, 0, sizeof(struct wx_thermal_sensor_data)); in txgbe_init_thermal_sensor_thresh() 58 if (wx->bus.func) in txgbe_init_thermal_sensor_thresh() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/eeprom/ |
H A D | microchip,93lc46b.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Microchip 93xx46 SPI compatible EEPROM family 10 - Cory Tusar <cory.tusar@pid1solutions.com> 15 - atmel,at93c46 16 - atmel,at93c46d 17 - atmel,at93c56 18 - atmel,at93c66 [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt76x2/ |
H A D | eeprom.c | 1 // SPDX-License-Identifier: ISC 10 #include "eeprom.h" 17 void *src = dev->mt76.eeprom.data + MT_EE_MAC_ADDR; in mt76x2_eeprom_get_macaddr() 19 memcpy(dev->mphy.macaddr, src, ETH_ALEN); in mt76x2_eeprom_get_macaddr() 80 struct device_node *np = dev->mt76.dev->of_node; in mt76x2_apply_cal_free_data() 81 u8 *eeprom = dev->mt76.eeprom.data; in mt76x2_apply_cal_free_data() local 83 eeprom[MT_EE_TX_POWER_0_START_5G], in mt76x2_apply_cal_free_data() 84 eeprom[MT_EE_TX_POWER_0_START_5G + 1], in mt76x2_apply_cal_free_data() 85 eeprom[MT_EE_TX_POWER_1_START_5G], in mt76x2_apply_cal_free_data() 86 eeprom[MT_EE_TX_POWER_1_START_5G + 1] in mt76x2_apply_cal_free_data() [all …]
|