1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/bridge/nxp,tda998x.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NXP TDA998x HDMI transmitter
8
9maintainers:
10  - Russell King <linux@armlinux.org.uk>
11
12properties:
13  compatible:
14    const: nxp,tda998x
15
16  reg:
17    maxItems: 1
18
19  interrupts:
20    maxItems: 1
21
22  video-ports:
23    default: 0x230145
24    maximum: 0xffffff
25    description:
26      24 bits value which defines how the video controller output is wired to
27      the TDA998x input.
28
29  audio-ports:
30    description:
31      Array of 8-bit values, 2 values per DAI (Documentation/sound/soc/dai.rst).
32      The implementation allows one or two DAIs.
33      If two DAIs are defined, they must be of different type.
34    $ref: /schemas/types.yaml#/definitions/uint32-matrix
35    items:
36      minItems: 1
37      items:
38        - description: |
39            The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
40            (see include/dt-bindings/display/tda998x.h).
41        - description:
42            The second value defines the tda998x AP_ENA reg content when the
43            DAI in question is used.
44
45  '#sound-dai-cells':
46    enum: [ 0, 1 ]
47
48  nxp,calib-gpios:
49    maxItems: 1
50    description:
51      Calibration GPIO, which must correspond with the gpio used for the
52      TDA998x interrupt pin.
53
54  port:
55    $ref: /schemas/graph.yaml#/properties/port
56    description: Parallel input port
57
58  ports:
59    $ref: /schemas/graph.yaml#/properties/ports
60
61    properties:
62      port@0:
63        type: object
64        description: Parallel input port
65
66      port@1:
67        type: object
68        description: HDMI output port
69
70required:
71  - compatible
72  - reg
73
74oneOf:
75  - required:
76      - port
77  - required:
78      - ports
79
80additionalProperties: false
81
82examples:
83  - |
84    #include <dt-bindings/display/tda998x.h>
85    #include <dt-bindings/interrupt-controller/irq.h>
86
87    i2c {
88        #address-cells = <1>;
89        #size-cells = <0>;
90
91        tda998x: hdmi-encoder@70 {
92            compatible = "nxp,tda998x";
93            reg = <0x70>;
94            interrupt-parent = <&gpio0>;
95            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
96            video-ports = <0x230145>;
97
98            #sound-dai-cells = <1>;
99                         /* DAI-format / AP_ENA reg value */
100            audio-ports = <TDA998x_SPDIF 0x04>,
101                          <TDA998x_I2S 0x03>;
102
103            port {
104                tda998x_in: endpoint {
105                    remote-endpoint = <&lcdc_0>;
106                };
107            };
108        };
109    };
110