summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/display/allwinner,sun8i-a83t-hdmi-phy.yaml
blob: 501cec16168cee3b96cc9d939563ff3a1494e22d (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
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/allwinner,sun8i-a83t-hdmi-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Allwinner A83t HDMI PHY Device Tree Bindings

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

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

  compatible:
    enum:
      - allwinner,sun8i-a83t-hdmi-phy
      - allwinner,sun8i-h3-hdmi-phy
      - allwinner,sun8i-r40-hdmi-phy
      - allwinner,sun50i-a64-hdmi-phy
      - allwinner,sun50i-h6-hdmi-phy

  reg:
    maxItems: 1

  clocks:
    minItems: 2
    maxItems: 4
    items:
      - description: Bus Clock
      - description: Module Clock
      - description: Parent of the PHY clock
      - description: Second possible parent of the PHY clock

  clock-names:
    minItems: 2
    maxItems: 4
    items:
      - const: bus
      - const: mod
      - const: pll-0
      - const: pll-1

  resets:
    maxItems: 1

  reset-names:
    const: phy

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - resets
  - reset-names

if:
  properties:
    compatible:
      contains:
        enum:
          - allwinner,sun8i-r40-hdmi-phy

then:
  properties:
    clocks:
      minItems: 4

    clock-names:
      minItems: 4

else:
  if:
    properties:
      compatible:
        contains:
          enum:
            - allwinner,sun8i-h3-hdmi-phy
            - allwinner,sun50i-a64-hdmi-phy

  then:
    properties:
      clocks:
        minItems: 3

      clock-names:
        minItems: 3

  else:
    properties:
      clocks:
        maxItems: 2

      clock-names:
        maxItems: 2

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/sun8i-a83t-ccu.h>
    #include <dt-bindings/reset/sun8i-a83t-ccu.h>

    hdmi_phy: hdmi-phy@1ef0000 {
        compatible = "allwinner,sun8i-a83t-hdmi-phy";
        reg = <0x01ef0000 0x10000>;
        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
        clock-names = "bus", "mod";
        resets = <&ccu RST_BUS_HDMI0>;
        reset-names = "phy";
        #phy-cells = <0>;
    };

...