diff mbox series

[09/13] dt-bindings: media: ov5640: Add default for synch signals

Message ID 20200717132859.237120-10-jacopo+renesas@jmondi.org (mailing list archive)
State New, archived
Headers show
Series dt-bindings: media: ov5640: Convert to json-schema | expand

Commit Message

Jacopo Mondi July 17, 2020, 1:28 p.m. UTC
Add defalt value for the DVP interface synchronism signals.

The default values have been derived from register 0x4740
documentation (datasheet version 2.03)

0x4740 POLARITY CTRL00 default = 0x20
bit 5: pclk polarity = 1 active high
bit 1: HREF polarity = 0 active low
bit 0: VSYNC polarity = 0 active low

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Laurent Pinchart July 17, 2020, 8:59 p.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Fri, Jul 17, 2020 at 03:28:55PM +0200, Jacopo Mondi wrote:
> Add defalt value for the DVP interface synchronism signals.

s/synchronism/synchronization/

> The default values have been derived from register 0x4740
> documentation (datasheet version 2.03)
> 
> 0x4740 POLARITY CTRL00 default = 0x20
> bit 5: pclk polarity = 1 active high
> bit 1: HREF polarity = 0 active low
> bit 0: VSYNC polarity = 0 active low

Do we need default values ? That's only for the case where the
properties are not specified, and I think they are mandatory when the
bus-type is set to parallel, aren't they ? I think stating this
explicitly will be less error-prone.

> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> index ab700a1830aa..3c20cdd02f76 100644
> --- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> @@ -94,12 +94,15 @@ properties:
>  
>            hsync-active:
>              enum: [0, 1]
> +            default: 0
>  
>            vsync-active:
>              enum: [0, 1]
> +            default: 0
>  
>            pclk-sample:
>              enum: [0, 1]
> +            default: 1
>  
>          allOf:
>            - if:
Rob Herring (Arm) July 20, 2020, 7:50 p.m. UTC | #2
On Fri, Jul 17, 2020 at 11:59:31PM +0300, Laurent Pinchart wrote:
> Hi Jacopo,
> 
> Thank you for the patch.
> 
> On Fri, Jul 17, 2020 at 03:28:55PM +0200, Jacopo Mondi wrote:
> > Add defalt value for the DVP interface synchronism signals.
> 
> s/synchronism/synchronization/
> 
> > The default values have been derived from register 0x4740
> > documentation (datasheet version 2.03)
> > 
> > 0x4740 POLARITY CTRL00 default = 0x20
> > bit 5: pclk polarity = 1 active high
> > bit 1: HREF polarity = 0 active low
> > bit 0: VSYNC polarity = 0 active low
> 
> Do we need default values ? That's only for the case where the
> properties are not specified, and I think they are mandatory when the
> bus-type is set to parallel, aren't they ? I think stating this
> explicitly will be less error-prone.

In this case, I think default should be fixed or not configurable.

> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  Documentation/devicetree/bindings/media/i2c/ov5640.yaml | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > index ab700a1830aa..3c20cdd02f76 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
> > @@ -94,12 +94,15 @@ properties:
> >  
> >            hsync-active:
> >              enum: [0, 1]
> > +            default: 0
> >  
> >            vsync-active:
> >              enum: [0, 1]
> > +            default: 0
> >  
> >            pclk-sample:
> >              enum: [0, 1]
> > +            default: 1
> >  
> >          allOf:
> >            - if:
> 
> -- 
> Regards,
> 
> Laurent Pinchart
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
index ab700a1830aa..3c20cdd02f76 100644
--- a/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ov5640.yaml
@@ -94,12 +94,15 @@  properties:
 
           hsync-active:
             enum: [0, 1]
+            default: 0
 
           vsync-active:
             enum: [0, 1]
+            default: 0
 
           pclk-sample:
             enum: [0, 1]
+            default: 1
 
         allOf:
           - if: