xref: /linux/Documentation/devicetree/bindings/phy/allwinner,sun8i-a23-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,sun8i-a23-usb-phy.yaml#
50b2f7ad1SMaxime Ripard$schema: http://devicetree.org/meta-schemas/core.yaml#
60b2f7ad1SMaxime Ripard
7*dd3cb467SAndrew Lunntitle: Allwinner A23 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    enum:
190b2f7ad1SMaxime Ripard      - allwinner,sun8i-a23-usb-phy
200b2f7ad1SMaxime Ripard      - allwinner,sun8i-a33-usb-phy
210b2f7ad1SMaxime Ripard
220b2f7ad1SMaxime Ripard  reg:
230b2f7ad1SMaxime Ripard    items:
240b2f7ad1SMaxime Ripard      - description: PHY Control registers
250b2f7ad1SMaxime Ripard      - description: PHY PMU1 registers
260b2f7ad1SMaxime Ripard
270b2f7ad1SMaxime Ripard  reg-names:
280b2f7ad1SMaxime Ripard    items:
290b2f7ad1SMaxime Ripard      - const: phy_ctrl
300b2f7ad1SMaxime Ripard      - const: pmu1
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
370b2f7ad1SMaxime Ripard  clock-names:
380b2f7ad1SMaxime Ripard    items:
390b2f7ad1SMaxime Ripard      - const: usb0_phy
400b2f7ad1SMaxime Ripard      - const: usb1_phy
410b2f7ad1SMaxime Ripard
420b2f7ad1SMaxime Ripard  resets:
430b2f7ad1SMaxime Ripard    items:
440b2f7ad1SMaxime Ripard      - description: USB OTG reset
450b2f7ad1SMaxime Ripard      - description: USB Host 1 Controller reset
460b2f7ad1SMaxime Ripard
470b2f7ad1SMaxime Ripard  reset-names:
480b2f7ad1SMaxime Ripard    items:
490b2f7ad1SMaxime Ripard      - const: usb0_reset
500b2f7ad1SMaxime Ripard      - const: usb1_reset
510b2f7ad1SMaxime Ripard
520b2f7ad1SMaxime Ripard  usb0_id_det-gpios:
530499220dSRob Herring    maxItems: 1
540b2f7ad1SMaxime Ripard    description: GPIO to the USB OTG ID pin
550b2f7ad1SMaxime Ripard
560b2f7ad1SMaxime Ripard  usb0_vbus_det-gpios:
570499220dSRob Herring    maxItems: 1
580b2f7ad1SMaxime Ripard    description: GPIO to the USB OTG VBUS detect pin
590b2f7ad1SMaxime Ripard
600b2f7ad1SMaxime Ripard  usb0_vbus_power-supply:
610b2f7ad1SMaxime Ripard    description: Power supply to detect the USB OTG VBUS
620b2f7ad1SMaxime Ripard
630b2f7ad1SMaxime Ripard  usb0_vbus-supply:
640b2f7ad1SMaxime Ripard    description: Regulator controlling USB OTG VBUS
650b2f7ad1SMaxime Ripard
660b2f7ad1SMaxime Ripard  usb1_vbus-supply:
670b2f7ad1SMaxime Ripard    description: Regulator controlling USB1 Host controller
680b2f7ad1SMaxime Ripard
690b2f7ad1SMaxime Ripardrequired:
700b2f7ad1SMaxime Ripard  - "#phy-cells"
710b2f7ad1SMaxime Ripard  - compatible
720b2f7ad1SMaxime Ripard  - clocks
730b2f7ad1SMaxime Ripard  - clock-names
740b2f7ad1SMaxime Ripard  - reg
750b2f7ad1SMaxime Ripard  - reg-names
760b2f7ad1SMaxime Ripard  - resets
770b2f7ad1SMaxime Ripard  - reset-names
780b2f7ad1SMaxime Ripard
790b2f7ad1SMaxime RipardadditionalProperties: false
800b2f7ad1SMaxime Ripard
810b2f7ad1SMaxime Ripardexamples:
820b2f7ad1SMaxime Ripard  - |
830b2f7ad1SMaxime Ripard    #include <dt-bindings/gpio/gpio.h>
840b2f7ad1SMaxime Ripard    #include <dt-bindings/clock/sun8i-a23-a33-ccu.h>
850b2f7ad1SMaxime Ripard    #include <dt-bindings/reset/sun8i-a23-a33-ccu.h>
860b2f7ad1SMaxime Ripard
870b2f7ad1SMaxime Ripard    phy@1c19400 {
880b2f7ad1SMaxime Ripard        #phy-cells = <1>;
890b2f7ad1SMaxime Ripard        compatible = "allwinner,sun8i-a23-usb-phy";
900b2f7ad1SMaxime Ripard        reg = <0x01c19400 0x10>, <0x01c1a800 0x4>;
910b2f7ad1SMaxime Ripard        reg-names = "phy_ctrl", "pmu1";
920b2f7ad1SMaxime Ripard        clocks = <&ccu CLK_USB_PHY0>,
930b2f7ad1SMaxime Ripard                 <&ccu CLK_USB_PHY1>;
940b2f7ad1SMaxime Ripard        clock-names = "usb0_phy",
950b2f7ad1SMaxime Ripard                      "usb1_phy";
960b2f7ad1SMaxime Ripard        resets = <&ccu RST_USB_PHY0>,
970b2f7ad1SMaxime Ripard                 <&ccu RST_USB_PHY1>;
980b2f7ad1SMaxime Ripard        reset-names = "usb0_reset",
990b2f7ad1SMaxime Ripard                      "usb1_reset";
1000b2f7ad1SMaxime Ripard        usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
1010b2f7ad1SMaxime Ripard        usb0_vbus_power-supply = <&usb_power_supply>;
1020b2f7ad1SMaxime Ripard        usb0_vbus-supply = <&reg_drivevbus>;
1030b2f7ad1SMaxime Ripard        usb1_vbus-supply = <&reg_usb1_vbus>;
1040b2f7ad1SMaxime Ripard    };
105