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