xref: /freebsd/share/man/man4/man4.arm/devcfg.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1735c7fe5SWojciech A. Koszek.\"
2735c7fe5SWojciech A. Koszek.\" Copyright (c) 2013 Thomas Skibo
3735c7fe5SWojciech A. Koszek.\" All rights reserved.
4735c7fe5SWojciech A. Koszek.\"
5735c7fe5SWojciech A. Koszek.\" Redistribution and use in source and binary forms, with or without
6735c7fe5SWojciech A. Koszek.\" modification, are permitted provided that the following conditions
7735c7fe5SWojciech A. Koszek.\" are met:
8735c7fe5SWojciech A. Koszek.\" 1. Redistributions of source code must retain the above copyright
9735c7fe5SWojciech A. Koszek.\"    notice, this list of conditions and the following disclaimer.
10735c7fe5SWojciech A. Koszek.\" 2. The name of the author may not be used to endorse or promote products
11735c7fe5SWojciech A. Koszek.\"    derived from this software without specific prior written permission.
12735c7fe5SWojciech A. Koszek.\"
13735c7fe5SWojciech A. Koszek.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14735c7fe5SWojciech A. Koszek.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15735c7fe5SWojciech A. Koszek.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16735c7fe5SWojciech A. Koszek.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17735c7fe5SWojciech A. Koszek.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18735c7fe5SWojciech A. Koszek.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19735c7fe5SWojciech A. Koszek.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20735c7fe5SWojciech A. Koszek.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21735c7fe5SWojciech A. Koszek.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22735c7fe5SWojciech A. Koszek.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23735c7fe5SWojciech A. Koszek.\" SUCH DAMAGE.
24735c7fe5SWojciech A. Koszek.\"
25735c7fe5SWojciech A. Koszek.Dd February 28, 2013
26735c7fe5SWojciech A. Koszek.Dt DEVCFG 4
27735c7fe5SWojciech A. Koszek.Os
28735c7fe5SWojciech A. Koszek.Sh NAME
29735c7fe5SWojciech A. Koszek.Nm devcfg
30735c7fe5SWojciech A. Koszek.Nd Zynq PL device config interface
31735c7fe5SWojciech A. Koszek.Sh SYNOPSIS
32735c7fe5SWojciech A. Koszek.Cd device devcfg
33735c7fe5SWojciech A. Koszek.Sh DESCRIPTION
34735c7fe5SWojciech A. KoszekThe special file
35735c7fe5SWojciech A. Koszek.Pa /dev/devcfg
36735c7fe5SWojciech A. Koszekcan be used to configure the PL (FPGA) section of the Xilinx Zynq-7000.
37735c7fe5SWojciech A. Koszek.Pp
388d0d14e9SJoel DahlOn the first write to the character device at file offset 0, the
398d0d14e9SJoel Dahl.Nm
408d0d14e9SJoel Dahldriver
41735c7fe5SWojciech A. Koszekasserts the top-level PL reset signals, disables the PS-PL level shifters,
429c5e5071SWojciech A. Koszekand clears the PL configuration.
439c5e5071SWojciech A. KoszekWrite data is sent to the PCAP (processor configuration access port).
449c5e5071SWojciech A. KoszekWhen the PL asserts the DONE signal, the devcfg driver will enable the level
459c5e5071SWojciech A. Koszekshifters and release the top-level PL reset signals.
46735c7fe5SWojciech A. Koszek.Pp
479c5e5071SWojciech A. KoszekThe PL (FPGA) can be configured by writing the bitstream to the character
489c5e5071SWojciech A. Koszekdevice like this:
49735c7fe5SWojciech A. Koszek.Bd -literal -offset indent
50735c7fe5SWojciech A. Koszekcat design.bit.bin > /dev/devcfg
51735c7fe5SWojciech A. Koszek.Ed
52735c7fe5SWojciech A. Koszek.Pp
53735c7fe5SWojciech A. KoszekThe file should not be confused with the .bit file output by the FPGA
549c5e5071SWojciech A. Koszekdesign tools.
559c5e5071SWojciech A. KoszekIt is the binary form of the configuration bitstream.
56735c7fe5SWojciech A. KoszekThe Xilinx
578d0d14e9SJoel Dahl.Ic promgen
58735c7fe5SWojciech A. Koszektool can do the conversion:
59735c7fe5SWojciech A. Koszek.Bd -literal -offset indent
60735c7fe5SWojciech A. Koszekpromgen -b -w -p bin -data_width 32 -u 0 design.bit -o design.bit.bin
61735c7fe5SWojciech A. Koszek.Ed
62735c7fe5SWojciech A. Koszek.Sh SYSCTL VARIABLES
638d0d14e9SJoel DahlThe
648d0d14e9SJoel Dahl.Nm
658d0d14e9SJoel Dahldriver provides the following
66735c7fe5SWojciech A. Koszek.Xr sysctl 8
67735c7fe5SWojciech A. Koszekvariables:
688d0d14e9SJoel Dahl.Bl -tag -width 4n
69735c7fe5SWojciech A. Koszek.It Va hw.fpga.pl_done
70735c7fe5SWojciech A. Koszek.Pp
719c5e5071SWojciech A. KoszekThis variable always reflects the status of the PL's DONE signal.
729c5e5071SWojciech A. KoszekA 1 means the PL section has been properly programmed.
73735c7fe5SWojciech A. Koszek.It Va hw.fpga.en_level_shifters
74735c7fe5SWojciech A. Koszek.Pp
75735c7fe5SWojciech A. KoszekThis variable controls if the PS-PL level shifters are enabled after the
769c5e5071SWojciech A. KoszekPL section has been reconfigured.
779c5e5071SWojciech A. KoszekThis variable is 1 by default but setting it to 0 allows the PL section to be
788d0d14e9SJoel Dahlprogrammed with configurations that do not interface to the PS section of the
799c5e5071SWojciech A. Koszekpart.
809c5e5071SWojciech A. KoszekChanging this value has no effect on the level shifters until the next device
819c5e5071SWojciech A. Koszekreconfiguration.
828d0d14e9SJoel Dahl.El
83735c7fe5SWojciech A. Koszek.Sh FILES
848d0d14e9SJoel Dahl.Bl -tag -width 12n
858d0d14e9SJoel Dahl.It Pa /dev/devcfg
868d0d14e9SJoel DahlCharacter device for the
87735c7fe5SWojciech A. Koszek.Nm
88735c7fe5SWojciech A. Koszekdriver.
898d0d14e9SJoel Dahl.El
90735c7fe5SWojciech A. Koszek.Sh SEE ALSO
91735c7fe5SWojciech A. KoszekZynq-7000 SoC Technical Reference Manual (Xilinx doc UG585)
928d0d14e9SJoel Dahl.Sh AUTHORS
93*cdeeb1fbSChristian Brueffer.An Thomas Skibo
94