xref: /freebsd-src/sys/contrib/device-tree/Bindings/display/msm/hdmi.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot
5b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/display/msm/hdmi.yaml#
6b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7b97ee269SEmmanuel Vadot
8b97ee269SEmmanuel Vadottitle: Qualcomm Adreno/Snapdragon HDMI output
9b97ee269SEmmanuel Vadot
10b97ee269SEmmanuel Vadotmaintainers:
11b97ee269SEmmanuel Vadot  - Rob Clark <robdclark@gmail.com>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadotproperties:
14b97ee269SEmmanuel Vadot  compatible:
15b97ee269SEmmanuel Vadot    enum:
16b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8084
17b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8660
18b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8960
19b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8974
20b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8994
21b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8996
22*b2d2a78aSEmmanuel Vadot      - qcom,hdmi-tx-8998
23b97ee269SEmmanuel Vadot
24b97ee269SEmmanuel Vadot  clocks:
25b97ee269SEmmanuel Vadot    minItems: 1
26*b2d2a78aSEmmanuel Vadot    maxItems: 8
27b97ee269SEmmanuel Vadot
28b97ee269SEmmanuel Vadot  clock-names:
29b97ee269SEmmanuel Vadot    minItems: 1
30*b2d2a78aSEmmanuel Vadot    maxItems: 8
31b97ee269SEmmanuel Vadot
32b97ee269SEmmanuel Vadot  reg:
33b97ee269SEmmanuel Vadot    minItems: 1
34b97ee269SEmmanuel Vadot    maxItems: 3
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot  reg-names:
37b97ee269SEmmanuel Vadot    minItems: 1
38b97ee269SEmmanuel Vadot    items:
39b97ee269SEmmanuel Vadot      - const: core_physical
40b97ee269SEmmanuel Vadot      - const: qfprom_physical
41b97ee269SEmmanuel Vadot      - const: hdcp_physical
42b97ee269SEmmanuel Vadot
43b97ee269SEmmanuel Vadot  interrupts:
44b97ee269SEmmanuel Vadot    maxItems: 1
45b97ee269SEmmanuel Vadot
46b97ee269SEmmanuel Vadot  phys:
47b97ee269SEmmanuel Vadot    maxItems: 1
48b97ee269SEmmanuel Vadot
49b97ee269SEmmanuel Vadot  phy-names:
50b97ee269SEmmanuel Vadot    enum:
51b97ee269SEmmanuel Vadot      - hdmi_phy
52b97ee269SEmmanuel Vadot      - hdmi-phy
53b97ee269SEmmanuel Vadot    deprecated: true
54b97ee269SEmmanuel Vadot
55b97ee269SEmmanuel Vadot  core-vdda-supply:
56b97ee269SEmmanuel Vadot    description: phandle to VDDA supply regulator
57b97ee269SEmmanuel Vadot
58b97ee269SEmmanuel Vadot  hdmi-mux-supply:
59b97ee269SEmmanuel Vadot    description: phandle to mux regulator
60b97ee269SEmmanuel Vadot    deprecated: true
61b97ee269SEmmanuel Vadot
62b97ee269SEmmanuel Vadot  core-vcc-supply:
63b97ee269SEmmanuel Vadot    description: phandle to VCC supply regulator
64b97ee269SEmmanuel Vadot
65b97ee269SEmmanuel Vadot  hpd-gpios:
66b97ee269SEmmanuel Vadot    maxItems: 1
67b97ee269SEmmanuel Vadot    description: hpd pin
68b97ee269SEmmanuel Vadot
69b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-en-gpios:
70b97ee269SEmmanuel Vadot    maxItems: 1
71b97ee269SEmmanuel Vadot    deprecated: true
72b97ee269SEmmanuel Vadot    description: HDMI mux enable pin
73b97ee269SEmmanuel Vadot
74b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-sel-gpios:
75b97ee269SEmmanuel Vadot    maxItems: 1
76b97ee269SEmmanuel Vadot    deprecated: true
77b97ee269SEmmanuel Vadot    description: HDMI mux select pin
78b97ee269SEmmanuel Vadot
79b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-lpm-gpios:
80b97ee269SEmmanuel Vadot    maxItems: 1
81b97ee269SEmmanuel Vadot    deprecated: true
82b97ee269SEmmanuel Vadot    description: HDMI mux lpm pin
83b97ee269SEmmanuel Vadot
84b97ee269SEmmanuel Vadot  '#sound-dai-cells':
85b97ee269SEmmanuel Vadot    const: 1
86b97ee269SEmmanuel Vadot
87b97ee269SEmmanuel Vadot  ports:
88b97ee269SEmmanuel Vadot    type: object
89b97ee269SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
90b97ee269SEmmanuel Vadot    properties:
91b97ee269SEmmanuel Vadot      port@0:
92b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
93b97ee269SEmmanuel Vadot        description: |
94b97ee269SEmmanuel Vadot          Input endpoints of the controller.
95b97ee269SEmmanuel Vadot
96b97ee269SEmmanuel Vadot      port@1:
97b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
98b97ee269SEmmanuel Vadot        description: |
99b97ee269SEmmanuel Vadot          Output endpoints of the controller.
100b97ee269SEmmanuel Vadot
101b97ee269SEmmanuel Vadot    required:
102b97ee269SEmmanuel Vadot      - port@0
103b97ee269SEmmanuel Vadot
104b97ee269SEmmanuel Vadotrequired:
105b97ee269SEmmanuel Vadot  - compatible
106b97ee269SEmmanuel Vadot  - clocks
107b97ee269SEmmanuel Vadot  - clock-names
108b97ee269SEmmanuel Vadot  - reg
109b97ee269SEmmanuel Vadot  - reg-names
110b97ee269SEmmanuel Vadot  - interrupts
111b97ee269SEmmanuel Vadot  - phys
112b97ee269SEmmanuel Vadot
113b97ee269SEmmanuel VadotallOf:
114b97ee269SEmmanuel Vadot  - if:
115b97ee269SEmmanuel Vadot      properties:
116b97ee269SEmmanuel Vadot        compatible:
117b97ee269SEmmanuel Vadot          contains:
118b97ee269SEmmanuel Vadot            enum:
119b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8960
120b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8660
121b97ee269SEmmanuel Vadot    then:
122b97ee269SEmmanuel Vadot      properties:
123b97ee269SEmmanuel Vadot        clocks:
124b97ee269SEmmanuel Vadot          minItems: 3
125b97ee269SEmmanuel Vadot          maxItems: 3
126b97ee269SEmmanuel Vadot        clock-names:
127b97ee269SEmmanuel Vadot          items:
128b97ee269SEmmanuel Vadot            - const: core
129b97ee269SEmmanuel Vadot            - const: master_iface
130b97ee269SEmmanuel Vadot            - const: slave_iface
131b97ee269SEmmanuel Vadot        core-vcc-supplies: false
132b97ee269SEmmanuel Vadot
133b97ee269SEmmanuel Vadot  - if:
134b97ee269SEmmanuel Vadot      properties:
135b97ee269SEmmanuel Vadot        compatible:
136b97ee269SEmmanuel Vadot          contains:
137b97ee269SEmmanuel Vadot            enum:
138b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8974
139b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8084
140b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8994
141b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8996
142b97ee269SEmmanuel Vadot    then:
143b97ee269SEmmanuel Vadot      properties:
144b97ee269SEmmanuel Vadot        clocks:
145b97ee269SEmmanuel Vadot          minItems: 5
146*b2d2a78aSEmmanuel Vadot          maxItems: 5
147b97ee269SEmmanuel Vadot        clock-names:
148b97ee269SEmmanuel Vadot          items:
149b97ee269SEmmanuel Vadot            - const: mdp_core
150b97ee269SEmmanuel Vadot            - const: iface
151b97ee269SEmmanuel Vadot            - const: core
152b97ee269SEmmanuel Vadot            - const: alt_iface
153b97ee269SEmmanuel Vadot            - const: extp
154b97ee269SEmmanuel Vadot        hdmi-mux-supplies: false
155b97ee269SEmmanuel Vadot
156*b2d2a78aSEmmanuel Vadot  - if:
157*b2d2a78aSEmmanuel Vadot      properties:
158*b2d2a78aSEmmanuel Vadot        compatible:
159*b2d2a78aSEmmanuel Vadot          contains:
160*b2d2a78aSEmmanuel Vadot            enum:
161*b2d2a78aSEmmanuel Vadot              - qcom,hdmi-tx-8998
162*b2d2a78aSEmmanuel Vadot    then:
163*b2d2a78aSEmmanuel Vadot      properties:
164*b2d2a78aSEmmanuel Vadot        clocks:
165*b2d2a78aSEmmanuel Vadot          minItems: 8
166*b2d2a78aSEmmanuel Vadot          maxItems: 8
167*b2d2a78aSEmmanuel Vadot        clock-names:
168*b2d2a78aSEmmanuel Vadot          items:
169*b2d2a78aSEmmanuel Vadot            - const: mdp_core
170*b2d2a78aSEmmanuel Vadot            - const: iface
171*b2d2a78aSEmmanuel Vadot            - const: core
172*b2d2a78aSEmmanuel Vadot            - const: alt_iface
173*b2d2a78aSEmmanuel Vadot            - const: extp
174*b2d2a78aSEmmanuel Vadot            - const: bus
175*b2d2a78aSEmmanuel Vadot            - const: mnoc
176*b2d2a78aSEmmanuel Vadot            - const: iface_mmss
177*b2d2a78aSEmmanuel Vadot
178b97ee269SEmmanuel VadotadditionalProperties: false
179b97ee269SEmmanuel Vadot
180b97ee269SEmmanuel Vadotexamples:
181b97ee269SEmmanuel Vadot  - |
182b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
183b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
184b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
185b97ee269SEmmanuel Vadot    hdmi: hdmi@4a00000 {
186b97ee269SEmmanuel Vadot      compatible = "qcom,hdmi-tx-8960";
187b97ee269SEmmanuel Vadot      reg-names = "core_physical";
188b97ee269SEmmanuel Vadot      reg = <0x04a00000 0x2f0>;
189b97ee269SEmmanuel Vadot      interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
190b97ee269SEmmanuel Vadot      clock-names = "core",
191b97ee269SEmmanuel Vadot                    "master_iface",
192b97ee269SEmmanuel Vadot                    "slave_iface";
193b97ee269SEmmanuel Vadot      clocks = <&clk 61>,
194b97ee269SEmmanuel Vadot               <&clk 72>,
195b97ee269SEmmanuel Vadot               <&clk 98>;
196b97ee269SEmmanuel Vadot      hpd-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
197b97ee269SEmmanuel Vadot      core-vdda-supply = <&pm8921_hdmi_mvs>;
198b97ee269SEmmanuel Vadot      hdmi-mux-supply = <&ext_3p3v>;
199b97ee269SEmmanuel Vadot      pinctrl-names = "default", "sleep";
200b97ee269SEmmanuel Vadot      pinctrl-0 = <&hpd_active  &ddc_active  &cec_active>;
201b97ee269SEmmanuel Vadot      pinctrl-1 = <&hpd_suspend &ddc_suspend &cec_suspend>;
202b97ee269SEmmanuel Vadot
203b97ee269SEmmanuel Vadot      phys = <&hdmi_phy>;
204b97ee269SEmmanuel Vadot    };
205b97ee269SEmmanuel Vadot  - |
206b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
207b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/qcom,mmcc-msm8996.h>
208b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
209b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
210b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
211b97ee269SEmmanuel Vadot    hdmi@9a0000 {
212b97ee269SEmmanuel Vadot      compatible = "qcom,hdmi-tx-8996";
213b97ee269SEmmanuel Vadot      reg = <0x009a0000 0x50c>,
214b97ee269SEmmanuel Vadot            <0x00070000 0x6158>,
215b97ee269SEmmanuel Vadot            <0x009e0000 0xfff>;
216b97ee269SEmmanuel Vadot      reg-names = "core_physical",
217b97ee269SEmmanuel Vadot                  "qfprom_physical",
218b97ee269SEmmanuel Vadot                  "hdcp_physical";
219b97ee269SEmmanuel Vadot
220b97ee269SEmmanuel Vadot      interrupt-parent = <&mdss>;
221b97ee269SEmmanuel Vadot      interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
222b97ee269SEmmanuel Vadot
223b97ee269SEmmanuel Vadot      clocks = <&mmcc MDSS_MDP_CLK>,
224b97ee269SEmmanuel Vadot               <&mmcc MDSS_AHB_CLK>,
225b97ee269SEmmanuel Vadot               <&mmcc MDSS_HDMI_CLK>,
226b97ee269SEmmanuel Vadot               <&mmcc MDSS_HDMI_AHB_CLK>,
227b97ee269SEmmanuel Vadot               <&mmcc MDSS_EXTPCLK_CLK>;
228b97ee269SEmmanuel Vadot      clock-names = "mdp_core",
229b97ee269SEmmanuel Vadot                    "iface",
230b97ee269SEmmanuel Vadot                    "core",
231b97ee269SEmmanuel Vadot                    "alt_iface",
232b97ee269SEmmanuel Vadot                    "extp";
233b97ee269SEmmanuel Vadot
234b97ee269SEmmanuel Vadot      phys = <&hdmi_phy>;
235b97ee269SEmmanuel Vadot      #sound-dai-cells = <1>;
236b97ee269SEmmanuel Vadot
237b97ee269SEmmanuel Vadot      pinctrl-names = "default", "sleep";
238b97ee269SEmmanuel Vadot      pinctrl-0 = <&hdmi_hpd_active &hdmi_ddc_active>;
239b97ee269SEmmanuel Vadot      pinctrl-1 = <&hdmi_hpd_suspend &hdmi_ddc_suspend>;
240b97ee269SEmmanuel Vadot
241b97ee269SEmmanuel Vadot      core-vdda-supply = <&vreg_l12a_1p8>;
242b97ee269SEmmanuel Vadot      core-vcc-supply = <&vreg_s4a_1p8>;
243b97ee269SEmmanuel Vadot
244b97ee269SEmmanuel Vadot      ports {
245b97ee269SEmmanuel Vadot        #address-cells = <1>;
246b97ee269SEmmanuel Vadot        #size-cells = <0>;
247b97ee269SEmmanuel Vadot
248b97ee269SEmmanuel Vadot        port@0 {
249b97ee269SEmmanuel Vadot          reg = <0>;
250b97ee269SEmmanuel Vadot          endpoint {
251b97ee269SEmmanuel Vadot            remote-endpoint = <&mdp5_intf3_out>;
252b97ee269SEmmanuel Vadot          };
253b97ee269SEmmanuel Vadot        };
254b97ee269SEmmanuel Vadot      };
255b97ee269SEmmanuel Vadot    };
256b97ee269SEmmanuel Vadot...
257