scuttleclun Posted November 9, 2016 Share Posted November 9, 2016 Hi, I have installed armbian 5.23 on an olimex A10 lime. After boot I find that the i2c devices on the UEXT interface do not show in /dev. They should be /dev/i2c-2 and /dev/i2c-3 and should be detectable using i2cdetect -y 2 (or 3). I notice that the package linux-jessie-root-lime-a10_5.23_armhf.deb ships the .bin (fex) files that configure the ports on boot. The file /boot/bin/lime-a10.bin and /boot/bin/lime-a10-lcd.bin have definitions for these ports but they are disabled. So for now I make a new .bin file with these ports enabled. Specifically I had to change the file like this (I made a new copy so that apt-get upgrade would not clobber my changes) as user 'root': # cd /boot/bin # bin2fex lime-a10.bin >lime-a10.fex # cp lime-a10.fex lime-a10-i2c.fex # nano lime-a10-i2c.fex then starting on line 121 I made the file look like this: [twi1_para]twi1_used = 1twi1_scl = port:PB18<2><default><default><default>twi1_sda = port:PB19<2><default><default><default>[twi2_para]twi2_used = 1twi2_scl = port:PB20<2><default><default><default>twi2_sda = port:PB21<2><default><default><default> Before the twi1_used = 0 and twi2_used=0 Then convert the file back to a .bin, change the symlink for script.bin and reboot # fex2bin lime-a10-i2c.fex lime-a10-i2c.bin # cd /boot # rm -f script.bin # ln -s bin/lime-a10-i2c.bin script.bin # shutdown -r now Question: Why are these ports disabled on the A10 lime in the .bin file? Can this be changed for future versions? Thank you in advance. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted November 10, 2016 Share Posted November 10, 2016 Why are these ports disabled on the A10 lime in the .bin file? Can this be changed for future versions? Default settings usually lean towards having most available pins as generic GPIO and specific interfaces should be enabled manually by end users if needed. Link to comment Share on other sites More sharing options...
scuttleclun Posted November 10, 2016 Author Share Posted November 10, 2016 Ok, thanks for the info. I wasn't sure if the default way it was set up was 'by design' or not. Hopefully this post will be useful to others who want to use I2C and SPI on the A10 Lime's UEXT connector. Link to comment Share on other sites More sharing options...
zador.blood.stained Posted November 10, 2016 Share Posted November 10, 2016 Ok, thanks for the info. I wasn't sure if the default way it was set up was 'by design' or not. It may be not consistent across all the boards because FEX files come from different board manufacturers or extracted from other images, so default settings may differ. Hopefully this post will be useful to others who want to use I2C and SPI on the A10 Lime's UEXT connector. I hope so Link to comment Share on other sites More sharing options...
Recommended Posts