Skip to content

SC16IS752 Driver not reporting Modem control correctly on PI model 4 #5506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mtnbarn opened this issue Jun 14, 2023 · 1 comment
Open
Labels
Close within 30 days Issue will be closed within 30 days unless requested to stay open Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator.

Comments

@mtnbarn
Copy link

mtnbarn commented Jun 14, 2023

Describe the bug

The modem signal lines are not being reported properly on the Raspberry PI 4. RTS,CTSDSR,DCD,DTR and RI are always reported as true using statserial. PI 3-B 1.2 and PI 2-B 1.2 report status and change in status correctly. RX/TX seem to work properly on all.

Steps to reproduce the behaviour

Run "statserial /dev/ttySC0" on PI 4 with sc16is752 attached via spi.
(All lines are NOT asserted)

output
Device: /dev/ttySC0

Signal Pin Pin Direction Status Full
Name (25) (9) (computer) Name


FG 1 - - - Frame Ground
TxD 2 3 out - Transmit Data
RxD 3 2 in - Receive Data
RTS 4 7 out 1 Request To Send
CTS 5 8 in 1 Clear To Send
DSR 6 6 in 1 Data Set Ready
GND 7 5 - - Signal Ground
DCD 8 1 in 1 Data Carrier Detect
DTR 20 4 out 1 Data Terminal Ready
RI 22 9 in 1 Ring Indicator

Device (s)

Raspberry Pi 4 Mod. B

System

root@raspberrypi:/home/pi# cat /etc/rpi-issue
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 638c7521ee0c431fafca1e2bd4fd25705b37ea5b, stage2

root@raspberrypi:/home/pi# vcgencmd version
Mar 17 2023 10:50:39
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 5.10.103-v8+ #1529 SMP PREEMPT Tue Mar 8 12:26:46 GMT 2022 aarch64 GNU/Linux

Logs

No response

Additional context

No response

@pelwell
Copy link
Contributor

pelwell commented Jun 15, 2023

I don't understand why you have submitted a patch against rpi-6.1.y (our current branch) and now are reporting a problem with the same driver but on 5.10? What happens on rpi-6.1.y?

My sc16is752 board is I2C-based, but running on a 4B I can see the CTS level going high when the pin is grounded. If you want to debug this further you should enable SPI logging:

  1. Enable SPI tracing:
$ sudo sh -c "echo 1 >/sys/kernel/debug/tracing/events/spi/enable"
  1. Run statserial, changing at least the CTS level.

  2. Capture the tracing output:

$ sudo cat /sys/kernel/debug/tracing/trace > spi_log1.txt
  1. If you want to run another test without rebooting, first clear the trace so far:
$ sudo sh -c "echo >/sys/kernel/debug/tracing/trace"

Run that test on both systems - Pi 4 and Pi 3, capturing the log to a different (and ideally suitably named) file each time.

@pelwell pelwell added Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator. Close within 30 days Issue will be closed within 30 days unless requested to stay open labels Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close within 30 days Issue will be closed within 30 days unless requested to stay open Waiting for external input Waiting for a comment from the originator of the issue, or a collaborator.
Projects
None yet
Development

No branches or pull requests

2 participants