Jump to content

Recommended Posts

Posted (edited)

This is a reply to treii28's post from 2023: 

 

To enable i2c on PH4 and PH5 pins, one would have to have to following lines in /boot/armbianEnv.txt files:

Quote

overlay_prefix=sun50i-h616
overlays=i2c3-ph

 

Reboot and see the new devices with:

Quote

ls /dev/i2c*

 

Scan for all the connected i2c devices:

Quote

 

sudo apt install i2c-tools

i2cdetect -y 2

 

 

All relevant (and some extra) overlays can be seen with the following command:

Quote

ls /boot/dtb/allwinner/overlay/sun50i-h616*

 

To see the configuration one could disassemble the dtb binary file and search it's contents for i2c3-ph

Quote

 

cd /boot/dtb/allwinner

dtc -I dtb -O dts sun50i-h618-orangepi-zero3.dtb > opz3.dts

 

 

Whenever making changes it would be the best to connect a serial monitor to the physical serial pins (3 separate pins labeled with UART and GND, RX, TX) to see kernel output at boot (115200 baud rate). The kernel log would have a line for loading the dtbo (or maybe an error for missing file:

Quote

Applying kernel provided DT overlay sun50i-h616-i2c3-ph.dtbo

 

For easier reference there are included lsmod output, kernel config and dts files from an armbian and the opiz version for "original" debian image (distributed by a sketchy Google drive link, it runs an unnecessary service with weird software repositories enabled by default).

 

lsmod-armbian lsmod-opiz kernel-armbian.config kernel-opiz.config opz3-armbian.dts opiz3-opiz.dts

Edited by mpl

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines