Jump to content
Sign in to follow this  
cybrnook

i2c-tools : decode-dimms get memory timings from CLI (SOLVED)

6 posts in this topic Last Reply

Recommended Posts

I want to be able to get my memory timings from CLI, but out of the box all I see is just a high level view with lshw -C memory

 

     *-bank:0
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2934 MHz (0.3 ns)
          product: HMA82GU8AFR8N-UH
          vendor: Hynix
          physical id: 0
          serial: 72446CE5
          slot: DIMM 0
          size: 16GiB
          width: 64 bits
          clock: 2934MHz (0.3ns)

 

I want to also be able to pull the memory timings. Looking online, seems the best way to do this is using i2c-tools (namely decode-dimms). So I pulled down and installed the slackware package: https://packages.slackonly.com/pub/packages/14.2-x86_64/system/i2c-tools/i2c-tools-4.1-x86_64-1_slonly.txz

 

 

But.... seems I need to be able to modprode eeprom before decode-dimms can actually read anything:

(Screenshot was from an old version of i2c-tools 3.1.1, I since updated to 4.1. Needed for DDR4)

image.png.7614a622205d03bff30853ca49a16c1c.png

 

Is there a way to get this information?

Edited by cybrnook

Share this post


Link to post

Well, in case anyone is interested I have made some progress, but not quite there yet.

 

I have been able to detect the smbus (of my board) that holds the I2C address of the SPD EEPROMs (which for me is "0", where I have all 8 x SPD EEPROMs).

image.png.9bf2f975d9ead37e0b25243caa3e9696.png

 

The catch now though is I need to have an eeprom driver baked into the kernel (namely the ee1004 eeprom driver/kmod).

 

@ich777 you think your kernel toolbox might be up for the challenge? (https://www.spinics.net/lists/linux-i2c/msg32331.html)

Edited by cybrnook

Share this post


Link to post
44 minutes ago, cybrnook said:

The catch now though is I need to have an eeprom driver baked into the kernel (namely the ee1004 eeprom driver/kmod).

If the kernel mod is in the Kernel it should be no problem, but I've not read the entire thread since my time is very very limited at the moment.

Try to make a custom/manual build and replace the step 'make oldconfig' with 'make menuconfig' or you could also inject it into the '.config' file like I do it with the DVB modules.

Please keep in mind that you have to do this by hand since make menuconfig will open up  a menu with all the available modules (don't forget to save it after you finished all...

Share this post


Link to post
56 minutes ago, ich777 said:

If the kernel mod is in the Kernel it should be no problem, but I've not read the entire thread since my time is very very limited at the moment.

Try to make a custom/manual build and replace the step 'make oldconfig' with 'make menuconfig' or you could also inject it into the '.config' file like I do it with the DVB modules.

Please keep in mind that you have to do this by hand since make menuconfig will open up  a menu with all the available modules (don't forget to save it after you finished all...

Oh, hey awesome. I didn't realize I could get to menuconfig (that's all I needed to know 🙂. I do lot's of work in OpenWRT). I assume this will be over a VNC connection to the container?

 

EDIT: RTFM 🙂 "'docker exec -ti NAMEOFYOURCONTAINER /bin/bash'"

Edited by cybrnook

Share this post


Link to post

😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁 😁😁

 

image.png.417007dce3e25061a9a1ff9062d7a8e2.png

Share this post


Link to post

@ich777 Once again that Kernel Docker worked awesome 🙂

 

My notes:

 

# Needed to enable i2cdetect
modprobe i2c-dev

# Detect current smbus(s)
i2cdetect -l | grep smbus

# Detect against all until you find 50-57 range, that is your bus (0,1,2,3, etc....)
i2cdetect -y 0 0x50 0x57

# Enable the device (per module), path matches bus number
echo ee1004 0x50 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x51 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x52 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x53 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x54 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x55 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x56 > /sys/bus/i2c/devices/i2c-0/new_device
echo ee1004 0x57 > /sys/bus/i2c/devices/i2c-0/new_device

# Display info
decode-dimms

# Display info side-by-side
decode-dimms --side-by-side

# Display DIE version (replacing 0-0050 with the i2c bus number followed by a dash then the memory bank number)
od -Ax -t x1 -v /sys/bus/i2c/drivers/ee1004/0-0050/eeprom

 

 

 

root@noah:~# decode-dimms --side-by-side
# decode-dimms version i2c-tools 4.1

Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho, Hans Geiblinger and others


Decoding EEPROM                                  0-0050           0-0051           0-0052           0-0053           0-0054           0-0055           0-0056           0-0057
Guessing DIMM is in                              bank 1           bank 2           bank 3           bank 4           bank 5           bank 6           bank 7           bank 8

---=== SPD EEPROM Information ===---
EEPROM CRC of bytes 0-125                        OK (0x74DA)
# of bytes written to SDRAM EEPROM               384
Total number of bytes in EEPROM                  512
Fundamental Memory type                          DDR4 SDRAM
SPD Revision                                     1.1
Module Type                                      UDIMM
EEPROM CRC of bytes 128-253                      OK (0x05F1)

---=== Memory Characteristics ===---
Maximum module speed                             2400 MHz (PC4-19200)
Size                                             16384 MB
Banks x Rows x Columns x Bits                    16 x 16 x 10 x 64
SDRAM Device Width                               8 bits
Ranks                                            2
Rank Mix                                         Symmetrical
Bus Width Extension                              8 bits
AA-RCD-RP-RAS (cycles)                           17-17-17-39
Supported CAS Latencies                          18T, 17T, 16T, 15T, 14T, 13T, 12T, 11T, 10T

---=== Timings at Standard Speeds ===---
AA-RCD-RP-RAS (cycles) as DDR4-2400              17-17-17-39
AA-RCD-RP-RAS (cycles) as DDR4-2133              15-15-15-35
AA-RCD-RP-RAS (cycles) as DDR4-1866              13-13-13-30
AA-RCD-RP-RAS (cycles) as DDR4-1600              11-11-11-26

---=== Timing Parameters ===---
Minimum Cycle Time (tCKmin)                      0.833 ns
Maximum Cycle Time (tCKmax)                      1.600 ns
Minimum CAS Latency Time (tAA)                   13.750 ns
Minimum RAS to CAS Delay (tRCD)                  13.750 ns
Minimum Row Precharge Delay (tRP)                13.750 ns
Minimum Active to Precharge Delay (tRAS)         32.000 ns
Minimum Active to Auto-Refresh Delay (tRC)       45.750 ns
Minimum Recovery Delay (tRFC1)                   350.000 ns
Minimum Recovery Delay (tRFC2)                   260.000 ns
Minimum Recovery Delay (tRFC4)                   160.000 ns
Minimum Four Activate Window Delay (tFAW)        21.000 ns
Minimum Row Active to Row Active Delay (tRRD_S)  3.300 ns
Minimum Row Active to Row Active Delay (tRRD_L)  4.900 ns
Minimum CAS to CAS Delay (tCCD_L)                5.000 ns
Minimum Write Recovery Time (tWR)                15.000 ns
Minimum Write to Read Time (tWTR_S)              2.500 ns
Minimum Write to Read Time (tWTR_L)              7.500 ns

---=== Other Information ===---
Package Type                                     Monolithic
Maximum Activate Count                           Unlimited
Post Package Repair                              One row per bank group
Soft PPR                                         Supported
Module Nominal Voltage                           1.2 V
Thermal Sensor                                   TSE2004 compliant

---=== Physical Characteristics ===---
Module Height                                    19 mm
Module Thickness                                 2 mm front, 2 mm back
Module Reference Card                            ZZ

---=== Manufacturer Data ===---
Module Manufacturer                              SK Hynix
DRAM Manufacturer                                SK Hynix
Manufacturing Location Code                      0x01
Manufacturing Date                               2018-W28         2018-W28         2018-W28         2018-W28         2018-W16         2018-W28         2018-W28         2018-W28
Assembly Serial Number                           0x72446CE5       0x72446C05       0x72446AE9       0x72446A98       0x72189C5D       0x72446CE7       0x72446B14       0x72446C0A
Part Number                                      HMA82GU8AFR8N-UH    


Number of SDRAM DIMMs detected and decoded: 8

 

root@noah:~# od -Ax -t x1 -v /sys/bus/i2c/drivers/ee1004/0-0050/eeprom
000000 23 11 0c 02 85 21 00 08 00 60 00 03 09 0b 80 00
000010 00 00 07 0d f8 0f 00 00 6e 6e 6e 11 00 6e f0 0a
000020 20 08 00 05 00 a8 1b 28 28 00 78 00 14 3c 00 00
000030 00 00 00 00 00 00 00 00 00 00 00 00 0c 2c 15 35
000040 15 35 0b 2c 15 35 0b 35 0b 2c 0b 35 15 36 00 00
000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000070 00 00 00 00 00 00 9c b5 00 00 00 00 e7 d6 da 74
000080 04 11 1f 01 00 00 00 00 00 00 00 00 00 00 00 00
000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 05
000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000140 80 ad 01 18 28 72 44 6c e5 48 4d 41 38 32 47 55
000150 38 41 46 52 38 4e 2d 55 48 20 20 20 20 00 80 ad
000160 ff 54 44 38 37 4e 35 32 32 36 49 30 31 00 00 00
000170 01 00 00 00 00 00 00 02 00 00 00 00 00 dd 00 00
000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000200

Save to a txt file and open with Thaiphoon Burner (File, Open from Clipboard/File):

image.thumb.png.b6b87a036b1c3635c7c01b5cdc6925b8.png

Edited by cybrnook

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this