head 1.13; access; symbols netbsd-10-2-RELEASE:1.10 netbsd-9-5-RELEASE:1.5 netbsd-11-0-RELEASE:1.10 netbsd-11-0-RC7:1.10 netbsd-11-0-RC6:1.10 netbsd-11-0-RC5:1.10 netbsd-11-0-RC4:1.10 netbsd-11-0-RC3:1.10 netbsd-11-0-RC2:1.10 netbsd-11-0-RC1:1.10 perseant-exfatfs-base-20250801:1.10 netbsd-11:1.10.0.10 netbsd-11-base:1.10 netbsd-10-1-RELEASE:1.10 perseant-exfatfs-base-20240630:1.10 perseant-exfatfs:1.10.0.8 perseant-exfatfs-base:1.10 netbsd-8-3-RELEASE:1.5 netbsd-9-4-RELEASE:1.5 netbsd-10-0-RELEASE:1.10 netbsd-10-0-RC6:1.10 netbsd-10-0-RC5:1.10 netbsd-10-0-RC4:1.10 netbsd-10-0-RC3:1.10 netbsd-10-0-RC2:1.10 thorpej-ifq:1.10.0.6 thorpej-ifq-base:1.10 thorpej-altq-separation:1.10.0.4 thorpej-altq-separation-base:1.10 netbsd-10-0-RC1:1.10 netbsd-10:1.10.0.2 netbsd-10-base:1.10 bouyer-sunxi-drm:1.9.0.2 bouyer-sunxi-drm-base:1.9 netbsd-9-3-RELEASE:1.5 thorpej-i2c-spi-conf2:1.7.0.22 thorpej-i2c-spi-conf2-base:1.7 thorpej-futex2:1.7.0.20 thorpej-futex2-base:1.7 thorpej-cfargs2:1.7.0.18 thorpej-cfargs2-base:1.7 cjep_sun2x-base1:1.7 cjep_sun2x:1.7.0.16 cjep_sun2x-base:1.7 cjep_staticlib_x-base1:1.7 netbsd-9-2-RELEASE:1.5 cjep_staticlib_x:1.7.0.14 cjep_staticlib_x-base:1.7 thorpej-i2c-spi-conf:1.7.0.12 thorpej-i2c-spi-conf-base:1.7 thorpej-cfargs:1.7.0.10 thorpej-cfargs-base:1.7 thorpej-futex:1.7.0.8 thorpej-futex-base:1.7 netbsd-9-1-RELEASE:1.5 bouyer-xenpvh-base2:1.7 phil-wifi-20200421:1.7 bouyer-xenpvh-base1:1.7 phil-wifi-20200411:1.7 bouyer-xenpvh:1.7.0.6 bouyer-xenpvh-base:1.7 is-mlppp:1.7.0.4 is-mlppp-base:1.7 phil-wifi-20200406:1.7 netbsd-8-2-RELEASE:1.5 ad-namecache-base3:1.7 netbsd-9-0-RELEASE:1.5 netbsd-9-0-RC2:1.5 ad-namecache-base2:1.7 ad-namecache-base1:1.7 ad-namecache:1.7.0.2 ad-namecache-base:1.7 netbsd-9-0-RC1:1.5 phil-wifi-20191119:1.7 netbsd-9:1.5.0.24 netbsd-9-base:1.5 phil-wifi-20190609:1.5 netbsd-8-1-RELEASE:1.5 netbsd-8-1-RC1:1.5 isaki-audio2:1.5.0.22 isaki-audio2-base:1.5 pgoyette-compat-merge-20190127:1.5 pgoyette-compat-20190127:1.5 pgoyette-compat-20190118:1.5 pgoyette-compat-1226:1.5 pgoyette-compat-1126:1.5 pgoyette-compat-1020:1.5 pgoyette-compat-0930:1.5 pgoyette-compat-0906:1.5 jdolecek-ncqfixes:1.5.0.20 jdolecek-ncqfixes-base:1.5 netbsd-7-2-RELEASE:1.4 pgoyette-compat-0728:1.5 netbsd-8-0-RELEASE:1.5 phil-wifi:1.5.0.18 phil-wifi-base:1.5 pgoyette-compat-0625:1.5 netbsd-8-0-RC2:1.5 pgoyette-compat-0521:1.5 pgoyette-compat-0502:1.5 pgoyette-compat-0422:1.5 netbsd-8-0-RC1:1.5 pgoyette-compat-0415:1.5 pgoyette-compat-0407:1.5 pgoyette-compat-0330:1.5 pgoyette-compat-0322:1.5 pgoyette-compat-0315:1.5 netbsd-7-1-2-RELEASE:1.4 pgoyette-compat:1.5.0.16 pgoyette-compat-base:1.5 netbsd-7-1-1-RELEASE:1.4 tls-maxphys-base-20171202:1.5 matt-nb8-mediatek:1.5.0.14 matt-nb8-mediatek-base:1.5 nick-nhusb-base-20170825:1.5 perseant-stdc-iso10646:1.5.0.12 perseant-stdc-iso10646-base:1.5 netbsd-8:1.5.0.10 netbsd-8-base:1.5 prg-localcount2-base3:1.5 prg-localcount2-base2:1.5 prg-localcount2-base1:1.5 prg-localcount2:1.5.0.8 prg-localcount2-base:1.5 pgoyette-localcount-20170426:1.5 bouyer-socketcan-base1:1.5 jdolecek-ncq:1.5.0.6 jdolecek-ncq-base:1.5 pgoyette-localcount-20170320:1.5 netbsd-7-1:1.4.0.10 netbsd-7-1-RELEASE:1.4 netbsd-7-1-RC2:1.4 nick-nhusb-base-20170204:1.5 netbsd-7-nhusb-base-20170116:1.4 bouyer-socketcan:1.5.0.4 bouyer-socketcan-base:1.5 pgoyette-localcount-20170107:1.5 netbsd-7-1-RC1:1.4 nick-nhusb-base-20161204:1.5 pgoyette-localcount-20161104:1.5 netbsd-7-0-2-RELEASE:1.4 nick-nhusb-base-20161004:1.5 localcount-20160914:1.5 netbsd-7-nhusb:1.4.0.8 netbsd-7-nhusb-base:1.4 pgoyette-localcount-20160806:1.5 pgoyette-localcount-20160726:1.5 pgoyette-localcount:1.5.0.2 pgoyette-localcount-base:1.5 nick-nhusb-base-20160907:1.5 nick-nhusb-base-20160529:1.5 netbsd-7-0-1-RELEASE:1.4 nick-nhusb-base-20160422:1.5 nick-nhusb-base-20160319:1.5 nick-nhusb-base-20151226:1.5 netbsd-7-0:1.4.0.6 netbsd-7-0-RELEASE:1.4 nick-nhusb-base-20150921:1.5 netbsd-7-0-RC3:1.4 netbsd-7-0-RC2:1.4 netbsd-7-0-RC1:1.4 nick-nhusb-base-20150606:1.4 nick-nhusb-base-20150406:1.4 nick-nhusb:1.4.0.4 nick-nhusb-base:1.4 netbsd-5-2-3-RELEASE:1.2 netbsd-5-1-5-RELEASE:1.2 netbsd-6-0-6-RELEASE:1.2 netbsd-6-1-5-RELEASE:1.2 netbsd-7:1.4.0.2 netbsd-7-base:1.4 yamt-pagecache-base9:1.4 yamt-pagecache-tag8:1.2 netbsd-6-1-4-RELEASE:1.2 netbsd-6-0-5-RELEASE:1.2 tls-earlyentropy:1.3.0.2 tls-earlyentropy-base:1.4 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.3 riastradh-drm2-base3:1.3 netbsd-6-1-3-RELEASE:1.2 netbsd-6-0-4-RELEASE:1.2 netbsd-5-2-2-RELEASE:1.2 netbsd-5-1-4-RELEASE:1.2 netbsd-6-1-2-RELEASE:1.2 netbsd-6-0-3-RELEASE:1.2 netbsd-5-2-1-RELEASE:1.2 netbsd-5-1-3-RELEASE:1.2 rmind-smpnet-nbase:1.4 netbsd-6-1-1-RELEASE:1.2 riastradh-drm2-base2:1.2 riastradh-drm2-base1:1.2 riastradh-drm2:1.2.0.118 riastradh-drm2-base:1.2 rmind-smpnet:1.2.0.110 rmind-smpnet-base:1.4 netbsd-6-1:1.2.0.116 netbsd-6-0-2-RELEASE:1.2 netbsd-6-1-RELEASE:1.2 khorben-n900:1.2.0.114 netbsd-6-1-RC4:1.2 netbsd-6-1-RC3:1.2 agc-symver:1.2.0.112 agc-symver-base:1.2 netbsd-6-1-RC2:1.2 netbsd-6-1-RC1:1.2 yamt-pagecache-base8:1.2 netbsd-5-2:1.2.0.108 netbsd-6-0-1-RELEASE:1.2 yamt-pagecache-base7:1.2 netbsd-5-2-RELEASE:1.2 netbsd-5-2-RC1:1.2 matt-nb6-plus-nbase:1.2 yamt-pagecache-base6:1.2 netbsd-6-0:1.2.0.106 netbsd-6-0-RELEASE:1.2 netbsd-6-0-RC2:1.2 tls-maxphys:1.2.0.104 tls-maxphys-base:1.4 matt-nb6-plus:1.2.0.102 matt-nb6-plus-base:1.2 netbsd-6-0-RC1:1.2 jmcneill-usbmp-base10:1.2 yamt-pagecache-base5:1.2 jmcneill-usbmp-base9:1.2 yamt-pagecache-base4:1.2 jmcneill-usbmp-base8:1.2 jmcneill-usbmp-base7:1.2 jmcneill-usbmp-base6:1.2 jmcneill-usbmp-base5:1.2 jmcneill-usbmp-base4:1.2 jmcneill-usbmp-base3:1.2 jmcneill-usbmp-pre-base2:1.2 jmcneill-usbmp-base2:1.2 netbsd-6:1.2.0.100 netbsd-6-base:1.2 netbsd-5-1-2-RELEASE:1.2 netbsd-5-1-1-RELEASE:1.2 jmcneill-usbmp:1.2.0.98 jmcneill-usbmp-base:1.2 jmcneill-audiomp3:1.2.0.96 jmcneill-audiomp3-base:1.2 yamt-pagecache-base3:1.2 yamt-pagecache-base2:1.2 yamt-pagecache:1.2.0.94 yamt-pagecache-base:1.2 rmind-uvmplock-nbase:1.2 cherry-xenmp:1.2.0.92 cherry-xenmp-base:1.2 bouyer-quota2-nbase:1.2 bouyer-quota2:1.2.0.90 bouyer-quota2-base:1.2 jruoho-x86intr:1.2.0.88 jruoho-x86intr-base:1.2 matt-mips64-premerge-20101231:1.2 matt-nb5-mips64-premerge-20101231:1.2 matt-nb5-pq3:1.2.0.86 matt-nb5-pq3-base:1.2 netbsd-5-1:1.2.0.84 netbsd-5-1-RELEASE:1.2 uebayasi-xip-base4:1.2 uebayasi-xip-base3:1.2 yamt-nfs-mp-base11:1.2 netbsd-5-1-RC4:1.2 matt-nb5-mips64-k15:1.2 uebayasi-xip-base2:1.2 yamt-nfs-mp-base10:1.2 netbsd-5-1-RC3:1.2 netbsd-5-1-RC2:1.2 uebayasi-xip-base1:1.2 netbsd-5-1-RC1:1.2 rmind-uvmplock:1.2.0.82 rmind-uvmplock-base:1.2 yamt-nfs-mp-base9:1.2 uebayasi-xip:1.2.0.80 uebayasi-xip-base:1.2 netbsd-5-0-2-RELEASE:1.2 matt-nb5-mips64-premerge-20091211:1.2 matt-premerge-20091211:1.2 yamt-nfs-mp-base8:1.2 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2 matt-nb4-mips64-k7-u2a-k9b:1.2 matt-nb5-mips64-u1-k1-k5:1.2 yamt-nfs-mp-base7:1.2 matt-nb5-mips64:1.2.0.78 netbsd-5-0-1-RELEASE:1.2 jymxensuspend-base:1.2 yamt-nfs-mp-base6:1.2 yamt-nfs-mp-base5:1.2 yamt-nfs-mp-base4:1.2 jym-xensuspend-nbase:1.2 yamt-nfs-mp-base3:1.2 nick-hppapmap-base4:1.2 nick-hppapmap-base3:1.2 netbsd-5-0:1.2.0.76 netbsd-5-0-RELEASE:1.2 netbsd-5-0-RC4:1.2 netbsd-5-0-RC3:1.2 nick-hppapmap-base2:1.2 netbsd-5-0-RC2:1.2 jym-xensuspend:1.2.0.74 jym-xensuspend-base:1.2 netbsd-5-0-RC1:1.2 haad-dm-base2:1.2 haad-nbase2:1.2 ad-audiomp2:1.2.0.72 ad-audiomp2-base:1.2 netbsd-5:1.2.0.70 netbsd-5-base:1.2 nick-hppapmap:1.2.0.68 nick-hppapmap-base:1.2 matt-mips64-base2:1.2 matt-mips64:1.2.0.66 haad-dm-base1:1.2 wrstuden-revivesa-base-4:1.2 netbsd-4-0-1-RELEASE:1.2 wrstuden-revivesa-base-3:1.2 wrstuden-revivesa-base-2:1.2 wrstuden-fixsa-newbase:1.2 nick-csl-alignment-base5:1.2 haad-dm:1.2.0.64 haad-dm-base:1.2 wrstuden-revivesa-base-1:1.2 simonb-wapbl-nbase:1.2 yamt-pf42-base4:1.2 simonb-wapbl:1.2.0.62 simonb-wapbl-base:1.2 yamt-pf42-base3:1.2 hpcarm-cleanup-nbase:1.2 yamt-pf42-baseX:1.2 yamt-pf42-base2:1.2 yamt-nfs-mp-base2:1.2 wrstuden-revivesa:1.2.0.60 wrstuden-revivesa-base:1.2 yamt-nfs-mp:1.2.0.58 yamt-nfs-mp-base:1.2 yamt-pf42:1.2.0.56 yamt-pf42-base:1.2 ad-socklock-base1:1.2 yamt-lazymbuf-base15:1.2 yamt-lazymbuf-base14:1.2 keiichi-mipv6-nbase:1.2 mjf-devfs2:1.2.0.54 mjf-devfs2-base:1.2 nick-net80211-sync:1.2.0.52 nick-net80211-sync-base:1.2 keiichi-mipv6:1.2.0.50 keiichi-mipv6-base:1.2 bouyer-xeni386-merge1:1.2 matt-armv6-prevmlocking:1.2 wrstuden-fixsa-base-1:1.2 vmlocking2-base3:1.2 netbsd-4-0:1.2.0.48 netbsd-4-0-RELEASE:1.2 bouyer-xeni386-nbase:1.2 yamt-kmem-base3:1.2 cube-autoconf:1.2.0.46 cube-autoconf-base:1.2 yamt-kmem-base2:1.2 bouyer-xeni386:1.2.0.44 bouyer-xeni386-base:1.2 yamt-kmem:1.2.0.42 yamt-kmem-base:1.2 vmlocking2-base2:1.2 reinoud-bufcleanup-nbase:1.2 vmlocking2:1.2.0.40 vmlocking2-base1:1.2 netbsd-4-0-RC5:1.2 matt-nb4-arm:1.2.0.38 matt-nb4-arm-base:1.2 matt-armv6-nbase:1.2 jmcneill-base:1.2 netbsd-4-0-RC4:1.2 mjf-devfs:1.2.0.36 mjf-devfs-base:1.2 bouyer-xenamd64-base2:1.2 vmlocking-nbase:1.2 yamt-x86pmap-base4:1.2 bouyer-xenamd64:1.2.0.34 bouyer-xenamd64-base:1.2 netbsd-4-0-RC3:1.2 yamt-x86pmap-base3:1.2 yamt-x86pmap-base2:1.2 netbsd-4-0-RC2:1.2 yamt-x86pmap:1.2.0.32 yamt-x86pmap-base:1.2 netbsd-4-0-RC1:1.2 matt-armv6:1.2.0.30 matt-armv6-base:1.2 matt-mips64-base:1.2 jmcneill-pm:1.2.0.28 jmcneill-pm-base:1.2 hpcarm-cleanup:1.2.0.26 hpcarm-cleanup-base:1.2 nick-csl-alignment:1.2.0.24 nick-csl-alignment-base:1.2 yamt-idlelwp-base8:1.2 wrstuden-fixsa:1.2.0.22 wrstuden-fixsa-base:1.2 thorpej-atomic:1.2.0.20 thorpej-atomic-base:1.2 reinoud-bufcleanup:1.2.0.18 reinoud-bufcleanup-base:1.2 mjf-ufs-trans:1.2.0.16 mjf-ufs-trans-base:1.2 vmlocking:1.2.0.14 vmlocking-base:1.2 ad-audiomp:1.2.0.12 ad-audiomp-base:1.2 yamt-idlelwp:1.2.0.10 post-newlock2-merge:1.2 newlock2-nbase:1.2 yamt-lazymbuf:1.2.0.8 yamt-splraiseipl-base5:1.2 yamt-splraiseipl-base4:1.2 yamt-splraiseipl-base3:1.2 netbsd-4:1.2.0.6 netbsd-4-base:1.2 newlock2:1.2.0.4 newlock2-base:1.2 yamt-splraiseipl:1.2.0.2 yamt-splraiseipl-base2:1.2; locks; strict; comment @# @; 1.13 date 2025.10.24.23.16.11; author brad; state Exp; branches; next 1.12; commitid m1nX9aI2WwzMpSfG; 1.12 date 2025.09.11.14.32.49; author thorpej; state Exp; branches; next 1.11; commitid WGzgQt7WHQRuXiaG; 1.11 date 2025.09.06.15.44.04; author thorpej; state Exp; branches; next 1.10; commitid 9V4ybx31NXy5wF9G; 1.10 date 2022.12.03.01.04.43; author brad; state Exp; branches; next 1.9; commitid mW2p7WuqkJYw234E; 1.9 date 2022.01.17.16.31.23; author thorpej; state Exp; branches; next 1.8; commitid oqkvJPkkmkFWq0pD; 1.8 date 2021.12.07.17.39.54; author brad; state Exp; branches; next 1.7; commitid kyx3HNdcWuOc6KjD; 1.7 date 2019.11.02.14.33.27; author tnn; state Exp; branches; next 1.6; commitid ADyoVgbYJ8CLKhJB; 1.6 date 2019.08.05.23.42.48; author tnn; state Exp; branches; next 1.5; commitid ddrw6YvAwO3xETxB; 1.5 date 2015.08.18.15.54.20; author phx; state Exp; branches 1.5.18.1; next 1.4; commitid sphCBYAqepMSALxy; 1.4 date 2014.04.06.17.59.39; author kardel; state Exp; branches 1.4.4.1; next 1.3; commitid FGN9lfus4RB1lEvx; 1.3 date 2014.02.25.20.09.37; author rkujawa; state Exp; branches 1.3.2.1; next 1.2; commitid WSUY3g93wuwakwqx; 1.2 date 2006.10.07.07.21.13; author gdamore; state Exp; branches 1.2.2.1 1.2.4.1 1.2.8.1 1.2.38.1 1.2.94.1 1.2.104.1 1.2.110.1 1.2.114.1; next 1.1; 1.1 date 2006.10.02.07.18.19; author gdamore; state Exp; branches; next ; 1.5.18.1 date 2020.04.13.08.04.48; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; 1.4.4.1 date 2015.09.22.12.06.00; author skrll; state Exp; branches; next ; commitid CpNWKp3ozVNTafCy; 1.3.2.1 date 2014.08.10.06.54.58; author tls; state Exp; branches; next ; commitid evvdUIM09cnWBMLx; 1.2.2.1 date 2006.10.07.07.21.13; author yamt; state dead; branches; next 1.2.2.2; 1.2.2.2 date 2006.10.22.06.06.48; author yamt; state Exp; branches; next ; 1.2.4.1 date 2006.10.07.07.21.13; author ad; state dead; branches; next 1.2.4.2; 1.2.4.2 date 2006.11.18.21.34.49; author ad; state Exp; branches; next ; 1.2.8.1 date 2006.10.07.07.21.13; author yamt; state dead; branches; next 1.2.8.2; 1.2.8.2 date 2006.12.30.20.49.37; author yamt; state Exp; branches; next ; 1.2.38.1 date 2007.11.10.02.57.03; author matt; state Exp; branches; next ; 1.2.94.1 date 2014.05.22.11.40.36; author yamt; state Exp; branches; next ; commitid VUUXuyNWnt3AKwBx; 1.2.104.1 date 2014.08.20.00.03.50; author tls; state Exp; branches; next 1.2.104.2; commitid jTnpym9Qu0o4R1Nx; 1.2.104.2 date 2017.12.03.11.37.32; author jdolecek; state Exp; branches; next ; commitid XcIYRZTAh1LmerhA; 1.2.110.1 date 2014.05.18.17.45.47; author rmind; state Exp; branches; next ; commitid mL5ZYSzpqK6QS2Bx; 1.2.114.1 date 2013.05.10.01.25.07; author khorben; state Exp; branches; next 1.2.114.2; 1.2.114.2 date 2013.05.15.13.52.19; author khorben; state Exp; branches; next ; commitid lJ6z0hZOHZVKrJPw; desc @@ 1.13 log @ 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. @ text @# $NetBSD: files.spi,v 1.12 2025/09/11 14:32:49 thorpej Exp $ define spibus { } device spi { [slave = -1] } attach spi at spibus file dev/spi/spi.c spi | spibus # # SPI client devices # # Common SPI flash support define spiflashbus { } device spiflash: disk attach spiflash at spiflashbus file dev/spi/spiflash.c spiflash | spiflashbus # STMicro M25P SPI flash device m25p: spiflashbus attach m25p at spi file dev/spi/m25p.c m25p # TI TMP121 digital temperature sensor device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp # MCP48x1 DAC device mcp48x1dac attach mcp48x1dac at spi file dev/spi/mcp48x1.c mcp48x1dac # MCP23S17 16-bit GPIO attach mcpgpio at spi with mcpgpio_spi file dev/spi/mcp23xxxgpio_spi.c mcpgpio_spi # Solomon Systech SSD13xx PLED/OLED display attach ssdfb at spi with ssdfb_spi: fdt_gpio file dev/spi/ssdfb_spi.c ssdfb_spi # MCP3x0x ADC device mcp3kadc: fdt_regulator, sysmon_envsys attach mcp3kadc at spi file dev/spi/mcp3k.c mcp3kadc # Sparkfun Serial motor controller attach scmd at spi with scmdspi file dev/spi/scmdspi.c scmdspi # Bosch BMP280 / BME280 sensor attach bmx280thp at spi with bmx280thpspi file dev/spi/bmx280thpspi.c bmx280thpspi # NXP SC16IS7xx UART bridge defparam opt_sc16is7xx.h SC16IS7XX_SPI_FREQUENCY attach sc16is7xx at spi with sc16is7xxspi file dev/spi/sc16is7xxspi.c sc16is7xxspi @ 1.12 log @If using FDT, get Vref from the device tree per the documented bindings for this device. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.11 2025/09/06 15:44:04 thorpej Exp $ d54 5 @ 1.11 log @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. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.10 2022/12/03 01:04:43 brad Exp $ d43 1 a43 1 device mcp3kadc: sysmon_envsys @ 1.10 log @ Split the BMP280 / BME280 driver into common code and create I2C and SPI attachments. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.9 2022/01/17 16:31:23 thorpej Exp $ d39 1 a39 1 attach ssdfb at spi with ssdfb_spi @ 1.9 log @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. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.8 2021/12/07 17:39:54 brad Exp $ d50 4 @ 1.8 log @ 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. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.7 2019/11/02 14:33:27 tnn Exp $ d35 2 a36 3 device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio d49 1 a49 1 file dev/spi/scmdspi.c scmdspi @ 1.7 log @add spi(4) bus frontend for ssdfb(4) @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.6 2019/08/05 23:42:48 tnn Exp $ d47 4 @ 1.6 log @spi: make the "slave" config(5) locator optional needed to be able to support FDT direct attachment of SPI slaves @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.5 2015/08/18 15:54:20 phx Exp $ d39 4 @ 1.5 log @MI driver for the Microchip 3x0x series of SAR analog to digital converters. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.4 2014/04/06 17:59:39 kardel Exp $ d5 1 a5 1 device spi { slave } @ 1.5.18.1 log @Mostly merge changes from HEAD upto 20200411 @ text @d1 1 a1 1 # $NetBSD$ d5 1 a5 1 device spi { [slave = -1] } a38 4 # Solomon Systech SSD13xx PLED/OLED display attach ssdfb at spi with ssdfb_spi file dev/spi/ssdfb_spi.c ssdfb_spi @ 1.4 log @add Microchip MCP23S17 GPIO driver (via SPI interface) @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.3 2014/02/25 20:09:37 rkujawa Exp $ d38 5 @ 1.4.4.1 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.5 2015/08/18 15:54:20 phx Exp $ a37 5 # MCP3x0x ADC device mcp3kadc: sysmon_envsys attach mcp3kadc at spi file dev/spi/mcp3k.c mcp3kadc @ 1.3 log @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. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ d34 4 @ 1.3.2.1 log @Rebase. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.4 2014/04/06 17:59:39 kardel Exp $ a33 4 # MCP23S17 16-bit GPIO device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio @ 1.2 log @Add spiflash driver, and M25P instance, used for STMicro flash devices found on Meraki Mini (for example). @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.1 2006/10/02 07:18:19 gdamore Exp $ d28 6 @ 1.2.104.1 log @Rebase to HEAD as of a few days ago. @ text @d1 1 a1 1 # $NetBSD$ a27 10 # MCP48x1 DAC device mcp48x1dac attach mcp48x1dac at spi file dev/spi/mcp48x1.c mcp48x1dac # MCP23S17 16-bit GPIO device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio @ 1.2.104.2 log @update from HEAD @ text @a37 5 # MCP3x0x ADC device mcp3kadc: sysmon_envsys attach mcp3kadc at spi file dev/spi/mcp3k.c mcp3kadc @ 1.2.94.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ a27 10 # MCP48x1 DAC device mcp48x1dac attach mcp48x1dac at spi file dev/spi/mcp48x1.c mcp48x1dac # MCP23S17 16-bit GPIO device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio @ 1.2.110.1 log @sync with head @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ a27 10 # MCP48x1 DAC device mcp48x1dac attach mcp48x1dac at spi file dev/spi/mcp48x1.c mcp48x1dac # MCP23S17 16-bit GPIO device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio @ 1.2.114.1 log @Just like for the I2C and GPIO buses, added an interrupt locator to the SPI bus, so that ARM device drivers on either of these buses (like on the Nokia N900) can register and react on system interrupts. These interrupts are typically triggered via GPIO pins. XXX This change is not adequate because intr_establish() is a MD interface, so it will have to be re-designed before merging to the main tree. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ d5 1 a5 1 device spi { slave, [intr = -1] } @ 1.2.114.2 log @Let the bus speed of SPI devices be specified within the kernel configuration. @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2.114.1 2013/05/10 01:25:07 khorben Exp $ d5 1 a5 1 device spi { slave, [intr = -1], [speed = -1] } @ 1.2.4.1 log @file files.spi was added on branch newlock2 on 2006-11-18 21:34:49 +0000 @ text @d1 27 @ 1.2.4.2 log @Sync with head. @ text @a0 27 # $NetBSD: files.spi,v 1.2.4.1 2006/11/18 21:34:49 ad Exp $ define spibus { } device spi { slave } attach spi at spibus file dev/spi/spi.c spi | spibus # # SPI client devices # # Common SPI flash support define spiflashbus { } device spiflash: disk attach spiflash at spiflashbus file dev/spi/spiflash.c spiflash | spiflashbus # STMicro M25P SPI flash device m25p: spiflashbus attach m25p at spi file dev/spi/m25p.c m25p # TI TMP121 digital temperature sensor device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp @ 1.2.2.1 log @file files.spi was added on branch yamt-splraiseipl on 2006-10-22 06:06:48 +0000 @ text @d1 27 @ 1.2.2.2 log @sync with head @ text @a0 27 # $NetBSD: files.spi,v 1.2.2.1 2006/10/22 06:06:48 yamt Exp $ define spibus { } device spi { slave } attach spi at spibus file dev/spi/spi.c spi | spibus # # SPI client devices # # Common SPI flash support define spiflashbus { } device spiflash: disk attach spiflash at spiflashbus file dev/spi/spiflash.c spiflash | spiflashbus # STMicro M25P SPI flash device m25p: spiflashbus attach m25p at spi file dev/spi/m25p.c m25p # TI TMP121 digital temperature sensor device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp @ 1.2.8.1 log @file files.spi was added on branch yamt-lazymbuf on 2006-12-30 20:49:37 +0000 @ text @d1 27 @ 1.2.8.2 log @sync with head. @ text @a0 27 # $NetBSD: files.spi,v 1.2.8.1 2006/12/30 20:49:37 yamt Exp $ define spibus { } device spi { slave } attach spi at spibus file dev/spi/spi.c spi | spibus # # SPI client devices # # Common SPI flash support define spiflashbus { } device spiflash: disk attach spiflash at spiflashbus file dev/spi/spiflash.c spiflash | spiflashbus # STMicro M25P SPI flash device m25p: spiflashbus attach m25p at spi file dev/spi/m25p.c m25p # TI TMP121 digital temperature sensor device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp @ 1.2.38.1 log @Add AT91 support from Sami Kantoluoto Add TI OMAP2430 support from Marty Fouts @@ Danger Inc @ text @d1 1 a1 1 # $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ a27 5 # SPI output buffer device spi_obuf: gpiobus attach spi_obuf at spi file dev/spi/spi_obuf.c spi_obuf needs-flag @ 1.1 log @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. @ text @d1 1 a1 1 # $NetBSD$ d13 11 @