Migrating from dunfell to kirkstone - deviec tree issues

Hi

SOM : Apalis iMX8

We are migrating from dunell to kirkstone (Linux 5.15-2.2.x.). Device tree patches work fine in dunfell but fail on kirikstone.

We modified device tree files to make uart3 work with RTS control. we are using the GPIO IMX8QM_UART0_RTS_B_LSIO_GPIO0_IO22 pin as the RTS control signal. works perfectly fine on dunfell but these changes fail to control RTS or GPIO (out) signal on kirikstone. We make sure that PWM0 is disabled (which uses the same pin)

I am not sure anything else needs to be changed on Linux version 5.15-2.2.x. Any guidance on this will be helpful.

Here is the snapshot of device tree changes

/* Apalis UART3 */
pinctrl_lpuart0: lpuart0grp {
	fsl,pins =
		<IMX8QM_UART0_RX_DMA_UART0_RX				0x06000020>,
		<IMX8QM_UART0_TX_DMA_UART0_TX				0x06000020>,
		<IMX8QM_UART0_RTS_B_LSIO_GPIO0_IO22			0x00000021>;			
};


/* Apalis UART3 */

&lpuart0 {
status = “okay”;
linux,rs485-enabled-at-boot-time;
rs485-rts-active-low;
rts-gpios = <&lsio_gpio0 22 GPIO_ACTIVE_LOW>;
/uart-has-rtscts;/
/fsl,dte-mode;/
};

/* Apalis UART3 */
&lpuart0 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_lpuart0>;
};

Regards
Dhanya

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Migrating device tree changes from Dunfell to Kirkstone and encountering issues, especially with UART and GPIO configurations, can be challenging due to potential changes in the Linux kernel between these Yocto Project releases. The Linux kernel version jump from Dunfell (likely using a 4.x or early 5.x kernel) to Kirkstone (using Linux 5.15-2.2.x) introduces numerous changes that could affect device tree configurations.

For the issue you’re facing with the UART3 RTS control signal not working as expected on Kirkstone, here are some steps and considerations:

  1. Kernel Configuration Check: Ensure that the kernel configuration (CONFIG_SERIAL_IMX) supports the UART features you’re using. The kernel configuration might have changed between versions, affecting UART behavior.

  2. Device Tree Binding Documentation: Review the device tree binding documentation for the i.MX8QM in the Linux kernel source code (Documentation/devicetree/bindings/) for any changes in the UART or GPIO bindings that might require adjustments to your device tree.

  3. GPIO Controller Node: Verify that the lsio_gpio0 node is correctly defined in your device tree and that it matches the Kirkstone kernel’s expectations for GPIO controllers. The naming or properties might have changed.

  4. RS-485 Configuration: The linux,rs485-enabled-at-boot-time, rs485-rts-active-low, and rts-gpios properties in your device tree snippet are specific to RS-485 configuration. Ensure that the RS-485 support in the kernel (CONFIG_SERIAL_8250_DMA and CONFIG_SERIAL_8250_EXAR) is enabled and compatible with the changes you’ve made. The kernel’s handling of RS-485 configurations could have evolved, requiring updates to your device tree or driver code.

  5. Pin Configuration: The pin configuration for IMX8QM_UART0_RTS_B_LSIO_GPIO0_IO22 with the setting 0x00000021 might need reevaluation. The Kirkstone kernel could interpret pin muxing and configuration settings differently, or there might be additional properties required to fully enable the pin’s functionality as expected.

  6. Debugging: Utilize the kernel’s debugging facilities to trace the GPIO and UART initialization process. Look for messages related to GPIO and UART setup during boot, which might provide clues on what’s going wrong. Tools like dmesg and debugfs can be invaluable here.

  7. Review Kernel Changes: Since you

Please, also check if these links can help you solve your problem:

How to Run a Hello World on the Cortex-M | Toradex Developer Center.

Hi @Dhanyakumar,
Please have a look at the similar issue that you are facing.