xref: /linux/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-usb-phy.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
10b2f7ad1SMaxime Ripard# SPDX-License-Identifier: GPL-2.0
20b2f7ad1SMaxime Ripard%YAML 1.2
30b2f7ad1SMaxime Ripard---
40b2f7ad1SMaxime Ripard$id: http://devicetree.org/schemas/phy/allwinner,sun6i-a31-usb-phy.yaml#
50b2f7ad1SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
60b2f7ad1SMaxime Ripard
7*dd3cb467SAndrew Lunntitle: Allwinner A31 USB PHY
80b2f7ad1SMaxime Ripard
90b2f7ad1SMaxime Ripardmaintainers:
100b2f7ad1SMaxime Ripard  - Chen-Yu Tsai <wens@csie.org>
110b2f7ad1SMaxime Ripard  - Maxime Ripard <mripard@kernel.org>
120b2f7ad1SMaxime Ripard
130b2f7ad1SMaxime Ripardproperties:
140b2f7ad1SMaxime Ripard  "#phy-cells":
150b2f7ad1SMaxime Ripard    const: 1
160b2f7ad1SMaxime Ripard
170b2f7ad1SMaxime Ripard  compatible:
180b2f7ad1SMaxime Ripard    const: allwinner,sun6i-a31-usb-phy
190b2f7ad1SMaxime Ripard
200b2f7ad1SMaxime Ripard  reg:
210b2f7ad1SMaxime Ripard    items:
220b2f7ad1SMaxime Ripard      - description: PHY Control registers
230b2f7ad1SMaxime Ripard      - description: PHY PMU1 registers
240b2f7ad1SMaxime Ripard      - description: PHY PMU2 registers
250b2f7ad1SMaxime Ripard
260b2f7ad1SMaxime Ripard  reg-names:
270b2f7ad1SMaxime Ripard    items:
280b2f7ad1SMaxime Ripard      - const: phy_ctrl
290b2f7ad1SMaxime Ripard      - const: pmu1
300b2f7ad1SMaxime Ripard      - const: pmu2
310b2f7ad1SMaxime Ripard
320b2f7ad1SMaxime Ripard  clocks:
330b2f7ad1SMaxime Ripard    items:
340b2f7ad1SMaxime Ripard      - description: USB OTG PHY bus clock
350b2f7ad1SMaxime Ripard      - description: USB Host 0 PHY bus clock
360b2f7ad1SMaxime Ripard      - description: USB Host 1 PHY bus clock
370b2f7ad1SMaxime Ripard
380b2f7ad1SMaxime Ripard  clock-names:
390b2f7ad1SMaxime Ripard    items:
400b2f7ad1SMaxime Ripard      - const: usb0_phy
410b2f7ad1SMaxime Ripard      - const: usb1_phy
420b2f7ad1SMaxime Ripard      - const: usb2_phy
430b2f7ad1SMaxime Ripard
440b2f7ad1SMaxime Ripard  resets:
450b2f7ad1SMaxime Ripard    items:
460b2f7ad1SMaxime Ripard      - description: USB OTG reset
470b2f7ad1SMaxime Ripard      - description: USB Host 1 Controller reset
480b2f7ad1SMaxime Ripard      - description: USB Host 2 Controller reset
490b2f7ad1SMaxime Ripard
500b2f7ad1SMaxime Ripard  reset-names:
510b2f7ad1SMaxime Ripard    items:
520b2f7ad1SMaxime Ripard      - const: usb0_reset
530b2f7ad1SMaxime Ripard      - const: usb1_reset
540b2f7ad1SMaxime Ripard      - const: usb2_reset
550b2f7ad1SMaxime Ripard
560b2f7ad1SMaxime Ripard  usb0_id_det-gpios:
570499220dSRob Herring    maxItems: 1
580b2f7ad1SMaxime Ripard    description: GPIO to the USB OTG ID pin
590b2f7ad1SMaxime Ripard
600b2f7ad1SMaxime Ripard  usb0_vbus_det-gpios:
610499220dSRob Herring    maxItems: 1
620b2f7ad1SMaxime Ripard    description: GPIO to the USB OTG VBUS detect pin
630b2f7ad1SMaxime Ripard
640b2f7ad1SMaxime Ripard  usb0_vbus_power-supply:
650b2f7ad1SMaxime Ripard    description: Power supply to detect the USB OTG VBUS
660b2f7ad1SMaxime Ripard
670b2f7ad1SMaxime Ripard  usb0_vbus-supply:
680b2f7ad1SMaxime Ripard    description: Regulator controlling USB OTG VBUS
690b2f7ad1SMaxime Ripard
700b2f7ad1SMaxime Ripard  usb1_vbus-supply:
710b2f7ad1SMaxime Ripard    description: Regulator controlling USB1 Host controller
720b2f7ad1SMaxime Ripard
730b2f7ad1SMaxime Ripard  usb2_vbus-supply:
740b2f7ad1SMaxime Ripard    description: Regulator controlling USB2 Host controller
750b2f7ad1SMaxime Ripard
760b2f7ad1SMaxime Ripardrequired:
770b2f7ad1SMaxime Ripard  - "#phy-cells"
780b2f7ad1SMaxime Ripard  - compatible
790b2f7ad1SMaxime Ripard  - clocks
800b2f7ad1SMaxime Ripard  - clock-names
810b2f7ad1SMaxime Ripard  - reg
820b2f7ad1SMaxime Ripard  - reg-names
830b2f7ad1SMaxime Ripard  - resets
840b2f7ad1SMaxime Ripard  - reset-names
850b2f7ad1SMaxime Ripard
860b2f7ad1SMaxime RipardadditionalProperties: false
870b2f7ad1SMaxime Ripard
880b2f7ad1SMaxime Ripardexamples:
890b2f7ad1SMaxime Ripard  - |
900b2f7ad1SMaxime Ripard    #include <dt-bindings/gpio/gpio.h>
910b2f7ad1SMaxime Ripard    #include <dt-bindings/clock/sun6i-a31-ccu.h>
920b2f7ad1SMaxime Ripard    #include <dt-bindings/reset/sun6i-a31-ccu.h>
930b2f7ad1SMaxime Ripard
940b2f7ad1SMaxime Ripard    phy@1c19400 {
950b2f7ad1SMaxime Ripard        #phy-cells = <1>;
960b2f7ad1SMaxime Ripard        compatible = "allwinner,sun6i-a31-usb-phy";
970b2f7ad1SMaxime Ripard        reg = <0x01c19400 0x10>,
980b2f7ad1SMaxime Ripard              <0x01c1a800 0x4>,
990b2f7ad1SMaxime Ripard              <0x01c1b800 0x4>;
1000b2f7ad1SMaxime Ripard        reg-names = "phy_ctrl",
1010b2f7ad1SMaxime Ripard                    "pmu1",
1020b2f7ad1SMaxime Ripard                    "pmu2";
1030b2f7ad1SMaxime Ripard        clocks = <&ccu CLK_USB_PHY0>,
1040b2f7ad1SMaxime Ripard                 <&ccu CLK_USB_PHY1>,
1050b2f7ad1SMaxime Ripard                 <&ccu CLK_USB_PHY2>;
1060b2f7ad1SMaxime Ripard        clock-names = "usb0_phy",
1070b2f7ad1SMaxime Ripard                      "usb1_phy",
1080b2f7ad1SMaxime Ripard                      "usb2_phy";
1090b2f7ad1SMaxime Ripard        resets = <&ccu RST_USB_PHY0>,
1100b2f7ad1SMaxime Ripard                 <&ccu RST_USB_PHY1>,
1110b2f7ad1SMaxime Ripard                 <&ccu RST_USB_PHY2>;
1120b2f7ad1SMaxime Ripard        reset-names = "usb0_reset",
1130b2f7ad1SMaxime Ripard                      "usb1_reset",
1140b2f7ad1SMaxime Ripard                      "usb2_reset";
1150b2f7ad1SMaxime Ripard        usb0_id_det-gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>; /* PA15 */
1160b2f7ad1SMaxime Ripard        usb0_vbus_det-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
1170b2f7ad1SMaxime Ripard        usb0_vbus_power-supply = <&usb_power_supply>;
1180b2f7ad1SMaxime Ripard        usb0_vbus-supply = <&reg_drivevbus>;
1190b2f7ad1SMaxime Ripard        usb1_vbus-supply = <&reg_usb1_vbus>;
1200b2f7ad1SMaxime Ripard        usb2_vbus-supply = <&reg_usb2_vbus>;
1210b2f7ad1SMaxime Ripard    };
122