[5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding
Commit Message
From: Volodymyr Kharuk <vkh@melexis.com>
To: linux-media@vger.kernel.org
Cc: Volodymyr Kharuk <vkh@melexis.com>,
Andrii Kyselov <ays@melexis.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Hyun Kwon <hyun.kwon@xilinx.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Michal Simek <michal.simek@xilinx.com>,
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
devicetree@vger.kernel.org
Subject: [PATCH 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding
Date: Mon, 20 Jun 2022 19:24:36 +0300
Message-Id: <fde3ed603f2c605278ab8fe2c0aa03e96ce4fb33.1655738299.git.vkh@melexis.com>
X-Mailer: git-send-email 2.36.1
In-Reply-To: <cover.1655738299.git.vkh@melexis.com>
References: <cover.1655738299.git.vkh@melexis.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Add device tree binding of the mlx7502x and update MAINTAINERS
Signed-off-by: Volodymyr Kharuk <vkh@melexis.com>
---
.../bindings/media/i2c/melexis,mlx7502x.yaml | 106 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 107 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
Comments
On 20/06/2022 18:25, Volodymyr Kharuk wrote:
> From: Volodymyr Kharuk <vkh@melexis.com>
> To: linux-media@vger.kernel.org
> Cc: Volodymyr Kharuk <vkh@melexis.com>,
> Andrii Kyselov <ays@melexis.com>,
> Mauro Carvalho Chehab <mchehab@kernel.org>,
> Rob Herring <robh+dt@kernel.org>,
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
> Hyun Kwon <hyun.kwon@xilinx.com>,
> Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
> Michal Simek <michal.simek@xilinx.com>,
> Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
> devicetree@vger.kernel.org
> Subject: [PATCH 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding
> Date: Mon, 20 Jun 2022 19:24:36 +0300
> Message-Id: <fde3ed603f2c605278ab8fe2c0aa03e96ce4fb33.1655738299.git.vkh@melexis.com>
> X-Mailer: git-send-email 2.36.1
> In-Reply-To: <cover.1655738299.git.vkh@melexis.com>
> References: <cover.1655738299.git.vkh@melexis.com>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
I don't think your email is correct... The easiest to create proper
patch is to use Git (git format-patch, git send-email).
>
> Add device tree binding of the mlx7502x and update MAINTAINERS
>
> Signed-off-by: Volodymyr Kharuk <vkh@melexis.com>
> ---
> .../bindings/media/i2c/melexis,mlx7502x.yaml | 106 ++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 107 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> new file mode 100644
> index 000000000000..0cc6e425caec
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> @@ -0,0 +1,106 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/melexis,mlx7502x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Melexis ToF 7502x MIPI CSI-2 Sensor Device Tree Bindings
s/Device Tree Bindings//
> +
> +maintainers:
> + - Volodymyr Kharuk <vkh@melexis.com>
> +
> +description: |-
> + Melexis ToF 7502x sensors has a CSI-2 output. It supports 2 and 4 lanes,
> + and mipi speeds are 300, 600, 704, 800, 904, 960Mbs. Supported format is RAW12.
> + Sensor 75026 is QVGA, while 75027 is VGA sensor.
> +
> +properties:
> + compatible:
> + const: melexis,mlx7502x
> +
> + reg:
> + maxItems: 1
> +
> + vcc-supply:
> + description: VCC supply phandle.
> +
> + hw-trigger-gpio:
Yoiu need vendor prefix here, because this does not look like standard
property. Plus "gpios", not "gpio", so:
melexis,hw-trigger-gpios
> + maxItems: 1
> + description: Hardware Trigger GPIO Control (active low)
> +
> + reset-gpio:
reset-gpios
> + maxItems: 1
> + description: Reset Sensor GPIO Control (active low)
> +
> + leden-gpio:
vendor prefix + gpios, unless this is "enable-gpios" standard property.
> + maxItems: 1
> + description: Led driver enanle GPIO Control (active high)
enable?
> +
> + port:
> + description: MIPI CSI-2 transmitter port
> + $ref: /schemas/graph.yaml#/$defs/port-base
> +
> + properties:
> + endpoint:
> + $ref: /schemas/media/video-interfaces.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + data-lanes:
> + anyOf:
oneOf
although probably has the same effect
> + - items:
> + - const: 1
> + - const: 2
> + - items:
> + - const: 1
> + - const: 2
> + - const: 3
> + - const: 4
> +
> + clock-noncontinuous: true
> + link-frequencies: true
> +
> + required:
> + - data-lanes
> + - link-frequencies
> +
> +required:
> + - compatible
> + - reg
> + - port
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + i2c1 {
Just "i2c"
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + mlx7502x: camera@57 {
> + compatible = "melexis,mlx7502x";
> + reg = <0x57>;
> +
> + vcc-supply = <&mlx_7502x_reg>;
> + hw-trigger-gpio = <&gpio_exp 2 GPIO_ACTIVE_HIGH>;
> + reset-gpio = <&gpio_exp 6 GPIO_ACTIVE_HIGH>;
> + leden-gpio = <&gpio_exp 7 GPIO_ACTIVE_HIGH>;
> +
> + port {
> + mlx7502x_out_mipi_csi2: endpoint {
> + remote-endpoint = <&mipi_csi2_from_mlx7502x>;
> + data-lanes = <1 2 3 4>;
> + link-frequencies = /bits/ 64 < 960000000
> + 904000000
> + 800000000
> + 704000000
> + 600000000
> + 300000000 >;
> + };
> + };
> + };
> + };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 6b74de976e90..ce052a351fda 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -12676,6 +12676,7 @@ M: Volodymyr Kharuk <vkh@melexis.com>
> L: linux-media@vger.kernel.org
> S: Supported
> W: http://www.melexis.com
> +F: Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> F: include/uapi/linux/mlx7502x.h
>
> MELFAS MIP4 TOUCHSCREEN DRIVER
Best regards,
Krzysztof
Hi Krzysztof,
Thanks for your review,
On Mon, Jun 20, 2022 at 06:55:40PM +0200, Krzysztof Kozlowski wrote:
> On 20/06/2022 18:25, Volodymyr Kharuk wrote:
> > From: Volodymyr Kharuk <vkh@melexis.com>
> > To: linux-media@vger.kernel.org
> > Cc: Volodymyr Kharuk <vkh@melexis.com>,
> > Andrii Kyselov <ays@melexis.com>,
> > Mauro Carvalho Chehab <mchehab@kernel.org>,
> > Rob Herring <robh+dt@kernel.org>,
> > Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
> > Hyun Kwon <hyun.kwon@xilinx.com>,
> > Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
> > Michal Simek <michal.simek@xilinx.com>,
> > Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
> > devicetree@vger.kernel.org
> > Subject: [PATCH 5/6] media: dt-bindings: media: i2c: Add mlx7502x camera sensor binding
> > Date: Mon, 20 Jun 2022 19:24:36 +0300
> > Message-Id: <fde3ed603f2c605278ab8fe2c0aa03e96ce4fb33.1655738299.git.vkh@melexis.com>
> > X-Mailer: git-send-email 2.36.1
> > In-Reply-To: <cover.1655738299.git.vkh@melexis.com>
> > References: <cover.1655738299.git.vkh@melexis.com>
> > MIME-Version: 1.0
> > Content-Transfer-Encoding: 8bit
>
> I don't think your email is correct... The easiest to create proper
> patch is to use Git (git format-patch, git send-email).
Actually I've used git format-patch and git send-email.
I wanted to use mutt as sendmail. Mutt didn't understand the header from git send-email.
So now I switched to another sendmail. Now it should be fine.
>
>
> >
> > Add device tree binding of the mlx7502x and update MAINTAINERS
> >
> > Signed-off-by: Volodymyr Kharuk <vkh@melexis.com>
> > ---
> > .../bindings/media/i2c/melexis,mlx7502x.yaml | 106 ++++++++++++++++++
> > MAINTAINERS | 1 +
> > 2 files changed, 107 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> > new file mode 100644
> > index 000000000000..0cc6e425caec
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> > @@ -0,0 +1,106 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/i2c/melexis,mlx7502x.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Melexis ToF 7502x MIPI CSI-2 Sensor Device Tree Bindings
>
> s/Device Tree Bindings//
>
> > +
> > +maintainers:
> > + - Volodymyr Kharuk <vkh@melexis.com>
> > +
> > +description: |-
> > + Melexis ToF 7502x sensors has a CSI-2 output. It supports 2 and 4 lanes,
> > + and mipi speeds are 300, 600, 704, 800, 904, 960Mbs. Supported format is RAW12.
> > + Sensor 75026 is QVGA, while 75027 is VGA sensor.
> > +
> > +properties:
> > + compatible:
> > + const: melexis,mlx7502x
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + vcc-supply:
> > + description: VCC supply phandle.
> > +
> > + hw-trigger-gpio:
>
> Yoiu need vendor prefix here, because this does not look like standard
> property. Plus "gpios", not "gpio", so:
> melexis,hw-trigger-gpios
>
> > + maxItems: 1
> > + description: Hardware Trigger GPIO Control (active low)
> > +
> > + reset-gpio:
>
> reset-gpios
>
> > + maxItems: 1
> > + description: Reset Sensor GPIO Control (active low)
> > +
> > + leden-gpio:
>
> vendor prefix + gpios, unless this is "enable-gpios" standard property.
Yes it is enable for another device(illumination), so it not the standard one.
>
> > + maxItems: 1
> > + description: Led driver enanle GPIO Control (active high)
>
> enable?
Yeap, thanks
>
> > +
> > + port:
> > + description: MIPI CSI-2 transmitter port
> > + $ref: /schemas/graph.yaml#/$defs/port-base
> > +
> > + properties:
> > + endpoint:
> > + $ref: /schemas/media/video-interfaces.yaml#
> > + unevaluatedProperties: false
> > +
> > + properties:
> > + data-lanes:
> > + anyOf:
>
> oneOf
> although probably has the same effect
Agree.
>
> > + - items:
> > + - const: 1
> > + - const: 2
> > + - items:
> > + - const: 1
> > + - const: 2
> > + - const: 3
> > + - const: 4
> > +
> > + clock-noncontinuous: true
> > + link-frequencies: true
> > +
> > + required:
> > + - data-lanes
> > + - link-frequencies
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/gpio/gpio.h>
> > +
> > + i2c1 {
>
> Just "i2c"
>
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + mlx7502x: camera@57 {
> > + compatible = "melexis,mlx7502x";
> > + reg = <0x57>;
> > +
> > + vcc-supply = <&mlx_7502x_reg>;
> > + hw-trigger-gpio = <&gpio_exp 2 GPIO_ACTIVE_HIGH>;
> > + reset-gpio = <&gpio_exp 6 GPIO_ACTIVE_HIGH>;
> > + leden-gpio = <&gpio_exp 7 GPIO_ACTIVE_HIGH>;
> > +
> > + port {
> > + mlx7502x_out_mipi_csi2: endpoint {
> > + remote-endpoint = <&mipi_csi2_from_mlx7502x>;
> > + data-lanes = <1 2 3 4>;
> > + link-frequencies = /bits/ 64 < 960000000
> > + 904000000
> > + 800000000
> > + 704000000
> > + 600000000
> > + 300000000 >;
> > + };
> > + };
> > + };
> > + };
> > +
> > +...
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 6b74de976e90..ce052a351fda 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -12676,6 +12676,7 @@ M: Volodymyr Kharuk <vkh@melexis.com>
> > L: linux-media@vger.kernel.org
> > S: Supported
> > W: http://www.melexis.com
> > +F: Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
> > F: include/uapi/linux/mlx7502x.h
> >
> > MELFAS MIP4 TOUCHSCREEN DRIVER
>
>
> Best regards,
> Krzysztof
new file mode 100644
@@ -0,0 +1,106 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/melexis,mlx7502x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Melexis ToF 7502x MIPI CSI-2 Sensor Device Tree Bindings
+
+maintainers:
+ - Volodymyr Kharuk <vkh@melexis.com>
+
+description: |-
+ Melexis ToF 7502x sensors has a CSI-2 output. It supports 2 and 4 lanes,
+ and mipi speeds are 300, 600, 704, 800, 904, 960Mbs. Supported format is RAW12.
+ Sensor 75026 is QVGA, while 75027 is VGA sensor.
+
+properties:
+ compatible:
+ const: melexis,mlx7502x
+
+ reg:
+ maxItems: 1
+
+ vcc-supply:
+ description: VCC supply phandle.
+
+ hw-trigger-gpio:
+ maxItems: 1
+ description: Hardware Trigger GPIO Control (active low)
+
+ reset-gpio:
+ maxItems: 1
+ description: Reset Sensor GPIO Control (active low)
+
+ leden-gpio:
+ maxItems: 1
+ description: Led driver enanle GPIO Control (active high)
+
+ port:
+ description: MIPI CSI-2 transmitter port
+ $ref: /schemas/graph.yaml#/$defs/port-base
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ anyOf:
+ - items:
+ - const: 1
+ - const: 2
+ - items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
+
+ clock-noncontinuous: true
+ link-frequencies: true
+
+ required:
+ - data-lanes
+ - link-frequencies
+
+required:
+ - compatible
+ - reg
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mlx7502x: camera@57 {
+ compatible = "melexis,mlx7502x";
+ reg = <0x57>;
+
+ vcc-supply = <&mlx_7502x_reg>;
+ hw-trigger-gpio = <&gpio_exp 2 GPIO_ACTIVE_HIGH>;
+ reset-gpio = <&gpio_exp 6 GPIO_ACTIVE_HIGH>;
+ leden-gpio = <&gpio_exp 7 GPIO_ACTIVE_HIGH>;
+
+ port {
+ mlx7502x_out_mipi_csi2: endpoint {
+ remote-endpoint = <&mipi_csi2_from_mlx7502x>;
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 < 960000000
+ 904000000
+ 800000000
+ 704000000
+ 600000000
+ 300000000 >;
+ };
+ };
+ };
+ };
+
+...
@@ -12676,6 +12676,7 @@ M: Volodymyr Kharuk <vkh@melexis.com>
L: linux-media@vger.kernel.org
S: Supported
W: http://www.melexis.com
+F: Documentation/devicetree/bindings/media/i2c/melexis,mlx7502x.yaml
F: include/uapi/linux/mlx7502x.h
MELFAS MIP4 TOUCHSCREEN DRIVER