0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/phy/allwinner,sun4i-a10-usb-phy.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Allwinner A10 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 enum:
0019 - allwinner,sun4i-a10-usb-phy
0020 - allwinner,sun7i-a20-usb-phy
0021
0022 reg:
0023 items:
0024 - description: PHY Control registers
0025 - description: PHY PMU1 registers
0026 - description: PHY PMU2 registers
0027
0028 reg-names:
0029 items:
0030 - const: phy_ctrl
0031 - const: pmu1
0032 - const: pmu2
0033
0034 clocks:
0035 maxItems: 1
0036 description: USB PHY bus clock
0037
0038 clock-names:
0039 const: usb_phy
0040
0041 resets:
0042 items:
0043 - description: USB OTG reset
0044 - description: USB Host 1 Controller reset
0045 - description: USB Host 2 Controller reset
0046
0047 reset-names:
0048 items:
0049 - const: usb0_reset
0050 - const: usb1_reset
0051 - const: usb2_reset
0052
0053 usb0_id_det-gpios:
0054 maxItems: 1
0055 description: GPIO to the USB OTG ID pin
0056
0057 usb0_vbus_det-gpios:
0058 maxItems: 1
0059 description: GPIO to the USB OTG VBUS detect pin
0060
0061 usb0_vbus_power-supply:
0062 description: Power supply to detect the USB OTG VBUS
0063
0064 usb0_vbus-supply:
0065 description: Regulator controlling USB OTG VBUS
0066
0067 usb1_vbus-supply:
0068 description: Regulator controlling USB1 Host controller
0069
0070 usb2_vbus-supply:
0071 description: Regulator controlling USB2 Host controller
0072
0073 required:
0074 - "#phy-cells"
0075 - compatible
0076 - clocks
0077 - clock-names
0078 - reg
0079 - reg-names
0080 - resets
0081 - reset-names
0082
0083 additionalProperties: false
0084
0085 examples:
0086 - |
0087 #include <dt-bindings/gpio/gpio.h>
0088 #include <dt-bindings/clock/sun4i-a10-ccu.h>
0089 #include <dt-bindings/reset/sun4i-a10-ccu.h>
0090
0091 usbphy: phy@1c13400 {
0092 #phy-cells = <1>;
0093 compatible = "allwinner,sun4i-a10-usb-phy";
0094 reg = <0x01c13400 0x10>, <0x01c14800 0x4>, <0x01c1c800 0x4>;
0095 reg-names = "phy_ctrl", "pmu1", "pmu2";
0096 clocks = <&ccu CLK_USB_PHY>;
0097 clock-names = "usb_phy";
0098 resets = <&ccu RST_USB_PHY0>,
0099 <&ccu RST_USB_PHY1>,
0100 <&ccu RST_USB_PHY2>;
0101 reset-names = "usb0_reset", "usb1_reset", "usb2_reset";
0102 usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>;
0103 usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>;
0104 usb0_vbus-supply = <®_usb0_vbus>;
0105 usb1_vbus-supply = <®_usb1_vbus>;
0106 usb2_vbus-supply = <®_usb2_vbus>;
0107 };