| #
1.13 |
|
24-Oct-2025 |
brad |
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.
|
| #
1.12 |
|
11-Sep-2025 |
thorpej |
If using FDT, get Vref from the device tree per the documented bindings for this device.
|
| #
1.11 |
|
06-Sep-2025 |
thorpej |
Step towards modularizing the Flattened Device Tree code.
Define attributes for each of the specific device bindings: clock, dai, dma, gpio, i2c, iommu, mbox, mmc_pwrseq, phy, power, power domain, pwm, regulator, reset controller, spi, system controller, pin controller. Include these support files only if either a provider or consumer with one of these attributes is present in the kernel config.
Add the necessary attributes to the device / attach declarations for each provider and consumer.
There are some bindings that are consumed by generic code (iommu, pinctrl, power, power domain). Provide weak stubs for these routines to handle situations where there is no provider.
No actual code changed; NFCI.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
|
| #
1.10 |
|
03-Dec-2022 |
brad |
Split the BMP280 / BME280 driver into common code and create I2C and SPI attachments.
|
|
Revision tags: bouyer-sunxi-drm-base
|
| #
1.9 |
|
17-Jan-2022 |
thorpej |
Re-factor and overhaul the "mcp23s17gpio" driver as "mcpgpio", and add support for 8-bit and I2C variants of the chip: - MCP23008 / MCP23S08: 8-bit (I2C / SPI) - MCP23017 / MCP23S17: 16-bit (I2C / SPI) - MCP23018 / MCP23S18: 16-bit (I2C / SPI), open-drain outputs
The MCP23x17 and MCP23x18 are essentially identical, software-wise; we merely report different GPIO pin capabilities (no push-pull output for MCP23x18). Also, remove the tri-state capability that was previously advertised by the old version of this driver; these chips have no way to put the pin into a HI-Z mode.
All 3 I2C versions are supported, but the SPI front-end still only supports the MCP23S17 for now (SPI autoconfiguration needs an overhaul).
mcp23s17gpio(4) remains present as a link to the new mcpgpio(4) man page.
XXX Still to-do: FDT integration, interrupt suppoort.
|
| #
1.8 |
|
07-Dec-2021 |
brad |
A driver and user land utility for the Sparkfun Serial Controlled Motor Driver module as illustrated here:
https://www.sparkfun.com/products/13911
A SCMD module is a ARM SOC simular to a Arduino in front of a motor driver chip. The single SCMD module can control two motors and up to 16 additional modules can be chained together using an internal I2C bus. One can interface with the SCMD using tty uart commands, SPI or I2C. The driver in this commit adds a kernel driver for the I2C and SPI interfaces. The command line utility provides a set of convenience commands that support most of the functions of the SCMD and is able to use the tty uart mode, SPI user land or the included kernel driver in a uniform manor.
The use of the SCMD module is mostly for small robots and the like, but it can control anything that is controllable by voltage.
|
|
Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
|
| #
1.7 |
|
02-Nov-2019 |
tnn |
add spi(4) bus frontend for ssdfb(4)
|
| #
1.6 |
|
05-Aug-2019 |
tnn |
spi: make the "slave" config(5) locator optional
needed to be able to support FDT direct attachment of SPI slaves
|
|
Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
|
| #
1.5 |
|
18-Aug-2015 |
phx |
branches: 1.5.18; MI driver for the Microchip 3x0x series of SAR analog to digital converters.
|
|
Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
|
| #
1.4 |
|
06-Apr-2014 |
kardel |
branches: 1.4.4; add Microchip MCP23S17 GPIO driver (via SPI interface)
|
|
Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
|
| #
1.3 |
|
25-Feb-2014 |
rkujawa |
branches: 1.3.2; Add preliminary driver for Microchip MCP48x1 family of DACs.
Needs more testing and an appropriate API for such (non-audio) DACs. For now one can set the output value using sysctl node. Also sysmon(4) will conveniently report the voltage on Vout pin of the DAC. Note that this is not an actual measured voltage, but merely calculated using equation from datasheet. Real voltage might be different and depend on analog circuitry attached to the DAC.
|
|
Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 netbsd-5-1-RC4 matt-nb5-mips64-k15 uebayasi-xip-base2 yamt-nfs-mp-base10 netbsd-5-1-RC3 netbsd-5-1-RC2 uebayasi-xip-base1 netbsd-5-1-RC1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase nick-csl-alignment-base5 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase mjf-devfs2-base nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 matt-armv6-prevmlocking wrstuden-fixsa-base-1 vmlocking2-base3 netbsd-4-0-RELEASE bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 netbsd-4-0-RC5 matt-nb4-arm-base matt-armv6-nbase jmcneill-base netbsd-4-0-RC4 mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base netbsd-4-0-RC3 yamt-x86pmap-base3 yamt-x86pmap-base2 netbsd-4-0-RC2 yamt-x86pmap-base netbsd-4-0-RC1 matt-armv6-base matt-mips64-base jmcneill-pm-base hpcarm-cleanup-base nick-csl-alignment-base yamt-idlelwp-base8 wrstuden-fixsa-base thorpej-atomic-base reinoud-bufcleanup-base mjf-ufs-trans-base vmlocking-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 netbsd-4-base newlock2-base yamt-splraiseipl-base2
|
| #
1.2 |
|
07-Oct-2006 |
gdamore |
branches: 1.2.2; 1.2.4; 1.2.8; 1.2.38; 1.2.94; 1.2.104; 1.2.110; 1.2.114; Add spiflash driver, and M25P instance, used for STMicro flash devices found on Meraki Mini (for example).
|
| #
1.1 |
|
02-Oct-2006 |
gdamore |
Initial commit of SPI bus (also known as Microwire) framework, along with a sample driver for the TI TMP121 temperature sensor. This has been moderately tested on Au1550, and it is not enabled in sys/conf (yet). So the change is harmless at worst, and useful at best.
Alchemy Au1550 bus driver forthcoming, along with a driver for SPI flash devices, such as found on the Meraki Mini
This development was partially funded by the Champaign-Urbana Community Wireless Network Project.
Note that there are some MD-specific SPI drivers that could probably be made MI under this new framework.
|