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.

Unable to get i2c connection to work on Orange Pi Zero 2

Featured Replies

I have been trying to get DS3231 to work with the OrangePi Zero 2 via the i2c bus.

I have tried setting the following settings in /boot/armbianEnv.txt

overlay_prefix=sun8i-h6
overlay=i2c0 i2c1 i2c2

However, I am not able to use i2c tools to read the DS3231.


Any suggestions are welcomed. Thank you in advance!

Hi. It's probably a bit late. On OrangePi Zero2 thereis i2c3 interface. Thus you must create your own DT overlay for i2c3 interface. See https://github.com/armbian/sunxi-DT-overlays/blob/master/sun50i-h6/sun50i-h6-i2c2.dts as an example. Let's say you create file sun50i-h6-i2c3.dts:

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun50i-h6";

	fragment@0 {
		target-path = "/aliases";
		__overlay__ {
			i2c3 = "/soc/i2c@5002c00";
		};
	};

	fragment@1 {
		target = <&i2c3>;
		__overlay__ {
			pinctrl-names = "default";
			pinctrl-0 = <&i2c3_ph_pins>;
			status = "okay";
		};
	};
};

 

Compile this file into a binary device-tree overlay blob:

dtc -I dts -O dtb -o sun50i-h6-i2c3.dtbo sun50i-h6-i2c3.dts

 

Set permmissions and copy compiled file into /boot/dtb/allwinner/overlay:

chmod +x ./sun50i-h6-i2c3.dtbo
sudo cp ./sun50i-h6-i2c3.dtbo /boot/dtb/allwinner/overlay


Then use the following in your armbianEnv.txt:

overlay_prefix=sun50i-h6
overlay=i2c3

 

Edited by serg_stetsuk
improved answer

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...

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.