xref: /freebsd/sys/contrib/device-tree/Bindings/display/allwinner,sun8i-a83t-hdmi-phy.yaml (revision dc318a4ffabcbfa23bb56a33403aad36e6de30af)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/allwinner,sun8i-a83t-hdmi-phy.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Allwinner A83t HDMI PHY Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11  - Maxime Ripard <mripard@kernel.org>
12
13properties:
14  "#phy-cells":
15    const: 0
16
17  compatible:
18    enum:
19      - allwinner,sun8i-a83t-hdmi-phy
20      - allwinner,sun8i-h3-hdmi-phy
21      - allwinner,sun8i-r40-hdmi-phy
22      - allwinner,sun50i-a64-hdmi-phy
23      - allwinner,sun50i-h6-hdmi-phy
24
25  reg:
26    maxItems: 1
27
28  clocks:
29    minItems: 2
30    maxItems: 4
31    items:
32      - description: Bus Clock
33      - description: Module Clock
34      - description: Parent of the PHY clock
35      - description: Second possible parent of the PHY clock
36
37  clock-names:
38    minItems: 2
39    maxItems: 4
40    items:
41      - const: bus
42      - const: mod
43      - const: pll-0
44      - const: pll-1
45
46  resets:
47    maxItems: 1
48
49  reset-names:
50    const: phy
51
52required:
53  - compatible
54  - reg
55  - clocks
56  - clock-names
57  - resets
58  - reset-names
59
60if:
61  properties:
62    compatible:
63      contains:
64        enum:
65          - allwinner,sun8i-r40-hdmi-phy
66
67then:
68  properties:
69    clocks:
70      minItems: 4
71
72    clock-names:
73      minItems: 4
74
75else:
76  if:
77    properties:
78      compatible:
79        contains:
80          enum:
81            - allwinner,sun8i-h3-hdmi-phy
82            - allwinner,sun50i-a64-hdmi-phy
83
84  then:
85    properties:
86      clocks:
87        minItems: 3
88
89      clock-names:
90        minItems: 3
91
92  else:
93    properties:
94      clocks:
95        maxItems: 2
96
97      clock-names:
98        maxItems: 2
99
100additionalProperties: false
101
102examples:
103  - |
104    #include <dt-bindings/clock/sun8i-a83t-ccu.h>
105    #include <dt-bindings/reset/sun8i-a83t-ccu.h>
106
107    hdmi_phy: hdmi-phy@1ef0000 {
108        compatible = "allwinner,sun8i-a83t-hdmi-phy";
109        reg = <0x01ef0000 0x10000>;
110        clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_SLOW>;
111        clock-names = "bus", "mod";
112        resets = <&ccu RST_BUS_HDMI0>;
113        reset-names = "phy";
114        #phy-cells = <0>;
115    };
116
117...
118