i2cset question
Hey all, I found the i2c-tools and lm-sensors packages today...great stuff! I had a question about using i2cset properly. I'm trying to set the value of a digital potentiometer (maxim 5434L) over the i2cbus, and I can tell by using i2cdump that it's setting the register value properly...but I keep getting "Warning - readback failed" after i use i2cset. Here's the output of what I'm trying to do:
ccole@test:~$ sudo modprobe scx200_acb ccole@test:~$ sudo modprobe i2c-dev ccole@test:~$ sudo su - root@test:~# i2cdetect -l i2c-0 smbus CS5536 ACB0 SMBus adapter
root@test:~# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@test:~# i2cdump 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.?
10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*?
20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.?
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h
40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6
50: 7f 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 ?23-B3S.........
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................root@test:~# i2cset 0 0x50 0x50 0x21 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM may render your memory USELESS and make your system UNBOOTABLE! I will write to device file /dev/i2c-0, chip address 0x50, data address 0x50, data 0x21, mode byte. Continue? [y/N] y Warning - readback failed
root@test:~# i2cdump 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.?
10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*?
20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.?
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h
40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6
50: 21 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 !23-B3S.........
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................root@test:~# i2cset 0 0x50 0x50 0x00 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM may render your memory USELESS and make your system UNBOOTABLE! I will write to device file /dev/i2c-0, chip address 0x50, data address 0x50, data 0x00, mode byte. Continue? [y/N] y Warning - readback failed
root@test:~# i2cdump 0 0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x50, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.?
10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*?
20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.?
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h
40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6
50: 00 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 .23-B3S.........
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................Thanks,
Chris
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Chris,
Quoted 41 lines · Chris Cole
Hey all, I found the i2c-tools and lm-sensors packages today...great stuff! I had a question about using i2cset properly. I'm trying to set the value of a digital potentiometer (maxim 5434L) over the i2cbus, and I can tell by using i2cdump that it's setting the register value properly...but I keep getting "Warning - readback failed" after i use i2cset. Here's the output of what I'm trying to do:
ccole@test:~$ sudo modprobe scx200_acb ccole@test:~$ sudo modprobe i2c-dev ccole@test:~$ sudo su - root@test:~# i2cdetect -l i2c-0 smbus CS5536 ACB0 SMBus adapterroot@test:~# i2cdetect 0 WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0. I will probe address range 0x03-0x77. Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- root@test:~# i2cdump 0 0x50 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x50, mode byte Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 7f 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 ?23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Quoted 8 lines
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
This is the SPD EEPROM of your memory module (512 MB of PC2700 DDR SDRAM according to decode-dimms.) This is not your digital potentiometer.
Quoted 6 lines
root@test:~# i2cset 0 0x50 0x50 0x21 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM may render your memory USELESS and make your system UNBOOTABLE!
As the warning says, you REALLY shouldn't do this!
Quoted 52 lines
I will write to device file
/dev/i2c-0, chip address0x50, data address0x50, data0x21, mode byte.
Continue? [y/N] y
Warning - readback failedroot@test:~# i2cdump 0 0x50 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x50, mode byte Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 21 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 !23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................root@test:~# i2cset 0 0x50 0x50 0x00 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM may render your memory USELESS and make your system UNBOOTABLE! I will write to device file /dev/i2c-0, chip address 0x50, data address 0x50, data 0x00, mode byte. Continue? [y/N] y Warning - readback failedroot@test:~# i2cdump 0 0x50 No size specified (using byte-data access) WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file /dev/i2c-0, address 0x50, mode byte Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 00 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 .23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Quoted 8 lines
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
You are very lucky that you didn't write to a byte location < 0x40, that would have broken the checksum and you would no longer be able to boot your system.
I encourage you to restore the value of byte 0x50 to what it originally was and never ever again touch this SPD EEPROM.
The "readback failed" warning is presumably because it takes some time to the EEPROM to write the new data and in the meantime you can't read from it.
The MAX5434L has I2C address 0x28 or 0x29. It doesn't show on i2cdetect. Check whether it's properly soldered. If it is, try i2cget instead of i2cdetect, maybe the Maxim chip doesn't like the probes i2cdetect does.
Signature · 1 line
Jean Delvare
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines
You are very lucky that you didn't write to a byte location <
0x40, that would have broken the checksum and you would no longer be able to boot your system.I encourage you to restore the value of byte
0x50to what it originally was and never ever again touch this SPD EEPROM.
Quoted 9 lines
The "readback failed" warning is presumably because it takes some time to the EEPROM to write the new data and in the meantime you can't read from it.
The MAX5434L has I2C address
0x28or0x29. It doesn't show on i2cdetect. Check whether it's properly soldered. If it is, try i2cget instead of i2cdetect, maybe the Maxim chip doesn't like the probes i2cdetect does.
Ok, I think we were getting confused about the MAX45434L data sheet addressing and thought the address of 0x50 corresponded to the chip. I now see that the address should be 0x28, however I know it's soldered properly and I still can't see it with i2cget...am I dead in the water or is there possibly another way to approach this?
Thanks,
Chris
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Chris Cole
Quoted 7 lines
You are very lucky that you didn't write to a byte location <
0x40, that would have broken the checksum and you would no longer be able to boot your system.I encourage you to restore the value of byte
0x50to what it originally was and never ever again touch this SPD EEPROM.Quoted 9 lines
The "readback failed" warning is presumably because it takes some time to the EEPROM to write the new data and in the meantime you can't read from it.
The MAX5434L has I2C address
0x28or0x29. It doesn't show on i2cdetect. Check whether it's properly soldered. If it is, try i2cget instead of i2cdetect, maybe the Maxim chip doesn't like the probes i2cdetect does.
Quoted 5 lines
Ok, I think we were getting confused about the MAX45434L data sheet addressing and thought the address of
0x50corresponded to the chip. I now see that the address should be0x28, however I know it's soldered properly and I still can't see it with i2cget...am I dead in the water or is there possibly another way to approach this?
You clearly have to solve your hardware problem first, and for that there's nothing I can do. Maybe try another chip sample, or try on another system.
Signature · 1 line
Jean Delvare
Quoted 135 lines · Jean Delvare
Hi Chris,
Quoted 41 lines · Chris Cole
Hey all, I found the i2c-tools and lm-sensors packages today...great stuff! I had a question about using i2cset properly. I'm trying to set the value of a digital potentiometer (maxim 5434L) over the i2cbus, and I can tell by using i2cdump that it's setting the register value properly...but I keep getting "Warning - readback failed" after i use i2cset. Here's the output of what I'm trying to do:
ccole <at> test:~$ sudo modprobe
scx200_acb
ccole <at> test:~$ sudo modprobe i2c-dev
ccole <at> test:~$ sudo su -
root <at> test:~# i2cdetect -l
i2c-0 smbus CS5536 ACB0 SMBus adapterroot <at> test:~# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file/dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root <at> test:~# i2cdump 00x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file/dev/i2c-0, address0x50, mode byte Continue? [Y/n] y0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 7f 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 ?23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................Quoted 8 lines
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................This is the SPD EEPROM of your memory module (512 MB of PC2700 DDR SDRAM according to decode-dimms.) This is not your digital potentiometer.
Quoted 6 lines
root <at> test:~# i2cset 0
0x500x500x21
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM
may render your memory USELESS and make your system UNBOOTABLE!As the warning says, you REALLY shouldn't do this!
Quoted 52 lines
I will write to device file
/dev/i2c-0, chip address0x50, data address0x50, data0x21, mode byte.
Continue? [y/N] y
Warning - readback failedroot <at> test:~# i2cdump 0
0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file/dev/i2c-0, address0x50, mode byte Continue? [Y/n] y0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 21 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 !23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................root <at> test:~# i2cset 0
0x500x500x00
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! DANGEROUS! Writing to a serial EEPROM on a memory DIMM
may render your memory USELESS and make your system UNBOOTABLE! I will write to device file/dev/i2c-0, chip address0x50, data address0x50, data0x00, mode byte.
Continue? [y/N] y
Warning - readback failedroot <at> test:~# i2cdump 0
0x50
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse! I will probe file/dev/i2c-0, address0x50, mode byte Continue? [Y/n] y0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef 00: 80 08 07 0d 0b 01 40 00 04 60 70 00 82 08 00 01 ??????@.?`p.??.? 10: 0e 04 0c 01 02 20 c0 75 70 00 00 48 30 48 2a 80 ????? ?up..H0H*? 20: 80 80 45 45 00 00 00 00 00 3c 48 30 2d 55 00 01 ??EE.....<H0-U.? 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 68 ..............?h 40: 7f 7f 7f 7f 7f ba 00 00 00 56 4c 34 37 30 4c 36 ??????...VL470L6 50: 00 32 33 2d 42 33 53 00 00 00 00 00 00 00 00 00 .23-B3S......... 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................Quoted 8 lines
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................You are very lucky that you didn't write to a byte location <
0x40, that would have broken the checksum and you would no longer be able to boot your system.I encourage you to restore the value of byte
0x50to what it originally was and never ever again touch this SPD EEPROM.
Quoted 9 lines
The "readback failed" warning is presumably because it takes some time to the EEPROM to write the new data and in the meantime you can't read from it.
The MAX5434L has I2C address
0x28or0x29. It doesn't show on i2cdetect. Check whether it's properly soldered. If it is, try i2cget instead of i2cdetect, maybe the Maxim chip doesn't like the probes i2cdetect does.
Hi, Jean
I have the same problem than Chris. I am working with an ALIX motherboard with voyage linux distribution and I have connected a 24LC64 eeprom. When I try to write the epprom with i2cset command it doesn't work.
I am sure that the address of the eeprom is 0x51 because if I change it i2cdetect shows me it in the new address (the first test I did it was in the 0x50 address, then I changed it to 0x51).
I loaded i2c-dev and i2c-core modules.
voyage:~# i2cdetect -l
i2c-0 smbus CS5536 ACB0 SMBus adapter
voyage:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
voyage:~# i2cdump -y 0 0x51
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................As you see the eeprom is empty. The first thing I don't understand is why i2cdump shows only 256 bytes and not all the eeprom (64K).
If I try to write it doesn't complain, but when I dump the memory again nothing changed.
voyage:~# i2cset -y 0 0x51 0x01 0xaa
voyage:~# i2cdump -y 0 0x51
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................The only way I see a change is writing in data address 0 with c mode, then in the next dump I see 00 in 0x00 address.. BUT if I repeat the dump it prints ff again!
voyage:~# i2cset -y 0 0x51 0 c
voyage:~# i2cdump -y 0 0x51
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
voyage:~# i2cdump -y 0 0x51
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................I have tried this with two different chips, the result was exactly the same.
Any idea? Any help will be apreciated!
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Javi,
Quoted 1 line · Javi
I have the same problem than Chris.
Actually I suspect this is a different problem.
Quoted 3 lines
I am working with an ALIX motherboard with
voyage linux distribution and I have connected a 24LC64 eeprom. When I try to write the epprom with i2cset command it doesn't work.
Because the 24LC64 uses a two-byte addressing model, while SMBus uses a one-byte addressing model. This means you can't use this type of EEPROM with an SMBus controller [1]. You need a full-featured I2C controller. You may be able to achieve that on your system by using the scx200_i2c driver instead of scx200_acb driver, or by using an extra pair of GPIO pins with i2c-gpio.
If this isn't an option for you then you'll have to use a different EEPROM model. AFAIK the 24C16 is the largest one using single-byte addressing (it uses all 8 I2C addresses 0x50-0x57, and 256 * 8 * 8 = 16K.)
Note that you can't use i2cdump, i2cget and i2cset with 2-byte addressed EEPROMs. You'll have to try the dedicated tools under eepromer in the i2c-tools package [2]. For 2-byte addressed EEPROMs you want either eeprog or eepromer. I seem to recall eeprog implements the tricks described below for 2-byte addressed EEPROMs over SMBus.
[1] Actually you can write to such an EEPROM by abusing SMBus write transactions. All you have to do is pass the second address byte as the first data byte of either an SMBus write word transaction or, if your SMBus controller supports it, an I2C block write transaction. Then shift all data bytes by one position. For reads, you could use an SMBus write byte transaction to set the address and then SMBus receive byte transactions in a loop to retrieve the data bytes one by one. However this is racy and slow.
[2] Note that the primary hosting site for i2c-tools is currently down, you can use my mirror if needed:
http://khali.linux-fr.org/mirror/i2c-tools/
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/wishlist.html