summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-hdmi.yaml
blob: 75e6479397a5023d781379be1fe760271bde7e35 (plain)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/allwinner,sun4i-a10-hdmi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A10 HDMI Controller Device Tree Bindings

description: |
  The HDMI Encoder supports the HDMI video and audio outputs, and does
  CEC. It is one end of the pipeline.

maintainers:
  - Chen-Yu Tsai <wens@csie.org>
  - Maxime Ripard <mripard@kernel.org>

properties:
  compatible:
    oneOf:
      - const: allwinner,sun4i-a10-hdmi
      - const: allwinner,sun5i-a10s-hdmi
      - const: allwinner,sun6i-a31-hdmi
      - items:
          - const: allwinner,sun7i-a20-hdmi
          - const: allwinner,sun5i-a10s-hdmi

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    oneOf:
      - items:
          - description: The HDMI interface clock
          - description: The HDMI module clock
          - description: The first video PLL
          - description: The second video PLL

      - items:
          - description: The HDMI interface clock
          - description: The HDMI module clock
          - description: The HDMI DDC clock
          - description: The first video PLL
          - description: The second video PLL

  clock-names:
    oneOf:
      - items:
          - const: ahb
          - const: mod
          - const: pll-0
          - const: pll-1

      - items:
          - const: ahb
          - const: mod
          - const: ddc
          - const: pll-0
          - const: pll-1

  resets:
    maxItems: 1

  dmas:
    items:
      - description: DDC Transmission DMA Channel
      - description: DDC Reception DMA Channel
      - description: Audio Transmission DMA Channel

  dma-names:
    items:
      - const: ddc-tx
      - const: ddc-rx
      - const: audio-tx

  ports:
    type: object
    description: |
      A ports node with endpoint definitions as defined in
      Documentation/devicetree/bindings/media/video-interfaces.txt.

    properties:
      "#address-cells":
        const: 1

      "#size-cells":
        const: 0

      port@0:
        type: object
        description: |
          Input endpoints of the controller.

      port@1:
        type: object
        description: |
          Output endpoints of the controller. Usually an HDMI
          connector.

    required:
      - "#address-cells"
      - "#size-cells"
      - port@0
      - port@1

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names
  - dmas
  - dma-names

if:
  properties:
    compatible:
      contains:
        const: allwinner,sun6i-a31-hdmi

then:
  properties:
    clocks:
      minItems: 5

    clock-names:
      minItems: 5

  required:
    - resets

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/sun4i-a10-ccu.h>
    #include <dt-bindings/dma/sun4i-a10.h>
    #include <dt-bindings/reset/sun4i-a10-ccu.h>

    hdmi: hdmi@1c16000 {
        compatible = "allwinner,sun4i-a10-hdmi";
        reg = <0x01c16000 0x1000>;
        interrupts = <58>;
        clocks = <&ccu CLK_AHB_HDMI0>, <&ccu CLK_HDMI>,
                 <&ccu CLK_PLL_VIDEO0_2X>,
                 <&ccu CLK_PLL_VIDEO1_2X>;
        clock-names = "ahb", "mod", "pll-0", "pll-1";
        dmas = <&dma SUN4I_DMA_NORMAL 16>,
               <&dma SUN4I_DMA_NORMAL 16>,
               <&dma SUN4I_DMA_DEDICATED 24>;
        dma-names = "ddc-tx", "ddc-rx", "audio-tx";

        ports {
            #address-cells = <1>;
            #size-cells = <0>;

            hdmi_in: port@0 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0>;

                hdmi_in_tcon0: endpoint@0 {
                    reg = <0>;
                    remote-endpoint = <&tcon0_out_hdmi>;
                };

                hdmi_in_tcon1: endpoint@1 {
                    reg = <1>;
                    remote-endpoint = <&tcon1_out_hdmi>;
                };
            };

            hdmi_out: port@1 {
                reg = <1>;
            };
        };
    };

...