Other Parts Discussed in Thread: ISO1176
Tool/software:
Hi Ti Team,
One of our products is based on AM3352 and it has #2 RS485 ports.
With old SDK [kernel 4.9.XX], RS485 ports were working fine but after upgrading to SDK 9.01.0, RS485 ports are working in Rx mode only.
Tried multiple configurations and device tree settings as per dts files in am335x-evm/kernel-source/arch/arm/boot/dts/ti but RS485 port works in RX mode using an 8250 serial driver.
With the old omap serial driver, the RS485 Tx is working fine, but Rx is not working correctly.
DTS file changes for specific port is as follows:
uart2_pins: pinmux_uart2_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x92C, PIN_INPUT | MUX_MODE1) /* (N19) gmii1_txclk.uart2_rxd */
AM33XX_IOPAD(0x930, PIN_OUTPUT | MUX_MODE1) /* (M19) gmii1_rxclk.uart2_txd */
>;
};
rs485_rts_pins: pinmux_gpio_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE7) /* (A17) spi0_cs0.gpio0_5 <EN_485> */
>;
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
rts-gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
rs485-rts-active-high;
rs485-rts-delay = <0 0>;
linux,rs485-enabled-at-boot-time;
status = "okay";
};
Kernel Configuration are as follows:
#
# Serial drivers
#
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
CONFIG_SERIAL_8250_16550A_VARIANTS=y
# CONFIG_SERIAL_8250_FINTEK is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_NR_UARTS=10
CONFIG_SERIAL_8250_RUNTIME_UARTS=10
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not set
CONFIG_SERIAL_8250_DWLIB=y
CONFIG_SERIAL_8250_FSL=y
CONFIG_SERIAL_8250_DW=y
# CONFIG_SERIAL_8250_RT288X is not set
CONFIG_SERIAL_8250_OMAP=y
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y
CONFIG_SERIAL_OF_PLATFORM=y
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX310X is not set
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_SIFIVE is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
CONFIG_SERIAL_XILINX_PS_UART=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
# CONFIG_SERIAL_ARC is not set
CONFIG_SERIAL_FSL_LPUART=y
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
CONFIG_SERIAL_CONEXANT_DIGICOLOR=y
CONFIG_SERIAL_CONEXANT_DIGICOLOR_CONSOLE=y
CONFIG_SERIAL_ST_ASC=y
CONFIG_SERIAL_ST_ASC_CONSOLE=y
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers
With the above changes, AM3352 is receiving data correctly over the RS485 port, but the transmit is not working.
It seems like the RTS pin (GPIO0_5) is not toggling correctly and thus data is not coming out from ISO1176.
Can you please review and point out any issue in port configuration?
Thanks in advance.



