i.mx6 i2c eeprom(fm24w256)read&write don't right

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx6 i2c eeprom(fm24w256)read&write don't right

1,108 Views
blackhuang
Contributor I

dear nxp fae:

          I use android6.0 kernel 4.1.15

Using i2c to mount the fm24w256 kernel without the driver, search data found similar to AT24C256.AT24 driver is used in the kernel.

Configure DTS according to the circuit diagram and manual below

eeprom@50 {
compatible = "at,24c256";
reg = <0x50>;
};This node is mounted under i2c2, and later changes to i2c1 still have no effect
logo:at24 2-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
The following problems were found when using i2c-tools test.
This eeprom was previously data-enabled, burned through other systems, readable, and writable
root@sabresd_6dq:/ # i2cdump -f -y 1 0x50
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: 51 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Q...............
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 ................
Only the first position of the data being viewed is correct.
No error is reported through i2cset-y-f 2 0x50 0x11 0x22, but it is still 0xff through i2cget.

Question 1: can cypress fm24w256 use at24 driver?If not, where do you need to change it?

Question 2: can I read and write the eeprom correctly with i2c tools?I2cset is set to 16bit.However, the eeprom is 8bit in use.How do you test it?

The project is very urgent, I hope to get your help as soon as possible, I will be very grateful !!!!
Labels (1)
0 Kudos
1 Reply

944 Views
igorpadykov
NXP Employee
NXP Employee

Hi black

one can check i2c address selection and try to debug driver with oscilloscope,

pay attention to "i2c_device_id at24_ids[]" :

at24.c\eeprom\misc\drivers - linux-imx - i.MX Linux kernel 

also may be useful

F-RAM Support under Linux – KBA223028 | Cypress Developer Community 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos