Missing ttymxc on Yocto 1.6

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing ttymxc on Yocto 1.6

Jump to solution
3,807 Views
pakwoon
Contributor II

Hello Community,

We are in the process of moving from the LTIB build system to a Yocto one and have noticed missing UARTs on the iMX6DL. (We are using a Congatec qmx6 PN16111 and code from their git repository)

On the old LTIB build, the kernel detects 3 UARTS:

---------------------------------------------------------------------------------------------------------

[    2.212509] imx-uart.1: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX

[    2.268576] console [ttymxc1] enabled, bootconsole disabled

[    2.268576] console [ttymxc1] enabled, bootconsole disabled

[    2.280442] imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

[    2.287378] imx-uart.4: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX

[    2.302894] brd: module loaded

...

root@linaro:/sys/class/tty# ls -las ttymx*

0 lrwxrwxrwx 1 root root 0 2014-09-30 02:23 ttymxc1 -> ../../devices/platform/imx-uart.1/tty/ttymxc1

0 lrwxrwxrwx 1 root root 0 2014-09-30 02:23 ttymxc2 -> ../../devices/platform/imx-uart.2/tty/ttymxc2

0 lrwxrwxrwx 1 root root 0 2014-09-30 02:23 ttymxc4 -> ../../devices/platform/imx-uart.4/tty/ttymxc4

---------------------------------------------------------------------------------------------------------

But on the newer Yocto 1.6 build, there is only 1 and the class path is different.

---------------------------------------------------------------------------------------------------------

VGEN6: 1800 mV

Serial: IMX driver

21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX

console [ttymxc1] enabled

serial: Freescale lpuart driver

...

root@cgtqmx6:/sys/class/tty# ls -las

0 lrwxrwxrwx  1 root root 0 Sep 30 02:25 ttymxc1 -> ../../devices/soc0/soc.1/2100000.aips-bus/21e8000.serial/tty/ttymxc1

---------------------------------------------------------------------------------------------------------

From what I can tell (and I am no means an expert) the newer build extracts the machine info from the dtb file, while in the older build it can't find a dtb file. The dtb file contains all the UART information, but for some reason, the kernel just doesn't see the other UARTs. Am I missing a configuration setting somewhere else? Do I need something in uboot?

Thanks in advance.

Labels (1)
Tags (3)
1 Solution
1,094 Views
michaelschanz
Contributor III

Thank you very much for pointing out this insufficiency of our conga-QMX6 kernel implementation. We appreciate your suggestions very much.

In order to fix the problem, we've created a patch that can be found in our kernel repository:

https://git.congatec.com/arm/qmx6_kernel/commit/9a3e94917d94b901b674cece0a3576b427a63b12

best regards,

Michael Schanz

View solution in original post

0 Kudos
8 Replies
1,094 Views
fabio_estevam
NXP Employee
NXP Employee

If the dts has all the 3 uart nodes then all the three should be probed. Are you sure all the three nodes are present in the dts for your board?

0 Kudos
1,094 Views
pakwoon
Contributor II

Hi Fabio,

The dtb it is searching for is imx6dl-qmx6.dtb. Inside imx6dl-qmx6.dts there is #include "imx6dl.dtsi", which has the following:

                                uart1: serial@02020000 {

                                        compatible = "fsl,imx6q-uart", "fsl,imx21-uart";

                                        reg = <0x02020000 0x4000>;

                                        interrupts = <0 26 0x04>;

                                        clocks = <&clks 160>, <&clks 161>;

                                        clock-names = "ipg", "per";

                                        dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;

                                        dma-names = "rx", "tx";

                                        status = "disabled";

                                };

                        uart2: serial@021e8000 {

                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";

                                reg = <0x021e8000 0x4000>;

                                interrupts = <0 27 0x04>;

                                clocks = <&clks 160>, <&clks 161>;

                                clock-names = "ipg", "per";

                                dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;

                                dma-names = "rx", "tx";

                                status = "disabled";

                        };

                        uart3: serial@021ec000 {

                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";

                                reg = <0x021ec000 0x4000>;

                                interrupts = <0 28 0x04>;

                                clocks = <&clks 160>, <&clks 161>;

                                clock-names = "ipg", "per";

                                dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;

                                dma-names = "rx", "tx";

                                status = "disabled";

                        };

                        uart4: serial@021f0000 {

                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";

                                reg = <0x021f0000 0x4000>;

                                interrupts = <0 29 0x04>;

                                clocks = <&clks 160>, <&clks 161>;

                                clock-names = "ipg", "per";

                                dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;

                                dma-names = "rx", "tx";

                                status = "disabled";

                        };

...

I can see the status as "disabled" for all the UARTS, but how does /dev/ttymxc1 appear and the console work? Do the bootargs from uboot enable ttymxc1?  FYI, my cmdline value has "console=ttymxc1,115200"

0 Kudos
1,094 Views
fabio_estevam
NXP Employee
NXP Employee

No, you need to really look at imx6dl-qmx6.dts. It is there that you need to activate the uarts you want via 'status=okay' andl also by providing the IOMUX configuration for the uarts.

imx6dl.dtsi has all the uarts defined and disabled, because this is a description of the SoC.

It is in your board dts that you specify what are the UART ports that are available in that particular hardware.

1,094 Views
fabio_estevam
NXP Employee
NXP Employee

Actually you need to look at imx6qdl-qmx6.dtsi:

https://git.congatec.com/arm/qmx6_kernel/blob/293398f2e1973888475733dfce8658a035ff7ab0/arch/arm/boot...

There is only one uart enabled in this dtsi, so the current behaviour is expected.

You should enable the other uarts in this file.

0 Kudos
1,095 Views
michaelschanz
Contributor III

Thank you very much for pointing out this insufficiency of our conga-QMX6 kernel implementation. We appreciate your suggestions very much.

In order to fix the problem, we've created a patch that can be found in our kernel repository:

https://git.congatec.com/arm/qmx6_kernel/commit/9a3e94917d94b901b674cece0a3576b427a63b12

best regards,

Michael Schanz

0 Kudos
1,094 Views
pakwoon
Contributor II

Thank you Michael and Fabio, the patch works.

VGEN6: 1800 mV

Serial: IMX driver

21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX

console [ttymxc1] enabled

21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX

21f4000.serial: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX

serial: Freescale lpuart driver

[drm] Initialized drm 1.1.0 20060810

root@cgtqmx6:/sys/class/tty# ls -las ttymxc*

0 lrwxrwxrwx 1 root root 0 Jan  1  1970 ttymxc1 -> ../../devices/soc0/soc.1/2100000.aips-bus/21e8000.serial/tty/ttymxc1

0 lrwxrwxrwx 1 root root 0 Jan  1  1970 ttymxc2 -> ../../devices/soc0/soc.1/2100000.aips-bus/21ec000.serial/tty/ttymxc2

0 lrwxrwxrwx 1 root root 0 Jan  1  1970 ttymxc4 -> ../../devices/soc0/soc.1/2100000.aips-bus/21f4000.serial/tty/ttymxc4

root@cgtqmx6:/sys/class/tty# uname -a

Linux cgtqmx6 3.10.17-1.0.0_qmx6+g4138f5b #1 SMP PREEMPT Wed Oct 8 07:53:08 EST 2014 armv7l GNU/Linux

root@cgtqmx6:/sys/class/tty#

0 Kudos
1,094 Views
chandiniindavar
Contributor IV

Hi All,

Could any one tell me how to open ttymxc* ?

i can see below things.

$ ls -las /dev/ttymx*

0 crw------- 1 root tty  207, 16 Feb 23 15:39 /dev/ttymxc0

0 crw------- 1 root root 207, 20 Jan  1  1970 /dev/ttymxc4

0 crw------- 1 root root 207, 21 Jan  1  1970 /dev/ttymxc5

Chandini

0 Kudos
1,094 Views
fabio_estevam
NXP Employee
NXP Employee

Excellent, Michael.

I have also seen Alex de Cabo's patch updating Yocto to include such patch.

Also, if you have a chance it would be nice to have congatec support in the mainline kernel.

Thanks,

Fabio Estevam

0 Kudos