I need to use the clock driver from COMMON_CLK_SI5341. Is this something that can be enabled in the Torizon kernel, or do I need to build my own?
Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
I’d be glad to help with the SI5341 clock driver! To provide you with the most accurate guidance, could you let me know:
- Which hardware are you using? (e.g., Verdin i.MX8M Plus, Verdin AM62, Apalis i.MX8QP, Colibri i.MX8X)
- Which OS and version are you running? (e.g., Torizon OS 6, Torizon OS 7.2.0-build.13, BSP 7)
You can get detailed information about your system by running the tdx-info command on your device. More details are available at: Getting Device Information with Tdx-Info | Toradex Developer Center
Checking Driver Availability
Once I know your platform, I can help you check if the SI5341 driver is available. Similar to other kernel modules, you can check if COMMON_CLK_SI5341 is available in your current Torizon OS by running(1):
# zcat /proc/config.gz | grep SI5341
Available Options
Based on the documentation, if the driver isn’t available by default, you have several options(2):
- Request inclusion: Ask Toradex to include it by default in future releases
- External kernel module: Add it as an external kernel module via TorizonCore Builder(3)
- Custom Yocto build: Build your own Torizon OS image with the driver enabled
The TorizonCore Builder approach for external kernel modules is well-documented and allows you to build kernel modules from source and deploy them to your Torizon OS system(3).
Common platforms include:
- Hardware: Verdin i.MX8M Plus, Verdin AM62, Aquila AM69, Apalis i.MX8QP, Colibri i.MX8X
- OS: Torizon OS 6, Torizon OS 7.2.0-build.13, BSP 7, BSP 6
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Verdin i.MX8M Plus And Torizon 7
Check Driver Availability First
For the Verdin iMX8M Plus with Torizon OS 7, first check if the COMMON_CLK_SI5341 driver is already available in your current kernel configuration(1):
# zcat /proc/config.gz | grep SI5341
If the configuration shows CONFIG_COMMON_CLK_SI5341=m, then the driver is available as a Loadable Kernel Module (LKM) and you can activate it using a Device Tree Overlay(1).
If Driver is Not Available
If the driver is not available in your current Torizon OS 7 image, you have several options:
Option 1: Build External Kernel Module
Follow the instructions in the Building External Kernel Modules With Torizon article to add the SI5341 driver as an external module(1).
Option 2: Custom Torizon OS Image
You can build a custom Torizon OS image with the driver enabled. For the Verdin iMX8M Plus, you would need to clone the appropriate kernel source(2):
git clone -b toradex_6.6-2.2.x-imx git://git.toradex.com/linux-toradex.git linux
Then customize the kernel configuration to include CONFIG_COMMON_CLK_SI5341=m and build your custom image.
Device Tree Integration
Once the driver is available, you’ll need to create a Device Tree Overlay to configure the SI5341 clock generator on your I2C bus. The process is similar to other I2C devices - you’ll need to identify the correct I2C bus and create an overlay that configures the si5341 node(1).
For the Verdin iMX8M Plus, you can use the general-purpose I2C buses like I2C4 (accessible via verdin-i2c1)(1).
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Greetings @kdubious,
Just to confirm, since you marked the AI’s response as a solution. Which option forward are you going with?
Best Regards,
Jeremias
I ended up in a spot where patching the driver was a valid patch forward for me. At that point, it seemed best just to pull the driver code out, edit it as I needed, and build that as a module.
patching the driver
If your use-case requires the patching of this existing driver, then this makes sense. Thanks for confirming just wanted to understand what solution you ended up going with.
Best Regards,
Jeremias