1.\" 2.\" Copyright (c) 2018 Ian Lepore <ian@freebsd.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd July 9, 2018 29.Dt IMX_SPI 4 30.Os 31.Sh NAME 32.Nm imx_spi 33.Nd device driver for the NXP i.MX family Serial Peripheral Interface (SPI) 34.Sh SYNOPSIS 35To compile this driver into the kernel, 36place the following line in your 37kernel configuration file: 38.Bd -ragged -offset indent 39.Cd "device imx_spi" 40.Ed 41.Pp 42Alternatively, to load the driver as a 43module at boot time, place the following line in 44.Xr loader.conf 5 : 45.Bd -literal -offset indent 46imx_spi_load="YES" 47.Ed 48.Sh DESCRIPTION 49The 50.Nm 51driver provides support for the 52.Sq ECSPI 53(Enhanced Configurable SPI) hardware present on the NXP i.MX family 54of processors. 55While the ECSPI hardware supports both master and slave mode, 56this driver currently operates only in master mode. 57.Pp 58Due to hardware quirks, the 59.Nm 60driver requires that all chip select pins be configured as GPIO pins. 61Use the FDT property 62.Sq cs-gpios 63to specify which pins to use as chip selects. 64You may use any GPIO pins, including the ones that the hardware would 65normally use as SPI select pins; just configure them as GPIO in the 66.Xr fdt_pinctrl 4 67data. 68.Pp 69.Sh SYSCTL VARIABLES 70The following variables are available via 71.Xr sysctl 8 , 72and as 73.Xr loader 8 74tunables: 75.Bl -tag -width indent 76.It Va dev.imx_spi.%d.debug 77Output debugging info when non-zero. 78A value of 1 displays information about bus transfers, 792 adds information about bus clock frequency and chip select activity, 80and 3 adds information about interrupt handling. 81.El 82.Sh SEE ALSO 83.Xr fdt 4 , 84.Xr fdt_pinctrl 4 , 85.Xr sysctl 8 86.Sh HISTORY 87The 88.Nm 89driver first appeared in 90.Fx 12.0 . 91