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.

PROCESSOR-SDK-AM335X: RS485 support on am335x with SDK v.08.02.00.24

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: AM3352

Hi Team!

We are working on a custom board with am3352 SoC and are updating to the tisdk version 08.02.00.24. We are facing a problem in RS485 communication. Seemingly the issue is related to the serial driver. In the older tisdk, the device tree node property for uart node - "rs485-enabled-at-boot-time" sufficed the task to configure the port for RS485 communication along with a gpio pin configuration. However the same changes are not working with the latest tisdk.

Additionally, the 'ttyOx' devnode used previously for the aforementioned purpose is no longer available with the latest tisdk and so we have made the changes to use 'ttySx' nodes.

We wanted to clarify if this property is specific to the omap uart drivers. As we observed that ttyOx was handled by omap uart drivers but ttySx is now binding to 8250 driver. Does 8250 driver also come along with the capability to support RS485 communication with the same property change in device tree node? If not which additional changes will be required?

  • Hi Monish,

    Yes, the previous omap_serial uart driver uses ttyOx devnode. Now the latest SDK migrated to 8250_omap uart driver which uses the standard ttySx devnode.

    Now 'rs485-enabled-at-boot-time' has been named as 'linux,rs485-enabled-at-boot-time' when using 8250_omap driver. Please see the kernel document: Documentation/devicetree/bindings/serial/rs485.yaml for details.

  • Thank you Bin for the reply.

    I have already added the device node property as 'linux,rs485-enabled-at-boot-time' in the uart node. The communication still doesn't work. 

    Could you also guide me with an example of how a uart node can be configured for RS485 communication with the latest tisdk?

    One more observation is that the configuration of gpio pin for controlling the direction of data transfer in rs485, which we have set with rts-gpio property is not working as expected. That is, if a gpio pin say gpioN is configured to be used for the mentioned purpose, it should not be allowed to export the same gpioN in the /sys/class/gpio and it is expected to deny with message that resource is busy. This was seen in the older tisdk. However, with the latest tisdk, I am able to export the gpioN as well as am also able to modify the 'value' of the gpio pin. This makes us suspect that the gpio pin is not getting bound for the mentioend purpose through the device tree. Could you please guide me why is it not working as expected with these configurations or any additional configurations are needed?

  • Also, is it possible to still use omap_serial uart driver in the latest SDK?

  • Hi Team!

    Wanted to mention some additional details and observations here. 

    If I disable 8250_omap driver and use the default omap_serial driver, the RS485 communication takes place but the data received over it is corrupted, Could you guide us with information if the omap_serial driver in the new SDK has got some significant changes in this regard about reading the data over UART, against which some additional changes are required in configs/device tree?

    Request you to please provide the necessary guidance as this issue is becoming a blocker in our development with am3352 SoC and the updated SDK.

    Thanking you in anticipation,