DESK-MX8M-L/Peripherals/I2C

From DAVE Developer's Wiki
Jump to: navigation, search
History
Issue Date Notes
2025/08/06 DESK-MX8M-L-4.x.x release


Peripheral I2C[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree modifications to standard DAVE's kit for the ORCA SOM:

From imx8mp-mito8mplus-cb1001.dts:

...
...
/* groove connector */
&i2c6 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c6>;
	status = "okay";
};

and from the imx8mp-mito8mplus.dtsi:

...
...
&iomuxc {
...
...

	pinctrl_i2c6: i2c6grp {
		fsl,pins = <
			MX8MP_IOMUXC_UART4_RXD__I2C6_SCL		0x400001c3
			MX8MP_IOMUXC_UART4_TXD__I2C6_SDA		0x400001c3
		>;
	};

...
...


Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

...
...
[    2.194955] i2c i2c-0: IMX I2C adapter registered
[    2.201041] i2c 1-003c: Fixing up cyclic dependency with 32e40000.csi
[    2.207787] ov5640 1-003c: supply DOVDD not found, using dummy regulator
[    2.214603] ov5640 1-003c: supply AVDD not found, using dummy regulator
[    2.221263] ov5640 1-003c: supply DVDD not found, using dummy regulator
[    2.236233] i2c i2c-1: IMX I2C adapter registered
[    2.242353] i2c 2-003c: Fixing up cyclic dependency with 32e50000.csi
[    2.249107] ov5640 2-003c: supply DOVDD not found, using dummy regulator
[    2.255910] ov5640 2-003c: supply AVDD not found, using dummy regulator
[    2.262574] ov5640 2-003c: supply DVDD not found, using dummy regulator
[    2.286152] i2c i2c-2: IMX I2C adapter registered
[    2.292020] i2c 5-004c: Fixing up cyclic dependency with 32c00000.bus:ldb@32ec005c
[    2.430554] i2c i2c-5: IMX I2C adapter registered
...
...

Usage with i2ctools[edit | edit source]

root@desk-mx8mp:~# i2cdetect -y <i2c bus number>

root@desk-mx8mp:~#

Additional information[edit | edit source]

A good I2C bus tutorial can be found in this video from Bootlin.

For general information, please refer to the I2C tools wiki page