All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommaso Merciai <tomm.merciai@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: jacopo.mondi@ideasonboard.com, laurent.pinchart@ideasonboard.com,
	martin.hecht@avnet.eu, linuxfancy@googlegroups.com,
	"Tommaso Merciai" <tomm.merciai@gmail.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Hans Verkuil" <hverkuil@xs4all.nl>,
	"Marco Felsch" <m.felsch@pengutronix.de>,
	"Gerald Loacker" <gerald.loacker@wolfvision.net>,
	"Krzysztof Hałasa" <khalasa@piap.pl>,
	"Shawn Tu" <shawnx.tu@intel.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
	"Mikhail Rudenko" <mike.rudenko@gmail.com>,
	"Nicholas Roth" <nicholas@rothemail.net>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] media: dt-bindings: alvium: add document YAML binding
Date: Fri, 26 May 2023 19:39:43 +0200	[thread overview]
Message-ID: <20230526173955.797226-2-tomm.merciai@gmail.com> (raw)
In-Reply-To: <20230526173955.797226-1-tomm.merciai@gmail.com>

Add documentation of device tree in YAML schema for the ALVIUM
Camera from Allied Vision Inc.

References:
 - https://www.alliedvision.com/en/products/embedded-vision-solutions

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
Changes since v1:
 - Fixed build error as suggested by RHerring bot

 .../media/i2c/alliedvision,alvium.yaml        | 115 ++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml

diff --git a/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml
new file mode 100644
index 000000000000..81e9e560c99d
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/alliedvision,alvium.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/alliedvision,alvium.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Alliedvision Alvium Camera
+
+maintainers:
+  - Tommaso Merciai <tomm.merciai@gmail.com>
+  - Martin Hecht <martin.hecht@avnet.eu>
+
+allOf:
+  - $ref: /schemas/media/video-interface-devices.yaml#
+
+properties:
+  compatible:
+    const: alliedvision,alvium
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: XCLK Input Clock
+
+  clock-names:
+    const: xclk
+
+  powerdown-gpios:
+    maxItems: 1
+    description: >
+      Reference to the GPIO connected to the powerdown pin, if any.
+
+  reset-gpios:
+    maxItems: 1
+    description: >
+      Reference to the GPIO connected to the reset pin, if any.
+
+  streamon-delay:
+    maxItems: 1
+    description: >
+      Delay before camera start capturing frames in us.
+
+  rotation:
+    enum:
+      - 0
+      - 180
+
+  port:
+    description: Digital Output Port
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    additionalProperties: false
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          clock-lanes:
+            const: 0
+          data-lanes:
+            minItems: 1
+            maxItems: 4
+          link-frequencies: true
+
+        required:
+          - data-lanes
+          - link-frequencies
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+      #include <dt-bindings/gpio/gpio.h>
+      #include <dt-bindings/clock/imx8mp-clock.h>
+
+      i2c {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          camera: alvium@3c {
+              compatible = "alliedvision,alvium";
+              pinctrl-names = "default";
+              pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>, <&pinctrl_csi_mclk>;
+              reg = <0x3c>;
+              clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+              clock-names = "xclk";
+              assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+              assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+              assigned-clock-rates = <24000000>;
+              streamon-delay = <20>;
+              powerdown-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+              reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+              status = "okay";
+
+              port {
+                  alvium_out: endpoint {
+                      remote-endpoint = <&mipi_csi_0_in>;
+                      data-lanes = <1 2 3 4>;
+                      link-frequencies = /bits/ 64 <681250000>;
+                      clock-lanes = <0>;
+                  };
+              };
+          };
+      };
+
+...
-- 
2.34.1


  reply	other threads:[~2023-05-26 17:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 17:39 [PATCH v2 0/2] media: i2c: Add support for alvium camera Tommaso Merciai
2023-05-26 17:39 ` Tommaso Merciai [this message]
2023-05-26 19:00   ` [PATCH v2 1/2] media: dt-bindings: alvium: add document YAML binding Conor Dooley
2023-05-29  7:22     ` Tommaso Merciai
2023-05-28 21:16   ` Sakari Ailus
2023-05-29  6:39     ` Laurent Pinchart
2023-05-29  6:43       ` Laurent Pinchart
2023-05-31 10:20         ` Tommaso Merciai
2023-05-31 11:06           ` Laurent Pinchart
2023-05-31 14:01             ` Tommaso Merciai
2023-05-31 14:36               ` Laurent Pinchart
2023-05-29  7:57       ` Tommaso Merciai
2023-05-29  8:07         ` Laurent Pinchart
2023-05-29  7:41     ` Tommaso Merciai
2023-05-29  7:51       ` Laurent Pinchart
2023-05-30 15:53   ` Krzysztof Kozlowski
2023-05-26 17:39 ` [PATCH v2 2/2] media: i2c: Add support for alvium camera Tommaso Merciai
2023-05-26 18:39   ` Christophe JAILLET
2023-05-29 10:08     ` Tommaso Merciai
2023-05-29 12:34       ` Christophe JAILLET
2023-05-29 13:26         ` Tommaso Merciai
2023-05-29  7:40   ` Laurent Pinchart
2023-05-31 10:13     ` Tommaso Merciai
2023-05-31 11:33       ` Laurent Pinchart
2023-05-31 14:19         ` Tommaso Merciai
2023-05-31 14:42           ` Laurent Pinchart
2023-05-31 15:12             ` Tommaso Merciai
2023-06-01 17:05         ` Tommaso Merciai
2023-06-02  4:31           ` Laurent Pinchart
2023-06-13 12:00             ` Sakari Ailus
2023-06-13 13:24               ` Tommaso Merciai
2023-05-30 20:56   ` kernel test robot

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=20230526173955.797226-2-tomm.merciai@gmail.com \
    --to=tomm.merciai@gmail.com \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gerald.loacker@wolfvision.net \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=khalasa@piap.pl \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linuxfancy@googlegroups.com \
    --cc=m.felsch@pengutronix.de \
    --cc=martin.hecht@avnet.eu \
    --cc=mchehab@kernel.org \
    --cc=mike.rudenko@gmail.com \
    --cc=nicholas@rothemail.net \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shawnx.tu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.