【Linux】
No ttysWK device files
Posted at 7/7/2023 19:36:07
View:1298
|
Replies:7
Print
Only Author
[Copy Link]
1 #
Type:
Self-Compiled Firmware
SDK Package Name:
??
Last Commit:
0000-00-00 00:00:00
Modification Content:
??
Log:
log.zip
Problem description and steps to reproduce:
Last edited by EugenyB1 In 7/7/2023 23:27 Editor
Edit:
So we have two problems:
(1) my local bench assembles update.img without support of these sWK files - why? What should I do?
(2) I see nothing in the scope output when writing to any of these files with standard buildroot image running. Is device faulty?
More info:
I compiled this T-Firefly / rk3308-linux · GitLab (howver the source code was downloaded approximately a year ago) and I do not see RS485 device files in the list.
RS485_1: /dev/ttysWK0
RS485_2: /dev/ttysWK1
RS485_3: /dev/ttysWK2
RS232 : /dev/ttysWK3 Copy the code
How to identify which device file corresponds to each RS485 serial port?
/ # cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:unknown port:00000000 irq:0
1: uart:unknown port:00000000 irq:0
2: uart:unknown port:00000000 irq:0
3: uart:unknown port:00000000 irq:0
4: uart:unknown port:00000000 irq:0 Copy the code / # echo "aaa" > /dev/ttyS0
sh: write error: Input/output error
/ # echo "aaa" > /dev/ttyS1
sh: write error: Input/output error
/ # echo "aaa" > /dev/ttyS2
sh: write error: Input/output error
/ # echo "aaa" > /dev/ttyS3
sh: write error: Input/output error
/ # echo "aaa" > /dev/ttyS4
sh: write error: Input/output error Copy the code
Executable file spi-wk2xxx has the following :con_wk2xxx_subport bad iobase %d
1: bad iobase %d
wk2xxx-%d %s cannot create workqueue
wk2xxxspi cannot allocate irq %d
ttySWK ttysWK Copy the code but I do not see source for it.
/proc/tty # cat drivers
/dev/tty /dev/tty 5 0 system:/dev/tty
/dev/console /dev/console 5 1 system:console
/dev/ptmx /dev/ptmx 5 2 system
/dev/vc/0 /dev/vc/0 4 0 system:vtmaster
rfcomm /dev/rfcomm 216 0-255 serial
usbserial /dev/ttyUSB 188 0-511 serial
serial /dev/ttyS 4 64-68 serial
pty_slave /dev/pts 136 0-1048575 pty:slave
pty_master /dev/ptm 128 0-1048575 pty:master
unknown /dev/tty 4 1-63 console
fiq-debugger /dev/ttyFIQ 254 0 serial Copy the code
Now I am comparing behavior of IHC3308GW-Buildroot-20211221.img (original) with mehavior of my compiled image:
original[ 1.120580] pwm-regulator vdd-core: lookup for GPIO enable failed
[ 1.121418] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[ 1.124688] [drm] Initialized drm 1.1.0 20060810
[ 1.124846] random: nonblocking pool is initialized
[ 1.127942] Unable to detect cache hierarchy for CPU 0
[ 1.135358] loop: module loaded
[ 1.135600] SCSI Media Changer driver v0.25
*******************************************
[ 1.136809] rockchip-spi ff120000.spi: Failed to request TX DMA channel
[ 1.136851] rockchip-spi ff120000.spi: Failed to request RX DMA channel
[ 1.139473] 11wk2xxx_probe: setup mode 0, 8 bits/w, 10000000 Hz max
[ 1.139557] of_get_named_gpiod_flags: parsed 'power-gpio' property of node '/spi@ff120000/spi_wk2xxx@00[0]' - status (0)
[ 1.139629] of_get_named_gpiod_flags: parsed 'reset-gpio' property of node '/spi@ff120000/spi_wk2xxx@00[0]' - status (0)
[ 1.309710] of_get_named_gpiod_flags: parsed 'irq-gpio' property of node '/spi@ff120000/spi_wk2xxx@00[0]' - status (0)
[ 1.309760] of_get_named_gpiod_flags: parsed 'cs-gpio' property of node '/spi@ff120000/spi_wk2xxx@00[0]' - status (0)
[ 1.309957] wk2xxx_serial_init()
[ 1.309981] wk2xxx_request_port
[ 1.310001] ttysWK0 at I/O 0x1 (irq = 87, base_baud = 460800) is a wk2xxx
[ 1.310404] uart_add_one_port success for line i:= 0 with right 0
[ 1.310429] wk2xxx_request_port
[ 1.310445] ttysWK1 at I/O 0x2 (irq = 87, base_baud = 460800) is a wk2xxx
[ 1.310733] uart_add_one_port success for line i:= 1 with right 0
[ 1.310754] wk2xxx_request_port
[ 1.310770] ttysWK2 at I/O 0x3 (irq = 87, base_baud = 460800) is a wk2xxx
[ 1.311037] uart_add_one_port success for line i:= 2 with right 0
[ 1.311060] wk2xxx_request_port
[ 1.311076] ttysWK3 at I/O 0x4 (irq = 87, base_baud = 460800) is a wk2xxx
[ 1.311392] uart_add_one_port success for line i:= 3 with right 0
[ 1.311412] uart_add_one_port = 0x0
*******************************************
[ 1.311468] register spi return v = :0
[ 1.311538] lora1276 register spi return v = :0
[ 1.311585] CAN device driver interface
[ 1.324486] rk_gmac-dwmac ff4e0000.ethernet: clock input or output? (input).
[ 1.324542] rk_gmac-dwmac ff4e0000.ethernet: Can not read property: tx_delay.
[ 1.324561] rk_gmac-dwmac ff4e0000.ethernet: set tx_delay to 0x30
[ 1.324577] rk_gmac-dwmac ff4e0000.ethernet: Can not read property: rx_delay.
[ 1.324594] rk_gmac-dwmac ff4e0000.ethernet: set rx_delay to 0x10
[ 1.324619] rk_gmac-dwmac ff4e0000.ethernet: integrated PHY? (no).
[ 1.324896] rk_gmac-dwmac ff4e0000.ethernet: clock input from PHY
[ 1.329934] rk_gmac-dwmac ff4e0000.ethernet: init for RMII
[ 1.330088] stmmac - user ID: 0x10, Synopsys ID: 0x35 Copy the code my:[ 1.115818] pwm-regulator vdd-core: lookup for GPIO enable failed
[ 1.116614] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled
[ 1.119964] [drm] Initialized drm 1.1.0 20060810
[ 1.120073] random: nonblocking pool is initialized
[ 1.122757] Unable to detect cache hierarchy for CPU 0
[ 1.130107] loop: module loaded
[ 1.130362] SCSI Media Changer driver v0.25
*******************************************
[ 1.131067] register spi return v = :0
[ 1.131143] lora1276 register spi return v = :0
[ 1.131196] CAN device driver interface Copy the code
original
/ # find . | grep wk2xxx
./sys/bus/spi/drivers/wk2xxxspi
./sys/bus/spi/drivers/wk2xxxspi/bind
./sys/bus/spi/drivers/wk2xxxspi/spi0.0
./sys/bus/spi/drivers/wk2xxxspi/uevent
./sys/bus/spi/drivers/wk2xxxspi/unbind
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/reg
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/name
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/cs-gpio
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/power-gpio
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/compatible
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/spi-max-frequency
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/irq-gpio
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/reset-gpio
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/status
./sys/firmware/devicetree/base/spi@ff120000/spi_wk2xxx@00/phandle
./sys/firmware/devicetree/base/__symbols__/spi_wk2xxx Copy the code my
/ # find . | grep wk2xxx
find: ./proc/880: No such file or directory
./sys/bus/spi/drivers/wk2xxxspi
./sys/bus/spi/drivers/wk2xxxspi/bind
./sys/bus/spi/drivers/wk2xxxspi/uevent
./sys/bus/spi/drivers/wk2xxxspi/unbind Copy the code Therefore device driver is present in my build, but it totally refuses to see the hardware.
Before this driver initialization in the kernel log, there's something else missing in my build:
[ 0.455758] of_get_named_gpiod_flags: parsed 'gpio' property of node '/vcc3v3-4g-power-regulator[0]' - status (0)
[ 0.456329] of_get_named_gpiod_flags: parsed 'gpio' property of node '/vcc3v3-4g-reset-regulator[0]' - status (0)
Copy the code