All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: devicetree@vger.kernel.org, linux-media@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	linux-renesas-soc@vger.kernel.org,
	laurent.pinchart+renesas@ideasonboard.com,
	niklas.soderlund@ragnatech.se
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	sakari.ailus@iki.fi, mchehab@kernel.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Hyun Kwon <hyunk@xilinx.com>
Subject: 
Date: Wed, 13 May 2020 14:54:45 +0200	[thread overview]
Message-ID: <20200513125445.54132-1-jacopo+renesas@jmondi.org> (raw)
In-Reply-To: <20200512223329.GA23701@bogus>

Subject: [PATCH] fixup! dt-bindings: media: i2c: Add bindings for Maxima Integrated MAX9286

Temporary fixup to ease review. To be squashed into v10 if accepted.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---

While fixing Rob's reported bug on v9 I realized thanks to a
dt_binding_check warning that the i2c-mux child nodes where under-specified.

This fixup epxands the i2c-mux child nodes description and updates the
example to match our currently-out-of-tree DTS files for GMSL platforms.

dt_binding_check still reports a warning:

Documentation/devicetree/bindings/media/i2c/maxim,max9286.example.dt.yaml: camera@51: reg: [[81, 97]] is too short
Documentation/devicetree/bindings/media/i2c/maxim,max9286.example.dt.yaml: camera@52: reg: [[82, 98]] is too short
Documentation/devicetree/bindings/media/i2c/maxim,max9286.example.dt.yaml: camera@53: reg: [[83, 99]] is too short
Documentation/devicetree/bindings/media/i2c/maxim,max9286.example.dt.yaml: camera@54: reg: [[84, 100]] is too short

Which I was not able to silence.
---
 .../bindings/media/i2c/maxim,max9286.yaml     | 86 +++++++++++++++++--
 1 file changed, 77 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
index f9d3e5712c59..d9bd19caed2f 100644
--- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
@@ -130,9 +130,7 @@ properties:
     description: |
       Each GMSL link is modelled as a child bus of an i2c bus
       multiplexer/switch, in accordance with bindings described in
-      Documentation/devicetree/bindings/i2c/i2c-mux.txt. The serializer
-      device on the remote end of the GMSL link shall be modelled as a child
-      node of the corresponding I2C bus.
+      Documentation/devicetree/bindings/i2c/i2c-mux.txt.

     properties:
       '#address-cells':
@@ -141,7 +139,74 @@ properties:
       '#size-cells':
         const: 0

-  additionalProperties: false
+    patternProperties:
+      "^i2c@[0-3]$":
+        type: object
+        description: |
+          Child node of the i2c bus multiplexer which represents a GMSL link.
+          Each serializer device on the GMSL link remote end is represented with
+          an i2c-mux child node. The MAX9286 chip supports up to 4 GMSL
+          channels.
+
+        properties:
+          '#address-cells':
+            const: 1
+
+          '#size-cells':
+            const: 0
+
+          reg:
+            description: The index of the GMSL channel.
+            maxItems: 1
+
+        patternProperties:
+          "^camera@[0-9]+":
+            type: object
+            description: |
+              The remote camera device, composed by a GMSL serializer and a
+              connected video source.
+
+            properties:
+              compatible:
+                description: The remote device compatible string.
+
+              reg:
+                description: |
+                  The I2C addresses to be assigned to the remote devices through
+                  address reprogramming. The number of entries depends on the
+                  requirements of the currently connected remote device.
+
+              port:
+                type: object
+
+                properties:
+                  endpoint:
+                    type: object
+
+                    properties:
+                      remote-endpoint:
+                        description: phandle to the MAX9286 sink endpoint.
+
+                    required:
+                      - remote-endpoint
+
+                    additionalProperties: false
+
+                required:
+                  - endpoint
+
+                additionalProperties: false
+
+            required:
+              - compatible
+              - reg
+              - port
+
+            additionalProperties: false
+
+        additionalProperties: false
+
+    additionalProperties: false

 required:
   - compatible
@@ -220,11 +285,11 @@ examples:
           i2c@0 {
             #address-cells = <1>;
             #size-cells = <0>;
-
             reg = <0>;

             camera@51 {
-              reg = <0x51>;
+              compatible = "imi,rdacm20";
+              reg = <0x51 0x61>;

               port {
                 rdacm20_out0: endpoint {
@@ -241,7 +306,8 @@ examples:
             reg = <1>;

             camera@52 {
-              reg = <0x52>;
+              compatible = "imi,rdacm20";
+              reg = <0x52 0x62>;

               port {
                 rdacm20_out1: endpoint {
@@ -257,7 +323,8 @@ examples:
             reg = <2>;

             camera@53 {
-              reg = <0x53>;
+              compatible = "imi,rdacm20";
+              reg = <0x53 0x63>;

               port {
                 rdacm20_out2: endpoint {
@@ -273,7 +340,8 @@ examples:
             reg = <3>;

             camera@54 {
-              reg = <0x54>;
+              compatible = "imi,rdacm20";
+              reg = <0x54 0x64>;

               port {
                 rdacm20_out3: endpoint {
--
2.26.2


  reply	other threads:[~2020-05-13 12:51 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 15:51 [PATCH v9 0/4] MAX9286 GMSL Support (+RDACM20) Kieran Bingham
2020-05-12 15:51 ` [PATCH v9 1/4] dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286 Kieran Bingham
2020-05-12 22:33   ` Rob Herring
2020-05-13 12:54     ` Jacopo Mondi [this message]
2020-05-14  9:43       ` [PATCH] fixup! dt-bindings: media: i2c: Add bindings for Maxima " Kieran Bingham
2020-05-14 10:20         ` Jacopo Mondi
2020-05-12 22:36   ` [PATCH v9 1/4] dt-bindings: media: i2c: Add bindings for Maxim " Rob Herring
2020-05-13 12:28     ` Jacopo Mondi
2020-05-12 15:51 ` [PATCH v9 2/4] media: i2c: Add MAX9286 driver Kieran Bingham
2020-05-12 17:40   ` Manivannan Sadhasivam
2020-05-14  9:53     ` Kieran Bingham
2020-05-14  9:59       ` Manivannan Sadhasivam
2020-05-14 10:05         ` Kieran Bingham
2020-05-12 18:17   ` Manivannan Sadhasivam
2020-05-14 10:02     ` Kieran Bingham
2020-05-14 10:13       ` Manivannan Sadhasivam
2020-05-14 11:47         ` Kieran Bingham
2020-05-14 11:59           ` Geert Uytterhoeven
2020-05-14 12:48             ` Manivannan Sadhasivam
2020-05-14 13:50               ` Kieran Bingham
2020-05-14 11:47         ` Kieran Bingham
2020-05-14 12:27           ` Kieran Bingham
2020-05-14 12:54             ` Manivannan Sadhasivam
2020-05-16 21:51   ` Sakari Ailus
2020-05-18 11:45     ` Kieran Bingham
2020-05-18 12:38       ` Jacopo Mondi
2020-05-18 13:09         ` Kieran Bingham
2020-05-18 16:11           ` [PATCH] fixes! [max9286]: Validate link formats Kieran Bingham
2020-05-18 18:44             ` Kieran Bingham
2020-05-19  8:13               ` Sakari Ailus
2020-05-19  7:56             ` Jacopo Mondi
2020-05-19  9:00               ` Kieran Bingham
2020-05-19  8:10       ` [PATCH v9 2/4] media: i2c: Add MAX9286 driver Sakari Ailus
2020-05-19  8:55         ` Kieran Bingham
2020-05-19  9:03           ` Sakari Ailus
2020-05-20  0:50       ` Laurent Pinchart
2020-05-26  8:54         ` Sakari Ailus
2020-05-12 15:51 ` [PATCH v9 3/4] dt-bindings: media: i2c: Add bindings for IMI RDACM2x Kieran Bingham
2020-05-12 15:51 ` [PATCH v9 4/4] media: i2c: Add RDACM20 driver Kieran Bingham
2020-05-16 22:36   ` Sakari Ailus
2020-05-18  7:35     ` Jacopo Mondi

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=20200513125445.54132-1-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=hyunk@xilinx.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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.