All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] [RFC] dt-bindings: display: bridge: sil,sii9022: Convert to json-schema
Date: Thu, 28 Oct 2021 20:01:15 -0500	[thread overview]
Message-ID: <YXtH252v1u67chri@robh.at.kernel.org> (raw)
In-Reply-To: <1ad70333148a473c1344a87993e795be90f355e4.1634817622.git.geert+renesas@glider.be>

On Thu, Oct 21, 2021 at 02:01:22PM +0200, Geert Uytterhoeven wrote:
> Convert the Silicon Image sii902x HDMI bridge Device Tree binding
> documentation to json-schema.
> 
> Add missing sil,sii9022-cpi and sil,sii9022-tpi compatible values.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> RFC as I do not know the meaning of the various ports subnodes.
> ---
>  .../bindings/display/bridge/sii902x.txt       |  78 ----------
>  .../bindings/display/bridge/sil,sii9022.yaml  | 133 ++++++++++++++++++
>  2 files changed, 133 insertions(+), 78 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/bridge/sii902x.txt
>  create mode 100644 Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> deleted file mode 100644
> index 3bc760cc31cbbeee..0000000000000000
> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> +++ /dev/null
> @@ -1,78 +0,0 @@
> -sii902x HDMI bridge bindings
> -
> -Required properties:
> -	- compatible: "sil,sii9022"
> -	- reg: i2c address of the bridge
> -
> -Optional properties:
> -	- interrupts: describe the interrupt line used to inform the host
> -	  about hotplug events.
> -	- reset-gpios: OF device-tree gpio specification for RST_N pin.
> -	- iovcc-supply: I/O Supply Voltage (1.8V or 3.3V)
> -	- cvcc12-supply: Digital Core Supply Voltage (1.2V)
> -
> -	HDMI audio properties:
> -	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
> -	   is wired, <1> if the both are wired. HDMI audio is
> -	   configured only if this property is found.
> -	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
> -	   Each integer indicates which i2s pin is connected to which
> -	   audio fifo. The first integer selects i2s audio pin for the
> -	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
> -	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
> -	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
> -	   but there can be no gaps. E.g. an i2s pin must be mapped to
> -	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
> -	   value is <0>, describing SD0 pin beiging routed to hdmi audio
> -	   fifo #0.
> -	- clocks: phandle and clock specifier for each clock listed in
> -           the clock-names property
> -	- clock-names: "mclk"
> -	   Describes SII902x MCLK input. MCLK can be used to produce
> -	   HDMI audio CTS values. This property follows
> -	   Documentation/devicetree/bindings/clock/clock-bindings.txt
> -	   consumer binding.
> -
> -	If HDMI audio is configured the sii902x device becomes an I2S
> -	and/or spdif audio codec component (e.g a digital audio sink),
> -	that can be used in configuring a full audio devices with
> -	simple-card or audio-graph-card binding. See their binding
> -	documents on how to describe the way the sii902x device is
> -	connected to the rest of the audio system:
> -	Documentation/devicetree/bindings/sound/simple-card.yaml
> -	Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> -	Note: In case of the audio-graph-card binding the used port
> -	index should be 3.
> -
> -Optional subnodes:
> -	- video input: this subnode can contain a video input port node
> -	  to connect the bridge to a display controller output (See this
> -	  documentation [1]).
> -
> -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
> -
> -Example:
> -	hdmi-bridge@39 {
> -		compatible = "sil,sii9022";
> -		reg = <0x39>;
> -		reset-gpios = <&pioA 1 0>;
> -		iovcc-supply = <&v3v3_hdmi>;
> -		cvcc12-supply = <&v1v2_hdmi>;
> -
> -		#sound-dai-cells = <0>;
> -		sil,i2s-data-lanes = < 0 1 2 >;
> -		clocks = <&mclk>;
> -		clock-names = "mclk";
> -
> -		ports {
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -
> -			port@0 {
> -				reg = <0>;
> -				bridge_in: endpoint {
> -					remote-endpoint = <&dc_out>;
> -				};
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> new file mode 100644
> index 0000000000000000..4e5a8ecf87647e8b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> @@ -0,0 +1,133 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/sil,sii9022.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Silicon Image sii902x HDMI bridge
> +
> +maintainers:
> +  - Boris Brezillon <bbrezillon@kernel.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - sil,sii9022-cpi
> +              - sil,sii9022-tpi
> +          - const: sil,sii9022
> +      - const: sil,sii9022
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +    description: Interrupt line used to inform the host about hotplug events.
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  iovcc-supply:
> +    description: I/O Supply Voltage (1.8V or 3.3V)
> +
> +  cvcc12-supply:
> +    description: Digital Core Supply Voltage (1.2V)
> +
> +  '#sound-dai-cells':
> +    enum: [ 0, 1 ]
> +    description: |
> +      <0> if only i2s or spdif pin is wired,
> +      <1> if both are wired.
> +      HDMI audio is configured only if this property is found.
> +      If HDMI audio is configured the sii902x device becomes an I2S and/or
> +      spdif audio codec component (e.g. a digital audio sink), that can be used
> +      in configuring a full audio devices with simple-card or audio-graph-card
> +      binding. See their binding documents on how to describe the way the
> +      sii902x device is connected to the rest of the audio system:
> +      Documentation/devicetree/bindings/sound/simple-card.yaml
> +      Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> +      Note: In case of the audio-graph-card binding the used port index should
> +      be 3.
> +
> +  sil,i2s-data-lanes:
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    items:
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]

minItems: 1
maxItems: 4
uniqueItems: true
items:
  enum: [ 0, 1, 2, 3 ]


> +    description:
> +      Each integer indicates which i2s pin is connected to which audio fifo.
> +      The first integer selects i2s audio pin for the first audio fifo#0 (HDMI
> +      channels 1&2), second for fifo#1 (HDMI channels 3&4), and so on. There
> +      are 4 fifos and 4 i2s pins (SD0 - SD3). Any i2s pin can be connected to
> +      any fifo, but there can be no gaps. E.g. an i2s pin must be mapped to
> +      fifo#0 and fifo#1 before mapping a channel to fifo#2. Default value is
> +      <0>, describing SD0 pin being routed to hdmi audio fifo #0.
> +
> +  clocks:
> +    maxItems: 1
> +    description: MCLK input. MCLK can be used to produce HDMI audio CTS values.
> +
> +  clock-names:
> +    const: mclk
> +
> +  ports:
> +    type: object
> +    properties:
> +      port@0:
> +        type: object
> +        description: FIXME

Can't help you on that, but you need graph.yaml references on ports 
and all of these.

> +
> +      port@1:
> +        type: object
> +        description: FIXME
> +
> +      port@2:
> +        type: object
> +        description: FIXME
> +
> +      port@3:
> +        type: object
> +        description: FIXME
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        hdmi-bridge@39 {
> +            compatible = "sil,sii9022";
> +            reg = <0x39>;
> +            reset-gpios = <&pioA 1 0>;
> +            iovcc-supply = <&v3v3_hdmi>;
> +            cvcc12-supply = <&v1v2_hdmi>;
> +
> +            #sound-dai-cells = <0>;
> +            sil,i2s-data-lanes = < 0 1 2 >;
> +            clocks = <&mclk>;
> +            clock-names = "mclk";
> +
> +            ports {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +
> +                port@0 {
> +                    reg = <0>;
> +                    bridge_in: endpoint {
> +                        remote-endpoint = <&dc_out>;
> +                    };
> +                };
> +            };
> +        };
> +    };
> -- 
> 2.25.1
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] [RFC] dt-bindings: display: bridge: sil, sii9022: Convert to json-schema
Date: Thu, 28 Oct 2021 20:01:15 -0500	[thread overview]
Message-ID: <YXtH252v1u67chri@robh.at.kernel.org> (raw)
In-Reply-To: <1ad70333148a473c1344a87993e795be90f355e4.1634817622.git.geert+renesas@glider.be>

On Thu, Oct 21, 2021 at 02:01:22PM +0200, Geert Uytterhoeven wrote:
> Convert the Silicon Image sii902x HDMI bridge Device Tree binding
> documentation to json-schema.
> 
> Add missing sil,sii9022-cpi and sil,sii9022-tpi compatible values.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> RFC as I do not know the meaning of the various ports subnodes.
> ---
>  .../bindings/display/bridge/sii902x.txt       |  78 ----------
>  .../bindings/display/bridge/sil,sii9022.yaml  | 133 ++++++++++++++++++
>  2 files changed, 133 insertions(+), 78 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/bridge/sii902x.txt
>  create mode 100644 Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/sii902x.txt b/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> deleted file mode 100644
> index 3bc760cc31cbbeee..0000000000000000
> --- a/Documentation/devicetree/bindings/display/bridge/sii902x.txt
> +++ /dev/null
> @@ -1,78 +0,0 @@
> -sii902x HDMI bridge bindings
> -
> -Required properties:
> -	- compatible: "sil,sii9022"
> -	- reg: i2c address of the bridge
> -
> -Optional properties:
> -	- interrupts: describe the interrupt line used to inform the host
> -	  about hotplug events.
> -	- reset-gpios: OF device-tree gpio specification for RST_N pin.
> -	- iovcc-supply: I/O Supply Voltage (1.8V or 3.3V)
> -	- cvcc12-supply: Digital Core Supply Voltage (1.2V)
> -
> -	HDMI audio properties:
> -	- #sound-dai-cells: <0> or <1>. <0> if only i2s or spdif pin
> -	   is wired, <1> if the both are wired. HDMI audio is
> -	   configured only if this property is found.
> -	- sil,i2s-data-lanes: Array of up to 4 integers with values of 0-3
> -	   Each integer indicates which i2s pin is connected to which
> -	   audio fifo. The first integer selects i2s audio pin for the
> -	   first audio fifo#0 (HDMI channels 1&2), second for fifo#1
> -	   (HDMI channels 3&4), and so on. There is 4 fifos and 4 i2s
> -	   pins (SD0 - SD3). Any i2s pin can be connected to any fifo,
> -	   but there can be no gaps. E.g. an i2s pin must be mapped to
> -	   fifo#0 and fifo#1 before mapping a channel to fifo#2. Default
> -	   value is <0>, describing SD0 pin beiging routed to hdmi audio
> -	   fifo #0.
> -	- clocks: phandle and clock specifier for each clock listed in
> -           the clock-names property
> -	- clock-names: "mclk"
> -	   Describes SII902x MCLK input. MCLK can be used to produce
> -	   HDMI audio CTS values. This property follows
> -	   Documentation/devicetree/bindings/clock/clock-bindings.txt
> -	   consumer binding.
> -
> -	If HDMI audio is configured the sii902x device becomes an I2S
> -	and/or spdif audio codec component (e.g a digital audio sink),
> -	that can be used in configuring a full audio devices with
> -	simple-card or audio-graph-card binding. See their binding
> -	documents on how to describe the way the sii902x device is
> -	connected to the rest of the audio system:
> -	Documentation/devicetree/bindings/sound/simple-card.yaml
> -	Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> -	Note: In case of the audio-graph-card binding the used port
> -	index should be 3.
> -
> -Optional subnodes:
> -	- video input: this subnode can contain a video input port node
> -	  to connect the bridge to a display controller output (See this
> -	  documentation [1]).
> -
> -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
> -
> -Example:
> -	hdmi-bridge@39 {
> -		compatible = "sil,sii9022";
> -		reg = <0x39>;
> -		reset-gpios = <&pioA 1 0>;
> -		iovcc-supply = <&v3v3_hdmi>;
> -		cvcc12-supply = <&v1v2_hdmi>;
> -
> -		#sound-dai-cells = <0>;
> -		sil,i2s-data-lanes = < 0 1 2 >;
> -		clocks = <&mclk>;
> -		clock-names = "mclk";
> -
> -		ports {
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -
> -			port@0 {
> -				reg = <0>;
> -				bridge_in: endpoint {
> -					remote-endpoint = <&dc_out>;
> -				};
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> new file mode 100644
> index 0000000000000000..4e5a8ecf87647e8b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/sil,sii9022.yaml
> @@ -0,0 +1,133 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/sil,sii9022.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Silicon Image sii902x HDMI bridge
> +
> +maintainers:
> +  - Boris Brezillon <bbrezillon@kernel.org>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - sil,sii9022-cpi
> +              - sil,sii9022-tpi
> +          - const: sil,sii9022
> +      - const: sil,sii9022
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +    description: Interrupt line used to inform the host about hotplug events.
> +
> +  reset-gpios:
> +    maxItems: 1
> +
> +  iovcc-supply:
> +    description: I/O Supply Voltage (1.8V or 3.3V)
> +
> +  cvcc12-supply:
> +    description: Digital Core Supply Voltage (1.2V)
> +
> +  '#sound-dai-cells':
> +    enum: [ 0, 1 ]
> +    description: |
> +      <0> if only i2s or spdif pin is wired,
> +      <1> if both are wired.
> +      HDMI audio is configured only if this property is found.
> +      If HDMI audio is configured the sii902x device becomes an I2S and/or
> +      spdif audio codec component (e.g. a digital audio sink), that can be used
> +      in configuring a full audio devices with simple-card or audio-graph-card
> +      binding. See their binding documents on how to describe the way the
> +      sii902x device is connected to the rest of the audio system:
> +      Documentation/devicetree/bindings/sound/simple-card.yaml
> +      Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> +      Note: In case of the audio-graph-card binding the used port index should
> +      be 3.
> +
> +  sil,i2s-data-lanes:
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 1
> +    items:
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]
> +      - enum: [ 0, 1, 2, 3 ]

minItems: 1
maxItems: 4
uniqueItems: true
items:
  enum: [ 0, 1, 2, 3 ]


> +    description:
> +      Each integer indicates which i2s pin is connected to which audio fifo.
> +      The first integer selects i2s audio pin for the first audio fifo#0 (HDMI
> +      channels 1&2), second for fifo#1 (HDMI channels 3&4), and so on. There
> +      are 4 fifos and 4 i2s pins (SD0 - SD3). Any i2s pin can be connected to
> +      any fifo, but there can be no gaps. E.g. an i2s pin must be mapped to
> +      fifo#0 and fifo#1 before mapping a channel to fifo#2. Default value is
> +      <0>, describing SD0 pin being routed to hdmi audio fifo #0.
> +
> +  clocks:
> +    maxItems: 1
> +    description: MCLK input. MCLK can be used to produce HDMI audio CTS values.
> +
> +  clock-names:
> +    const: mclk
> +
> +  ports:
> +    type: object
> +    properties:
> +      port@0:
> +        type: object
> +        description: FIXME

Can't help you on that, but you need graph.yaml references on ports 
and all of these.

> +
> +      port@1:
> +        type: object
> +        description: FIXME
> +
> +      port@2:
> +        type: object
> +        description: FIXME
> +
> +      port@3:
> +        type: object
> +        description: FIXME
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        hdmi-bridge@39 {
> +            compatible = "sil,sii9022";
> +            reg = <0x39>;
> +            reset-gpios = <&pioA 1 0>;
> +            iovcc-supply = <&v3v3_hdmi>;
> +            cvcc12-supply = <&v1v2_hdmi>;
> +
> +            #sound-dai-cells = <0>;
> +            sil,i2s-data-lanes = < 0 1 2 >;
> +            clocks = <&mclk>;
> +            clock-names = "mclk";
> +
> +            ports {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +
> +                port@0 {
> +                    reg = <0>;
> +                    bridge_in: endpoint {
> +                        remote-endpoint = <&dc_out>;
> +                    };
> +                };
> +            };
> +        };
> +    };
> -- 
> 2.25.1
> 
> 

  reply	other threads:[~2021-10-29  1:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 12:01 [PATCH] [RFC] dt-bindings: display: bridge: sil,sii9022: Convert to json-schema Geert Uytterhoeven
2021-10-21 12:01 ` [PATCH] [RFC] dt-bindings: display: bridge: sil, sii9022: " Geert Uytterhoeven
2021-10-29  1:01 ` Rob Herring [this message]
2021-10-29  1:01   ` Rob Herring

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=YXtH252v1u67chri@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bbrezillon@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.