0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/phy/allwinner,sun6i-a31-usb-phy.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Allwinner A31 USB PHY Device Tree Bindings
0008
0009 maintainers:
0010 - Chen-Yu Tsai <wens@csie.org>
0011 - Maxime Ripard <mripard@kernel.org>
0012
0013 properties:
0014 "#phy-cells":
0015 const: 1
0016
0017 compatible:
0018 const: allwinner,sun6i-a31-usb-phy
0019
0020 reg:
0021 items:
0022 - description: PHY Control registers
0023 - description: PHY PMU1 registers
0024 - description: PHY PMU2 registers
0025
0026 reg-names:
0027 items:
0028 - const: phy_ctrl
0029 - const: pmu1
0030 - const: pmu2
0031
0032 clocks:
0033 items:
0034 - description: USB OTG PHY bus clock
0035 - description: USB Host 0 PHY bus clock
0036 - description: USB Host 1 PHY bus clock
0037
0038 clock-names:
0039 items:
0040 - const: usb0_phy
0041 - const: usb1_phy
0042 - const: usb2_phy
0043
0044 resets:
0045 items:
0046 - description: USB OTG reset
0047 - description: USB Host 1 Controller reset
0048 - description: USB Host 2 Controller reset
0049
0050 reset-names:
0051 items:
0052 - const: usb0_reset
0053 - const: usb1_reset
0054 - const: usb2_reset
0055
0056 usb0_id_det-gpios:
0057 maxItems: 1
0058 description: GPIO to the USB OTG ID pin
0059
0060 usb0_vbus_det-gpios:
0061 maxItems: 1
0062 description: GPIO to the USB OTG VBUS detect pin
0063
0064 usb0_vbus_power-supply:
0065 description: Power supply to detect the USB OTG VBUS
0066
0067 usb0_vbus-supply:
0068 description: Regulator controlling USB OTG VBUS
0069
0070 usb1_vbus-supply:
0071 description: Regulator controlling USB1 Host controller
0072
0073 usb2_vbus-supply:
0074 description: Regulator controlling USB2 Host controller
0075
0076 required:
0077 - "#phy-cells"
0078 - compatible
0079 - clocks
0080 - clock-names
0081 - reg
0082 - reg-names
0083 - resets
0084 - reset-names
0085
0086 additionalProperties: false
0087
0088 examples:
0089 - |
0090 #include <dt-bindings/gpio/gpio.h>
0091 #include <dt-bindings/clock/sun6i-a31-ccu.h>
0092 #include <dt-bindings/reset/sun6i-a31-ccu.h>
0093
0094 phy@1c19400 {
0095 #phy-cells = <1>;
0096 compatible = "allwinner,sun6i-a31-usb-phy";
0097 reg = <0x01c19400 0x10>,
0098 <0x01c1a800 0x4>,
0099 <0x01c1b800 0x4>;
0100 reg-names = "phy_ctrl",
0101 "pmu1",
0102 "pmu2";
0103 clocks = <&ccu CLK_USB_PHY0>,
0104 <&ccu CLK_USB_PHY1>,
0105 <&ccu CLK_USB_PHY2>;
0106 clock-names = "usb0_phy",
0107 "usb1_phy",
0108 "usb2_phy";
0109 resets = <&ccu RST_USB_PHY0>,
0110 <&ccu RST_USB_PHY1>,
0111 <&ccu RST_USB_PHY2>;
0112 reset-names = "usb0_reset",
0113 "usb1_reset",
0114 "usb2_reset";
0115 usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
0116 usb0_vbus_det-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
0117 usb0_vbus_power-supply = <&usb_power_supply>;
0118 usb0_vbus-supply = <®_drivevbus>;
0119 usb1_vbus-supply = <®_usb1_vbus>;
0120 usb2_vbus-supply = <®_usb2_vbus>;
0121 };