Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/phy/allwinner,sun8i-h3-usb-phy.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Allwinner H3 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,sun8i-h3-usb-phy
0020       - allwinner,sun50i-h616-usb-phy
0021 
0022   reg:
0023     items:
0024       - description: PHY Control registers
0025       - description: PHY PMU0 registers
0026       - description: PHY PMU1 registers
0027       - description: PHY PMU2 registers
0028       - description: PHY PMU3 registers
0029 
0030   reg-names:
0031     items:
0032       - const: phy_ctrl
0033       - const: pmu0
0034       - const: pmu1
0035       - const: pmu2
0036       - const: pmu3
0037 
0038   clocks:
0039     items:
0040       - description: USB OTG PHY bus clock
0041       - description: USB Host 0 PHY bus clock
0042       - description: USB Host 1 PHY bus clock
0043       - description: USB Host 2 PHY bus clock
0044 
0045   clock-names:
0046     items:
0047       - const: usb0_phy
0048       - const: usb1_phy
0049       - const: usb2_phy
0050       - const: usb3_phy
0051 
0052   resets:
0053     items:
0054       - description: USB OTG reset
0055       - description: USB Host 1 Controller reset
0056       - description: USB Host 2 Controller reset
0057       - description: USB Host 3 Controller reset
0058 
0059   reset-names:
0060     items:
0061       - const: usb0_reset
0062       - const: usb1_reset
0063       - const: usb2_reset
0064       - const: usb3_reset
0065 
0066   usb0_id_det-gpios:
0067     maxItems: 1
0068     description: GPIO to the USB OTG ID pin
0069 
0070   usb0_vbus_det-gpios:
0071     maxItems: 1
0072     description: GPIO to the USB OTG VBUS detect pin
0073 
0074   usb0_vbus_power-supply:
0075     description: Power supply to detect the USB OTG VBUS
0076 
0077   usb0_vbus-supply:
0078     description: Regulator controlling USB OTG VBUS
0079 
0080   usb1_vbus-supply:
0081     description: Regulator controlling USB1 Host controller
0082 
0083   usb2_vbus-supply:
0084     description: Regulator controlling USB2 Host controller
0085 
0086   usb3_vbus-supply:
0087     description: Regulator controlling USB3 Host controller
0088 
0089 required:
0090   - "#phy-cells"
0091   - compatible
0092   - clocks
0093   - clock-names
0094   - reg
0095   - reg-names
0096   - resets
0097   - reset-names
0098 
0099 additionalProperties: false
0100 
0101 examples:
0102   - |
0103     #include <dt-bindings/gpio/gpio.h>
0104     #include <dt-bindings/clock/sun8i-h3-ccu.h>
0105     #include <dt-bindings/reset/sun8i-h3-ccu.h>
0106 
0107     phy@1c19400 {
0108         #phy-cells = <1>;
0109         compatible = "allwinner,sun8i-h3-usb-phy";
0110         reg = <0x01c19400 0x2c>,
0111               <0x01c1a800 0x4>,
0112               <0x01c1b800 0x4>,
0113               <0x01c1c800 0x4>,
0114               <0x01c1d800 0x4>;
0115         reg-names = "phy_ctrl",
0116                     "pmu0",
0117                     "pmu1",
0118                     "pmu2",
0119                     "pmu3";
0120         clocks = <&ccu CLK_USB_PHY0>,
0121                  <&ccu CLK_USB_PHY1>,
0122                  <&ccu CLK_USB_PHY2>,
0123                  <&ccu CLK_USB_PHY3>;
0124         clock-names = "usb0_phy",
0125                       "usb1_phy",
0126                       "usb2_phy",
0127                       "usb3_phy";
0128         resets = <&ccu RST_USB_PHY0>,
0129                  <&ccu RST_USB_PHY1>,
0130                  <&ccu RST_USB_PHY2>,
0131                  <&ccu RST_USB_PHY3>;
0132         reset-names = "usb0_reset",
0133                       "usb1_reset",
0134                       "usb2_reset",
0135                       "usb3_reset";
0136         usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0137         usb0_vbus-supply = <&reg_usb0_vbus>;
0138         usb1_vbus-supply = <&reg_usb1_vbus>;
0139         usb2_vbus-supply = <&reg_usb2_vbus>;
0140         usb3_vbus-supply = <&reg_usb3_vbus>;
0141     };