hii
i am using 2.6.35.3 kernel in ltib but when i want used the i2c device its like rtc and tcp ip its producing "Failed writing to the I2C-bus: Connection timed out "
example:
[root@alarm i2c]# ./i2c-tool -w 0 0x48 4 0x02 0xA0 0x40 0x03 | |
SLAVE ADDRESS: 0x48 | |
NUMBER OF BYTES TO WRITE: 4 | |
MEMORY ALLOCATED AT ADDRESS: 0x12008 | |
/dev/i2c-0 OPENDED! | |
Failed writing to the I2C-bus: Connection timed out | |
Thanks®ard
pramod kumar
Hi Pramod
before writing, file /dev/i2c-0 should be created manually, please look
at correct procedure below
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hii igorpadykov
Thanks for that ..i have followed all process also uesd I2C-tool but when run this command it s producing this ..and i am working on imx233 board
plz tell me how to solve this problem
root@freescale /home$ i2cdetect -l
i2c-0 i2c MXS I2C adapter I2C adapter
root@freescale /home$ 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: -- -- -- -- -- -- -- -- -- -- -- -- --hw_i2c_dma_setup_read
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: ��-- hw_i2c_dma_setup_read��-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- hw_i2c_dma_setup_read-- -- -- -- -- --
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
-- hw_i2c_dma_setup_read
--
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
....................................................................................................................................................................................................................
root@freescale /home$ i2cdump 0 0x6a
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 0x6a, mode byte
Continue? [Y/n] y
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
XX XX XX XX X� XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
20: XX XX XX XX XX XX XX XX XX XX .�Minicom2.5XX XX XX XX XX | XXXXXXXXXXXXXXXX |
30: XX XX XX XX XX XX XX .�Minicom2.5X XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
50: XX XX .�Minicom2.5XX XX XX XX XX XX XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
60: XX XX XX XX XX XX XX XX XX XX XX .�Minicom2.5XX XX XX XX | XXXXXXXXXXXXXXXX |
70: XX X�Minicom2.5XX XX XX XX XX XX XX XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
80: XX .�Minicom2.5XX XX XX XX XX XX .�Minicom2.5XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
90: XX XX XX XX X�Minicom2.5XX XX XX XX XX XX XX XX XX XX XX | XXXXXXXXXXXXXXXX |
a0: XX .�Minicom2.5XX XX XX XX .�Minicom2.5XX XX .�Minicom2.5.�Minicom2.5XX XX XX XX ....XXXXXXXXXXXXXXXX
b0: Minicom2.5XX XX XX XX XX .�Minicom2.5XX XX XX XX XX
......................................................................................................................................................................................................................
root@freescale /home$ i2cset 0 0x6a 01 0x0008 w
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will write to device file /dev/i2c-0, chip address 0x6a, data address
0x01, data 0x08, mode word.
Continue? [Y/n] y
Error: Write failed
Hi Pramod
please try latest official i.MX23 EVK Linux BSP release
L2.6.31_10.05.00_SDK_SOURCE : Linux 2.6.31 Source Code Files 2010.05 Release.
~igor
Hi Pramod,
I suggest you to use kernel 4.1 with and apply the following patch:
It will be part of 4.2 kernel, but you can apply it manually and I2C will work. Then you can add the dts entry in the imx23-olinuxino device tree file.
Regards,
Fabio Estevam
And here is the patch that adds i2c to the olinuxino board:
Hi Pramod
if you are using successfully imx233-olimax kernel,
then seems your board is based on olimax board.
Suggested Linux BSP release was developed for i.MX23 EVK,
not for olimax board. I would suggest to post this to
~igor