[FS#3402] RUT955: Seriously broken

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Sun Mar 14 20:56:54 GMT 2021


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#3402 - RUT955: Seriously broken
User who did this - tophirsch (tophirsch)

----------
RS-232 is working totally fine, just select the correct kmods for usb-serial.

RS-485 is causing some trouble, but I managed to find a fix/workaround.

First there is this kernel trace at boot and whenever I try to open the serial port with picocom:

kern.info kernel: [    1.619968] 18500000.uart: ttyATH1 at MMIO 0x18500000 (irq = 12, base_baud = 2500000) is a AR933X UART
kern.warn kernel: [    1.629472] ------------[ cut here ]------------
kern.warn kernel: [    1.634176] WARNING: CPU: 0 PID: 103 at drivers/gpio/gpiolib.c:3637 gpiod_set_array_value_complex+0x33c/0x42c
kern.warn kernel: [    1.644220] Modules linked in:
kern.warn kernel: [    1.647328] CPU: 0 PID: 103 Comm: kworker/0:1 Not tainted 5.4.101 #0
kern.warn kernel: [    1.653808] Workqueue: events deferred_probe_work_func
kern.warn kernel: [    1.659013] Stack : 805c2020 802cbd00 00000009 00000002 87d70a80 800b98c0 87e0b3c0 00000000
kern.warn kernel: [    1.667495]         00000017 87cbc23c 805b3464 87d37ab4 80650000 00000000 87d37a88 2bca0ad8
kern.warn kernel: [    1.675978]         00000000 00000000 00000000 0000006b 00000063 00000000 645f7072 6f62655f
kern.warn kernel: [    1.684461]         0000006b 807d0000 00000000 0009f9f0 00000000 00000009 00000000 802cbd00
kern.warn kernel: [    1.692935]         00000009 00000002 87d70a80 87d37bb0 00000001 8031c12c 00000000 807b0000
kern.warn kernel: [    1.701410]         ...
kern.warn kernel: [    1.703894] Call Trace:
kern.warn kernel: [    1.706402] [] show_stack+0x30/0x100
kern.warn kernel: [    1.710919] [] __warn+0xc0/0x10c
kern.warn kernel: [    1.715075] [] warn_slowpath_fmt+0x5c/0xac
kern.warn kernel: [    1.720109] [] gpiod_set_array_value_complex+0x33c/0x42c
kern.warn kernel: [    1.726374] [] gpiod_set_array_value+0x34/0x48
kern.warn kernel: [    1.731788] [] mctrl_gpio_set+0xc4/0xe8
kern.warn kernel: [    1.736557] [] uart_add_one_port+0x3cc/0x534
kern.warn kernel: [    1.741768] [] ar933x_uart_probe+0x2d8/0x35c
kern.warn kernel: [    1.746981] [] platform_drv_probe+0x40/0x94
kern.warn kernel: [    1.752112] [] really_probe+0x104/0x358
kern.warn kernel: [    1.756886] [] bus_for_each_drv+0x70/0xb0
kern.warn kernel: [    1.761832] [] __device_attach+0x114/0x150
kern.warn kernel: [    1.766874] [] bus_probe_device+0x9c/0xb8
kern.warn kernel: [    1.771821] [] deferred_probe_work_func+0x7c/0xbc
kern.warn kernel: [    1.777504] [] process_one_work+0x220/0x480
kern.warn kernel: [    1.782627] [] worker_thread+0x32c/0x5c8
kern.warn kernel: [    1.787502] [] kthread+0x138/0x140
kern.warn kernel: [    1.791843] [] ret_from_kernel_thread+0x14/0x1c
kern.warn kernel: [    1.797325] ---[ end trace 69e1c3c2115ec69e ]---


Commenting the **dtr-gpios** entry in //target/linux/ath79/dts/ar9344_teltonika_rut955.dts// out, lets the kernel trace disappear and leads to the second problem: the RUT955 is only able to receive data via RS-485, transmission does not work.

This issue can be resolved by modifying the pin muxing in //target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi//:
changing:

pmx_uart2: uart2 {
	// UART1_DTR on GPIO 0, UART1_RD on GPIO 11, UART1_TD on GPIO 18
	pinctrl-single,bits = ,
			,
			;
};

to:

pmx_uart2: uart2 {
        pinctrl-single,bits =   ,
                                ,
                                ;
};


According to the Teltonike SDK the tx pin is 18, but **** configures GPIO19 at 0x1804003C.
After correcting the value and mask, transmission is working now.

As I'm not that familiar with devicetree, I dont know if commenting out **dtr-gpios** has no side effects, so be carefull.
If there are no side effects and it could be verified that this fix is working for all RUT955 devices, I could do a PR.

Device used: Teltonika RUT955 (Batch: 102)
----------

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3402#comment9487

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list