xref: /freebsd/sys/contrib/device-tree/Bindings/phy/allwinner,sun9i-a80-usb-phy.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/allwinner,sun9i-a80-usb-phy.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7*7ef62cebSEmmanuel Vadottitle: Allwinner A80 USB PHY
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Chen-Yu Tsai <wens@csie.org>
11c66ec88fSEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotproperties:
14c66ec88fSEmmanuel Vadot  "#phy-cells":
15c66ec88fSEmmanuel Vadot    const: 0
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot  compatible:
18c66ec88fSEmmanuel Vadot    const: allwinner,sun9i-a80-usb-phy
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadot  reg:
21c66ec88fSEmmanuel Vadot    maxItems: 1
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot  clocks:
24c66ec88fSEmmanuel Vadot    anyOf:
255def4c47SEmmanuel Vadot      - maxItems: 1
265def4c47SEmmanuel Vadot        description: Main PHY Clock
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot      - items:
29c66ec88fSEmmanuel Vadot          - description: Main PHY clock
30c66ec88fSEmmanuel Vadot          - description: HSIC 12MHz clock
31c66ec88fSEmmanuel Vadot          - description: HSIC 480MHz clock
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  clock-names:
34c66ec88fSEmmanuel Vadot    oneOf:
35c66ec88fSEmmanuel Vadot      - const: phy
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot      - items:
38c66ec88fSEmmanuel Vadot          - const: phy
39c66ec88fSEmmanuel Vadot          - const: hsic_12M
40c66ec88fSEmmanuel Vadot          - const: hsic_480M
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  resets:
435def4c47SEmmanuel Vadot    minItems: 1
445def4c47SEmmanuel Vadot    items:
45c66ec88fSEmmanuel Vadot      - description: Normal USB PHY reset
46c66ec88fSEmmanuel Vadot      - description: HSIC Reset
47c66ec88fSEmmanuel Vadot
48c66ec88fSEmmanuel Vadot  reset-names:
495def4c47SEmmanuel Vadot    minItems: 1
505def4c47SEmmanuel Vadot    items:
51c66ec88fSEmmanuel Vadot      - const: phy
52c66ec88fSEmmanuel Vadot      - const: hsic
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel Vadot  phy_type:
55c66ec88fSEmmanuel Vadot    const: hsic
56c66ec88fSEmmanuel Vadot    description:
57c66ec88fSEmmanuel Vadot      When absent, the PHY type will be assumed to be normal USB.
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel Vadot  phy-supply:
60c66ec88fSEmmanuel Vadot    description:
61c66ec88fSEmmanuel Vadot      Regulator that powers VBUS
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadotrequired:
64c66ec88fSEmmanuel Vadot  - "#phy-cells"
65c66ec88fSEmmanuel Vadot  - compatible
66c66ec88fSEmmanuel Vadot  - reg
67c66ec88fSEmmanuel Vadot  - clocks
68c66ec88fSEmmanuel Vadot  - clock-names
69c66ec88fSEmmanuel Vadot  - resets
70c66ec88fSEmmanuel Vadot  - reset-names
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel VadotadditionalProperties: false
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadotif:
75c66ec88fSEmmanuel Vadot  properties:
76c66ec88fSEmmanuel Vadot    phy_type:
77c66ec88fSEmmanuel Vadot      const: hsic
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadot  required:
80c66ec88fSEmmanuel Vadot    - phy_type
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadotthen:
83c66ec88fSEmmanuel Vadot  properties:
84c66ec88fSEmmanuel Vadot    clocks:
85c66ec88fSEmmanuel Vadot      maxItems: 3
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot    clock-names:
88c66ec88fSEmmanuel Vadot      maxItems: 3
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot    resets:
91c66ec88fSEmmanuel Vadot      maxItems: 2
92c66ec88fSEmmanuel Vadot
93c66ec88fSEmmanuel Vadot    reset-names:
94c66ec88fSEmmanuel Vadot      maxItems: 2
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadotexamples:
97c66ec88fSEmmanuel Vadot  - |
98c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/sun9i-a80-usb.h>
99c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/sun9i-a80-usb.h>
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot    usbphy1: phy@a00800 {
102c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun9i-a80-usb-phy";
103c66ec88fSEmmanuel Vadot        reg = <0x00a00800 0x4>;
104c66ec88fSEmmanuel Vadot        clocks = <&usb_clocks CLK_USB0_PHY>;
105c66ec88fSEmmanuel Vadot        clock-names = "phy";
106c66ec88fSEmmanuel Vadot        resets = <&usb_clocks RST_USB0_PHY>;
107c66ec88fSEmmanuel Vadot        reset-names = "phy";
108c66ec88fSEmmanuel Vadot        phy-supply = <&reg_usb1_vbus>;
109c66ec88fSEmmanuel Vadot        #phy-cells = <0>;
110c66ec88fSEmmanuel Vadot    };
111c66ec88fSEmmanuel Vadot
112c66ec88fSEmmanuel Vadot  - |
113c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/sun9i-a80-usb.h>
114c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/sun9i-a80-usb.h>
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadot    usbphy3: phy@a02800 {
117c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun9i-a80-usb-phy";
118c66ec88fSEmmanuel Vadot        reg = <0x00a02800 0x4>;
119c66ec88fSEmmanuel Vadot        clocks = <&usb_clocks CLK_USB2_PHY>,
120c66ec88fSEmmanuel Vadot                 <&usb_clocks CLK_USB_HSIC>,
121c66ec88fSEmmanuel Vadot                 <&usb_clocks CLK_USB2_HSIC>;
122c66ec88fSEmmanuel Vadot        clock-names = "phy",
123c66ec88fSEmmanuel Vadot                      "hsic_12M",
124c66ec88fSEmmanuel Vadot                      "hsic_480M";
125c66ec88fSEmmanuel Vadot        resets = <&usb_clocks RST_USB2_PHY>,
126c66ec88fSEmmanuel Vadot                 <&usb_clocks RST_USB2_HSIC>;
127c66ec88fSEmmanuel Vadot        reset-names = "phy",
128c66ec88fSEmmanuel Vadot                      "hsic";
129c66ec88fSEmmanuel Vadot        phy_type = "hsic";
130c66ec88fSEmmanuel Vadot        phy-supply = <&reg_usb3_vbus>;
131c66ec88fSEmmanuel Vadot        #phy-cells = <0>;
132c66ec88fSEmmanuel Vadot    };
133