Request to Change the Default Kernel Configuration for Torizon OS

Hello, Torizon Support Team.

Background:
We are currently designing a carrier board for the i.MX95 Verdin SOM. The OS will be Torizon OS.
The carrier board will feature an 8-channel or 16-channel RS485 interface and a 20-channel digital temperature sensor interface.
We plan to use the following ICs for these interfaces:

  • RS485: MAXLINEAR XR17V358
  • Temperature Sensor: ADI LT2983

Request:
We plan to use Torizon OS, but this will require changes to the Torizon OS kernel configuration.

With the default Torizon kernel configuration, is it possible to have the following two options enabled by default?

The changes to the kernel configuration are as follows:

  1. For XR17V358 support

Already integrated into the Linux kernel.

For some reason, the kernel configuration in Torizon OS is limited to a maximum of 6 channels, so this needs to be changed to 8 or 16 channels.

  1. For LT2983 support

https://developer.analog.com/docs/linux/drivers/iio-temperature/ltc2983.html

This is disabled by default in the Torizon kernel.

Change this setting to enabled.

Best Regards,

Kanou

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Thank you for your detailed request regarding kernel configuration changes for Torizon OS on the Verdin iMX95.

Kernel Configuration Modifications for Your Use Case

For your carrier board design with the XR17V358 RS485 interface and LT2983 temperature sensor, you have two approaches:

Option 1: Request Inclusion in Default Torizon OS (Recommended for Your Case)

If the kernel modules you need don’t negatively impact Torizon OS, Toradex may include them in future releases. You can make a request in the Toradex Community(1).

Based on the Torizon OS 6.4.0 release notes, Toradex has a history of enabling additional kernel modules by request. For example, they enabled support for various sensors and devices as modules(2):

  • MAX31855 thermocouple
  • Linear Technology LTC1660 and LTC1665 DACs
  • NTC thermistor sensors
  • SHT40 humidity sensor
  • Texas Instruments PCM1681 CODEC
  • Vishay Semiconductor VEML6030 Ambient Light Sensor

Option 2: Build Custom Kernel Modules with TorizonCore Builder

While TorizonCore Builder supports building external kernel modules(1), it has limitations:

TorizonCore Builder does NOT support:

  • Modifying the kernel source code
  • Adding in-tree kernel modules
  • Customizing kernel configuration options directly(1)

Since both the XR17V358 driver configuration (SERIAL_8250_NR_UARTS and SERIAL_8250_RUNTIME_UARTS) and LT2983 driver (CONFIG_SENSORS_LTC2983) are in-tree kernel options, you cannot enable or modify these directly using TorizonCore Builder(1).

Recommended Path Forward

  1. Submit a community request for enabling:

    • CONFIG_SENSORS_LTC2983=m (as a module)
    • Increased SERIAL_8250_NR_UARTS and SERIAL_8250_RUNTIME_UARTS values (to 16 or higher)
  2. Alternative: If you need immediate customization beyond TorizonCore Builder’s capabilities, you would need to use the Yocto Project to build a fully custom Torizon OS image with your required kernel configuration changes.

I recommend starting with a community request, as Toradex has demonstrated willingness to include additional kernel modules when they don’t negatively impact the platform.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Dear @mamoru_kanou , thanks for your request. This has been captured and escalate.

Give us some time to evaluate the implementation feasibility and impact of your request. I hope I can get back to you soon with positive news.

Thank you for your patience.

Kind regards,
Alvaro.

Hi @mamoru_kanou , CONFIG_LTC2983 is a tristate option, but it depends on CONFIG_IIO and CONFIG_SPI, so it can’t be set to a higher value than either of them.

In our Torizon default kernel config, CONFIG_SPI is Y while CONFIG_IIO is M. This limits CONFIG_LTC2983 to M, so it would be built as a kernel module, not as a built-in driver. Making CONFIG_LTC2983 to Y would require changing CONFIG_IIO to Y as well, which has a bigger impact than just adding the LTC2983 kernel module.

The i.MX SPI controller drivers are built as modules in the default config, so even a built-in LTC2983 driver could only probe once those modules are loaded from the rootfs. In practice, it wouldn’t be available any earlier.

Would adding LTC2983 as a kernel module in the Torizon default configuration work for you? The end result should be the same as long as you don’t need the driver in the early stages of the Linux boot, and the smaller the change, the faster it can be implemented and the fewer reasons there are to reject it.

Thanks!
Alvaro.

Hi @alvaro.tx ,

Thank you for the explanation.

Your suggestion is fine.
It is OK to use the LT2983 driver as a kernel module rather than a static driver.

Thanks,

kanou

Hi @mamoru_kanou,

Here is an update on the kernel configuration request for the Verdin iMX95 (XR17V358 and LTC2983).

Our R&D team has implemented the change, and it is now under review:

  • CONFIG_SERIAL_8250_NR_UARTS=16: raises the maximum number of 8250 UART ports supported by the kernel to 16, which covers the XR17V358 with the 16-port expansion.
  • CONFIG_LTC2983=m: enables the LTC2983 driver as a kernel module. It loads automatically when the LTC2983 node is present in the device tree (through your overlay).

We intentionally left CONFIG_SERIAL_8250_RUNTIME_UARTS unchanged. That option sets how many ttyS ports are registered by default at boot, and changing it would add extra ttyS device nodes on every device running Torizon OS. Instead, you can enable the 16 ports on your devices with the kernel argument 8250.nr_uarts=16, which is easy to add with TorizonCore Builder (procedure below).

Once the change is merged, it will be included in upcoming Torizon OS builds. I recommend checking again the config for the nightly builds in around 1 week to see if the change has been implemented.

Please note that the kernel argument only takes full effect on an image that includes this change, because 8250.nr_uarts cannot exceed CONFIG_SERIAL_8250_NR_UARTS.

Procedure: adding 8250.nr_uarts=16 with TorizonCore Builder

Option A: tcbuild.yaml (recommended for production and CI)

Add the kernel argument to the customization section of your tcbuild.yaml. If you already have one (for example, for device tree overlays), add the kernel block to it:

yaml

customization:
  kernel:
    arguments:
      - 8250.nr_uarts=16

Then build the image as usual:

$ torizoncore-builder build

Option B: standalone commands (useful during development)

$ torizoncore-builder images unpack <torizon-os-image>.tar
$ torizoncore-builder kernel set_custom_args "8250.nr_uarts=16"
$ torizoncore-builder kernel get_custom_args
$ torizoncore-builder union custom-branch
$ torizoncore-builder deploy custom-branch --remote-host <board-ip> --remote-username torizon --remote-password <password> --reboot

To generate a Toradex Easy Installer image instead of deploying over SSH, use deploy custom-branch --output-directory <output-dir>.

Note that kernel set_custom_args replaces any custom arguments set previously, so if you already use other kernel arguments, pass all of them in the same command. On Torizon OS 7.5.0 and later, custom kernel arguments are stored separately from device tree overlays, so overlay commands (dto apply/dto remove) will not affect them.

Verification on the device

# cat /proc/cmdline | grep -o "8250.nr_uarts=[0-9]*"
# cat /sys/module/8250/parameters/nr_uarts      # expected: 16
# dmesg | grep -i ttyS                          # XR17V358 ports registered
# lsmod | grep ltc2983                          # after applying the LTC2983 overlay
# ls /sys/bus/iio/devices/

Reference: Customizing Kernel Arguments in Torizon

Please let me know if you have any questions.

Thanks!
Alvaro

Hi @mamoru_kanou , I have received confirmation from the Torizon team that the successfully built nightlies starting from the 19th of November, will include this change.

Thank you as always for your patience.

Alvaro san,

Thank you for letting us know.
We will close this thread for now.
We look forward to your continued support.

Regards,

Kanou