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.

AM3352: RS485 port works only in Rx mode in AM3352 with TI SDK 9.01.00

Part Number: AM3352
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.

  • Hi Harsh,

    In the kernel DTS code you provided, the pinmux "uart2_pins" is referenced in the "&uart2" node, but the pinmux "rs485_rts_pins" is not referenced anywhere.

    Please try to move the gpio0_5 pinmux from "rs485_rts_pins" to "uart2_pins" node, to see if this resolves the RS485 TX problem.

    The pinmux should be look like:

    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 */
            AM33XX_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE7) /* (A17) spi0_cs0.gpio0_5 <EN_485> */
        >;
    };
    

  • Hi Bin Liu,

    Thanks for quick response.

    Yes this was also tried but unfortunately same result.

  • Hi Harsh,

    Please use a scope to capture the waveform of the 3 UART pins in both working case with old kernel and the non-working case with SDK9.1.

  • Please also attach the Linux boot log for the non-working case.

  • Hi Bin Liu,

    Thank you for quick response.

    Please find the required info:
    With the new kernel RTS pin remains at ~1V level all the time.

    boot log:

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 6.6.52-evse-g561bbd55f91a (oe-user@oe-host) (arm-oe-linux-gnueabi-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240716) #1 PREEMPT Tue Apr  5 23:00:00 UTC 2011
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt: Machine model: TI AM335x EVM-SK
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] cma: Reserved 64 MiB at 0xbc000000 on node -1
    [    0.000000] Zone ranges:
    [    0.000000]   Normal   [mem 0x0000000080000000-0x00000000afefffff]
    [    0.000000]   HighMem  [mem 0x00000000aff00000-0x00000000bfffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x00000000afefffff]
    [    0.000000]   node   0: [mem 0x00000000b0000000-0x00000000bfffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
    [    0.000000] On node 0, zone HighMem: 256 pages in unavailable ranges
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (neon)
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Kernel command line: console=ttyS0,115200n8 rw panic=30 root=/dev/mmcblk1p2 rootflags=image=rootfs-2.500.7-git.ubuntu.241031131911+24-44.erofs
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260162
    [    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
    [    0.000000] Memory: 957000K/1047552K available (8192K kernel code, 707K rwdata, 2444K rodata, 1024K init, 272K bss, 25016K reserved, 65536K cma-reserved, 196608K highmem)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] TI gptimer clocksource: always-on /ocp/interconnect@44c00000/segment@200000/target-module@31000
    [    0.000004] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000065] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.001207] TI gptimer clockevent: 24000000 Hz at /ocp/interconnect@48000000/segment@0/target-module@40000
    [    0.005252] Console: colour dummy device 80x30
    [    0.005406] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
    [    0.071369] CPU: Testing write buffer coherency: ok
    [    0.071549] CPU0: Spectre v2: using BPIALL workaround
    [    0.071576] pid_max: default: 32768 minimum: 301
    [    0.072118] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
    [    0.072184] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
    [    0.078248] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.078853] rcu: Hierarchical SRCU implementation.
    [    0.078877] rcu: 	Max phase no-delay instances is 1000.
    [    0.085875] devtmpfs: initialized
    [    0.139553] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.140345] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.140423] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
    [    0.153305] pinctrl core: initialized pinctrl subsystem
    [    0.157277] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.164470] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.167870] thermal_sys: Registered thermal governor 'step_wise'
    [    0.168119] cpuidle: using governor ladder
    [    0.168209] cpuidle: using governor menu
    [    0.225086] No ATAGs?
    [    0.225134] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.239318] cryptd: max_cpu_qlen set to 1000
    [    0.249958] SCSI subsystem initialized
    [    0.250915] libata version 3.00 loaded.
    [    0.252079] usbcore: registered new interface driver usbfs
    [    0.252259] usbcore: registered new interface driver hub
    [    0.252443] usbcore: registered new device driver usb
    [    0.253414] pps_core: LinuxPPS API ver. 1 registered
    [    0.253441] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.253518] PTP clock support registered
    [    0.254302] scmi_core: SCMI protocol bus registered
    [    0.259834] Bluetooth: Core ver 2.22
    [    0.260033] NET: Registered PF_BLUETOOTH protocol family
    [    0.260056] Bluetooth: HCI device and connection manager initialized
    [    0.260099] Bluetooth: HCI socket layer initialized
    [    0.260127] Bluetooth: L2CAP socket layer initialized
    [    0.260189] Bluetooth: SCO socket layer initialized
    [    0.262304] clocksource: Switched to clocksource dmtimer
    [    0.296862] NET: Registered PF_INET protocol family
    [    0.297764] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [    0.304322] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
    [    0.304425] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    0.304475] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
    [    0.304707] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.305047] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.305378] UDP hash table entries: 512 (order: 1, 8192 bytes, linear)
    [    0.305476] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes, linear)
    [    0.305948] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    0.307020] Trying to unpack rootfs image as initramfs...
    [    0.316077] Initialise system trusted keyrings
    [    0.322806] workingset: timestamp_bits=14 max_order=18 bucket_order=4
    [    0.324288] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.518119] Freeing initrd memory: 1420K
    [    0.876075] NET: Registered PF_ALG protocol family
    [    0.876145] Key type asymmetric registered
    [    0.876168] Asymmetric key parser 'x509' registered
    [    0.876608] bounce: pool size: 64 pages
    [    0.876714] io scheduler mq-deadline registered
    [    0.876742] io scheduler kyber registered
    [    0.876909] io scheduler bfq registered
    [    0.894268] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.911558] STMicroelectronics ASC driver initialized
    [    0.946691] brd: module loaded
    [    0.965605] loop: module loaded
    [    0.970809] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
    [    0.970843] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
    [    0.979354] usbcore: registered new interface driver usb-storage
    [    0.979704] usbcore: registered new interface driver usbserial_generic
    [    0.979819] usbserial: USB Serial support registered for generic
    [    0.979933] usbcore: registered new interface driver option
    [    0.980034] usbserial: USB Serial support registered for GSM modem (1-port)
    [    0.981174] i2c_dev: i2c /dev entries driver
    [    0.984091] Bluetooth: HCI UART driver ver 2.3
    [    0.984131] Bluetooth: HCI UART protocol H4 registered
    [    0.984242] Bluetooth: HCI UART protocol LL registered
    [    0.984443] cpuidle: enable-method property 'ti,am3352' found operations
    [    0.986244] sdhci: Secure Digital Host Controller Interface driver
    [    0.986272] sdhci: Copyright(c) Pierre Ossman
    [    0.986811] Synopsys Designware Multimedia Card Interface Driver
    [    0.987353] sdhci-pltfm: SDHCI platform and OF driver helper
    [    0.991938] usbcore: registered new interface driver usbhid
    [    0.991973] usbhid: USB HID core driver
    [    0.994735] NET: Registered PF_INET6 protocol family
    [    0.998516] Segment Routing with IPv6
    [    0.998733] In-situ OAM (IOAM) with IPv6
    [    0.999009] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.001280] NET: Registered PF_PACKET protocol family
    [    1.001938] Bluetooth: RFCOMM socket layer initialized
    [    1.002047] Bluetooth: RFCOMM ver 1.11
    [    1.002102] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    1.002138] Bluetooth: BNEP socket layer initialized
    [    1.002160] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    1.002192] Bluetooth: HIDP socket layer initialized
    [    1.002989] Key type dns_resolver registered
    [    1.006866] omap_voltage_late_init: Voltage driver support not added
    [    1.036895] registered taskstats version 1
    [    1.036948] Loading compiled-in X.509 certificates
    [    1.140939] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/gpio_keys_s1
    [    1.141094] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/gpio_keys_s0
    [    1.141212] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_rtc_gpio_pins
    [    1.141328] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_usb_gpio_pins
    [    1.141443] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_rfid_gpio_pins
    [    1.141558] platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_gpio_pins
    [    1.144007] pinctrl-single 44e10800.pinmux: 142 pins, size 568
    [    1.158107] ti-sysc: probe of 44e31000.target-module failed with error -16
    [    1.165293] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    1.197553] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
    [    1.209582] ti-sysc: probe of 48040000.target-module failed with error -16
    [    1.241281] OMAP GPIO hardware version 0.1
    [    1.254953] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    1.270300] at24 2-0054: supply vcc not found, using dummy regulator
    [    1.293709] at24 2-0054: 262144 byte 24c2048 EEPROM, writable, 1 bytes/write
    [    1.297188] bq32k 2-0068: Enabled trickle RTC battery charge.
    [    1.299031] bq32k 2-0068: registered as rtc0
    [    1.300195] bq32k 2-0068: setting system clock to 2024-10-31T19:04:52 UTC (1730401492)
    [    1.300575] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
    [    1.317326] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 27, base_baud = 3000000) is a 8250
    [    1.328008] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 28, base_baud = 3000000) is a 8250
    [    1.380706] random: crng init done
    [    1.380799] omap_rng 48310000.rng: Random Number Generator ver. 20
    [    1.413804] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
    [    1.413886] edma 49000000.dma: TI EDMA DMA engine driver
    [    1.435098] am335x-phy-driver 47401300.usb-phy: dummy supplies not allowed for exclusive requests
    [    1.452035] am335x-phy-driver 47401b00.usb-phy: dummy supplies not allowed for exclusive requests
    [    1.511390] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [    1.512016] omap-sham 53100000.sham: will run requests pump with realtime priority
    [    1.535862] omap_reset_deassert: timedout waiting for gfx:0
    [    1.536040] ti-sysc: probe of 5600fe00.target-module failed with error -110
    [    1.545380] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    1.550750] l3-aon-clkctrl:0000:0: failed to disable
    [    1.570568] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 39, base_baud = 3000000) is a 8250
    [    1.570832] printk: console [ttyS0] enabled
    [    2.652881] tps65910 0-002d: No interrupt support, no core IRQ
    [    2.666596] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    2.705821] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 41, base_baud = 3000000) is a 8250
    [    2.721391] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 42, base_baud = 3000000) is a 8250
    [    2.736486] sdhci-omap 48060000.mmc: supply pbias not found, using dummy regulator
    [    2.747013] qca7000@0 enforce active low on GPIO handle
    [    2.754000] sdhci-omap 48060000.mmc: supply vqmmc not found, using dummy regulator
    [    2.765794] qcaspi spi1.0: ver=0.2.7-i, clkspeed=8000000, burst_len=5000, pluggable=0
    [    2.796086] sdhci-omap 481d8000.mmc: supply pbias not found, using dummy regulator
    [    2.806761] sdhci-omap 481d8000.mmc: supply vqmmc not found, using dummy regulator
    [    2.835654] sdhci-omap 47810000.mmc: supply pbias not found, using dummy regulator
    [    2.844836] sdhci-omap 481d8000.mmc: using old ti,non-removable property
    [    2.853505] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    2.858976] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    2.885354] sdhci-omap 47810000.mmc: supply vqmmc not found, using dummy regulator
    [    2.898339] hub 1-0:1.0: USB hub found
    [    2.912805] hub 1-0:1.0: 1 port detected
    [    2.929506] mmc0: SDHCI controller on 48060000.mmc [48060000.mmc] using External DMA
    [    2.965638] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    2.971132] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    3.008178] hub 2-0:1.0: USB hub found
    [    3.012148] hub 2-0:1.0: 1 port detected
    [    3.019708] mmc1: SDHCI controller on 481d8000.mmc [481d8000.mmc] using External DMA
    [    3.062058] clk: Disabling unused clocks
    [    3.079571] mmc1: new high speed MMC card at address 0001
    [    3.087562] mmcblk1: mmc1:0001 W62704 3.53 GiB
    [    3.098611]  mmcblk1: p1 p2 p3
    [    3.105694] mmcblk1boot0: mmc1:0001 W62704 2.00 MiB
    [    3.116886] mmcblk1boot1: mmc1:0001 W62704 2.00 MiB
    [    3.122432] mmc2: SDHCI controller on 47810000.mmc [47810000.mmc] using External DMA
    [    3.136326] mmcblk1rpmb: mmc1:0001 W62704 512 KiB, chardev (246:0)
    [    3.145291] sdhci-omap 47810000.mmc: card claims to support voltages below defined range
    [    3.158810] Freeing unused kernel image (initmem) memory: 1024K
    [    3.166989] Run /init as init process
    [    3.170808]   with arguments:
    [    3.170833]     /init
    [    3.170854]   with environment:
    [    3.170870]     HOME=/
    [    3.170888]     TERM=linux
    [    3.252950] mmc2: new high speed SDIO card at address 0001
    [    3.421400] EXT4-fs (mmcblk1p2): mounted filesystem 7e6b1042-11b5-44a8-b1c5-ef064c6dc792 r/w with ordered data mode. Quota mode: disabled.
    [    3.482905] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [    3.667299] hub 1-1:1.0: USB hub found
    [    3.674157] hub 1-1:1.0: 4 ports detected
    [    4.162449] usb 1-1.3: new high-speed USB device number 3 using musb-hdrc
    [    8.548070] loop0: detected capacity change from 0 to 284952
    [    8.583572] erofs: (device loop0): mounted with root inode @ nid 36.
    [    8.863629] systemd[1]: Failed to find module 'autofs4'
    [    8.900609] systemd[1]: systemd 255-387a14a^ running in system mode (+PAM -AUDIT -SELINUX -APPARMOR +IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -TPM2 -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
    [    8.933866] systemd[1]: Detected architecture arm.
    [    8.973677] systemd[1]: No hostname configured, using default hostname.
    [    8.981795] systemd[1]: Hostname set to <localhost>.
    [    9.025324] systemd[1]: Initializing machine ID from random generator.
    [   12.072252] systemd[1]: Queued start job for default target Multi-User System.
    [   12.245407] systemd[1]: Created slice Slice /system/getty.
    [   12.292862] systemd[1]: Created slice Slice /system/modprobe.
    [   12.343508] systemd[1]: Created slice Slice /system/serial-getty.
    [   12.392927] systemd[1]: Created slice Slice /system/syslog-ng.
    [   12.439408] systemd[1]: Created slice User and Session Slice.
    [   12.474510] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [   12.514356] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [   12.553521] systemd[1]: Expecting device /dev/mmcblk1p1...
    [   12.593027] systemd[1]: Expecting device /dev/ttyS0...
    [   12.634152] systemd[1]: Reached target Path Units.
    [   12.673432] systemd[1]: Reached target Remote File Systems.
    [   12.713196] systemd[1]: Reached target Slice Units.
    [   12.753569] systemd[1]: Reached target Swaps.
    [   12.887635] systemd[1]: Listening on Process Core Dump Socket.
    [   12.934628] systemd[1]: Listening on initctl Compatibility Named Pipe.
    [   13.001851] systemd[1]: Journal Audit Socket was skipped because of an unmet condition check (ConditionSecurity=audit).
    [   13.017356] systemd[1]: Listening on Journal Socket (/dev/log).
    [   13.056856] systemd[1]: Listening on Journal Socket.
    [   13.097070] systemd[1]: Listening on Network Service Netlink Socket.
    [   13.137066] systemd[1]: Listening on udev Control Socket.
    [   13.175928] systemd[1]: Listening on udev Kernel Socket.
    [   13.216356] systemd[1]: Listening on User Database Manager Socket.
    [   13.255797] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
    [   13.313777] systemd[1]: Mounting POSIX Message Queue File System...
    [   13.413389] systemd[1]: Mounting Kernel Debug File System...
    [   13.453335] systemd[1]: Kernel Trace File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/tracing).
    [   13.551648] systemd[1]: Mounting Temporary Directory /tmp...
    [   13.744897] systemd[1]: Starting Create List of Static Device Nodes...
    [   13.895085] systemd[1]: Starting Load Kernel Module configfs...
    [   13.996825] systemd[1]: Starting Load Kernel Module drm...
    [   14.164944] systemd[1]: Starting Load Kernel Module fuse...
    [   14.190150] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
    [   14.272841] systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
    [   14.384763] systemd[1]: Starting Journal Service...
    [   14.505248] systemd[1]: Starting Load Kernel Modules...
    [   14.645061] systemd[1]: Starting Generate network units from Kernel command line...
    [   14.824778] systemd[1]: Starting Remount Root and Kernel File Systems...
    [   15.004950] systemd[1]: Starting Coldplug All udev Devices...
    [   15.394227] systemd[1]: Mounted POSIX Message Queue File System.
    [   15.466299] systemd[1]: Mounted Kernel Debug File System.
    [   15.557450] systemd[1]: Mounted Temporary Directory /tmp.
    [   15.663209] systemd[1]: Finished Create List of Static Device Nodes.
    [   15.721711] systemd[1]: modprobe@configfs.service: Deactivated successfully.
    [   15.803398] systemd[1]: Finished Load Kernel Module configfs.
    [   15.850416] systemd[1]: modprobe@drm.service: Deactivated successfully.
    [   15.923774] systemd[1]: Finished Load Kernel Module drm.
    [   15.970333] systemd[1]: modprobe@fuse.service: Deactivated successfully.
    [   16.044342] systemd[1]: Finished Load Kernel Module fuse.
    [   16.122829] systemd[1]: Finished Generate network units from Kernel command line.
    [   16.193040] systemd[1]: Finished Remount Root and Kernel File Systems.
    [   16.286741] systemd[1]: Reached target Preparation for Network.
    [   16.334203] systemd-journald[80]: Collecting audit messages is disabled.
    [   16.365581] systemd[1]: FUSE Control File System was skipped because of an unmet condition check (ConditionPathExists=/sys/fs/fuse/connections).
    [   16.523514] systemd[1]: Mounting Kernel Configuration File System...
    [   16.575761] systemd[1]: Rebuild Hardware Database was skipped because no trigger condition checks were met.
    [   16.804836] systemd[1]: Starting Load/Save OS Random Seed...
    [   17.084905] systemd[1]: Starting Create Static Device Nodes in /dev gracefully...
    [   17.326497] systemd[1]: Mounted Kernel Configuration File System.
    [   18.173244] systemd[1]: Finished Load/Save OS Random Seed.
    [   18.244941] systemd[1]: First Boot Complete was skipped because of an unmet condition check (ConditionFirstBoot=yes).
    [   18.418853] systemd[1]: Finished Create Static Device Nodes in /dev gracefully.
    [   18.644879] systemd[1]: Starting Create System Users...
    [   18.695448] systemd[1]: Started Journal Service.
    [   20.155042] systemd-journald[80]: Received client request to flush runtime journal.
    [   32.330935] qcaspi spi1.0 ethiso0: renamed from eth0
    [   33.122773] vdd2: disabling
    [   36.791173] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [   37.409407] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [   37.539236] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600'
    [   38.436128] remoteproc remoteproc0: wkup_m3 is available
    [   38.981456] omap_rtc 44e3e000.rtc: registered as rtc1
    [   39.200828] remoteproc remoteproc0: powering up wkup_m3
    [   39.313447] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 119996
    [   39.321998] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   39.322054] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   41.839870] usbcore: registered new device driver r8152-cfgselector
    [   42.182950] r8152-cfgselector 1-1.3: reset high-speed USB device number 3 using musb-hdrc
    [   42.553244] r8152 1-1.3:1.0 (unnamed net_device) (uninitialized): Invalid ether addr 00:00:00:00:00:00
    [   42.612556] r8152 1-1.3:1.0 (unnamed net_device) (uninitialized): Random ether addr 6e:20:12:46:7c:45
    [   43.455035] r8152 1-1.3:1.0: Direct firmware load for rtl_nic/rtl8153a-4.fw failed with error -2
    [   43.495712] r8152 1-1.3:1.0: Falling back to sysfs fallback for: rtl_nic/rtl8153a-4.fw
    [   43.575201] r8152 1-1.3:1.0 eth0: v1.12.13
    [   43.619423] usbcore: registered new interface driver r8152
    [   43.789145] usbcore: registered new interface driver cdc_ether
    [   43.965548] usbcore: registered new interface driver r8153_ecm
    [   46.505567] wl18xx_driver wl18xx.1.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [   46.549747] wl18xx_driver wl18xx.1.auto: Falling back to sysfs fallback for: ti-connectivity/wl1271-nvs.bin
    [   46.958093] r8152 1-1.3:1.0 ethusb0: renamed from eth0
    [  105.444095] r8152 1-1.3:1.0: unable to load firmware patch rtl_nic/rtl8153a-4.fw (-110)
    [  111.324049] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [  111.385309] wlcore: loaded
    [  141.885353] wlcore: PHY firmware version: Rev 8.2.0.0.245
    [  142.360014] wlcore: firmware booted (Rev 8.9.0.0.86)
    [  155.246969] wlcore: down
    


    Waveform with old kernel [working] and new [non-working] case:

    Old_Kernel_Tx.jpg [working]:

    Old_Kernel_Rx.jpg [Working]:

    New_Kernel_Tx.jpg [Not Working]:

    New_Kernel_Rx.jpg [Working]:



    Additionally, tried following options in DT but still not working ex expected:

    #1

    uart2_pins: pinmux_uart2_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x92C, PIN_INPUT_PULLUP | MUX_MODE1) /* (N19) gmii1_txclk.uart2_rxd */
    AM33XX_IOPAD(0x930, PIN_OUTPUT | MUX_MODE1) /* (M19) gmii1_rxclk.uart2_txd */
    AM33XX_IOPAD(0x95C, PIN_INPUT | MUX_MODE7) /* (A17) spi0_cs0.gpio0_5 <EN_485> */
    >;
    };

    #2:
    uart2_pins: pinmux_uart2_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x92C, PIN_INPUT_PULLUP | MUX_MODE1) /* (N19) gmii1_txclk.uart2_rxd */
    AM33XX_IOPAD(0x930, PIN_OUTPUT | MUX_MODE1) /* (M19) gmii1_rxclk.uart2_txd */
    AM33XX_IOPAD(0x95C, PIN_INPUT_PULLUP | MUX_MODE7) /* (A17) spi0_cs0.gpio0_5 <EN_485> */
    >;
    };

    #3:
    uart2_pins: pinmux_uart2_pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x92C, PIN_INPUT_PULLUP | MUX_MODE1) /* (N19) gmii1_txclk.uart2_rxd */
    AM33XX_IOPAD(0x930, PIN_OUTPUT | MUX_MODE1) /* (M19) gmii1_rxclk.uart2_txd */
    AM33XX_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE7) /* (A17) spi0_cs0.gpio0_5 <EN_485> */
    >;
    };


    #4:
    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> */
    >;
    };


    That said, AM3352 is not toggling RTS pin as expected.

    Thanks.

  • Hi Harsh,

    Thanks for the details.

    With the new kernel RTS pin remains at ~1V level all the time.

    It seems telling the pin A17 padconfig is not set to GPIO mode correctly. Please read the corresponding pin padconfig register in both working and non-working cases to see if they have the same value.

    Your Linux boot log shows the kernel version is v6.6, this is not the kernel used in SDK9.1, which should be kernel v6.1.

    Please double check that you indeed use SDK9.1 kernel.

  • Hi Bin Liu,

    Thank you for the inputs.
    It is resolved by updating to flag to "rts-gpios" in DT and turning off serial dma [# CONFIG_SERIAL_8250_DMA is not set].

    Thanks.

  • Hi Harsh,

    &uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&uart2_pins>;

    rts-gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;

    Do you mean changing "rts-gpio" to "rts-gpios" resolves the issue? I thought kernel supports both names, though "rts-gpios" is recommended.

  • Hi Bin Liu

    Yes changing to rts-gpios and disabling dma both togather helped to resolve issue.

    That was my thinking as well so i had not tried that initially but after exploring driver in detail, realized it requires rts-gpios.

    Additionally, you were right that sdk has kernel v6.1 but we upgraded kernel to incorporate all possible security patches.

    Thanks.

  • Hi Harsh,

    Yes changing to rts-gpios and disabling dma both togather helped to resolve issue.

    That was my thinking as well so i had not tried that initially but after exploring driver in detail, realized it requires rts-gpios.

    Thanks for the information. I didn't know xxx-gpio devicetree UART pin names are no longer supported.

    I dug into the kernel source, and found kernel commit

        d99482673f95 ("serial: mctrl_gpio: Check if GPIO property exisits before requesting it")

    forces the UART devicetree gpio pin name should be "xxx-gpios", and "xxx-gpio" is no longer supported.