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.

AM3358: am3358

Part Number: AM3358

HI:

I use BSP version 07.00, but RTS automatic switchover is required. Then I add the following attribute (rts-gpios) in the device tree. Although it can be switched automatically, it is found that it cannot wake up after the sleep . If this attribute is removed,add rts-gpio, I can wake up from sleep. The following is my device tree configuration:

&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "okay";
rts-gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
rs485-rts-active-high;
rs485-rx-during-tx;
rs485-rts-delay = <1 1>;
linux,rs485-enabled-at-boot-time;
};

Firstly, hibernate through echo mem > /sys/power/state, and then wake up through debug serial port UART0, that is, press any key. However, it is found that after adding rts-gpios, you cannot wake up. After adding rts-gpio , can wake up, but RTS cannot be switched automatically

  • Hi Miller,

    Can you use UART_RTS pin instead of GPIO3_4 for the RS485 direction control?

  • However, the RS485 R/E pin on the hardware has been connected to a separate gpio, and UART is not used RTS pin, how to operate?

  • Hi Miller,

    RS485 support is not validated and supported by the Processor SDK, since we don't have any EVM supports RS485 function. So I won't be able to tell why rts-gpios breaks on suspend/resume.

    I checked the kernel source, GPIO based RTS support was added since kernel v5.3 which is not very long before the SDK 7.0 kernel (v5.4) which you use, so it is possible the feature is not fully supported yet. Can you try the latest AM335x SDK v8.2 to see if the issue still exist?

    By the way, if you check the kernel DT binding document - Documentation/devicetree/bindings/serial/8250.yaml, "rts-gpios" is the correct name of the DT property, "rts-gpio" is not. I guess this explains why "rts-gpio" doesn't break suspend/resume, but the GPIO pin doesn't control RS485 transceiver, because the 8250 driver doesn't recognize "rts-gpio".

  • OK, thank you very much for your help. I will test the latest SDK V8.2.