Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   brad
Date:           Fri Oct 24 23:16:12 UTC 2025

Modified Files:
        src/distrib/sets/lists/man: mi
        src/distrib/sets/lists/manhtml: mi
        src/share/man/man4: Makefile gpio.4 iic.4 spi.4
        src/sys/conf: files
        src/sys/dev/i2c: files.i2c
        src/sys/dev/ic: com.c comvar.h
        src/sys/dev/spi: files.spi
Added Files:
        src/share/man/man4: sc16is7xx.4
        src/sys/dev/i2c: sc16is7xxi2c.c
        src/sys/dev/ic: sc16is7xx.c sc16is7xx_tty.c sc16is7xx_ttyvar.h
            sc16is7xxreg.h sc16is7xxvar.h
        src/sys/dev/spi: sc16is7xxspi.c

Log Message:
A driver for the NXP SC16IS7xx family of UART chips.  This family is
mostly a 16C450 with features from the 16C550, 16C650 and 16C750 and
makes use of src/sys/dev/ic/com.c for much of the heavy lifting.

A BIG difference is that the chip family is attached via a I2C or SPI
bus and is in no way, shape or form, attached to the computer via a
computer bus.

Since spin locks are not allowed to be held while calling to the I2C
or SPI framework com.c grew a new hw feature flag where it could be
run at something other than a hard IP level and doesn't hold spin lock
(for very long).  In particular, IPL_SOFTSERIAL.  This method is
enabled via a hw feature flag and should not effect any other use of
com.c.  Other changes with this new method of use include the use of
workqueues and such.

A further feature added to com.c was the abilty to take advantage of
the MCR prescaler that is present in the SC16IS7xx family and likely
present in the 16C650.  This prescaler is tried if the baud rate
requested can not be met with the frequency oscillator that the chip is
built with.

The chip family does not use any particular frequency oscillator for
the baud rate generator.  In order to deal with this the frequency can
be set via sysctl, a kernel option or with a FDT overlay if that is
supported.

Most of the features of the chip family are supported including the
gpio pins via gpiobus(4) that are present with some of the family
members.

The chip can attach via I2C or SPI and can make sure of FDT if that is
present in the system.

This chip family has been around for quite some time and there are a
number of breakout boards on Amazon.  It is also reasonably priced and
you can roll your own board if you can perform simple SMD soldering as
very few additional components are required.


To generate a diff of this commit:
cvs rdiff -u -r1.1810 -r1.1811 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.31 -r1.32 src/distrib/sets/lists/manhtml/mi
cvs rdiff -u -r1.748 -r1.749 src/share/man/man4/Makefile
cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/gpio.4
cvs rdiff -u -r1.39 -r1.40 src/share/man/man4/iic.4
cvs rdiff -u -r0 -r1.1 src/share/man/man4/sc16is7xx.4
cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/spi.4
cvs rdiff -u -r1.1316 -r1.1317 src/sys/conf/files
cvs rdiff -u -r1.136 -r1.137 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/sc16is7xxi2c.c
cvs rdiff -u -r1.388 -r1.389 src/sys/dev/ic/com.c
cvs rdiff -u -r1.98 -r1.99 src/sys/dev/ic/comvar.h
cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/sc16is7xx.c \
    src/sys/dev/ic/sc16is7xx_tty.c src/sys/dev/ic/sc16is7xx_ttyvar.h \
    src/sys/dev/ic/sc16is7xxreg.h src/sys/dev/ic/sc16is7xxvar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/spi/files.spi
cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/sc16is7xxspi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index