public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Mirela Rabulea <mirela.rabulea@nxp.com>,
	mchehab@kernel.org, sakari.ailus@linux.intel.com,
	hverkuil-cisco@xs4all.nl, laurentiu.palcu@nxp.com,
	robert.chiras@nxp.com, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, LnxRevLi@nxp.com,
	kieran.bingham@ideasonboard.com, hdegoede@redhat.com,
	dave.stevenson@raspberrypi.com, mike.rudenko@gmail.com,
	alain.volmat@foss.st.com, julien.vuillaumier@nxp.com,
	alice.yuan@nxp.com
Subject: Re: [PATCH 1/5] dt-bindings: media: i2c: Add bindings for OX05B1S sensor driver
Date: Tue, 29 Oct 2024 13:57:47 +0200	[thread overview]
Message-ID: <20241029115747.GL22600@pendragon.ideasonboard.com> (raw)
In-Reply-To: <c32439a5-4230-4ca5-8d46-fb00d25072e5@linaro.org>

On Tue, Oct 29, 2024 at 11:44:33AM +0000, Bryan O'Donoghue wrote:
> On 28/10/2024 19:06, Mirela Rabulea wrote:
> > Add bindings for OX05B1S sensor driver
> > 
> > Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
> > ---
> >   .../bindings/media/i2c/ovti,ox05b1s.yaml      | 109 ++++++++++++++++++
> >   1 file changed, 109 insertions(+)
> >   create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ox05b1s.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ox05b1s.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ox05b1s.yaml
> > new file mode 100644
> > index 000000000000..d47e1950f24d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ox05b1s.yaml
> > @@ -0,0 +1,109 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +# Copyright (C) 2024, NXP
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/i2c/ovti,ox05b1s.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Omnivision OX05B1S Image Sensor
> > +
> > +maintainers:
> > +  - Mirela Rabulea <mirela.rabulea@nxp.com>
> > +
> > +description: |-
> > +  The Omnivision OX05B1S is a 1/2.5-Inch CMOS image sensor with an active array size

Reflow to 80 columns.

> > +  of 2592 x 1944. It is programmable through I2C interface.
> > +  The sensor output is available via CSI-2 serial data output.
> > +
> 
> You should add
> 
> +allOf:
> +  - $ref: /schemas/media/video-interface-devices.yaml#
> 
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - ovti,ox05b1s
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    description: Input clock (24 MHz)
> > +    items:
> > +      - const: csi_mclk

If there's a single clock you can drop the name.

How about regulators ?

> > +
> > +  assigned-clocks:
> > +    maxItems: 1
> > +
> > +  assigned-clock-parents:
> > +    maxItems: 1
> > +
> > +  assigned-clock-rates:
> > +    maxItems: 1
> > +
> 
> assigned-clock* should be dropped.
> 
> https://lore.kernel.org/all/20241025-b4-linux-next-202041004-i2c-media-yaml-fixes-v2-1-1b4535174a5a@linaro.org/

Agreed.

> > +
> > +  orientation: true
> > +  rotation: true
> 
> I think you can drop both of these too.

Aren't they needed given that the binding ends with

additionalProperties: false

?

> > +
> > +  port:
> > +    $ref: /schemas/graph.yaml#/$defs/port-base
> > +    additionalProperties: false
> > +    description: MIPI CSI-2 transmitter port
> > +
> > +    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
> > +        required:
> > +          - data-lanes
> > +
> > +    required:
> > +      - endpoint
> > +
> > +required:
> > +  - compatible
> > +  - reg

The device requires a clock, shouldn't the clocks property be required ?

> > +  - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        ox05b1s: ox05b1s@36 {
> > +            compatible = "ovti,ox05b1s";
> > +            reg = <0x36>;
> > +            reset-gpios = <&i2c3_gpio_expander_20 2 GPIO_ACTIVE_LOW>;

This isn't specified in the bindings. Does the example validate ?

> > +            orientation = <2>;
> > +            rotation = <0>;
> > +            status = "okay";
> 
> You should include assigned-clock* here in the example.

Is that mandatory ? I'd rather omit it, I think it only adds noise.

> > +
> > +            port {
> > +                ox05b1s_mipi_0_ep: endpoint {
> > +                    remote-endpoint = <&mipi_csi0_ep>;
> > +                    data-lanes = <1 2 3 4>;
> > +                };
> > +            };
> > +        };
> > +    };
> > +...

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-10-29 11:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 19:06 [PATCH 0/5] media: i2c: Add OX05B1S camera sensor driver Mirela Rabulea
2024-10-28 19:06 ` [PATCH 1/5] dt-bindings: media: i2c: Add bindings for OX05B1S " Mirela Rabulea
2024-10-29  6:14   ` Krzysztof Kozlowski
2024-10-29 12:10     ` Laurent Pinchart
2024-10-29 12:15       ` Krzysztof Kozlowski
2024-10-29 12:21         ` Laurent Pinchart
2024-10-29 12:28           ` Krzysztof Kozlowski
2024-10-29 12:46             ` Laurent Pinchart
2024-10-29 12:47               ` Krzysztof Kozlowski
2024-10-29 13:36     ` [EXT] " Mirela Rabulea
2024-10-29 13:49       ` Krzysztof Kozlowski
2024-10-29 11:44   ` Bryan O'Donoghue
2024-10-29 11:57     ` Laurent Pinchart [this message]
2024-10-29 12:00       ` Bryan O'Donoghue
2024-10-30  6:08         ` [EXT] " Mirela Rabulea
2024-10-30  6:02       ` Mirela Rabulea
2024-11-04 14:25         ` Laurent Pinchart
2024-11-26 16:10           ` Mirela Rabulea
2024-10-28 19:06 ` [PATCH 2/5] media: ox05b1s: Add omnivision OX05B1S raw " Mirela Rabulea
2024-10-29  6:17   ` Krzysztof Kozlowski
2024-10-28 19:06 ` [PATCH 3/5] MAINTAINERS: Add entry for OX05B1S " Mirela Rabulea
2024-10-28 19:06 ` [PATCH 4/5] dt-bindings: media: i2c: Update bindings for OX05B1S with OS08A20 Mirela Rabulea
2024-10-29  6:17   ` Krzysztof Kozlowski
2024-10-29 14:02     ` [EXT] " Mirela Rabulea
2024-10-29 16:46       ` Krzysztof Kozlowski
2024-10-28 19:06 ` [PATCH 5/5] media: ox05b1s: Add support for Omnivision OS08A20 raw sensor Mirela Rabulea
2024-11-01 12:08   ` Sakari Ailus
2024-11-04 13:21     ` [EXT] " Mirela Rabulea

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=20241029115747.GL22600@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=LnxRevLi@nxp.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alice.yuan@nxp.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=julien.vuillaumier@nxp.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurentiu.palcu@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mike.rudenko@gmail.com \
    --cc=mirela.rabulea@nxp.com \
    --cc=robert.chiras@nxp.com \
    --cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox