Documentation / devicetree / bindings / display / bridge / nxp,tda998x.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
# 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:
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 0x230145
    maximum: 0xffffff
    description:
      24 bits value which defines how the video controller output is wired to
      the TDA998x input.

  audio-ports:
    description:
      Array of 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
    minItems: 1
    maxItems: 2
    items:
      items:
        - description: |
            The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
            (see include/dt-bindings/display/tda998x.h).
          enum: [ 1, 2 ]
        - description:
            The second value defines the tda998x AP_ENA reg content when the
            DAI in question is used.
          maximum: 0xff
 
  '#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
    description: Parallel input port

  ports:
    $ref: /schemas/graph.yaml#/properties/ports

    properties:
      port@0:
        type: object
        description: Parallel input port

      port@1:
        type: object
        description: HDMI output port

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>;
                };
            };
        };
    };