Using the UARTs

Discussion in 'SECOSBC-A62' started by ddewaele, Mar 16, 2016.

  1. ddewaele

    ddewaele Member

    Joined:
    Dec 2, 2014
    Messages:
    48
    Likes Received:
    11
    On the UDOO Quad board, there was a way to add support for additional UARTs (by changing some board specific defines) :

    Code:
    UART3 /dev/ttymxc2 pin 47 (EIM_D25) pin 53 (EIM_D24) pin 51 (/sys/class/gpio/gpio56) pin 51 (/sys/class/gpio/gpio56)
    UART5 /dev/ttymxc4 pin 48 (KEY_ROW1) pin 49 (KEY_COL1) pin 46 (/sys/class/gpio/gpio145) pin 46 (/sys/class/gpio/gpio145)
    This resulted in additional tty devices becoming available (ttymxc2 / ttymxc4)
    Code:
    dmesg | grep tty
    [   1.641791] imx-uart.0: ttymxc0 at MMIO 0x2020000 (irq = 58) is a IMX
    [   1.648674] imx-uart.1: ttymxc1 at MMIO 0x21e8000 (irq = 59) is a IMX
    [   1.655176] console [ttymxc1] enabled, bootconsole disabled
    [   1.666751] imx-uart.2: ttymxc2 at MMIO 0x21ec000 (irq = 60) is a IMX
    [   1.673593] imx-uart.3: ttymxc3 at MMIO 0x21f0000 (irq = 61) is a IMX
    [   1.680398] imx-uart.4: ttymxc4 at MMIO 0x21f4000 (irq = 62) is a IMX
    However on the A62 I don't see any of the UARTs. Do I need to activate them, and to what tty devices do they map ?

    Thx.
     
  2. ddewaele

    ddewaele Member

    Joined:
    Dec 2, 2014
    Messages:
    48
    Likes Received:
    11
    Just for my understanding, where should one go to try and get help for this type of thing ?

    I appreciate the fact the Seco offers this as a community supported board, but there seems to be hardly a community available. The documentation is also pretty lacking as I haven't found any information surrounding this. It's nice that this board has lots of features, but if there's no way to tap into them it can be a little frustrating.

    As we cannot contact Seco directly, and this forum isn't that active, how should one view this Seco offering and where can we find help ?
     
    modjo likes this.
  3. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    I would check the schematics + the i.mx6 reference manual and then check the device trees

    Gesendet von meinem FP2 mit Tapatalk
     
  4. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    I've contacted @SECO_FAE, I'll update you as soon as I know something more.
     
  5. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Hi guys, we are going to add the A62 schematics in short time so to ease everybody's life.
     
    modjo and graugans like this.
  6. prakash.m

    prakash.m New Member Staff Member

    Joined:
    Jul 4, 2016
    Messages:
    4
    Likes Received:
    3
    Hi guys,sorry for late reply
    By default A62 community bsp enabled with debug uart in device tree,
    To enable the other uarts in a62 we need to add uart pins in device tree file located in (arch/arm/boot/dts/imx6qdl-seco_SBC_A62.dtsi)
    In expansion header of A62 having three UART'S
    Pin number 11-14 --> UART4(TX,RX,CTS and RTS)
    pin number 26,27 ---> UART1(TX,RX)
    pin number 28-31 ----> UART5(TX,RX,CTS and RTS)

    for adding the UART4 in device tree (arch/arm/boot/dts/imx6qdl-seco_SBC_A62.dtsi)
    pinctrl_uart4: uart4grp
    {
    fsl,pins = <
    MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
    MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
    MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
    MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
    >;
    };

    &uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart4>;
    status = "okay";
    };
    for adding the UART1 in device tree (arch/arm/boot/dts/imx6qdl-seco_SBC_A62.dtsi)
    pinctrl_uart1: uart1grp
    {
    fsl,pins = <
    MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
    MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
    >;
    };
    &uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart1>;
    status = "okay";
    };
    for adding the UART5 in device tree (arch/arm/boot/dts/imx6qdl-seco_SBC_A62.dtsi)
    pinctrl_uart5: uart5grp
    {
    fsl,pins = <
    MX6QDL_PAD_KEY_ROW4__UART5_CTS_B 0x1b0b1 /* UART5_CTS */
    MX6QDL_PAD_KEY_COL4__UART5_RTS_B 0x1b0b1 /* UART5_RTS */
    MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA 0x1b0b1
    MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA 0x1b0b1
    >;
    };
    &uart5 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart5>;
    status = "okay";
    };

    After adding this compile the device tree file.In userspace
    UART5 ---> ttymxc4 , UART4 --->ttymxc3 , UART1 ---> ttymxc0 ,UART2 ---> ttymxc1 (for debug purpose)

    NOTE:In udoo the all UART's are in TTL logic means which has no transceiver.But in a62 some of the UART's enabled with rs232 transceiver.For more details about UART Please check Expansion connector topics in A62 reference manual.
     
    modjo and graugans like this.
  7. kd11

    kd11 New Member

    Joined:
    Nov 21, 2017
    Messages:
    1
    Likes Received:
    0
    Hello,
    I have iwave SBC having same issue of UARTs
    I done above changes as per suggest compatible with my SBC, but no pulses are received on oscilloscope.

    Can you guide is any additional settings are need to be done ?
    i am using iwg15 imx6 Solo SBC


    Thank you
     
  8. AlexGb

    AlexGb New Member

    Joined:
    Aug 21, 2017
    Messages:
    1
    Likes Received:
    0
    Hello,
    I downloaded image "UDOObuntu 2 FOR QUAD" from https://www.udoo.org/bsp-download-page/ for "SBC-A62".
    As I understood from https://www.udoo.org/docs/Cookbook_Linux/Device_Tree_Editor.html I have to use "Device Tree editor" But in this image I can not find it. There is no "START menu -> Preferences -> Device Tree editor"

    From massage prakash.m i try to found location arch/arm/boot/dts/imx6qdl-seco_SBC_A62.dtsi on my board, but there it is not either.

    I can not figure out how to access uart, maybe I'm using the wrong image?
     

Share This Page