11a6922eeSLaurent Pinchart# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21a6922eeSLaurent Pinchart%YAML 1.2
31a6922eeSLaurent Pinchart---
41a6922eeSLaurent Pinchart$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml#
51a6922eeSLaurent Pinchart$schema: http://devicetree.org/meta-schemas/core.yaml#
61a6922eeSLaurent Pinchart
71a6922eeSLaurent Pincharttitle: Renesas R-Car LVDS Encoder
81a6922eeSLaurent Pinchart
91a6922eeSLaurent Pinchartmaintainers:
101a6922eeSLaurent Pinchart  - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
111a6922eeSLaurent Pinchart
121a6922eeSLaurent Pinchartdescription: |
131a6922eeSLaurent Pinchart  These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
141a6922eeSLaurent Pinchart  Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs.
151a6922eeSLaurent Pinchart
161a6922eeSLaurent Pinchartproperties:
171a6922eeSLaurent Pinchart  compatible:
181a6922eeSLaurent Pinchart    enum:
19109bf472SLad Prabhakar      - renesas,r8a7742-lvds # for RZ/G1H compatible LVDS encoders
201a6922eeSLaurent Pinchart      - renesas,r8a7743-lvds # for RZ/G1M compatible LVDS encoders
211a6922eeSLaurent Pinchart      - renesas,r8a7744-lvds # for RZ/G1N compatible LVDS encoders
221a6922eeSLaurent Pinchart      - renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders
231a6922eeSLaurent Pinchart      - renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders
241a6922eeSLaurent Pinchart      - renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders
2545d6ec79SMarian-Cristian Rotariu      - renesas,r8a774e1-lvds # for RZ/G2H compatible LVDS encoders
261a6922eeSLaurent Pinchart      - renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders
271a6922eeSLaurent Pinchart      - renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders
281a6922eeSLaurent Pinchart      - renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders
291a6922eeSLaurent Pinchart      - renesas,r8a7795-lvds # for R-Car H3 compatible LVDS encoders
301a6922eeSLaurent Pinchart      - renesas,r8a7796-lvds # for R-Car M3-W compatible LVDS encoders
31*3a9a6f3dSNikita Yushchenko      - renesas,r8a77961-lvds # for R-Car M3-W+ compatible LVDS encoders
321a6922eeSLaurent Pinchart      - renesas,r8a77965-lvds # for R-Car M3-N compatible LVDS encoders
331a6922eeSLaurent Pinchart      - renesas,r8a77970-lvds # for R-Car V3M compatible LVDS encoders
341a6922eeSLaurent Pinchart      - renesas,r8a77980-lvds # for R-Car V3H compatible LVDS encoders
351a6922eeSLaurent Pinchart      - renesas,r8a77990-lvds # for R-Car E3 compatible LVDS encoders
361a6922eeSLaurent Pinchart      - renesas,r8a77995-lvds # for R-Car D3 compatible LVDS encoders
371a6922eeSLaurent Pinchart
381a6922eeSLaurent Pinchart  reg:
391a6922eeSLaurent Pinchart    maxItems: 1
401a6922eeSLaurent Pinchart
411a6922eeSLaurent Pinchart  clocks:
421a6922eeSLaurent Pinchart    minItems: 1
431a6922eeSLaurent Pinchart    maxItems: 4
441a6922eeSLaurent Pinchart
451a6922eeSLaurent Pinchart  clock-names:
461a6922eeSLaurent Pinchart    minItems: 1
471a6922eeSLaurent Pinchart    maxItems: 4
481a6922eeSLaurent Pinchart
491a6922eeSLaurent Pinchart  resets:
501a6922eeSLaurent Pinchart    maxItems: 1
511a6922eeSLaurent Pinchart
521a6922eeSLaurent Pinchart  ports:
53b6755423SRob Herring    $ref: /schemas/graph.yaml#/properties/ports
541a6922eeSLaurent Pinchart
551a6922eeSLaurent Pinchart    properties:
561a6922eeSLaurent Pinchart      port@0:
57b6755423SRob Herring        $ref: /schemas/graph.yaml#/properties/port
581a6922eeSLaurent Pinchart        description: Parallel RGB input port
591a6922eeSLaurent Pinchart
601a6922eeSLaurent Pinchart      port@1:
61b6755423SRob Herring        $ref: /schemas/graph.yaml#/properties/port
621a6922eeSLaurent Pinchart        description: LVDS output port
631a6922eeSLaurent Pinchart
641a6922eeSLaurent Pinchart    required:
651a6922eeSLaurent Pinchart      - port@0
661a6922eeSLaurent Pinchart      - port@1
671a6922eeSLaurent Pinchart
681a6922eeSLaurent Pinchart  power-domains:
691a6922eeSLaurent Pinchart    maxItems: 1
701a6922eeSLaurent Pinchart
711a6922eeSLaurent Pinchart  renesas,companion:
721a6922eeSLaurent Pinchart    $ref: /schemas/types.yaml#/definitions/phandle
731a6922eeSLaurent Pinchart    description:
741a6922eeSLaurent Pinchart      phandle to the companion LVDS encoder. This property is mandatory
75a9a472aaSFabrizio Castro      for the first LVDS encoder on R-Car D3 and E3, and RZ/G2E SoCs, and shall
76a9a472aaSFabrizio Castro      point to the second encoder to be used as a companion in dual-link mode.
77a9a472aaSFabrizio Castro      It shall not be set for any other LVDS encoder.
781a6922eeSLaurent Pinchart
791a6922eeSLaurent Pinchartrequired:
801a6922eeSLaurent Pinchart  - compatible
811a6922eeSLaurent Pinchart  - reg
821a6922eeSLaurent Pinchart  - clocks
831a6922eeSLaurent Pinchart  - power-domains
841a6922eeSLaurent Pinchart  - resets
851a6922eeSLaurent Pinchart  - ports
861a6922eeSLaurent Pinchart
871a6922eeSLaurent Pinchartif:
881a6922eeSLaurent Pinchart  properties:
891a6922eeSLaurent Pinchart    compatible:
901a6922eeSLaurent Pinchart      enum:
911a6922eeSLaurent Pinchart        - renesas,r8a774c0-lvds
921a6922eeSLaurent Pinchart        - renesas,r8a77990-lvds
931a6922eeSLaurent Pinchart        - renesas,r8a77995-lvds
941a6922eeSLaurent Pinchartthen:
951a6922eeSLaurent Pinchart  properties:
961a6922eeSLaurent Pinchart    clocks:
971a6922eeSLaurent Pinchart      minItems: 1
981a6922eeSLaurent Pinchart      items:
991a6922eeSLaurent Pinchart        - description: Functional clock
1001a6922eeSLaurent Pinchart        - description: EXTAL input clock
1011a6922eeSLaurent Pinchart        - description: DU_DOTCLKIN0 input clock
1021a6922eeSLaurent Pinchart        - description: DU_DOTCLKIN1 input clock
1031a6922eeSLaurent Pinchart
1041a6922eeSLaurent Pinchart    clock-names:
1051a6922eeSLaurent Pinchart      minItems: 1
1061a6922eeSLaurent Pinchart      items:
1071a6922eeSLaurent Pinchart        - const: fck
1081a6922eeSLaurent Pinchart        # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
1091a6922eeSLaurent Pinchart        # These clocks are optional.
1101a6922eeSLaurent Pinchart        - enum:
1111a6922eeSLaurent Pinchart            - extal
1121a6922eeSLaurent Pinchart            - dclkin.0
1131a6922eeSLaurent Pinchart            - dclkin.1
1141a6922eeSLaurent Pinchart        - enum:
1151a6922eeSLaurent Pinchart            - extal
1161a6922eeSLaurent Pinchart            - dclkin.0
1171a6922eeSLaurent Pinchart            - dclkin.1
1181a6922eeSLaurent Pinchart        - enum:
1191a6922eeSLaurent Pinchart            - extal
1201a6922eeSLaurent Pinchart            - dclkin.0
1211a6922eeSLaurent Pinchart            - dclkin.1
1221a6922eeSLaurent Pinchart
1231a6922eeSLaurent Pinchart  required:
1241a6922eeSLaurent Pinchart    - clock-names
1251a6922eeSLaurent Pinchart
1261a6922eeSLaurent Pinchartelse:
1271a6922eeSLaurent Pinchart  properties:
1281a6922eeSLaurent Pinchart    clocks:
1291a6922eeSLaurent Pinchart      items:
1301a6922eeSLaurent Pinchart        - description: Functional clock
1311a6922eeSLaurent Pinchart
1321a6922eeSLaurent Pinchart    clock-names:
1331a6922eeSLaurent Pinchart      items:
1341a6922eeSLaurent Pinchart        - const: fck
1351a6922eeSLaurent Pinchart
1361a6922eeSLaurent Pinchart    renesas,companion: false
1371a6922eeSLaurent Pinchart
1381a6922eeSLaurent PinchartadditionalProperties: false
1391a6922eeSLaurent Pinchart
1401a6922eeSLaurent Pinchartexamples:
1411a6922eeSLaurent Pinchart  - |
1421a6922eeSLaurent Pinchart    #include <dt-bindings/clock/renesas-cpg-mssr.h>
1431a6922eeSLaurent Pinchart    #include <dt-bindings/power/r8a7795-sysc.h>
1441a6922eeSLaurent Pinchart
1451a6922eeSLaurent Pinchart    lvds@feb90000 {
1461a6922eeSLaurent Pinchart        compatible = "renesas,r8a7795-lvds";
1471a6922eeSLaurent Pinchart        reg = <0xfeb90000 0x14>;
1481a6922eeSLaurent Pinchart        clocks = <&cpg CPG_MOD 727>;
1491a6922eeSLaurent Pinchart        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
1501a6922eeSLaurent Pinchart        resets = <&cpg 727>;
1511a6922eeSLaurent Pinchart
1521a6922eeSLaurent Pinchart        ports {
1531a6922eeSLaurent Pinchart            #address-cells = <1>;
1541a6922eeSLaurent Pinchart            #size-cells = <0>;
1551a6922eeSLaurent Pinchart
1561a6922eeSLaurent Pinchart            port@0 {
1571a6922eeSLaurent Pinchart                reg = <0>;
1581a6922eeSLaurent Pinchart                lvds_in: endpoint {
1591a6922eeSLaurent Pinchart                    remote-endpoint = <&du_out_lvds0>;
1601a6922eeSLaurent Pinchart                };
1611a6922eeSLaurent Pinchart            };
1621a6922eeSLaurent Pinchart            port@1 {
1631a6922eeSLaurent Pinchart                reg = <1>;
1641a6922eeSLaurent Pinchart                lvds_out: endpoint {
1651a6922eeSLaurent Pinchart                    remote-endpoint = <&panel_in>;
1661a6922eeSLaurent Pinchart                };
1671a6922eeSLaurent Pinchart            };
1681a6922eeSLaurent Pinchart        };
1691a6922eeSLaurent Pinchart    };
1701a6922eeSLaurent Pinchart
1711a6922eeSLaurent Pinchart  - |
1721a6922eeSLaurent Pinchart    #include <dt-bindings/clock/renesas-cpg-mssr.h>
1731a6922eeSLaurent Pinchart    #include <dt-bindings/power/r8a77990-sysc.h>
1741a6922eeSLaurent Pinchart
1751a6922eeSLaurent Pinchart    lvds0: lvds@feb90000 {
1761a6922eeSLaurent Pinchart        compatible = "renesas,r8a77990-lvds";
1771a6922eeSLaurent Pinchart        reg = <0xfeb90000 0x20>;
1781a6922eeSLaurent Pinchart        clocks = <&cpg CPG_MOD 727>,
1791a6922eeSLaurent Pinchart                 <&x13_clk>,
1801a6922eeSLaurent Pinchart                 <&extal_clk>;
1811a6922eeSLaurent Pinchart        clock-names = "fck", "dclkin.0", "extal";
1821a6922eeSLaurent Pinchart        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
1831a6922eeSLaurent Pinchart        resets = <&cpg 727>;
1841a6922eeSLaurent Pinchart
1851a6922eeSLaurent Pinchart        renesas,companion = <&lvds1>;
1861a6922eeSLaurent Pinchart
1871a6922eeSLaurent Pinchart        ports {
1881a6922eeSLaurent Pinchart            #address-cells = <1>;
1891a6922eeSLaurent Pinchart            #size-cells = <0>;
1901a6922eeSLaurent Pinchart
1911a6922eeSLaurent Pinchart            port@0 {
1921a6922eeSLaurent Pinchart                reg = <0>;
1931a6922eeSLaurent Pinchart                lvds0_in: endpoint {
1941a6922eeSLaurent Pinchart                    remote-endpoint = <&du_out_lvds0>;
1951a6922eeSLaurent Pinchart                };
1961a6922eeSLaurent Pinchart            };
1971a6922eeSLaurent Pinchart            port@1 {
1981a6922eeSLaurent Pinchart                reg = <1>;
1991a6922eeSLaurent Pinchart                lvds0_out: endpoint {
2001a6922eeSLaurent Pinchart                    remote-endpoint = <&panel_in1>;
2011a6922eeSLaurent Pinchart                };
2021a6922eeSLaurent Pinchart            };
2031a6922eeSLaurent Pinchart        };
2041a6922eeSLaurent Pinchart    };
2051a6922eeSLaurent Pinchart
2061a6922eeSLaurent Pinchart    lvds1: lvds@feb90100 {
2071a6922eeSLaurent Pinchart        compatible = "renesas,r8a77990-lvds";
2081a6922eeSLaurent Pinchart        reg = <0xfeb90100 0x20>;
2091a6922eeSLaurent Pinchart        clocks = <&cpg CPG_MOD 727>,
2101a6922eeSLaurent Pinchart                 <&x13_clk>,
2111a6922eeSLaurent Pinchart                 <&extal_clk>;
2121a6922eeSLaurent Pinchart        clock-names = "fck", "dclkin.0", "extal";
2131a6922eeSLaurent Pinchart        power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
2141a6922eeSLaurent Pinchart        resets = <&cpg 726>;
2151a6922eeSLaurent Pinchart
2161a6922eeSLaurent Pinchart        ports {
2171a6922eeSLaurent Pinchart            #address-cells = <1>;
2181a6922eeSLaurent Pinchart            #size-cells = <0>;
2191a6922eeSLaurent Pinchart
2201a6922eeSLaurent Pinchart            port@0 {
2211a6922eeSLaurent Pinchart                reg = <0>;
2221a6922eeSLaurent Pinchart                lvds1_in: endpoint {
2231a6922eeSLaurent Pinchart                    remote-endpoint = <&du_out_lvds1>;
2241a6922eeSLaurent Pinchart                };
2251a6922eeSLaurent Pinchart            };
2261a6922eeSLaurent Pinchart            port@1 {
2271a6922eeSLaurent Pinchart                reg = <1>;
2281a6922eeSLaurent Pinchart                lvds1_out: endpoint {
2291a6922eeSLaurent Pinchart                    remote-endpoint = <&panel_in2>;
2301a6922eeSLaurent Pinchart                };
2311a6922eeSLaurent Pinchart            };
2321a6922eeSLaurent Pinchart        };
2331a6922eeSLaurent Pinchart    };
2341a6922eeSLaurent Pinchart
2351a6922eeSLaurent Pinchart...
236