Re: [PATCH v4 5/6] i2c: smbus: Support DDR5 SPD EEPROMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Guenter,


Thank you for your support.


Am 17.06.24 um 17:49 schrieb Guenter Roeck:

On Mon, Jun 17, 2024 at 04:42:47PM +0200, Paul Menzel wrote:
[ ... ]

I applied your patch

     $ git log --oneline --no-decorate -2
     00058a6 eeprom: Add basic spd5118 support
     a0e5865 i2cdetect: only use "newer" I2C_FUNC_* flags if they exist

but reading eeprom fails:

     $ sudo ./eeprom/decode-dimms

decode-dimms does not need sudo, but that should not make a difference.

     Cannot read /sys/bus/i2c/drivers/spd5118/0-0050/eeprom at ./eeprom/decode-dimms line 2465.

Well, it _is_ a hack ;-), but that specific operation should not fail.

Please try the following:

ls -l /sys/bus/i2c/drivers/spd5118/0-0050/eeprom
cp /sys/bus/i2c/drivers/spd5118/0-0050/eeprom /tmp
od -t x1 /sys/bus/i2c/drivers/spd5118/0-0050/eeprom

    $ ls -l /sys/bus/i2c/drivers/spd5118/0-0050/eeprom
-r--r--r-- 1 root root 1024 Jun 18 12:17 /sys/bus/i2c/drivers /spd5118/0-0050/eeprom
    $ cp /sys/bus/i2c/drivers/spd5118/0-0050/eeprom /tmp
cp: error reading '/sys/bus/i2c/drivers/spd5118/0-0050/eeprom': No such device or address
    $ od -t x1 /sys/bus/i2c/drivers/spd5118/0-0050/eeprom
od: /sys/bus/i2c/drivers/spd5118/0-0050/eeprom: read error: No such device or address
    0000000

sudo i2cdump -y -f 0 0x50

    $ sudo LD_LIBRARY_PATH=~/src/i2c-tools/lib tools/i2cdump -y -f 0 0x50
    No size specified (using byte-data access)
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

All those should work, and the size of /tmp/eeprom should be
1024 bytes. The output of i2cdump should start with something like

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 51 18 0a 86 32 03 32 00 00 00 00 07 ff 7f 00 00    Q???2?2......?..
                                      ^^

and with

      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 51 18 0a 86 32 03 32 00 00 00 00 00 ff 7f 00 00    Q???2?2......?..
                                      ^^

after executing the "sensors" command.

Hopefully, I didn’t do something silly, that it does not work on my system yet. `sensors` is able to read stuff:

```
$ sensors
spd5118-i2c-0-53
Adapter: SMBus I801 adapter at efa0
temp1:        +20.8°C  (low  =  +0.0°C, high = +55.0°C)
                       (crit low =  +0.0°C, crit = +85.0°C)

spd5118-i2c-0-51
Adapter: SMBus I801 adapter at efa0
temp1:        +21.5°C  (low  =  +0.0°C, high = +55.0°C)
                       (crit low =  +0.0°C, crit = +85.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +32.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +27.0°C  (high = +80.0°C, crit = +100.0°C)
Core 4:        +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 8:        +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 12:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 16:       +25.0°C  (high = +80.0°C, crit = +100.0°C)
Core 20:       +26.0°C  (high = +80.0°C, crit = +100.0°C)
Core 24:       +24.0°C  (high = +80.0°C, crit = +100.0°C)
Core 28:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 32:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 33:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 34:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 35:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 36:       +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 37:       +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 38:       +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 39:       +29.0°C  (high = +80.0°C, crit = +100.0°C)
Core 40:       +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 41:       +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 42:       +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 43:       +31.0°C  (high = +80.0°C, crit = +100.0°C)
Core 44:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 45:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 46:       +30.0°C  (high = +80.0°C, crit = +100.0°C)
Core 47:       +30.0°C  (high = +80.0°C, crit = +100.0°C)

spd5118-i2c-0-52
Adapter: SMBus I801 adapter at efa0
temp1:        +21.5°C  (low  =  +0.0°C, high = +55.0°C)
                       (crit low =  +0.0°C, crit = +85.0°C)

spd5118-i2c-0-50
Adapter: SMBus I801 adapter at efa0
temp1:        +21.5°C  (low  =  +0.0°C, high = +55.0°C)
                       (crit low =  +0.0°C, crit = +85.0°C)
```

Other than that, I can see that your system is an Intel system,
meaning the i2c controller would be i801, not piix4. I wonder
if that makes a difference. Has anyone else seeing this tested
eeprom access with i801 (or any other controller besides piix4),
by any chance?

Sorry, I only have Intel systems with DDR5 RAM at disposal.


Kind regards,

Paul


PS:

```
$ lsmod | grep i2c
i2c_algo_bit           12288  1 i915
regmap_i2c             12288  1 spd5118
$ grep I2C /boot/config-6.10.0-rc4.mx64.461-00047-g801b6aad6fa7
CONFIG_REGMAP_I2C=m
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_MOUSE_ELAN_I2C is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
# CONFIG_TCG_TIS_I2C is not set
CONFIG_TCG_TIS_I2C_CR50=m
CONFIG_TCG_TIS_I2C_ATMEL=m
CONFIG_TCG_TIS_I2C_INFINEON=m
CONFIG_TCG_TIS_I2C_NUVOTON=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
# I2C support
CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_MUX=y
# Multiplexer I2C Chip support
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_LTC4306 is not set
# CONFIG_I2C_MUX_PCA9541 is not set
# CONFIG_I2C_MUX_PCA954x is not set
# CONFIG_I2C_MUX_REG is not set
# CONFIG_I2C_MUX_MLXCPLD is not set
# end of Multiplexer I2C Chip support
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=y
CONFIG_I2C_ALGOBIT=m
# I2C Hardware Bus support
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD756_S4882=m
CONFIG_I2C_AMD8111=m
# CONFIG_I2C_AMD_MP2 is not set
CONFIG_I2C_I801=y
CONFIG_I2C_ISCH=m
# CONFIG_I2C_ISMT is not set
CONFIG_I2C_PIIX4=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_NFORCE2_S4985=m
# CONFIG_I2C_NVIDIA_GPU is not set
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
# CONFIG_I2C_ZHAOXIN is not set
# CONFIG_I2C_SCMI is not set
# I2C system bus drivers (mostly embedded / system-on-chip)
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set
# External I2C/SMBus adapter drivers
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_CP2615 is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PCI1XXXX is not set
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
# Other I2C/SMBus bus drivers
# CONFIG_I2C_MLXCPLD is not set
# CONFIG_I2C_VIRTIO is not set
# end of I2C Hardware Bus support
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_SLAVE is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support
# I2C GPIO expanders
# end of I2C GPIO expanders
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_OCC_P8_I2C is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_CS42L43_I2C is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS6594_I2C is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_ATC260X_I2C is not set
CONFIG_VIDEO_V4L2_I2C=y
# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'
# I2C encoder or helper chips
CONFIG_DRM_I2C_CH7006=m
CONFIG_DRM_I2C_SIL164=m
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# end of I2C encoder or helper chips
CONFIG_I2C_HID=y
# CONFIG_I2C_HID_ACPI is not set
# CONFIG_I2C_HID_OF is not set
# I2C RTC drivers
CONFIG_RTC_I2C_AND_SPI=y
# SPI and I2C RTC drivers
```




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux