From: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, mchehab@kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Cc: davem@davemloft.net, gregkh@linuxfoundation.org,
geert+renesas@glider.be, akpm@linux-foundation.org,
linux@roeck-us.net, hverkuil@xs4all.nl,
laurent.pinchart+renesas@ideasonboard.com, arnd@arndb.de,
sudipm.mukherjee@gmail.com, tiffany.lin@mediatek.com,
minghsiu.tsai@mediatek.com, jean-christophe.trotin@st.com,
andrew-ct.chen@mediatek.com, simon.horman@netronome.com,
songjun.wu@microchip.com, bparrot@ti.com,
CARLOS.PALMINHA@synopsys.com, Ramiro.Oliveira@synopsys.com
Subject: [PATCH v2 1/2] Add Documentation for Media Device, Video Device, and Synopsys DW MIPI CSI-2 Host
Date: Mon, 12 Dec 2016 15:00:35 +0000 [thread overview]
Message-ID: <48a46d2d60fff723e322fdbfb29d533c2d0f5637.1481554324.git.roliveir@synopsys.com> (raw)
In-Reply-To: <cover.1481548484.git.roliveir@synopsys.com>
Create device tree bindings documentation for Media and Video Device, as well
as the DW MIPI CSI-2 Host.
Signed-off-by: Ramiro Oliveira <roliveir@synopsys.com>
---
.../devicetree/bindings/media/snps,dw-mipi-csi.txt | 37 ++++++++
.../devicetree/bindings/media/snps,plat-ipk.txt | 105 +++++++++++++++++++++
2 files changed, 142 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/snps,dw-mipi-csi.txt
create mode 100644 Documentation/devicetree/bindings/media/snps,plat-ipk.txt
diff --git a/Documentation/devicetree/bindings/media/snps,dw-mipi-csi.txt b/Documentation/devicetree/bindings/media/snps,dw-mipi-csi.txt
new file mode 100644
index 0000000..1caa652
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/snps,dw-mipi-csi.txt
@@ -0,0 +1,37 @@
+Synopsys DesignWare CSI-2 Host controller
+
+Description
+-----------
+
+This HW block is used to receive image coming from an MIPI CSI-2 compatible
+camera.
+
+Required properties:
+- compatible: shall be "snps,dw-mipi-csi"
+- reg : physical base address and size of the device memory mapped
+ registers;
+- interrupts : CSI-2 Host interrupt
+- data-lanes : Number of lanes to be used
+- output-type : Core output to be used (IPI-> 0 or IDI->1 or BOTH->2) These
+ values choose which of the Core outputs will be used, it can be Image Data
+ Interface or Image Pixel Interface.
+- phys, phy-names: List of one PHY specifier and identifier string (as defined
+ in Documentation/devicetree/bindings/phy/phy-bindings.txt). This PHY is a MIPI
+ DPHY working in RX mode.
+
+Optional properties(if in IPI mode):
+- ipi-mode : Mode to be used when in IPI(Camera -> 0 or Automatic -> 1)
+ This property defines if the controller will use the video timings available
+ in the video stream or if it will use pre-defined ones.
+- ipi-color-mode: Bus depth to be used in IPI (48 bits -> 0 or 16 bits -> 1)
+ This property defines the width of the IPI bus.
+- ipi-auto-flush: Data auto-flush (1 -> Yes or 0 -> No). This property defines
+ if the data is automatically flushed in each vsync or if this process is done
+ manually
+- virtual-channel: Virtual channel where data is present when in IPI mode. This
+ property chooses the virtual channel which IPI will use to retrieve the video
+ stream.
+
+The per-board settings:
+ - port sub-node describing a single endpoint connected to the dw-mipi-csi
+ as described in video-interfaces.txt[1].
diff --git a/Documentation/devicetree/bindings/media/snps,plat-ipk.txt b/Documentation/devicetree/bindings/media/snps,plat-ipk.txt
new file mode 100644
index 0000000..50e9279
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/snps,plat-ipk.txt
@@ -0,0 +1,105 @@
+Synopsys DesignWare CSI-2 Host IPK Media Device
+
+The Synopsys DesignWare CSI-2 Host IPK subsystem comprises of multiple
+sub-devices represented by separate device tree nodes. Currently this includes:
+plat-ipk, video-device, and dw-mipi-csi.
+
+The sub-subdevices are defined as child nodes of the common 'camera' node which
+also includes common properties of the whole subsystem not really specific to
+any single sub-device.
+
+Common 'camera' node
+--------------------
+
+Required properties:
+
+- compatible: must be "snps,plat-ipk", "simple-bus"
+
+The 'camera' node must include at least one 'video-device' and one 'dw-mipi-csi'
+child node.
+
+'video-device' device nodes
+-------------------
+
+Required properties:
+
+- compatible: "snps,video-device"
+- dmas, dma-names: List of one DMA specifier and identifier string (as defined
+ in Documentation/devicetree/bindings/dma/dma.txt) per port. Each port
+ requires a DMA channel with the identifier string set to "port" followed by
+ the port index.
+
+Image sensor nodes
+------------------
+
+The sensor device nodes should be added to their control bus controller (e.g.
+I2C0) nodes and linked to a port node in the dw-mipi-csi,using the common video
+interfaces bindings, defined in video-interfaces.txt.
+
+Example:
+
+ i2c@0x02000 {
+ compatible = "snps,designware-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x02000 0x100>;
+ clock-frequency = <400000>;
+ clocks = <&i2cclk>;
+ interrupts =<0>;
+ ov: camera@0x36 {
+ compatible = "ovti,ov5647";
+ reg = <0x36>;
+ port {
+ camera_1: endpoint {
+ remote-endpoint = <&csi1_ep1>;
+ clock-lanes = <0>;
+ data-lanes = <1 2 >;
+ };
+ };
+ };
+ };
+
+
+ camera {
+ compatible = "snps,plat-ipk", "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ video_device: video-device@0x10000 {
+ compatible = "snps,video-device";
+ dmas = <&axi_vdma_0 0>;
+ dma-names = "vdma0";
+ };
+
+
+ csi2_1: csi2@0x03000 {
+ compatible = "snps,dw-mipi-csi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = < 0x03000 0x7FF>;
+ interrupts = <2>;
+ data-lanes = <2>;
+ output-type = <2>;
+
+ phys = <&mipi_phy_ctrl1 0>;
+ phy-names = "csi2-dphy";
+
+ /*IPI Related Configurations*/
+ ipi-mode = <0>;
+ ipi-color-mode = <0>;
+ ipi-auto-flush = <1>;
+ virtual-channel = <0>;
+
+ /* Camera MIPI CSI-2 (CSI1) */
+ port@1 {
+ reg = <1>;
+ csi1_ep1: endpoint {
+ remote-endpoint = <&camera_1>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+ };
+ };
+
+The dw-mipi-csi device binding is defined in snps,dw-mipi-csi.txt.
--
2.10.2
next prev parent reply other threads:[~2016-12-12 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 15:00 [PATCH v2 0/2] Add support for the DW IP Prototyping Kits for " Ramiro Oliveira
2016-12-12 15:00 ` Ramiro Oliveira [this message]
2016-12-12 15:00 ` [PATCH v2 2/2] Support for DW CSI-2 Host IPK Ramiro Oliveira
2017-01-11 11:54 ` Hans Verkuil
2017-01-12 17:43 ` Ramiro Oliveira
2017-01-12 18:06 ` Hans Verkuil
2016-12-19 17:38 ` [PATCH v2 1/2] Add Documentation for Media Device, Video Device, and Synopsys DW MIPI CSI-2 Host Rob Herring
2017-02-15 15:29 ` Ramiro Oliveira
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=48a46d2d60fff723e322fdbfb29d533c2d0f5637.1481554324.git.roliveir@synopsys.com \
--to=ramiro.oliveira@synopsys.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=akpm@linux-foundation.org \
--cc=andrew-ct.chen@mediatek.com \
--cc=arnd@arndb.de \
--cc=bparrot@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=jean-christophe.trotin@st.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=minghsiu.tsai@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=simon.horman@netronome.com \
--cc=songjun.wu@microchip.com \
--cc=sudipm.mukherjee@gmail.com \
--cc=tiffany.lin@mediatek.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
all inboxes | Powered by JetHome®