Jump to content

Recommended Posts

Posted

I'm porting this code and my OLED animation to Armbian. It runs rather slow at 100Khz I2C speed. Has anyone found a way to easily change the I2C speed on Mainline kernel Armbian without doing a custom build?

Posted
3 minutes ago, Larry Bank said:

Sorry for being thick, but exactly what does that entail? Just adding a "param" line to armbianEnv.txt?

No. If you are using, for example, a H3 based device, a recent enough Armbian image and want to change frequency of the I2C controller 1, you need to install kernel headers, create a file (i.e. "i2c1-change-frequency.dts")

/dts-v1/;
/plugin/;

/ {
	compatible = "allwinner,sun8i-h3";

	fragment@0 {
		target = <&i2c1>;
		__overlay__ {
			clock-frequency = <200000>;
		};
	};
};

and add it via "armbian-add-overlay"

 

Or for testing purposes just decompile, change and recompile the DT in /boot/dtb using dtc. Since there will be no node labels you'll have to check the original DT for node names, i.e. I2C 1 node would be named "i2c@1c2b000".

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines