xref: /freebsd/share/man/man4/man4.arm/imx_spi.4 (revision 069ac184)
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.Dd July 9, 2018
27.Dt IMX_SPI 4
28.Os
29.Sh NAME
30.Nm imx_spi
31.Nd device driver for the NXP i.MX family Serial Peripheral Interface (SPI)
32.Sh SYNOPSIS
33To compile this driver into the kernel,
34place the following line in your
35kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device imx_spi"
38.Ed
39.Pp
40Alternatively, to load the driver as a
41module at boot time, place the following line in
42.Xr loader.conf 5 :
43.Bd -literal -offset indent
44imx_spi_load="YES"
45.Ed
46.Sh DESCRIPTION
47The
48.Nm
49driver provides support for the
50.Sq ECSPI
51(Enhanced Configurable SPI) hardware present on the NXP i.MX family
52of processors.
53While the ECSPI hardware supports both master and slave mode,
54this driver currently operates only in master mode.
55.Pp
56Due to hardware quirks, the
57.Nm
58driver requires that all chip select pins be configured as GPIO pins.
59Use the FDT property
60.Sq cs-gpios
61to specify which pins to use as chip selects.
62You may use any GPIO pins, including the ones that the hardware would
63normally use as SPI select pins; just configure them as GPIO in the
64.Xr fdt_pinctrl 4
65data.
66.Pp
67.Sh SYSCTL VARIABLES
68The following variables are available via
69.Xr sysctl 8 ,
70and as
71.Xr loader 8
72tunables:
73.Bl -tag -width indent
74.It Va dev.imx_spi.%d.debug
75Output debugging info when non-zero.
76A value of 1 displays information about bus transfers,
772 adds information about bus clock frequency and chip select activity,
78and 3 adds information about interrupt handling.
79.El
80.Sh SEE ALSO
81.Xr fdt 4 ,
82.Xr fdt_pinctrl 4 ,
83.Xr sysctl 8
84.Sh HISTORY
85The
86.Nm
87driver first appeared in
88.Fx 12.0 .
89