Re: [PATCH 2/5] dt-bindings: media: max9286: Add overlap window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jacopo,

On 16/03/2020 20:27, Jacopo Mondi wrote:
> 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

/in future/in the future/
/of control/of the control/

> behaviour (window enabled or disabled) can be established, a new boolean
> property could supersede this one while being sure that older DTB are

/DTB/DTBs/

> fully specified to avoid confusion.
> 
> Provide a few convenience macros for the window disabled and window
> default value.

Well it's not the best solution (putting hardcode values into the DTB)
but I agree, without documentation these are almost 'magic values for
the hardware' which is unfortunate.

I do fear this may be the wrong place still though.

This is dependent upon the 'serializer' connected, so is it a property
of the serializer that the max9286 should query at probe time to see
what it has connected?

But that's just back to the whole topic of bus-parameter negotiations
between the serializer and deserializer ...


But with this solution, any dtb segment or overlay for the serializer
needs to modify the max9286 depending on it's requirements ... that
feels a bit odd. Possible, I think, but odd.

Do we have any precedence in existing DT to reference on this topic?




> Signed-off-by: Jacopo Mondi <jacopo+renesas@xxxxxxxxxx>
> ---
>  .../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@xxxxxxxxxxxx>
>  L:	linux-media@xxxxxxxxxxxxxxx
>  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 */
> 




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux