Hi Toradex,
I’m continuing to develop on my AM62 Som + Mallow board + Custom board.
After successfully connect to the pca gpio expander, I try now to communicate with my two ADC Microchip MCP3428 via i2c.
Unlike pca9575, the kernel module is not in ‘Yes’ by default but in ‘m’. So I need to enable the module at run time. I can see my two adc on port i2c3 at adress 0x68 and 0x6c with i2cdetect.
After using insmod to enable the module, the two devices are not UU but still appearing with their adress in i2cdetect.
So how to let the systeme pointing to the right driver please ?
My dts are written in the way, via the compatible command. But as the module is loaded after boot and may be after overlay operation, may be I would need to reload something ?
The own difference i can see with docuemntation example mcp6050 and my pca is that the kernel module is enable by me in the user space.
Here the step followed and my dts:
cd tcbdir
source tcb-env
rm -r torizon-core-docker-verdin-am62-Tezi_6.7.0-devel-202406+build.24.CUSTOM/
torizoncore-builder build
torizoncore-builder images unpack torizon-core-docker-verdin-am62-Tezi_6.7.0-devel-202406+build.24.CUSTOM/
torizoncore-builder deploy --remote-host 192.168.0.132 --remote-username torizon --remote-password flo --reboot
sudo insmod /lib/modules/6.1.80-6.7.0-devel+git.79fe3839eaae/kernel/drivers/iio/adc/mcp3422.ko
i2cdetect -r -y 3
I can see my two mcp3422 ADC in 0x68 and 0x6c, but no UU to mention that driver is ready to be used.
My dts content:
/dts-v1/;
/plugin/;#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>/ {
compatible = “toradex,verdin-am62”;
};
/* Verdin I2C_1 */
&main_i2c1 {
pca9575@20{
status = “okay”;
compatible= “nxp,pca9575”;
reg = <0x20>;
gpio-controller;
#gpio-cells = <2>;
};
};/* Verdin I2C_3 */
&main_i2c3 {
adc@68 {
compatible = “microchip,mcp3428”;
reg = <0x68>;
};
};
readlink /sys/bus/i2c/devices/4-0068
…/…/…/devices/platform/bus@f0000/20030000.i2c/i2c-4/4-0068
I also wonder for production how to automate the insmod.
Should I rebuild my own os with the CONFIG option to ’ yes’ may be?
Thank you !