devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <atull@opensource.altera.com>
To: jgunthorpe@obsidianresearch.com, hpa@zytor.com, monstr@monstr.eu,
	michal.simek@xilinx.com, rdunlap@infradead.org,
	gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	pantelis.antoniou@konsulko.com, robh+dt@kernel.org,
	grant.likely@linaro.org, iws@ovro.caltech.edu,
	linux-doc@vger.kernel.org, pavel@denx.de, broonie@kernel.org,
	philip@balister.org, rubini@gnudd.com, s.trumtrar@pengutronix.de,
	jason@lakedaemon.net, kyle.teske@ni.com, nico@linaro.org,
	balbi@ti.com, m.chehab@samsung.com, davidb@codeaurora.org,
	rob@landley.net, davem@davemloft.net, cesarb@cesarb.net,
	sameo@linux.intel.com, akpm@linux-foundation.org,
	linus.walleij@linaro.org, mgerlach@opensource.altera.com,
	delicious.quinoa@gmail.com, dinguyen@opensource.altera.com,
	yvanderv@opensource.altera.com,
	Alan Tull <atull@opensource.altera.com>
Subject: [PATCH v2 2/3] ARM: dts: socfpga: fpga bridges bindings docs
Date: Thu, 23 Oct 2014 18:51:06 -0500	[thread overview]
Message-ID: <1414108267-22058-3-git-send-email-atull@opensource.altera.com> (raw)
In-Reply-To: <1414108267-22058-1-git-send-email-atull@opensource.altera.com>

From: Alan Tull <atull@opensource.altera.com>

Add DTS binding documentation for the Altera FPGA bridges.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
 .../bindings/fpga/altera-fpga2sdram-bridge.txt     |   57 ++++++++++++++++++++
 .../bindings/fpga/altera-hps2fpga-bridge.txt       |   53 ++++++++++++++++++
 2 files changed, 110 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt
 create mode 100644 Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt

diff --git a/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt b/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt
new file mode 100644
index 0000000..cc8f522
--- /dev/null
+++ b/Documentation/devicetree/bindings/fpga/altera-fpga2sdram-bridge.txt
@@ -0,0 +1,57 @@
+Altera FPGA To SDRAM Bridge Driver
+
+This driver manages a bridge between an FPGA and the SDRAM used by an host
+processor system (HPS). The bridge contains a number read ports, write ports,
+and command ports.  Reconfiguring these ports requires that no SDRAM
+transactions occur during reconfiguration.  In other words, the code
+reconfiguring the ports cannot be run out of SDRAM nor can the FPGA access the
+SDRAM during the reconfiguration.  This driver does not support reconfiguring
+the ports.  Typcially, the ports are configured by code running out of onchip
+ram before Linux is started.
+
+This driver supports enabling and disabling of the configured ports all at
+once, which allows for safe reprogramming of the FPGA from user space, provided
+the new FPGA image uses the same port configuration. User space can enable or
+disable the bridge by writing a "1" or a "0", respectively, to its enable file
+under bridge's entry in /sys/class/fpga-bridge. Typically, one disables the
+bridges before reprogramming the FPGA.  Once the FPGA is reprogrammed, the
+bridges are reenabled.
+
+Required properties:
+
+ - compatible       : "altr,socfpga-fpga2sdram-bridge"
+
+ - read-ports-mask  : Bits 0 to 3 corresponds read ports 0 to 3. A bit set to 1
+                      indicates the corresponding read port should be enabled.
+
+ - write-ports-mask : Bits 0 to 3 corresponds write ports 0 to 3. A bit set
+                      to 1 indicates the corresponding write port should be
+                      enabled.
+
+ - cmd-ports-mask   : Bits 0 to 5 correspond to command ports 0 to 5. A bit set
+                      to 1 indicates the corresponding command port should be
+                      enabled.
+
+ - altr,sdr-syscon  : phandle of the sdr module
+
+Optional properties:
+
+ - label            : name that you want this bridge to show up as under
+                      /sys/class/fpga-bridge. Default is br<device#> if this is
+                      not specified.
+
+ - init-val         : 0 if driver should disable bridge at startup
+                      1 if driver should enable bridge at startup
+                      driver leaves bridge in current state if property not
+		      specified.
+
+Example:
+	fpga2sdram_br: fpgabridge@3 {
+		compatible = "altr,socfpga-fpga2sdram-bridge";
+		label = "fpga2sdram";
+		altr,sdr-syscon = <&sdr>;
+		read-ports-mask = <3>;
+		write-ports-mask = <3>;
+		cmd-ports-mask = <0xd>;
+		init-val = <0>;
+	};
diff --git a/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt b/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt
new file mode 100644
index 0000000..bc24a2e
--- /dev/null
+++ b/Documentation/devicetree/bindings/fpga/altera-hps2fpga-bridge.txt
@@ -0,0 +1,53 @@
+Altera FPGA/HPS Bridge Driver
+
+This driver manages a bridge between a FPGA and a host processor system (HPS).
+User space can enable or disable the bridge by writing a "1" or a "0",
+respectively, to its enable file under bridge's entry in
+/sys/class/fpga-bridge.  Typically, one disables the bridges before
+reprogramming the FPGA.  Once the FPGA is reprogrammed, the bridges are
+reenabled.
+
+Required properties:
+
+ - compatible     : should contain one of:
+                     "altr,socfpga-hps2fpga-bridge"
+                     "altr,socfpga-lwhps2fpga-bridge"
+                     "altr,socfpga-fpga2hps-bridge"
+
+ - clocks         : clocks used by this module
+
+ - altr,l3-syscon : phandle of the l3 interconnect module
+
+Optional properties:
+ - label          : name that you want this bridge to show up as under
+                    /sys/class/fpga-bridge.  Default is br<device#> if this is
+                    not specified.
+
+ - init-val       : 0 if driver should disable bridge at startup
+                    1 if driver should enable bridge at startup
+                    driver leaves bridge in current state if property not
+                    specified.
+
+Example:
+	hps_fpgabridge0: fpgabridge@0 {
+		compatible = "altr,socfpga-hps2fpga-bridge";
+		label = "hps2fpga";
+		altr,l3-syscon = <&l3regs>;
+		clocks = <&l4_main_clk>;
+		init-val = <1>;
+	};
+
+	hps_fpgabridge1: fpgabridge@1 {
+		compatible = "altr,socfpga-lwhps2fpga-bridge";
+		label = "lwhps2fpga";
+		altr,l3-syscon = <&l3regs>;
+		clocks = <&l4_main_clk>;
+		init-val = <0>;
+	};
+
+	hps_fpgabridge2: fpgabridge@2 {
+		compatible = "altr,socfpga-fpga2hps-bridge";
+		label = "fpga2hps";
+		altr,l3-syscon = <&l3regs>;
+		clocks = <&l4_main_clk>;
+	};
-- 
1.7.9.5

  parent reply	other threads:[~2014-10-23 23:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 23:51 [PATCH v2 0/3] fpga bridge framework atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2014-10-23 23:51 ` [PATCH v2 1/3] add sysfs document for fpga bridges atull
2014-10-24 10:54   ` Pavel Machek
2014-10-24 15:11     ` atull
2014-10-29  8:25       ` Pavel Machek
2014-10-23 23:51 ` atull [this message]
2014-10-24  7:00   ` [PATCH v2 2/3] ARM: dts: socfpga: fpga bridges bindings docs Steffen Trumtrar
2014-10-24  9:20     ` Pantelis Antoniou
2014-10-25 14:42       ` Steffen Trumtrar
2014-10-27 11:54         ` Pantelis Antoniou
2014-10-27 15:23           ` Steffen Trumtrar
2014-10-27 15:52             ` Pantelis Antoniou
2014-10-27 17:47               ` Steffen Trumtrar
     [not found]     ` <20141024070042.GL10262-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-10-28 21:19       ` atull
2014-10-28 21:53         ` atull
2014-10-29  7:57         ` Steffen Trumtrar
2014-10-29 10:16           ` Mark Brown
2014-10-29 10:31             ` Steffen Trumtrar
2014-10-29 14:30               ` atull
2014-10-29 20:49           ` atull
2014-10-29  8:24         ` Pavel Machek
2014-10-29 20:39           ` atull
2014-10-24 10:57   ` Pavel Machek
2014-10-27 11:48   ` Pantelis Antoniou
2014-10-27 15:01     ` Mark Brown
2014-10-27 15:05       ` Pantelis Antoniou
2014-10-27 15:32         ` Steffen Trumtrar
2014-10-27 15:45           ` Pantelis Antoniou
2014-10-27 17:17             ` Mark Brown
2014-10-27 17:21               ` Pantelis Antoniou
2014-10-27 18:00             ` Steffen Trumtrar
2014-10-27 18:03               ` Pantelis Antoniou
2014-10-23 23:51 ` [PATCH v2 3/3] fpga bridge driver atull
2014-10-27 11:37   ` Pantelis Antoniou
2014-10-23 23:57 ` [PATCH v2 0/3] fpga bridge framework atull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414108267-22058-3-git-send-email-atull@opensource.altera.com \
    --to=atull@opensource.altera.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=cesarb@cesarb.net \
    --cc=davem@davemloft.net \
    --cc=davidb@codeaurora.org \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=iws@ovro.caltech.edu \
    --cc=jason@lakedaemon.net \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kyle.teske@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mgerlach@opensource.altera.com \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=nico@linaro.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=pavel@denx.de \
    --cc=philip@balister.org \
    --cc=rdunlap@infradead.org \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=rubini@gnudd.com \
    --cc=s.trumtrar@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=yvanderv@opensource.altera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).