xref: /freebsd/sys/contrib/device-tree/Bindings/display/bridge/nxp,tda998x.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
17ef62cebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
27ef62cebSEmmanuel Vadot%YAML 1.2
37ef62cebSEmmanuel Vadot---
47ef62cebSEmmanuel Vadot$id: http://devicetree.org/schemas/display/bridge/nxp,tda998x.yaml#
57ef62cebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
67ef62cebSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: NXP TDA998x HDMI transmitter
87ef62cebSEmmanuel Vadot
97ef62cebSEmmanuel Vadotmaintainers:
107ef62cebSEmmanuel Vadot  - Russell King <linux@armlinux.org.uk>
117ef62cebSEmmanuel Vadot
127ef62cebSEmmanuel Vadotproperties:
137ef62cebSEmmanuel Vadot  compatible:
147ef62cebSEmmanuel Vadot    const: nxp,tda998x
157ef62cebSEmmanuel Vadot
167ef62cebSEmmanuel Vadot  reg:
177ef62cebSEmmanuel Vadot    maxItems: 1
187ef62cebSEmmanuel Vadot
197ef62cebSEmmanuel Vadot  interrupts:
207ef62cebSEmmanuel Vadot    maxItems: 1
217ef62cebSEmmanuel Vadot
227ef62cebSEmmanuel Vadot  video-ports:
23f126890aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
247ef62cebSEmmanuel Vadot    default: 0x230145
257ef62cebSEmmanuel Vadot    maximum: 0xffffff
267ef62cebSEmmanuel Vadot    description:
277ef62cebSEmmanuel Vadot      24 bits value which defines how the video controller output is wired to
287ef62cebSEmmanuel Vadot      the TDA998x input.
297ef62cebSEmmanuel Vadot
307ef62cebSEmmanuel Vadot  audio-ports:
317ef62cebSEmmanuel Vadot    description:
32*8d13bc63SEmmanuel Vadot      Array of 2 values per DAI (Documentation/sound/soc/dai.rst).
337ef62cebSEmmanuel Vadot      The implementation allows one or two DAIs.
347ef62cebSEmmanuel Vadot      If two DAIs are defined, they must be of different type.
357ef62cebSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-matrix
367ef62cebSEmmanuel Vadot    minItems: 1
37*8d13bc63SEmmanuel Vadot    maxItems: 2
38*8d13bc63SEmmanuel Vadot    items:
397ef62cebSEmmanuel Vadot      items:
407ef62cebSEmmanuel Vadot        - description: |
417ef62cebSEmmanuel Vadot            The first value defines the DAI type: TDA998x_SPDIF or TDA998x_I2S
427ef62cebSEmmanuel Vadot            (see include/dt-bindings/display/tda998x.h).
43*8d13bc63SEmmanuel Vadot          enum: [ 1, 2 ]
447ef62cebSEmmanuel Vadot        - description:
457ef62cebSEmmanuel Vadot            The second value defines the tda998x AP_ENA reg content when the
467ef62cebSEmmanuel Vadot            DAI in question is used.
47*8d13bc63SEmmanuel Vadot          maximum: 0xff
487ef62cebSEmmanuel Vadot
497ef62cebSEmmanuel Vadot  '#sound-dai-cells':
507ef62cebSEmmanuel Vadot    enum: [ 0, 1 ]
517ef62cebSEmmanuel Vadot
527ef62cebSEmmanuel Vadot  nxp,calib-gpios:
537ef62cebSEmmanuel Vadot    maxItems: 1
547ef62cebSEmmanuel Vadot    description:
557ef62cebSEmmanuel Vadot      Calibration GPIO, which must correspond with the gpio used for the
567ef62cebSEmmanuel Vadot      TDA998x interrupt pin.
577ef62cebSEmmanuel Vadot
587ef62cebSEmmanuel Vadot  port:
597ef62cebSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/port
607ef62cebSEmmanuel Vadot    description: Parallel input port
617ef62cebSEmmanuel Vadot
627ef62cebSEmmanuel Vadot  ports:
637ef62cebSEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
647ef62cebSEmmanuel Vadot
657ef62cebSEmmanuel Vadot    properties:
667ef62cebSEmmanuel Vadot      port@0:
677ef62cebSEmmanuel Vadot        type: object
687ef62cebSEmmanuel Vadot        description: Parallel input port
697ef62cebSEmmanuel Vadot
707ef62cebSEmmanuel Vadot      port@1:
717ef62cebSEmmanuel Vadot        type: object
727ef62cebSEmmanuel Vadot        description: HDMI output port
737ef62cebSEmmanuel Vadot
747ef62cebSEmmanuel Vadotrequired:
757ef62cebSEmmanuel Vadot  - compatible
767ef62cebSEmmanuel Vadot  - reg
777ef62cebSEmmanuel Vadot
787ef62cebSEmmanuel VadotoneOf:
797ef62cebSEmmanuel Vadot  - required:
807ef62cebSEmmanuel Vadot      - port
817ef62cebSEmmanuel Vadot  - required:
827ef62cebSEmmanuel Vadot      - ports
837ef62cebSEmmanuel Vadot
847ef62cebSEmmanuel VadotadditionalProperties: false
857ef62cebSEmmanuel Vadot
867ef62cebSEmmanuel Vadotexamples:
877ef62cebSEmmanuel Vadot  - |
887ef62cebSEmmanuel Vadot    #include <dt-bindings/display/tda998x.h>
897ef62cebSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
907ef62cebSEmmanuel Vadot
917ef62cebSEmmanuel Vadot    i2c {
927ef62cebSEmmanuel Vadot        #address-cells = <1>;
937ef62cebSEmmanuel Vadot        #size-cells = <0>;
947ef62cebSEmmanuel Vadot
957ef62cebSEmmanuel Vadot        tda998x: hdmi-encoder@70 {
967ef62cebSEmmanuel Vadot            compatible = "nxp,tda998x";
977ef62cebSEmmanuel Vadot            reg = <0x70>;
987ef62cebSEmmanuel Vadot            interrupt-parent = <&gpio0>;
997ef62cebSEmmanuel Vadot            interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
1007ef62cebSEmmanuel Vadot            video-ports = <0x230145>;
1017ef62cebSEmmanuel Vadot
1027ef62cebSEmmanuel Vadot            #sound-dai-cells = <1>;
1037ef62cebSEmmanuel Vadot                         /* DAI-format / AP_ENA reg value */
1047ef62cebSEmmanuel Vadot            audio-ports = <TDA998x_SPDIF 0x04>,
1057ef62cebSEmmanuel Vadot                          <TDA998x_I2S 0x03>;
1067ef62cebSEmmanuel Vadot
1077ef62cebSEmmanuel Vadot            port {
1087ef62cebSEmmanuel Vadot                tda998x_in: endpoint {
1097ef62cebSEmmanuel Vadot                    remote-endpoint = <&lcdc_0>;
1107ef62cebSEmmanuel Vadot                };
1117ef62cebSEmmanuel Vadot            };
1127ef62cebSEmmanuel Vadot        };
1137ef62cebSEmmanuel Vadot    };
114