Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

/dev/i2c-2 and /dev/i2c-3 (on UEXT) on A10 Lime

Featured Replies

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 = 1
twi1_scl = port:PB18<2><default><default><default>
twi1_sda = port:PB19<2><default><default><default>

[twi2_para]
twi2_used = 1
twi2_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.

 

 

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.

  • Author

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.

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

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.