mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 03:58:02 +07:00
cfad642538
This driver provides an access to EEPROM of IDT PCIe-switches. IDT PCIe- switches expose a simple SMBus interface to perform IO-operations from/to EEPROM, which is located at private (so called Master) SMBus. The driver creates a simple binary sysfs-file to have an access to the EEPROM using the SMBus-slave interface in the i2c-device susfs-directory: /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom In case if read-only flag is specified at dts-node of the device, User-space applications won't be able to write to the EEPROM sysfs-node. Additionally IDT 89HPESx SMBus interface has an ability to read/write values of device CSRs. This driver exposes debugfs-file to perform simple IO-operations using that ability for just basic debug purpose. Particularly the next file is created in the specific debugfs-directory: /sys/kernel/debug/idt_csr/ Format of the debugfs-file value is: $ cat /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>; <CSR address>:<CSR value> So reading the content of the file gives current CSR address and it value. If User-space application wishes to change current CSR address, it can just write a proper value to the sysfs-file: $ echo "<CSR address>" > /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname> If it wants to change the CSR value as well, the format of the write operation is: $ echo "<CSR address>:<CSR value>" > \ /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>; CSR address and value can be any of hexadecimal, decimal or octal format. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
114 lines
3.7 KiB
Plaintext
114 lines
3.7 KiB
Plaintext
menu "EEPROM support"
|
|
|
|
config EEPROM_AT24
|
|
tristate "I2C EEPROMs / RAMs / ROMs from most vendors"
|
|
depends on I2C && SYSFS
|
|
select NVMEM
|
|
help
|
|
Enable this driver to get read/write support to most I2C EEPROMs
|
|
and compatible devices like FRAMs, SRAMs, ROMs etc. After you
|
|
configure the driver to know about each chip on your target
|
|
board. Use these generic chip names, instead of vendor-specific
|
|
ones like at24c64, 24lc02 or fm24c04:
|
|
|
|
24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08,
|
|
24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024
|
|
|
|
Unless you like data loss puzzles, always be sure that any chip
|
|
you configure as a 24c32 (32 kbit) or larger is NOT really a
|
|
24c16 (16 kbit) or smaller, and vice versa. Marking the chip
|
|
as read-only won't help recover from this. Also, if your chip
|
|
has any software write-protect mechanism you may want to review the
|
|
code to make sure this driver won't turn it on by accident.
|
|
|
|
If you use this with an SMBus adapter instead of an I2C adapter,
|
|
full functionality is not available. Only smaller devices are
|
|
supported (24c16 and below, max 4 kByte).
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called at24.
|
|
|
|
config EEPROM_AT25
|
|
tristate "SPI EEPROMs from most vendors"
|
|
depends on SPI && SYSFS
|
|
select NVMEM
|
|
help
|
|
Enable this driver to get read/write support to most SPI EEPROMs,
|
|
after you configure the board init code to know about each eeprom
|
|
on your target board.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called at25.
|
|
|
|
config EEPROM_LEGACY
|
|
tristate "Old I2C EEPROM reader"
|
|
depends on I2C && SYSFS
|
|
help
|
|
If you say yes here you get read-only access to the EEPROM data
|
|
available on modern memory DIMMs and Sony Vaio laptops via I2C. Such
|
|
EEPROMs could theoretically be available on other devices as well.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called eeprom.
|
|
|
|
config EEPROM_MAX6875
|
|
tristate "Maxim MAX6874/5 power supply supervisor"
|
|
depends on I2C
|
|
help
|
|
If you say yes here you get read-only support for the user EEPROM of
|
|
the Maxim MAX6874/5 EEPROM-programmable, quad power-supply
|
|
sequencer/supervisor.
|
|
|
|
All other features of this chip should be accessed via i2c-dev.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called max6875.
|
|
|
|
|
|
config EEPROM_93CX6
|
|
tristate "EEPROM 93CX6 support"
|
|
help
|
|
This is a driver for the EEPROM chipsets 93c46 and 93c66.
|
|
The driver supports both read as well as write commands.
|
|
|
|
If unsure, say N.
|
|
|
|
config EEPROM_93XX46
|
|
tristate "Microwire EEPROM 93XX46 support"
|
|
depends on SPI && SYSFS
|
|
select REGMAP
|
|
select NVMEM
|
|
help
|
|
Driver for the microwire EEPROM chipsets 93xx46x. The driver
|
|
supports both read and write commands and also the command to
|
|
erase the whole EEPROM.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called eeprom_93xx46.
|
|
|
|
If unsure, say N.
|
|
|
|
config EEPROM_DIGSY_MTC_CFG
|
|
bool "DigsyMTC display configuration EEPROMs device"
|
|
depends on GPIO_MPC5200 && SPI_GPIO
|
|
help
|
|
This option enables access to display configuration EEPROMs
|
|
on digsy_mtc board. You have to additionally select Microwire
|
|
EEPROM 93XX46 driver. sysfs entries will be created for that
|
|
EEPROM allowing to read/write the configuration data or to
|
|
erase the whole EEPROM.
|
|
|
|
If unsure, say N.
|
|
|
|
config EEPROM_IDT_89HPESX
|
|
tristate "IDT 89HPESx PCIe-swtiches EEPROM / CSR support"
|
|
depends on I2C && SYSFS
|
|
help
|
|
Enable this driver to get read/write access to EEPROM / CSRs
|
|
over IDT PCIe-swtich i2c-slave interface.
|
|
|
|
This driver can also be built as a module. If so, the module
|
|
will be called idt_89hpesx.
|
|
|
|
endmenu
|