xref: /linux/Documentation/devicetree/bindings/display/bridge/nxp,tda998x.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1260a4ca8SGeert Uytterhoeven# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2260a4ca8SGeert Uytterhoeven%YAML 1.2
3260a4ca8SGeert Uytterhoeven---
4260a4ca8SGeert Uytterhoeven$id: http://devicetree.org/schemas/display/bridge/nxp,tda998x.yaml#
5260a4ca8SGeert Uytterhoeven$schema: http://devicetree.org/meta-schemas/core.yaml#
6260a4ca8SGeert Uytterhoeven
7260a4ca8SGeert Uytterhoeventitle: NXP TDA998x HDMI transmitter
8260a4ca8SGeert Uytterhoeven
9260a4ca8SGeert Uytterhoevenmaintainers:
10260a4ca8SGeert Uytterhoeven  - Russell King <linux@armlinux.org.uk>
11260a4ca8SGeert Uytterhoeven
12260a4ca8SGeert Uytterhoevenproperties:
13260a4ca8SGeert Uytterhoeven  compatible:
14260a4ca8SGeert Uytterhoeven    const: nxp,tda998x
15260a4ca8SGeert Uytterhoeven
16260a4ca8SGeert Uytterhoeven  reg:
17260a4ca8SGeert Uytterhoeven    maxItems: 1
18260a4ca8SGeert Uytterhoeven
19260a4ca8SGeert Uytterhoeven  interrupts:
20260a4ca8SGeert Uytterhoeven    maxItems: 1
21260a4ca8SGeert Uytterhoeven
22260a4ca8SGeert Uytterhoeven  video-ports:
2366c98360SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
24260a4ca8SGeert Uytterhoeven    default: 0x230145
25260a4ca8SGeert Uytterhoeven    maximum: 0xffffff
26260a4ca8SGeert Uytterhoeven    description:
27260a4ca8SGeert Uytterhoeven      24 bits value which defines how the video controller output is wired to
28260a4ca8SGeert Uytterhoeven      the TDA998x input.
29260a4ca8SGeert Uytterhoeven
30260a4ca8SGeert Uytterhoeven  audio-ports:
31260a4ca8SGeert Uytterhoeven    description:
32*4c654ec0SRob Herring      Array of 2 values per DAI (Documentation/sound/soc/dai.rst).
33260a4ca8SGeert Uytterhoeven      The implementation allows one or two DAIs.
34260a4ca8SGeert Uytterhoeven      If two DAIs are defined, they must be of different type.
35260a4ca8SGeert Uytterhoeven    $ref: /schemas/types.yaml#/definitions/uint32-matrix
36260a4ca8SGeert Uytterhoeven    minItems: 1
37*4c654ec0SRob Herring    maxItems: 2
38*4c654ec0SRob Herring    items:
39260a4ca8SGeert Uytterhoeven      items:
40260a4ca8SGeert Uytterhoeven        - description: |
41260a4ca8SGeert Uytterhoeven            The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
42260a4ca8SGeert Uytterhoeven            (see include/dt-bindings/display/tda998x.h).
43*4c654ec0SRob Herring          enum: [ 1, 2 ]
44260a4ca8SGeert Uytterhoeven        - description:
45260a4ca8SGeert Uytterhoeven            The second value defines the tda998x AP_ENA reg content when the
46260a4ca8SGeert Uytterhoeven            DAI in question is used.
47*4c654ec0SRob Herring          maximum: 0xff
48260a4ca8SGeert Uytterhoeven
49260a4ca8SGeert Uytterhoeven  '#sound-dai-cells':
50260a4ca8SGeert Uytterhoeven    enum: [ 0, 1 ]
51260a4ca8SGeert Uytterhoeven
52260a4ca8SGeert Uytterhoeven  nxp,calib-gpios:
53260a4ca8SGeert Uytterhoeven    maxItems: 1
54260a4ca8SGeert Uytterhoeven    description:
55260a4ca8SGeert Uytterhoeven      Calibration GPIO, which must correspond with the gpio used for the
56260a4ca8SGeert Uytterhoeven      TDA998x interrupt pin.
57260a4ca8SGeert Uytterhoeven
58260a4ca8SGeert Uytterhoeven  port:
59260a4ca8SGeert Uytterhoeven    $ref: /schemas/graph.yaml#/properties/port
60260a4ca8SGeert Uytterhoeven    description: Parallel input port
61260a4ca8SGeert Uytterhoeven
62260a4ca8SGeert Uytterhoeven  ports:
63260a4ca8SGeert Uytterhoeven    $ref: /schemas/graph.yaml#/properties/ports
64260a4ca8SGeert Uytterhoeven
65260a4ca8SGeert Uytterhoeven    properties:
66260a4ca8SGeert Uytterhoeven      port@0:
67260a4ca8SGeert Uytterhoeven        type: object
68260a4ca8SGeert Uytterhoeven        description: Parallel input port
69260a4ca8SGeert Uytterhoeven
70260a4ca8SGeert Uytterhoeven      port@1:
71260a4ca8SGeert Uytterhoeven        type: object
72260a4ca8SGeert Uytterhoeven        description: HDMI output port
73260a4ca8SGeert Uytterhoeven
74260a4ca8SGeert Uytterhoevenrequired:
75260a4ca8SGeert Uytterhoeven  - compatible
76260a4ca8SGeert Uytterhoeven  - reg
77260a4ca8SGeert Uytterhoeven
78260a4ca8SGeert UytterhoevenoneOf:
79260a4ca8SGeert Uytterhoeven  - required:
80260a4ca8SGeert Uytterhoeven      - port
81260a4ca8SGeert Uytterhoeven  - required:
82260a4ca8SGeert Uytterhoeven      - ports
83260a4ca8SGeert Uytterhoeven
84260a4ca8SGeert UytterhoevenadditionalProperties: false
85260a4ca8SGeert Uytterhoeven
86260a4ca8SGeert Uytterhoevenexamples:
87260a4ca8SGeert Uytterhoeven  - |
88260a4ca8SGeert Uytterhoeven    #include <dt-bindings/display/tda998x.h>
89260a4ca8SGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/irq.h>
90260a4ca8SGeert Uytterhoeven
91260a4ca8SGeert Uytterhoeven    i2c {
92260a4ca8SGeert Uytterhoeven        #address-cells = <1>;
93260a4ca8SGeert Uytterhoeven        #size-cells = <0>;
94260a4ca8SGeert Uytterhoeven
95260a4ca8SGeert Uytterhoeven        tda998x: hdmi-encoder@70 {
96260a4ca8SGeert Uytterhoeven            compatible = "nxp,tda998x";
97260a4ca8SGeert Uytterhoeven            reg = <0x70>;
98260a4ca8SGeert Uytterhoeven            interrupt-parent = <&gpio0>;
99260a4ca8SGeert Uytterhoeven            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
100260a4ca8SGeert Uytterhoeven            video-ports = <0x230145>;
101260a4ca8SGeert Uytterhoeven
102260a4ca8SGeert Uytterhoeven            #sound-dai-cells = <1>;
103260a4ca8SGeert Uytterhoeven                         /* DAI-format / AP_ENA reg value */
104260a4ca8SGeert Uytterhoeven            audio-ports = <TDA998x_SPDIF 0x04>,
105260a4ca8SGeert Uytterhoeven                          <TDA998x_I2S 0x03>;
106260a4ca8SGeert Uytterhoeven
107260a4ca8SGeert Uytterhoeven            port {
108260a4ca8SGeert Uytterhoeven                tda998x_in: endpoint {
109260a4ca8SGeert Uytterhoeven                    remote-endpoint = <&lcdc_0>;
110260a4ca8SGeert Uytterhoeven                };
111260a4ca8SGeert Uytterhoeven            };
112260a4ca8SGeert Uytterhoeven        };
113260a4ca8SGeert Uytterhoeven    };
114