public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: "Russell King" <linux@armlinux.org.uk>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-omap@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 3/3] [RFC] dt-bindings: display: bridge: nxp,tda998x: Convert to json-schema
Date: Thu, 28 Oct 2021 20:04:48 -0500	[thread overview]
Message-ID: <YXtIsCnJ+L5zqCVk@robh.at.kernel.org> (raw)
In-Reply-To: <1f6bf58d76efc2e869b800534b818d1451ef98a2.1634822085.git.geert+renesas@glider.be>

On Thu, Oct 21, 2021 at 03:18:53PM +0200, Geert Uytterhoeven wrote:
> Convert the NXP TDA998x HDMI transmitter Device Tree binding
> documentation to json-schema.
> 
> Add missing "#sound-dai-cells" property.
> Add ports hierarchy, as an alternative to port.
> Drop pinctrl properties, as they do not belong here.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> RFC as I do not know:
>   1. The correct value(s) for '#sound-dai-cells' (the example used 2,
>      which was IMHO wrong, while all actual users use 0),
>   2. The meaning of the various ports subnodes.
> ---
>  .../bindings/display/bridge/nxp,tda998x.yaml  | 108 ++++++++++++++++++
>  .../bindings/display/bridge/tda998x.txt       |  54 ---------
>  2 files changed, 108 insertions(+), 54 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/bridge/nxp,tda998x.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/bridge/tda998x.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/nxp,tda998x.yaml b/Documentation/devicetree/bindings/display/bridge/nxp,tda998x.yaml
> new file mode 100644
> index 0000000000000000..87c64edcf5d5617d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/nxp,tda998x.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/nxp,tda998x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP TDA998x HDMI transmitter
> +
> +maintainers:
> +  - Russell King <linux@armlinux.org.uk>
> +
> +properties:
> +  compatible:
> +    const: nxp,tda998x
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  video-ports:
> +    default: 0x230145
> +    description:
> +      24 bits value which defines how the video controller output is wired to
> +      the TDA998x input.

maximum: 0xffffff

(at least...)

> +
> +  audio-ports:
> +    description:
> +      Array of 8-bit values, 2 values per DAI (Documentation/sound/soc/dai.rst).
> +      The implementation allows one or two DAIs.
> +      If two DAIs are defined, they must be of different type.
> +    $ref: /schemas/types.yaml#/definitions/uint32-matrix
> +    items:
> +      minItems: 1
> +      maxItems: 2
> +      items:
> +        - description: |
> +            The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
> +            (see include/dt-bindings/display/tda998x.h).
> +        - description:
> +            The second value defines the tda998x AP_ENA reg content when the
> +            DAI in question is used.
> +
> +  '#sound-dai-cells':
> +    enum: [ 0, 1 ]
> +
> +  nxp,calib-gpios:
> +    maxItems: 1
> +    description:
> +      Calibration GPIO, which must correspond with the gpio used for the
> +      TDA998x interrupt pin.
> +
> +  port:
> +    $ref: /schemas/graph.yaml#/properties/port
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +    properties:
> +      port@0:
> +        type: object
> +        description: FIXME

Looks like the input from the example

> +
> +      port@1:
> +        type: object
> +        description: FIXME

Presumably the output to connector or another bridge.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +oneOf:
> +  - required:
> +      - port
> +  - required:
> +      - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/display/tda998x.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        tda998x: hdmi-encoder@70 {
> +            compatible = "nxp,tda998x";
> +            reg = <0x70>;
> +            interrupt-parent = <&gpio0>;
> +            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
> +            video-ports = <0x230145>;
> +
> +            #sound-dai-cells = <1>;
> +                         /* DAI-format / AP_ENA reg value */
> +            audio-ports = <TDA998x_SPDIF 0x04>,
> +                          <TDA998x_I2S 0x03>;
> +
> +            port {
> +                tda998x_in: endpoint {
> +                    remote-endpoint = <&lcdc_0>;
> +                };
> +            };
> +        };
> +    };

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 13:18 [PATCH 0/3] dt-bindings: display: bridge: nxp,tda998x: Json-schema conversion and fixes Geert Uytterhoeven
2021-10-21 13:18 ` [PATCH 1/3] ARM: dts: am335x: Fix TDA998x ports addressing Geert Uytterhoeven
2021-10-21 13:18 ` [PATCH 2/3] [RFC] arm64: dts: renesas: cat874: Drop bogus clocks property Geert Uytterhoeven
2021-10-21 13:18 ` [PATCH 3/3] [RFC] dt-bindings: display: bridge: nxp,tda998x: Convert to json-schema Geert Uytterhoeven
2021-10-29  1:04   ` Rob Herring [this message]
2021-10-29  8:08     ` Russell King (Oracle)
2021-10-29  8:28       ` Geert Uytterhoeven
2021-10-29  9:33         ` Russell King (Oracle)
2021-10-29  9:40           ` Geert Uytterhoeven
2021-10-29 10:02             ` Russell King (Oracle)

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=YXtIsCnJ+L5zqCVk@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bcousson@baylibre.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=tony@atomide.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