All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: kieran.bingham+renesas@ideasonboard.com,
	niklas.soderlund@ragnatech.se, laurent.pinchart@ideasonboard.com
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	hyunk@xilinx.com, manivannan.sadhasivam@linaro.org,
	linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 2/5] dt-bindings: media: max9286: Add overlap window
Date: Mon, 16 Mar 2020 21:27:54 +0100	[thread overview]
Message-ID: <20200316202757.529740-3-jacopo+renesas@jmondi.org> (raw)
In-Reply-To: <20200316202757.529740-1-jacopo+renesas@jmondi.org>

The MAX9286 chip exposes a way to control the 'overlap window'
parameter, most probably used in calculation of the frame
synchronization interval.

When used in conjunction with some serializers, the overlap window has to
be disabled in order to correctly achieve frame sync locking.

As the exact meaning of that control is not documented in the chip's
manual, require all DTS users to specify the value of the window. When,
and if, in future the meaning of control gets clarified and a default
behaviour (window enabled or disabled) can be established, a new boolean
property could supersede this one while being sure that older DTB are
fully specified to avoid confusion.

Provide a few convenience macros for the window disabled and window
default value.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 .../devicetree/bindings/media/i2c/maxim,max9286.yaml  | 11 +++++++++++
 MAINTAINERS                                           |  1 +
 include/dt-bindings/media/maxim-gmsl.h                |  9 +++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/media/maxim-gmsl.h

diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
index f9d3e5712c59..ee8e0418b3f0 100644
--- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
@@ -46,6 +46,14 @@ properties:
     description: GPIO connected to the \#PWDN pin with inverted polarity
     maxItems: 1
 
+  # Until the overlap window control gets not clarified, require dts
+  # to set its value explicitly,
+  maxim,overlap-window:
+    description: Overlap window duration, in pixel clock cycles.
+    maxItems: 1
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+
   ports:
     type: object
     description: |
@@ -146,6 +154,7 @@ properties:
 required:
   - compatible
   - reg
+  - maxim,overlap-window
   - ports
   - i2c-mux
 
@@ -154,6 +163,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/maxim-gmsl.h>
 
     i2c@e66d8000 {
       #address-cells = <1>;
@@ -166,6 +176,7 @@ examples:
         reg = <0x2c>;
         poc-supply = <&camera_poc_12v>;
         enable-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+        maxim,overlap-window = MAX9286_OVLP_WINDOW_DISABLED;
 
         ports {
           #address-cells = <1>;
diff --git a/MAINTAINERS b/MAINTAINERS
index 21a9ff4fe684..3d2455085c80 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10190,6 +10190,7 @@ M:	Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
 L:	linux-media@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
+F:	include/dt-bindings/media/maxim-gmsl.h
 F:	drivers/media/i2c/max9286.c
 
 MAX9860 MONO AUDIO VOICE CODEC DRIVER
diff --git a/include/dt-bindings/media/maxim-gmsl.h b/include/dt-bindings/media/maxim-gmsl.h
new file mode 100644
index 000000000000..47945ffc3a4d
--- /dev/null
+++ b/include/dt-bindings/media/maxim-gmsl.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _DT_BINDINGS_MEDIA_MAXIM_GMSL_H
+#define _DT_BINDINGS_MEDIA_MAXIM_GMSL_H
+
+/* MAX9286 default overlap values. */
+#define MAX9286_OVLP_WINDOW_DISABLED	<0>
+#define MAX9286_OVLP_WINDOW_DEFAULT	<0x1680>
+
+#endif /* _DT_BINDINGS_MEDIA_MAXIM_GMSL_H */
-- 
2.25.1


  parent reply	other threads:[~2020-03-16 20:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 20:27 [PATCH 0/5] media: i2c: max9286: Add configuration properties Jacopo Mondi
2020-03-16 20:27 ` [PATCH 1/5] media: i2c: max9286: Put of node on error Jacopo Mondi
2020-03-18  9:32   ` Kieran Bingham
2020-03-18 14:06     ` Jacopo Mondi
2020-03-16 20:27 ` Jacopo Mondi [this message]
2020-03-18  9:45   ` [PATCH 2/5] dt-bindings: media: max9286: Add overlap window Kieran Bingham
2020-03-18 14:19     ` Jacopo Mondi
2020-03-19  1:08       ` Hyun Kwon
2020-03-19  9:00         ` Jacopo Mondi
2020-03-16 20:27 ` [PATCH 3/5] media: i2c: max9286: Parse overlap window value Jacopo Mondi
2020-03-18  9:50   ` Kieran Bingham
2020-03-18 14:22     ` Jacopo Mondi
2020-03-16 20:27 ` [PATCH 4/5] dt-bindings: media: max9286: Add reverse channel amplitude Jacopo Mondi
2020-03-18  9:55   ` Kieran Bingham
2020-03-16 20:27 ` [PATCH 5/5] media: i2c: max9286: Parse " Jacopo Mondi
2020-03-18  9:57   ` Kieran Bingham
2020-03-18 14:32     ` Jacopo Mondi
2020-03-19 11:13       ` Kieran Bingham

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=20200316202757.529740-3-jacopo+renesas@jmondi.org \
    --to=jacopo+renesas@jmondi.org \
    --cc=hyunk@xilinx.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=niklas.soderlund@ragnatech.se \
    /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.