I’m testing Colibri iMX6ULL 512MB IT with Aster Carrier Board with a C/C++ project.
The I2c works fine but I need to change speed from 100Khz to 400Khz.
How can I do this ?
Device tree is the only solution ?
I’m testing Colibri iMX6ULL 512MB IT with Aster Carrier Board with a C/C++ project.
The I2c works fine but I need to change speed from 100Khz to 400Khz.
How can I do this ?
Device tree is the only solution ?
Yes you need to adjust a clock-frequency property for desired I2C channel
Hello @Massimo,
As @alex.tx said, you need to modify the device tree for this.
Before I can help you further, could you please send me the output of tdx-info command (more info here) from which you can get all the hardware and software information?
The cleanest way to add modifications to the device tree would be using a device tree overlay file so that you don’t have to mess up with the original device tree file. After you write the overlay file you just need to build it and deploy it on to the module. This process depends on what OS you have installed on the module - whether it is a Yocto reference image or TorizonCore. Obviously, Torizon makes the whole workflow a lot simpler compared to building the device tree files from the source. Here you will find more details about writing, building, and deploying device tree overlays for TorizonCore using our TorizonCore Builder tool. On the other hand, if you are using one of our Yocto-based reference images, you may find more information here.
On this page, you will also find some more information regarding deploying the overlays and also an example of how an overlay file should look like.
Please let us know if these links could get you started and also feel free to ask if you have more questions
Hello Rudhi,
this is the tdx-info output:
root@colibri-imx6ull-14926715:~# tdx-info
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.1.22-6.2.0+git.3b29299e5f60 #1 SMP Thu Mar 30 10:49:31 UTC 2023
Kernel command line: user_debug=30 ubi.mtd=ubi root=ubi0:rootfs rw rootfstype=ubifs ubi.fm_autoconvert=1 console=tty1 console=ttymxc0,115200n8 consoleblank=0 video=mxsfb:640x480M-16@60
Distro name: NAME="TDX Wayland with XWayland Upstream"
Distro version: VERSION_ID=6.2.0-build.6
Hostname: colibri-imx6ull-14926715
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Colibri iMX6ULL 256/512MB on Colibri Evaluation Board V3
Toradex version: 0044 V1.1A
Serial number: 14926715
Processor arch: armv7l
------------------------------------------------------------
root@colibri-imx6ull-14926715:~# tdx-info -dt
Device tree
------------------------------------------------------------
Device tree enabled: -
Compatible string: toradex,colibri-imx6ull-evalfsl,imx6ull
Device trees available: -
------------------------------------------------------------
Device tree overlays
------------------------------------------------------------
Overlays enabled: -
Overlays available: -
------------------------------------------------------------
Hello @Massimo,
Thanks for your answer.
I just noticed that you are using the Colibri iMX6ULL module with NAND flash memory. The NAND modules do not support device tree overlays.
For the iMX6ULL, the device tree is stored in an ubifs
partition. So the solution would be to modify the device tree directly, then compile it to a dtb and then update the ubi volume. This is documented here.
Here is an article on how to modify the device tree itself.
I hope that helps.
Hello @Massimo,
Hope you are doing well! Do you have any updates on this topic?
Hi @rudhi.tx,
I have some doubts about dtb.
I create my custom imx6ull-colibri-elsist-slimline.dtb using this command:
make DTC_FLAGS=“-@” imx6ull-colibri-elsist-slimline.dtb
from the dir where I installed the linux kernel (git clone -b v6.1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git) like explained here Build Linux Kernel from Source Code | Toradex Developer Center.
The imx6ull-colibri-elsist-slimline.dtb is a copy of imx6ull-colibri-aster.dts placed in arch/arm/boot/dts/ dir where I add:
&i2c1 {r
clock-frequency = <400000>;
};
I load the dtb on Colibri, writing it with:
ubiupdatevol /dev/ubi0_1 ./imx6ull-colibri-elsist-slimline.dtb
I reboot: the monitor doesn’t show nothing but the frequency of /dev/i2c0 was correctly changed to about 400khz.
Where can I find the dtb to use to show the display again ?
Which dts and dti I must use to show the display ?
Where to download the image “Toradex Embedded Linux Reference Multimedia Image (UPSTREAM) 6.2.0+build.6” I flashed with EasyInstaller ?
Thanks
Hello @Massimo,
I reboot: the monitor doesn’t show nothing
What type of display are you using?
Where can I find the dtb to use to show the display again?
Which dts and dti I must use to show the display ?
Was the display working before you applied the custom device trees?
Where to download the image “Toradex Embedded Linux Reference Multimedia Image (UPSTREAM) 6.2.0+build.6” I flashed with EasyInstaller ?
You can find this image on our artifactory: https://artifacts.toradex.com/ui/repos/tree/General/oe-release%2Fkirkstone-6.x.y%2Frele[…]Reference-Multimedia-Image-upstream-Tezi_6.2.0+build.6.tar
Hello @rudhi.tx,
I’m using a VGA display and it is visible before loading the dtb I created.
Please verify if the dts and dtsi that I used and I cloned with:
git clone -b v6.1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
are correct. Maybe I must clone from another place ?
The artifactory link you suggest, is unreachable.
I found images here Toradex Download Links (Torizon, Linux BSP, WinCE and Partner Demos) but I can’t find the “Toradex Embedded Linux Reference Multimedia Image (UPSTREAM) 6.2.0+build.6”.
Hello @Massimo,
Please verify if the dts and dtsi that I used and I cloned with:
git clone -b v6.1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
are correct. Maybe I must clone from another place ?
Could you please attach your custom dts
and dtsi
files here so that I could take a look?
The Linux kernel that you have cloned into looks correct to me since you are on the upstream branch.
The artifactory link you suggest, is unreachable.
Sorry, the link that I posted was wrong. I have now edited the previous reply with the correct link. Please check if that works for you.
May I also ask why you need this particular build of the image? On the downloads page that you found, you will find our 6.3 images. This should also work just fine for you.