9A5DLZ Header photo

Enabling I2C3 interface on Orange Pi


To enable I2C3 interface on Orange Pi, follow instructions below:
Create a file sun50i-h6-i2c3.dts with following content:


				

/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 add the following in your armbianEnv.txt which should be in /boot folder:

								
overlay_prefix=sun50i-h6
overlay=i2c3
								
								

Copyright 2024-2025, Mario Matovina
Send me an e-mail