1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/allwinner,sun8i-h3-usb-phy.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Allwinner H3 USB PHY 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel Vadotproperties: 14c66ec88fSEmmanuel Vadot "#phy-cells": 15c66ec88fSEmmanuel Vadot const: 1 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel Vadot compatible: 185956d97fSEmmanuel Vadot enum: 195956d97fSEmmanuel Vadot - allwinner,sun8i-h3-usb-phy 205956d97fSEmmanuel Vadot - allwinner,sun50i-h616-usb-phy 21c66ec88fSEmmanuel Vadot 22c66ec88fSEmmanuel Vadot reg: 23c66ec88fSEmmanuel Vadot items: 24c66ec88fSEmmanuel Vadot - description: PHY Control registers 25c66ec88fSEmmanuel Vadot - description: PHY PMU0 registers 26c66ec88fSEmmanuel Vadot - description: PHY PMU1 registers 27c66ec88fSEmmanuel Vadot - description: PHY PMU2 registers 28c66ec88fSEmmanuel Vadot - description: PHY PMU3 registers 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel Vadot reg-names: 31c66ec88fSEmmanuel Vadot items: 32c66ec88fSEmmanuel Vadot - const: phy_ctrl 33c66ec88fSEmmanuel Vadot - const: pmu0 34c66ec88fSEmmanuel Vadot - const: pmu1 35c66ec88fSEmmanuel Vadot - const: pmu2 36c66ec88fSEmmanuel Vadot - const: pmu3 37c66ec88fSEmmanuel Vadot 38c66ec88fSEmmanuel Vadot clocks: 39*8bab661aSEmmanuel Vadot minItems: 4 40c66ec88fSEmmanuel Vadot items: 41c66ec88fSEmmanuel Vadot - description: USB OTG PHY bus clock 42c66ec88fSEmmanuel Vadot - description: USB Host 0 PHY bus clock 43c66ec88fSEmmanuel Vadot - description: USB Host 1 PHY bus clock 44c66ec88fSEmmanuel Vadot - description: USB Host 2 PHY bus clock 45*8bab661aSEmmanuel Vadot - description: PMU clock for host port 2 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel Vadot clock-names: 48*8bab661aSEmmanuel Vadot minItems: 4 49c66ec88fSEmmanuel Vadot items: 50c66ec88fSEmmanuel Vadot - const: usb0_phy 51c66ec88fSEmmanuel Vadot - const: usb1_phy 52c66ec88fSEmmanuel Vadot - const: usb2_phy 53c66ec88fSEmmanuel Vadot - const: usb3_phy 54*8bab661aSEmmanuel Vadot - const: pmu2_clk 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot resets: 57c66ec88fSEmmanuel Vadot items: 58c66ec88fSEmmanuel Vadot - description: USB OTG reset 59c66ec88fSEmmanuel Vadot - description: USB Host 1 Controller reset 60c66ec88fSEmmanuel Vadot - description: USB Host 2 Controller reset 61c66ec88fSEmmanuel Vadot - description: USB Host 3 Controller reset 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot reset-names: 64c66ec88fSEmmanuel Vadot items: 65c66ec88fSEmmanuel Vadot - const: usb0_reset 66c66ec88fSEmmanuel Vadot - const: usb1_reset 67c66ec88fSEmmanuel Vadot - const: usb2_reset 68c66ec88fSEmmanuel Vadot - const: usb3_reset 69c66ec88fSEmmanuel Vadot 70c66ec88fSEmmanuel Vadot usb0_id_det-gpios: 715def4c47SEmmanuel Vadot maxItems: 1 72c66ec88fSEmmanuel Vadot description: GPIO to the USB OTG ID pin 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot usb0_vbus_det-gpios: 755def4c47SEmmanuel Vadot maxItems: 1 76c66ec88fSEmmanuel Vadot description: GPIO to the USB OTG VBUS detect pin 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot usb0_vbus_power-supply: 79c66ec88fSEmmanuel Vadot description: Power supply to detect the USB OTG VBUS 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot usb0_vbus-supply: 82c66ec88fSEmmanuel Vadot description: Regulator controlling USB OTG VBUS 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot usb1_vbus-supply: 85c66ec88fSEmmanuel Vadot description: Regulator controlling USB1 Host controller 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot usb2_vbus-supply: 88c66ec88fSEmmanuel Vadot description: Regulator controlling USB2 Host controller 89c66ec88fSEmmanuel Vadot 90c66ec88fSEmmanuel Vadot usb3_vbus-supply: 91c66ec88fSEmmanuel Vadot description: Regulator controlling USB3 Host controller 92c66ec88fSEmmanuel Vadot 93c66ec88fSEmmanuel Vadotrequired: 94c66ec88fSEmmanuel Vadot - "#phy-cells" 95c66ec88fSEmmanuel Vadot - compatible 96c66ec88fSEmmanuel Vadot - clocks 97c66ec88fSEmmanuel Vadot - clock-names 98c66ec88fSEmmanuel Vadot - reg 99c66ec88fSEmmanuel Vadot - reg-names 100c66ec88fSEmmanuel Vadot - resets 101c66ec88fSEmmanuel Vadot - reset-names 102c66ec88fSEmmanuel Vadot 103*8bab661aSEmmanuel VadotallOf: 104*8bab661aSEmmanuel Vadot - if: 105*8bab661aSEmmanuel Vadot properties: 106*8bab661aSEmmanuel Vadot compatible: 107*8bab661aSEmmanuel Vadot contains: 108*8bab661aSEmmanuel Vadot enum: 109*8bab661aSEmmanuel Vadot - allwinner,sun50i-h616-usb-phy 110*8bab661aSEmmanuel Vadot then: 111*8bab661aSEmmanuel Vadot properties: 112*8bab661aSEmmanuel Vadot clocks: 113*8bab661aSEmmanuel Vadot minItems: 5 114*8bab661aSEmmanuel Vadot 115*8bab661aSEmmanuel Vadot clock-names: 116*8bab661aSEmmanuel Vadot minItems: 5 117*8bab661aSEmmanuel Vadot else: 118*8bab661aSEmmanuel Vadot properties: 119*8bab661aSEmmanuel Vadot clocks: 120*8bab661aSEmmanuel Vadot maxItems: 4 121*8bab661aSEmmanuel Vadot 122*8bab661aSEmmanuel Vadot clock-names: 123*8bab661aSEmmanuel Vadot maxItems: 4 124*8bab661aSEmmanuel Vadot 125c66ec88fSEmmanuel VadotadditionalProperties: false 126c66ec88fSEmmanuel Vadot 127c66ec88fSEmmanuel Vadotexamples: 128c66ec88fSEmmanuel Vadot - | 129c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 130c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun8i-h3-ccu.h> 131c66ec88fSEmmanuel Vadot #include <dt-bindings/reset/sun8i-h3-ccu.h> 132c66ec88fSEmmanuel Vadot 133c66ec88fSEmmanuel Vadot phy@1c19400 { 134c66ec88fSEmmanuel Vadot #phy-cells = <1>; 135c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-h3-usb-phy"; 136c66ec88fSEmmanuel Vadot reg = <0x01c19400 0x2c>, 137c66ec88fSEmmanuel Vadot <0x01c1a800 0x4>, 138c66ec88fSEmmanuel Vadot <0x01c1b800 0x4>, 139c66ec88fSEmmanuel Vadot <0x01c1c800 0x4>, 140c66ec88fSEmmanuel Vadot <0x01c1d800 0x4>; 141c66ec88fSEmmanuel Vadot reg-names = "phy_ctrl", 142c66ec88fSEmmanuel Vadot "pmu0", 143c66ec88fSEmmanuel Vadot "pmu1", 144c66ec88fSEmmanuel Vadot "pmu2", 145c66ec88fSEmmanuel Vadot "pmu3"; 146c66ec88fSEmmanuel Vadot clocks = <&ccu CLK_USB_PHY0>, 147c66ec88fSEmmanuel Vadot <&ccu CLK_USB_PHY1>, 148c66ec88fSEmmanuel Vadot <&ccu CLK_USB_PHY2>, 149c66ec88fSEmmanuel Vadot <&ccu CLK_USB_PHY3>; 150c66ec88fSEmmanuel Vadot clock-names = "usb0_phy", 151c66ec88fSEmmanuel Vadot "usb1_phy", 152c66ec88fSEmmanuel Vadot "usb2_phy", 153c66ec88fSEmmanuel Vadot "usb3_phy"; 154c66ec88fSEmmanuel Vadot resets = <&ccu RST_USB_PHY0>, 155c66ec88fSEmmanuel Vadot <&ccu RST_USB_PHY1>, 156c66ec88fSEmmanuel Vadot <&ccu RST_USB_PHY2>, 157c66ec88fSEmmanuel Vadot <&ccu RST_USB_PHY3>; 158c66ec88fSEmmanuel Vadot reset-names = "usb0_reset", 159c66ec88fSEmmanuel Vadot "usb1_reset", 160c66ec88fSEmmanuel Vadot "usb2_reset", 161c66ec88fSEmmanuel Vadot "usb3_reset"; 162c66ec88fSEmmanuel Vadot usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 163c66ec88fSEmmanuel Vadot usb0_vbus-supply = <®_usb0_vbus>; 164c66ec88fSEmmanuel Vadot usb1_vbus-supply = <®_usb1_vbus>; 165c66ec88fSEmmanuel Vadot usb2_vbus-supply = <®_usb2_vbus>; 166c66ec88fSEmmanuel Vadot usb3_vbus-supply = <®_usb3_vbus>; 167c66ec88fSEmmanuel Vadot }; 168