Yes, again, I’m using a different board, so my pins/overlays will be different, but you need to enable the I2C bus you want to use in the device tree, or the kernel doesn’t know it’s there.
The wiring tool should come pre-installed if you’re using one of Libre’s images, and the command ldto list
will tell you what overlays are available for your board.
It’s a bit different than what I get on my board, but it looks like sudo ldto enable i2c1-twi0
should get you up and running on pins 3 and 5, using /dev/i2c-1
. If I’m wrong hopefully someone with and Allwinner board in hand can correct me.
You will need to reapply the overlay after each boot. You can add it permanently by replacing “enable” wit “merge”. Be aware on my board this flips the busses, so the internal use bus becomes i2c-1 and the one I attached my device to becomes i2c-0.
Hope that sheds some light. The Device Tree is a huge topic, so don’t worry if you don’t get it all at once!
EDITS: Corrected spelling, and it’s open on my browser so I may as well link to the pin-maps:
Also corrected overlay as noted below.