allwinner,sun8i-a83t-dw-hdmi.yaml 5.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/allwinner,sun8i-a83t-dw-hdmi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A83t DWC HDMI TX Encoder Device Tree Bindings

description: |
  The HDMI transmitter is a Synopsys DesignWare HDMI 1.4 TX controller
  IP with Allwinner\'s own PHY IP. It supports audio and video outputs
  and CEC.

  These DT bindings follow the Synopsys DWC HDMI TX bindings defined
15 16
  in bridge/synopsys,dw-hdmi.yaml with the following device-specific
  properties.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

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

properties:
  "#phy-cells":
    const: 0

  compatible:
    oneOf:
      - const: allwinner,sun8i-a83t-dw-hdmi
      - const: allwinner,sun50i-h6-dw-hdmi

      - items:
32 33 34 35 36
          - enum:
              - allwinner,sun8i-h3-dw-hdmi
              - allwinner,sun8i-r40-dw-hdmi
              - allwinner,sun50i-a64-dw-hdmi
          - const: allwinner,sun8i-a83t-dw-hdmi
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

  reg:
    maxItems: 1

  reg-io-width:
    const: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 3
    items:
      - description: Bus Clock
      - description: Register Clock
      - description: TMDS Clock
      - description: HDMI CEC Clock
      - description: HDCP Clock
      - description: HDCP Bus Clock

  clock-names:
    minItems: 3
    items:
      - const: iahb
      - const: isfr
      - const: tmds
      - const: cec
      - const: hdcp
      - const: hdcp-bus

  resets:
    minItems: 1
    items:
      - description: HDMI Controller Reset
      - description: HDCP Reset

  reset-names:
    minItems: 1
    items:
      - const: ctrl
      - const: hdcp

  phys:
    maxItems: 1
    description:
      Phandle to the DWC HDMI PHY.

  phy-names:
    const: phy

  hvcc-supply:
    description:
      The VCC power supply of the controller

  ports:
92
    $ref: /schemas/graph.yaml#/properties/ports
93 94 95

    properties:
      port@0:
96
        $ref: /schemas/graph.yaml#/properties/port
97 98 99 100 101
        description: |
          Input endpoints of the controller. Usually the associated
          TCON.

      port@1:
102
        $ref: /schemas/graph.yaml#/properties/port
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 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
        description: |
          Output endpoints of the controller. Usually an HDMI
          connector.

    required:
      - port@0
      - port@1

required:
  - compatible
  - reg
  - reg-io-width
  - interrupts
  - clocks
  - clock-names
  - resets
  - reset-names
  - phys
  - phy-names
  - ports

if:
  properties:
    compatible:
      contains:
        enum:
          - allwinner,sun50i-h6-dw-hdmi

then:
  properties:
    clocks:
      minItems: 6

    clock-names:
      minItems: 6

    resets:
      minItems: 2

    reset-names:
      minItems: 2


additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    /*
     * This comes from the clock/sun8i-a83t-ccu.h and
     * reset/sun8i-a83t-ccu.h headers, but we can't include them since
     * it would trigger a bunch of warnings for redefinitions of
     * symbols with the other example.
     */
    #define CLK_BUS_HDMI	39
    #define CLK_HDMI		93
    #define CLK_HDMI_SLOW	94
    #define RST_BUS_HDMI1	26

    hdmi@1ee0000 {
        compatible = "allwinner,sun8i-a83t-dw-hdmi";
        reg = <0x01ee0000 0x10000>;
        reg-io-width = <1>;
        interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
                 <&ccu CLK_HDMI>;
        clock-names = "iahb", "isfr", "tmds";
        resets = <&ccu RST_BUS_HDMI1>;
        reset-names = "ctrl";
        phys = <&hdmi_phy>;
        phy-names = "phy";
        pinctrl-names = "default";
        pinctrl-0 = <&hdmi_pins>;

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

            port@0 {
                reg = <0>;

                endpoint {
                    remote-endpoint = <&tcon1_out_hdmi>;
                };
            };

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

    /* Cleanup after ourselves */
    #undef CLK_BUS_HDMI
    #undef CLK_HDMI
    #undef CLK_HDMI_SLOW

  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>

    /*
     * This comes from the clock/sun50i-h6-ccu.h and
     * reset/sun50i-h6-ccu.h headers, but we can't include them since
     * it would trigger a bunch of warnings for redefinitions of
     * symbols with the other example.
     */
    #define CLK_BUS_HDMI	126
    #define CLK_BUS_HDCP	137
    #define CLK_HDMI		123
    #define CLK_HDMI_SLOW	124
    #define CLK_HDMI_CEC	125
    #define CLK_HDCP		136
    #define RST_BUS_HDMI_SUB	57
    #define RST_BUS_HDCP	62

    hdmi@6000000 {
        compatible = "allwinner,sun50i-h6-dw-hdmi";
        reg = <0x06000000 0x10000>;
        reg-io-width = <1>;
        interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>,
                 <&ccu CLK_HDMI>, <&ccu CLK_HDMI_CEC>,
                 <&ccu CLK_HDCP>, <&ccu CLK_BUS_HDCP>;
        clock-names = "iahb", "isfr", "tmds", "cec", "hdcp",
                      "hdcp-bus";
        resets = <&ccu RST_BUS_HDMI_SUB>, <&ccu RST_BUS_HDCP>;
        reset-names = "ctrl", "hdcp";
        phys = <&hdmi_phy>;
        phy-names = "phy";
        pinctrl-names = "default";
        pinctrl-0 = <&hdmi_pins>;

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

            port@0 {
                reg = <0>;

                endpoint {
                    remote-endpoint = <&tcon_top_hdmi_out_hdmi>;
                };
            };

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

...