Devicetree
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: "Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Jacopo Mondi" <jacopo+renesas@jmondi.org>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v8 2/7] dt-bindings: media: max9286: Define 'maxim,gpio-poc'
Date: Mon, 17 Jan 2022 11:57:16 +0000	[thread overview]
Message-ID: <164242063681.10801.10113230520314086360@Monstersaurus> (raw)
In-Reply-To: <20211216163439.139579-3-jacopo+renesas@jmondi.org>

Hi Jacopo,

Quoting Jacopo Mondi (2021-12-16 16:34:34)
> Define a new vendor property in the maxim,max9286 binding schema.
> 
> The new property allows to declare that the remote camera
> power-over-coax is controlled by one of the MAX9286 gpio lines.
> 
> As it is currently not possible to establish a regulator as consumer
> of the MAX9286 gpio controller for this purpose, the property allows to
> declare that the camera power is controlled by the MAX9286 directly.
> 
> The property accepts a gpio-index (0 or 1) and one line polarity
> flag as defined by dt-bindings/gpio/gpio.h.
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  .../bindings/media/i2c/maxim,max9286.yaml     | 67 ++++++++++++++++++-
>  1 file changed, 66 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> index ab4e7a620362..90315e217003 100644
> --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> @@ -70,6 +70,28 @@ properties:
>        a remote serializer whose high-threshold noise immunity is not enabled
>        is 100000 micro volts
>  
> +  maxim,gpio-poc:
> +    $ref: '/schemas/types.yaml#/definitions/uint32-array'
> +    minItems: 2
> +    maxItems: 2
> +    description: |
> +      Index of the MAX9286 gpio output line (0 or 1) that controls Power over
> +      Coax to the cameras and its associated polarity flag.
> +
> +      The property accepts an array of two unsigned integers, the first being
> +      the gpio line index (0 or 1) and the second being the gpio line polarity
> +      flag (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW) as defined in
> +      <include/dt-bindings/gpio/gpio.h>.
> +
> +      When the remote cameras power is controlled by one of the MAX9286 gpio
> +      lines, this property has to be used to specify which line among the two
> +      available ones controls the remote camera power enablement.
> +
> +      When this property is used it is not possible to register a gpio
> +      controller as the gpio lines are controlled directly by the MAX9286 and
> +      not available for consumers, nor the 'poc-supply' property should be
> +      specified.
> +
>    ports:
>      $ref: /schemas/graph.yaml#/properties/ports
>  
> @@ -165,7 +187,16 @@ required:
>    - reg
>    - ports
>    - i2c-mux
> -  - gpio-controller
> +
> +# If 'maxim,gpio-poc' is present, then 'poc-supply' and 'gpio-controller'
> +# are not allowed.
> +if:
> +  required:
> +    - maxim,gpio-poc
> +then:
> +  properties:
> +    poc-supply: false
> +    gpio-controller: false
>  
>  additionalProperties: false
>  
> @@ -310,4 +341,38 @@ examples:
>                  };
>              };
>          };
> +
> +        /*
> +        * Example of a deserializer that controls the camera Power over Coax

Indentation seems broken...

> +        * through one of its gpio lines.
> +        */
> +        gmsl-deserializer@6c {
> +            compatible = "maxim,max9286";
> +            reg = <0x6c>;
> +            enable-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
> +
> +            /*
> +            * The remote camera power is controlled by MAX9286 GPIO line #0.
> +            * No 'poc-supply' nor 'gpio-controller' are specified.
> +            */
> +            maxim,gpio-poc = <0 GPIO_ACTIVE_LOW>;
> +
> +            /*
> +            * Do not describe connections as they're the same as in the previous

Here too,

This seems like a simple way to describe this without hitting the
circular dependency loops I was facing when I looked at this. I'm sorry
it took me until v8 to find this out ;-)

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> +            * example.
> +            */
> +            ports {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +
> +                port@4 {
> +                    reg = <4>;
> +                };
> +            };
> +
> +            i2c-mux {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +            };
> +        };
>      };
> -- 
> 2.33.1
>

  reply	other threads:[~2022-01-17 11:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 16:34 [PATCH v8 0/7] arm64: dts: renesas: Enable MAX9286 on Eagle and Condor Jacopo Mondi
2021-12-16 16:34 ` [PATCH v8 1/7] dt-bindings: media: max9286: Re-indent example Jacopo Mondi
2021-12-16 16:34 ` [PATCH v8 2/7] dt-bindings: media: max9286: Define 'maxim,gpio-poc' Jacopo Mondi
2022-01-17 11:57   ` Kieran Bingham [this message]
2021-12-16 16:34 ` [PATCH v8 3/7] media: i2c: max9286: Use "maxim,gpio-poc" property Jacopo Mondi
2021-12-16 16:34 ` [PATCH v8 4/7] arm64: dts: renesas: condor: Enable MAX9286 Jacopo Mondi
2022-01-17 12:09   ` Kieran Bingham
2022-01-20  9:14   ` Geert Uytterhoeven
2022-01-20 10:25     ` Jacopo Mondi
2021-12-16 16:34 ` [PATCH v8 5/7] arm64: dts: renesas: eagle: " Jacopo Mondi
2022-01-17 12:00   ` Kieran Bingham
2022-01-20  9:22   ` Geert Uytterhoeven
2021-12-16 16:34 ` [PATCH v8 6/7] arm64: dts: renesas: Add GMSL cameras .dtsi Jacopo Mondi
2022-01-20  9:24   ` Geert Uytterhoeven
2021-12-16 16:34 ` [PATCH v8 7/7] DNI: arm64: dts: renesas: eagle: Include eagle-gmsl Jacopo Mondi
2021-12-17 14:30 ` [v8.1 3/7] media: i2c: max9286: Use "maxim,gpio-poc" property Jacopo Mondi

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=164242063681.10801.10113230520314086360@Monstersaurus \
    --to=kieran.bingham@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=robh@kernel.org \
    /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