Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,19 @@
Altera SOCFPGA Arria10 FPGA Manager
Required properties:
- compatible : should contain "altr,socfpga-a10-fpga-mgr"
- reg : base address and size for memory mapped io.
- The first index is for FPGA manager register access.
- The second index is for writing FPGA configuration data.
- resets : Phandle and reset specifier for the device's reset.
- clocks : Clocks used by the device.
Example:
fpga_mgr: fpga-mgr@ffd03000 {
compatible = "altr,socfpga-a10-fpga-mgr";
reg = <0xffd03000 0x100
0xffcfe400 0x20>;
clocks = <&l4_mp_clk>;
resets = <&rst FPGAMGR_RESET>;
};
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,a10-pr-ip.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera Arria10 Partial Reconfiguration IP
maintainers:
- Matthew Gerlach <matthew.gerlach@linux.intel.com>
description:
The Altera Arria 10 Partial Reconfiguration IP core allows the host
processor to perform partial reconfiguration of the FPGA fabric.
properties:
compatible:
const: altr,a10-pr-ip
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
fpga-mgr@ff20c000 {
compatible = "altr,a10-pr-ip";
reg = <0xff20c000 0x10>;
};
@@ -0,0 +1,74 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,fpga-passive-serial.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera Passive Serial SPI FPGA Manager
maintainers:
- Fabio Estevam <festevam@denx.de>
description: |
Altera FPGAs support a method of loading the bitstream over what is
referred to as "passive serial".
The passive serial link is not technically SPI, and might require extra
circuits in order to play nicely with other SPI slaves on the same bus.
See https://www.altera.com/literature/hb/cyc/cyc_c51013.pdf
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- altr,fpga-passive-serial
- altr,fpga-arria10-passive-serial
spi-max-frequency:
maximum: 20000000
reg:
maxItems: 1
nconfig-gpios:
description:
Config pin (referred to as nCONFIG in the manual).
maxItems: 1
nstat-gpios:
description:
Status pin (referred to as nSTATUS in the manual).
maxItems: 1
confd-gpios:
description:
confd pin (referred to as CONF_DONE in the manual)
maxItems: 1
required:
- compatible
- reg
- nconfig-gpios
- nstat-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
fpga@0 {
compatible = "altr,fpga-passive-serial";
reg = <0>;
nconfig-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>;
nstat-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
confd-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
};
};
...
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,freeze-bridge-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera Freeze Bridge Controller
description:
The Altera Freeze Bridge Controller manages one or more freeze bridges.
The controller can freeze/disable the bridges which prevents signal
changes from passing through the bridge. The controller can also
unfreeze/enable the bridges which allows traffic to pass through the bridge
normally.
maintainers:
- Xu Yilun <yilun.xu@intel.com>
allOf:
- $ref: fpga-bridge.yaml#
properties:
compatible:
const: altr,freeze-bridge-controller
reg:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
fpga-bridge@100000450 {
compatible = "altr,freeze-bridge-controller";
reg = <0x1000 0x10>;
bridge-enable = <0>;
};
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,socfpga-fpga-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera SOCFPGA FPGA Manager
maintainers:
- Steffen Trumtrar <s.trumtrar@pengutronix.de>
properties:
compatible:
const: altr,socfpga-fpga-mgr
reg:
items:
- description: FPGA manager register access
- description: Writing FPGA configuration data
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
fpgamgr@ff706000 {
compatible = "altr,socfpga-fpga-mgr";
reg = <0xff706000 0x1000>,
<0xffb90000 0x1000>;
interrupts = <0 175 4>;
};
@@ -0,0 +1,33 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,socfpga-fpga2sdram-bridge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera FPGA To SDRAM Bridge
maintainers:
- Xu Yilun <yilun.xu@intel.com>
allOf:
- $ref: fpga-bridge.yaml#
properties:
compatible:
const: altr,socfpga-fpga2sdram-bridge
reg:
maxItems: 1
required:
- compatible
unevaluatedProperties: false
examples:
- |
fpga-bridge@ffc25080 {
compatible = "altr,socfpga-fpga2sdram-bridge";
reg = <0xffc25080 0x4>;
bridge-enable = <0>;
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/altr,socfpga-hps2fpga-bridge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Altera FPGA/HPS Bridge
maintainers:
- Xu Yilun <yilun.xu@intel.com>
allOf:
- $ref: fpga-bridge.yaml#
properties:
compatible:
enum:
- altr,socfpga-lwhps2fpga-bridge
- altr,socfpga-hps2fpga-bridge
- altr,socfpga-fpga2hps-bridge
reg:
maxItems: 1
resets:
maxItems: 1
clocks:
maxItems: 1
required:
- compatible
- reg
- clocks
- resets
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/reset/altr,rst-mgr.h>
fpga-bridge@ff400000 {
compatible = "altr,socfpga-lwhps2fpga-bridge";
reg = <0xff400000 0x100000>;
bridge-enable = <0>;
clocks = <&l4_main_clk>;
resets = <&rst LWHPS2FPGA_RESET>;
};
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/efinix,trion-config.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Efinix SPI FPGA Manager
maintainers:
- Ian Dannapel <iansdannapel@gmail.com>
description: |
Efinix FPGAs (Trion, Topaz, and Titanium families) support loading bitstreams
through "SPI Passive Mode".
Additional pin hogs for bus width configuration should be set
elsewhere, if necessary.
References:
- https://www.efinixinc.com/docs/an006-configuring-trion-fpgas-v6.3.pdf
- https://www.efinixinc.com/docs/an033-configuring-titanium-fpgas-v2.8.pdf
- https://www.efinixinc.com/docs/an061-configuring-topaz-fpgas-v1.1.pdf
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
oneOf:
- items:
- enum:
- efinix,titanium-config
- efinix,topaz-config
- const: efinix,trion-config
- const: efinix,trion-config
spi-cpha: true
spi-cpol: true
spi-max-frequency:
maximum: 25000000
reg:
maxItems: 1
reset-gpios:
description:
reset and re-configuration trigger pin (low active)
maxItems: 1
cdone-gpios:
description:
optional configuration done status pin (high active)
maxItems: 1
required:
- compatible
- reg
- reset-gpios
- spi-cpha
- spi-cpol
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
fpga-mgr@0 {
compatible = "efinix,trion-config";
reg = <0>;
spi-max-frequency = <25000000>;
spi-cpha;
spi-cpol;
reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
cdone-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
fpga-mgr@0 {
compatible = "efinix,titanium-config", "efinix,trion-config";
reg = <0>;
spi-max-frequency = <25000000>;
spi-cpha;
spi-cpol;
reset-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
cdone-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
};
...
@@ -0,0 +1,30 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/fpga-bridge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FPGA Bridge
maintainers:
- Michal Simek <michal.simek@amd.com>
properties:
$nodename:
pattern: "^fpga-bridge(@.*|-([0-9]|[1-9][0-9]+))?$"
bridge-enable:
description: |
0 if driver should disable bridge at startup
1 if driver should enable bridge at startup
Default is to leave bridge in current state.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1 ]
additionalProperties: true
examples:
- |
fpga-bridge {
bridge-enable = <0>;
};
@@ -0,0 +1,354 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/fpga-region.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: FPGA Region
maintainers:
- Michal Simek <michal.simek@amd.com>
description: |
CONTENTS
- Introduction
- Terminology
- Sequence
- FPGA Region
- Supported Use Models
- Constraints
Introduction
============
FPGA Regions represent FPGA's and partial reconfiguration regions of FPGA's in
the Device Tree. FPGA Regions provide a way to program FPGAs under device tree
control.
The documentation hits some of the high points of FPGA usage and
attempts to include terminology used by both major FPGA manufacturers. This
document isn't a replacement for any manufacturers specifications for FPGA
usage.
Terminology
===========
Full Reconfiguration
* The entire FPGA is programmed.
Partial Reconfiguration (PR)
* A section of an FPGA is reprogrammed while the rest of the FPGA is not
affected.
* Not all FPGA's support PR.
Partial Reconfiguration Region (PRR)
* Also called a "reconfigurable partition"
* A PRR is a specific section of an FPGA reserved for reconfiguration.
* A base (or static) FPGA image may create a set of PRR's that later may
be independently reprogrammed many times.
* The size and specific location of each PRR is fixed.
* The connections at the edge of each PRR are fixed. The image that is loaded
into a PRR must fit and must use a subset of the region's connections.
* The busses within the FPGA are split such that each region gets its own
branch that may be gated independently.
Persona
* Also called a "partial bit stream"
* An FPGA image that is designed to be loaded into a PRR. There may be
any number of personas designed to fit into a PRR, but only one at a time
may be loaded.
* A persona may create more regions.
FPGA Bridge
* FPGA Bridges gate bus signals between a host and FPGA.
* FPGA Bridges should be disabled while the FPGA is being programmed to
prevent spurious signals on the cpu bus and to the soft logic.
* FPGA bridges may be actual hardware or soft logic on an FPGA.
* During Full Reconfiguration, hardware bridges between the host and FPGA
will be disabled.
* During Partial Reconfiguration of a specific region, that region's bridge
will be used to gate the busses. Traffic to other regions is not affected.
* In some implementations, the FPGA Manager transparently handles gating the
buses, eliminating the need to show the hardware FPGA bridges in the
device tree.
* An FPGA image may create a set of reprogrammable regions, each having its
own bridge and its own split of the busses in the FPGA.
FPGA Manager
* An FPGA Manager is a hardware block that programs an FPGA under the control
of a host processor.
Base Image
* Also called the "static image"
* An FPGA image that is designed to do full reconfiguration of the FPGA.
* A base image may set up a set of partial reconfiguration regions that may
later be reprogrammed.
---------------- ----------------------------------
| Host CPU | | FPGA |
| | | |
| ----| | ----------- -------- |
| | H | | |==>| Bridge0 |<==>| PRR0 | |
| | W | | | ----------- -------- |
| | | | | |
| | B |<=====>|<==| ----------- -------- |
| | R | | |==>| Bridge1 |<==>| PRR1 | |
| | I | | | ----------- -------- |
| | D | | | |
| | G | | | ----------- -------- |
| | E | | |==>| Bridge2 |<==>| PRR2 | |
| ----| | ----------- -------- |
| | | |
---------------- ----------------------------------
Figure 1: An FPGA set up with a base image that created three regions. Each
region (PRR0-2) gets its own split of the busses that is independently gated by
a soft logic bridge (Bridge0-2) in the FPGA. The contents of each PRR can be
reprogrammed independently while the rest of the system continues to function.
Sequence
========
When a DT overlay that targets an FPGA Region is applied, the FPGA Region will
do the following:
1. Disable appropriate FPGA bridges.
2. Program the FPGA using the FPGA manager.
3. Enable the FPGA bridges.
4. The Device Tree overlay is accepted into the live tree.
5. Child devices are populated.
When the overlay is removed, the child nodes will be removed and the FPGA Region
will disable the bridges.
FPGA Region
===========
FPGA Regions represent FPGA's and FPGA PR regions in the device tree. An FPGA
Region brings together the elements needed to program on a running system and
add the child devices:
* FPGA Manager
* FPGA Bridges
* image-specific information needed to the programming.
* child nodes
The intended use is that a Device Tree overlay (DTO) can be used to reprogram an
FPGA while an operating system is running.
An FPGA Region that exists in the live Device Tree reflects the current state.
If the live tree shows a "firmware-name" property or child nodes under an FPGA
Region, the FPGA already has been programmed. A DTO that targets an FPGA Region
and adds the "firmware-name" property is taken as a request to reprogram the
FPGA. After reprogramming is successful, the overlay is accepted into the live
tree.
The base FPGA Region in the device tree represents the FPGA and supports full
reconfiguration. It must include a phandle to an FPGA Manager. The base
FPGA region will be the child of one of the hardware bridges (the bridge that
allows register access) between the cpu and the FPGA. If there are more than
one bridge to control during FPGA programming, the region will also contain a
list of phandles to the additional hardware FPGA Bridges.
For partial reconfiguration (PR), each PR region will have an FPGA Region.
These FPGA regions are children of FPGA bridges which are then children of the
base FPGA region. The "Full Reconfiguration to add PRR's" example below shows
this.
If an FPGA Region does not specify an FPGA Manager, it will inherit the FPGA
Manager specified by its ancestor FPGA Region. This supports both the case
where the same FPGA Manager is used for all of an FPGA as well the case where
a different FPGA Manager is used for each region.
FPGA Regions do not inherit their ancestor FPGA regions' bridges. This prevents
shutting down bridges that are upstream from the other active regions while one
region is getting reconfigured (see Figure 1 above). During PR, the FPGA's
hardware bridges remain enabled. The PR regions' bridges will be FPGA bridges
within the static image of the FPGA.
Supported Use Models
====================
In all cases the live DT must have the FPGA Manager, FPGA Bridges (if any), and
a FPGA Region. The target of the Device Tree Overlay is the FPGA Region. Some
uses are specific to an FPGA device.
* No FPGA Bridges
In this case, the FPGA Manager which programs the FPGA also handles the
bridges behind the scenes. No FPGA Bridge devices are needed for full
reconfiguration.
* Full reconfiguration with hardware bridges
In this case, there are hardware bridges between the processor and FPGA that
need to be controlled during full reconfiguration. Before the overlay is
applied, the live DT must include the FPGA Manager, FPGA Bridges, and a
FPGA Region. The FPGA Region is the child of the bridge that allows
register access to the FPGA. Additional bridges may be listed in a
fpga-bridges property in the FPGA region or in the device tree overlay.
* Partial reconfiguration with bridges in the FPGA
In this case, the FPGA will have one or more PRR's that may be programmed
separately while the rest of the FPGA can remain active. To manage this,
bridges need to exist in the FPGA that can gate the buses going to each FPGA
region while the buses are enabled for other sections. Before any partial
reconfiguration can be done, a base FPGA image must be loaded which includes
PRR's with FPGA bridges. The device tree should have an FPGA region for each
PRR.
Constraints
===========
It is beyond the scope of this document to fully describe all the FPGA design
constraints required to make partial reconfiguration work[1] [2] [3], but a few
deserve quick mention.
A persona must have boundary connections that line up with those of the partition
or region it is designed to go into.
During programming, transactions through those connections must be stopped and
the connections must be held at a fixed logic level. This can be achieved by
FPGA Bridges that exist on the FPGA fabric prior to the partial reconfiguration.
--
[1] https://www.intel.com/programmable/technical-pdfs/683404.pdf
[2] tspace.library.utoronto.ca/bitstream/1807/67932/1/Byma_Stuart_A_201411_MAS_thesis.pdf
[3] https://docs.amd.com/v/u/en-US/ug702
properties:
$nodename:
pattern: "^fpga-region(@.*|-([0-9]|[1-9][0-9]+))?$"
compatible:
const: fpga-region
reg:
maxItems: 1
ranges: true
"#address-cells": true
"#size-cells": true
config-complete-timeout-us:
description:
The maximum time in microseconds time for the FPGA to go to operating
mode after the region has been programmed.
encrypted-fpga-config:
type: boolean
description:
Set if the bitstream is encrypted.
external-fpga-config:
type: boolean
description:
Set if the FPGA has already been configured prior to OS boot up.
firmware-name:
maxItems: 1
description:
Should contain the name of an FPGA image file located on the firmware
search path. If this property shows up in a live device tree it indicates
that the FPGA has already been programmed with this image.
If this property is in an overlay targeting an FPGA region, it is
a request to program the FPGA with that image.
fpga-bridges:
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
Should contain a list of phandles to FPGA Bridges that must be
controlled during FPGA programming along with the parent FPGA bridge.
This property is optional if the FPGA Manager handles the bridges.
If the fpga-region is the child of an fpga-bridge, the list should not
contain the parent bridge.
fpga-mgr:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Should contain a phandle to an FPGA Manager. Child FPGA Regions
inherit this property from their ancestor regions. An fpga-mgr property
in a region will override any inherited FPGA manager.
partial-fpga-config:
type: boolean
description:
Set if partial reconfiguration is to be done, otherwise full
reconfiguration is done.
region-freeze-timeout-us:
description:
The maximum time in microseconds to wait for bridges to successfully
become disabled before the region has been programmed.
region-unfreeze-timeout-us:
description:
The maximum time in microseconds to wait for bridges to successfully
become enabled after the region has been programmed.
required:
- compatible
- fpga-mgr
additionalProperties:
type: object
examples:
- |
/*
* Full Reconfiguration without Bridges with DT overlay
*/
fpga_region0: fpga-region@0 {
compatible = "fpga-region";
reg = <0 0>;
#address-cells = <1>;
#size-cells = <1>;
fpga-mgr = <&fpga_mgr0>;
ranges = <0x10000000 0x20000000 0x10000000>;
/* DT Overlay contains: &fpga_region0 */
firmware-name = "zynq-gpio.bin";
gpio@40000000 {
compatible = "xlnx,xps-gpio-1.00.a";
reg = <0x40000000 0x10000>;
gpio-controller;
#gpio-cells = <2>;
clocks = <&clk>;
};
};
- |
/*
* Partial reconfiguration with bridge
*/
fpga_region1: fpga-region@0 {
compatible = "fpga-region";
reg = <0 0>;
ranges;
#address-cells = <1>;
#size-cells = <1>;
fpga-mgr = <&fpga_mgr1>;
fpga-bridges = <&fpga_bridge1>;
partial-fpga-config;
/* DT Overlay contains: &fpga_region1 */
firmware-name = "zynq-gpio-partial.bin";
clk: clock {
compatible = "fixed-factor-clock";
clocks = <&parentclk>;
#clock-cells = <0>;
clock-div = <2>;
clock-mult = <1>;
};
axi {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
gpio@40000000 {
compatible = "xlnx,xps-gpio-1.00.a";
reg = <0x40000000 0x10000>;
#gpio-cells = <2>;
gpio-controller;
clocks = <&clk>;
};
};
};
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/intel,stratix10-soc-fpga-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel Stratix10 SoC FPGA Manager
maintainers:
- Mahesh Rao <mahesh.rao@altera.com>
- Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
- Niravkumar L Rabara <nirav.rabara@altera.com>
description:
The Intel Stratix10 SoC consists of a 64-bit quad-core ARM Cortex A53 hard
processor system (HPS) and a Secure Device Manager (SDM). The Stratix10
SoC FPGA Manager driver is used to configure/reconfigure the FPGA fabric
on the die.The driver communicates with SDM/ATF via the stratix10-svc
platform driver for performing its operations.
properties:
compatible:
enum:
- intel,stratix10-soc-fpga-mgr
- intel,agilex-soc-fpga-mgr
required:
- compatible
additionalProperties: false
examples:
- |
fpga-mgr {
compatible = "intel,stratix10-soc-fpga-mgr";
};
@@ -0,0 +1,59 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/lattice,ice40-fpga-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Lattice iCE40 FPGA Manager
maintainers:
- Joel Holdsworth <joel@airwebreathe.org.uk>
properties:
compatible:
const: lattice,ice40-fpga-mgr
reg:
maxItems: 1
spi-max-frequency:
minimum: 1000000
maximum: 25000000
cdone-gpios:
maxItems: 1
description: GPIO input connected to CDONE pin
reset-gpios:
maxItems: 1
description:
Active-low GPIO output connected to CRESET_B pin. Note that unless the
GPIO is held low during startup, the FPGA will enter Master SPI mode and
drive SCK with a clock signal potentially jamming other devices on the bus
until the firmware is loaded.
required:
- compatible
- reg
- spi-max-frequency
- cdone-gpios
- reset-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
fpga@0 {
compatible = "lattice,ice40-fpga-mgr";
reg = <0>;
spi-max-frequency = <1000000>;
cdone-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
};
};
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/lattice,sysconfig.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Lattice Slave SPI sysCONFIG FPGA manager
maintainers:
- Vladimir Georgiev <v.georgiev@metrotek.ru>
description: |
Lattice sysCONFIG port, which is used for FPGA configuration, among others,
have Slave Serial Peripheral Interface. Only full reconfiguration is
supported.
Programming of ECP5 is done by writing uncompressed bitstream image in .bit
format into FPGA's SRAM configuration memory.
properties:
compatible:
enum:
- lattice,sysconfig-ecp5
reg:
maxItems: 1
program-gpios:
description:
A GPIO line connected to PROGRAMN (active low) pin of the device.
Initiates configuration sequence.
maxItems: 1
init-gpios:
description:
A GPIO line connected to INITN (active low) pin of the device.
Indicates that the FPGA is ready to be configured.
maxItems: 1
done-gpios:
description:
A GPIO line connected to DONE (active high) pin of the device.
Indicates that the configuration sequence is complete.
maxItems: 1
required:
- compatible
- reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml
- if:
properties:
compatible:
contains:
const: lattice,sysconfig-ecp5
then:
properties:
spi-max-frequency:
maximum: 60000000
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
fpga-mgr@0 {
compatible = "lattice,sysconfig-ecp5";
reg = <0>;
spi-max-frequency = <20000000>;
program-gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
init-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
done-gpios = <&gpio3 2 GPIO_ACTIVE_HIGH>;
};
};
@@ -0,0 +1,29 @@
Lattice MachXO2 Slave SPI FPGA Manager
Lattice MachXO2 FPGAs support a method of loading the bitstream over
'slave SPI' interface.
See 'MachXO2ProgrammingandConfigurationUsageGuide.pdf' on www.latticesemi.com
Required properties:
- compatible: should contain "lattice,machxo2-slave-spi"
- reg: spi chip select of the FPGA
Example for full FPGA configuration:
fpga-region0 {
compatible = "fpga-region";
fpga-mgr = <&fpga_mgr_spi>;
#address-cells = <0x1>;
#size-cells = <0x1>;
};
spi1: spi@2000 {
...
fpga_mgr_spi: fpga-mgr@0 {
compatible = "lattice,machxo2-slave-spi";
spi-max-frequency = <8000000>;
reg = <0>;
};
};
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/microchip,mpf-spi-fpga-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip Polarfire FPGA manager.
maintainers:
- Vladimir Georgiev <v.georgiev@metrotek.ru>
description:
Device Tree Bindings for Microchip Polarfire FPGA Manager using slave SPI to
load the bitstream in .dat format.
properties:
compatible:
enum:
- microchip,mpf-spi-fpga-mgr
reg:
description: SPI chip select
maxItems: 1
required:
- compatible
- reg
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
fpga_mgr@0 {
compatible = "microchip,mpf-spi-fpga-mgr";
spi-max-frequency = <20000000>;
reg = <0>;
};
};
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/technologic,ts7300-fpga.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Technologic Systems TS-7300 FPGA Manager
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
description:
FPGA manager for the Altera Cyclone II FPGA on Technologic Systems
TS-7300 board. The FPGA is programmed via the memory-mapped interface
implemented in the CPLD.
properties:
compatible:
const: technologic,ts7300-fpga
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
fpga-mgr@13c00000 {
compatible = "technologic,ts7300-fpga";
reg = <0x13c00000 0x2>;
};
...
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xilinx-zynq-fpga-mgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Zynq FPGA Manager
maintainers:
- Michal Simek <michal.simek@amd.com>
properties:
compatible:
const: xlnx,zynq-devcfg-1.0
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: ref_clk
syscon:
$ref: /schemas/types.yaml#/definitions/phandle
description:
Phandle to syscon block which provide access to SLCR registers
required:
- compatible
- reg
- clocks
- clock-names
- syscon
additionalProperties: false
examples:
- |
devcfg: devcfg@f8007000 {
compatible = "xlnx,zynq-devcfg-1.0";
reg = <0xf8007000 0x100>;
interrupts = <0 8 4>;
clocks = <&clkc 12>;
clock-names = "ref_clk";
syscon = <&slcr>;
};
@@ -0,0 +1,86 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xlnx,fpga-selectmap.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx SelectMAP FPGA interface
maintainers:
- Charles Perry <charles.perry@savoirfairelinux.com>
description: |
Xilinx 7 Series FPGAs support a method of loading the bitstream over a
parallel port named the SelectMAP interface in the documentation. Only
the x8 mode is supported where data is loaded at one byte per rising edge of
the clock, with the MSB of each byte presented to the D0 pin.
Datasheets:
https://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf
allOf:
- $ref: /schemas/memory-controllers/mc-peripheral-props.yaml#
properties:
compatible:
enum:
- xlnx,fpga-xc7s-selectmap
- xlnx,fpga-xc7a-selectmap
- xlnx,fpga-xc7k-selectmap
- xlnx,fpga-xc7v-selectmap
reg:
description:
At least 1 byte of memory mapped IO
maxItems: 1
prog-gpios:
description:
config pin (referred to as PROGRAM_B in the manual)
maxItems: 1
done-gpios:
description:
config status pin (referred to as DONE in the manual)
maxItems: 1
init-gpios:
description:
initialization status and configuration error pin
(referred to as INIT_B in the manual)
maxItems: 1
csi-gpios:
description:
chip select pin (referred to as CSI_B in the manual)
Optional gpio for if the bus controller does not provide a chip select.
maxItems: 1
rdwr-gpios:
description:
read/write select pin (referred to as RDWR_B in the manual)
Optional gpio for if the bus controller does not provide this pin.
maxItems: 1
required:
- compatible
- reg
- prog-gpios
- done-gpios
- init-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
fpga-mgr@8000000 {
compatible = "xlnx,fpga-xc7s-selectmap";
reg = <0x8000000 0x4>;
prog-gpios = <&gpio5 5 GPIO_ACTIVE_LOW>;
init-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
done-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
csi-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
rdwr-gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
};
...
@@ -0,0 +1,80 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xlnx,fpga-slave-serial.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Slave Serial SPI FPGA
maintainers:
- Nava kishore Manne <nava.kishore.manne@amd.com>
description: |
Xilinx Spartan-6 and 7 Series FPGAs support a method of loading the bitstream
over what is referred to as slave serial interface.The slave serial link is
not technically SPI, and might require extra circuits in order to play nicely
with other SPI slaves on the same bus.
Datasheets:
https://www.xilinx.com/support/documentation/user_guides/ug380.pdf
https://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf
https://www.xilinx.com/support/documentation/application_notes/xapp583-fpga-configuration.pdf
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
properties:
compatible:
enum:
- xlnx,fpga-slave-serial
spi-cpha: true
spi-max-frequency:
maximum: 60000000
reg:
maxItems: 1
prog_b-gpios:
description:
config pin (referred to as PROGRAM_B in the manual)
maxItems: 1
done-gpios:
description:
config status pin (referred to as DONE in the manual)
maxItems: 1
init-b-gpios:
description:
initialization status and configuration error pin
(referred to as INIT_B in the manual)
maxItems: 1
required:
- compatible
- reg
- prog_b-gpios
- done-gpios
- init-b-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
fpga_mgr_spi: fpga-mgr@0 {
compatible = "xlnx,fpga-slave-serial";
spi-max-frequency = <60000000>;
spi-cpha;
reg = <0>;
prog_b-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
init-b-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
done-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
};
};
...
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xlnx,pr-decoupler.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx LogiCORE Partial Reconfig Decoupler/AXI shutdown manager Softcore
maintainers:
- Nava kishore Manne <nava.kishore.manne@amd.com>
allOf:
- $ref: fpga-bridge.yaml#
description: |
The Xilinx LogiCORE Partial Reconfig(PR) Decoupler manages one or more
decouplers/fpga bridges. The controller can decouple/disable the bridges
which prevents signal changes from passing through the bridge. The controller
can also couple / enable the bridges which allows traffic to pass through the
bridge normally.
Xilinx LogiCORE Dynamic Function eXchange(DFX) AXI shutdown manager Softcore
is compatible with the Xilinx LogiCORE pr-decoupler. The Dynamic Function
eXchange AXI shutdown manager prevents AXI traffic from passing through the
bridge. The controller safely handles AXI4MM and AXI4-Lite interfaces on a
Reconfigurable Partition when it is undergoing dynamic reconfiguration,
preventing the system deadlock that can occur if AXI transactions are
interrupted by DFX.
Please refer to fpga-region.txt and fpga-bridge.txt in this directory for
common binding part and usage.
properties:
compatible:
oneOf:
- items:
- const: xlnx,pr-decoupler-1.00
- const: xlnx,pr-decoupler
- items:
- const: xlnx,dfx-axi-shutdown-manager-1.00
- const: xlnx,dfx-axi-shutdown-manager
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: aclk
required:
- compatible
- reg
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
fpga-bridge@100000450 {
compatible = "xlnx,pr-decoupler-1.00", "xlnx,pr-decoupler";
reg = <0x10000045 0x10>;
clocks = <&clkc 15>;
clock-names = "aclk";
};
...
@@ -0,0 +1,33 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xlnx,versal-fpga.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Versal FPGA driver.
maintainers:
- Nava kishore Manne <nava.kishore.manne@amd.com>
description: |
Device Tree Versal FPGA bindings for the Versal SoC, controlled
using firmware interface.
properties:
compatible:
items:
- enum:
- xlnx,versal-fpga
required:
- compatible
additionalProperties: false
examples:
- |
versal_fpga: versal-fpga {
compatible = "xlnx,versal-fpga";
};
...
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/fpga/xlnx,zynqmp-pcap-fpga.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Zynq Ultrascale MPSoC FPGA Manager
maintainers:
- Nava kishore Manne <nava.kishore.manne@amd.com>
description: |
Device Tree Bindings for Zynq Ultrascale MPSoC FPGA Manager.
The ZynqMP SoC uses the PCAP (Processor Configuration Port) to
configure the Programmable Logic (PL). The configuration uses the
firmware interface.
properties:
compatible:
const: xlnx,zynqmp-pcap-fpga
required:
- compatible
additionalProperties: false
examples:
- |
firmware {
zynqmp_firmware: zynqmp-firmware {
zynqmp_pcap: pcap {
compatible = "xlnx,zynqmp-pcap-fpga";
};
};
};
...