This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6546: prg1 uart0 configuration

Part Number: AM6546
Other Parts Discussed in Thread: PROFIBUS

Hi,

Please support in configuring PRG1 UART0. We are using following pins of PRG1 module for UART0

            AM65X_IOPAD(0x0154, PIN_INPUT, 2)    /* (AF25) UART0_RXD */
            AM65X_IOPAD(0x0158, PIN_OUTPUT, 2)    /* (AF24) UART0_TXD */
            AM65X_IOPAD(0x0108, PIN_OUTPUT, 2)    /* (AH25) UART0_RTSn */     

we are referring to following link for configuring dts:

Need support in configuring DTS and which firmware we need to load for uart?How to configure interrupt-parent in DTS?

This is how we added DTS node:

pru_suart1 {
    compatible = "ti,pru-soft-uart";
    interrupt-parent = <&pruss_intc>;
    prus = <&pru1>;
    firmware-name = "ti-pruss/pru_swuart-fw.elf";
    ti,pru-interrupt-map = <0 21 2 2>;
    pinctrl-0 = <&pru_uart0_pins_default>;
    pinctrl-names = "default";
    #address-cells = <1>;
    #size-cells = <0>;

    pru1_port0: port@0 {
        reg = <0>;
        interrupts = <21>;
        ti,pru-suart-pins = /bits/ 8 <0 1 2 3>;
    };
};

Note:We are using PRG1_RGMII1 and PRG1_RGMI2 pins for Dual mac mode. So, we are loading firmware related to prueth.Is it possible to load boath UART and ethernet firmwares for PRG1?

Thanks and Regards,

N Chetan Kumar

  • Hi Chetan,

    May I know the context of this question ? There is no UART firmware available on AM65 and nothing is planned right now. You may port serial protocol firmware like Profibus from AM57 (See this) which uses UART in PRU but we will not be able to support such an effort.

    I see that you are referring to the UART pin bindings from AM3/Beaglebone, Instead you can take a look at AM57x Processor SDK Linux example.

    Technically it's possible to run UART firmware on one PRU-ICSS and Dual MAC on second PRU-ICSS instance, but again there is no plan to support any such activity.

    Regards

    Vineet

  • Chetan,

    I think we need to re-align on what's being asked.  The pins you specified correspond to a HARDWARE UART.  The pru_suart is a software uart driver where a PRU core bit-bangs a UART interface using PRU GPIO pins.  That is not applicable to this hardware UART, i.e. it's not the right driver.  I believe the question you should be asking is how to use those pins as a hardware UART from the context of the Cortex A53's running Linux.  In that respect:

    1. The UART hardware that is part of the ICSSG subsystem is different than what's in the rest of the chip, and would consequently need to use a different Linux driver.

    2. There are other devices that support that same UART IP (i.e. a driver exists).  However, I don't believe those devices have the RS-485 support which is what I assume the RTS pin is being targeted for, i.e. that driver may not solve your issue.

    3. Work would still need to be done to integrate that other Linux driver such that it can be leveraged from Linux.  Candidly, I don't expect that's part of any of our plans right now, so it is likely a challenge to enable this capability in the near future.  Furthermore, even if we completed this work, I don't know that it solves your issue if you require RS-485 support on this specific UART.

    Are any of the "regular" chip-level UARTs available?  Have you already used all 5?  Or is there a pinmux conflict with something else stopping you from using all 5?  The fastest way to resolve this issue is if you can use one of these normal UARTs.  It might require you to spin your hardware, but it would give you a path to solving your issue.

    Thanks,
    Brad

  • FYI, looks like the driver that I referenced previously has been integrated into TI's 5.4 branch:

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/tty/serial/8250/8250_pruss.c?h=ti-linux-5.4.y

    That driver was only integrated/tested on the AM335x, but the same UART IP is in ICSS-G on the AM65xx, i.e. I expect the driver should be usable for AM65xx too, but would need some effort to integrate and test.  I'm not aware of any TI plans to do this work, but it would give you a good stepping stone if you wanted to pursue this path.

  • Hi,

    Please let us know if TI's responses are sufficient, so we can close the topic.

    If there is a support requirement then you may reach out to TI contact and it can be discussed internally.

    Regards

    Vineet