1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2*c66ec88fSEmmanuel Vadot%YAML 1.2 3*c66ec88fSEmmanuel Vadot--- 4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/allwinner,sun8i-a23-usb-phy.yaml# 5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadottitle: Allwinner A23 USB PHY Device Tree Bindings 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel Vadotmaintainers: 10*c66ec88fSEmmanuel Vadot - Chen-Yu Tsai <wens@csie.org> 11*c66ec88fSEmmanuel Vadot - Maxime Ripard <mripard@kernel.org> 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel Vadotproperties: 14*c66ec88fSEmmanuel Vadot "#phy-cells": 15*c66ec88fSEmmanuel Vadot const: 1 16*c66ec88fSEmmanuel Vadot 17*c66ec88fSEmmanuel Vadot compatible: 18*c66ec88fSEmmanuel Vadot enum: 19*c66ec88fSEmmanuel Vadot - allwinner,sun8i-a23-usb-phy 20*c66ec88fSEmmanuel Vadot - allwinner,sun8i-a33-usb-phy 21*c66ec88fSEmmanuel Vadot 22*c66ec88fSEmmanuel Vadot reg: 23*c66ec88fSEmmanuel Vadot items: 24*c66ec88fSEmmanuel Vadot - description: PHY Control registers 25*c66ec88fSEmmanuel Vadot - description: PHY PMU1 registers 26*c66ec88fSEmmanuel Vadot 27*c66ec88fSEmmanuel Vadot reg-names: 28*c66ec88fSEmmanuel Vadot items: 29*c66ec88fSEmmanuel Vadot - const: phy_ctrl 30*c66ec88fSEmmanuel Vadot - const: pmu1 31*c66ec88fSEmmanuel Vadot 32*c66ec88fSEmmanuel Vadot clocks: 33*c66ec88fSEmmanuel Vadot items: 34*c66ec88fSEmmanuel Vadot - description: USB OTG PHY bus clock 35*c66ec88fSEmmanuel Vadot - description: USB Host 0 PHY bus clock 36*c66ec88fSEmmanuel Vadot 37*c66ec88fSEmmanuel Vadot clock-names: 38*c66ec88fSEmmanuel Vadot items: 39*c66ec88fSEmmanuel Vadot - const: usb0_phy 40*c66ec88fSEmmanuel Vadot - const: usb1_phy 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot resets: 43*c66ec88fSEmmanuel Vadot items: 44*c66ec88fSEmmanuel Vadot - description: USB OTG reset 45*c66ec88fSEmmanuel Vadot - description: USB Host 1 Controller reset 46*c66ec88fSEmmanuel Vadot 47*c66ec88fSEmmanuel Vadot reset-names: 48*c66ec88fSEmmanuel Vadot items: 49*c66ec88fSEmmanuel Vadot - const: usb0_reset 50*c66ec88fSEmmanuel Vadot - const: usb1_reset 51*c66ec88fSEmmanuel Vadot 52*c66ec88fSEmmanuel Vadot usb0_id_det-gpios: 53*c66ec88fSEmmanuel Vadot description: GPIO to the USB OTG ID pin 54*c66ec88fSEmmanuel Vadot 55*c66ec88fSEmmanuel Vadot usb0_vbus_det-gpios: 56*c66ec88fSEmmanuel Vadot description: GPIO to the USB OTG VBUS detect pin 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot usb0_vbus_power-supply: 59*c66ec88fSEmmanuel Vadot description: Power supply to detect the USB OTG VBUS 60*c66ec88fSEmmanuel Vadot 61*c66ec88fSEmmanuel Vadot usb0_vbus-supply: 62*c66ec88fSEmmanuel Vadot description: Regulator controlling USB OTG VBUS 63*c66ec88fSEmmanuel Vadot 64*c66ec88fSEmmanuel Vadot usb1_vbus-supply: 65*c66ec88fSEmmanuel Vadot description: Regulator controlling USB1 Host controller 66*c66ec88fSEmmanuel Vadot 67*c66ec88fSEmmanuel Vadotrequired: 68*c66ec88fSEmmanuel Vadot - "#phy-cells" 69*c66ec88fSEmmanuel Vadot - compatible 70*c66ec88fSEmmanuel Vadot - clocks 71*c66ec88fSEmmanuel Vadot - clock-names 72*c66ec88fSEmmanuel Vadot - reg 73*c66ec88fSEmmanuel Vadot - reg-names 74*c66ec88fSEmmanuel Vadot - resets 75*c66ec88fSEmmanuel Vadot - reset-names 76*c66ec88fSEmmanuel Vadot 77*c66ec88fSEmmanuel VadotadditionalProperties: false 78*c66ec88fSEmmanuel Vadot 79*c66ec88fSEmmanuel Vadotexamples: 80*c66ec88fSEmmanuel Vadot - | 81*c66ec88fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 82*c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/sun8i-a23-a33-ccu.h> 83*c66ec88fSEmmanuel Vadot #include <dt-bindings/reset/sun8i-a23-a33-ccu.h> 84*c66ec88fSEmmanuel Vadot 85*c66ec88fSEmmanuel Vadot phy@1c19400 { 86*c66ec88fSEmmanuel Vadot #phy-cells = <1>; 87*c66ec88fSEmmanuel Vadot compatible = "allwinner,sun8i-a23-usb-phy"; 88*c66ec88fSEmmanuel Vadot reg = <0x01c19400 0x10>, <0x01c1a800 0x4>; 89*c66ec88fSEmmanuel Vadot reg-names = "phy_ctrl", "pmu1"; 90*c66ec88fSEmmanuel Vadot clocks = <&ccu CLK_USB_PHY0>, 91*c66ec88fSEmmanuel Vadot <&ccu CLK_USB_PHY1>; 92*c66ec88fSEmmanuel Vadot clock-names = "usb0_phy", 93*c66ec88fSEmmanuel Vadot "usb1_phy"; 94*c66ec88fSEmmanuel Vadot resets = <&ccu RST_USB_PHY0>, 95*c66ec88fSEmmanuel Vadot <&ccu RST_USB_PHY1>; 96*c66ec88fSEmmanuel Vadot reset-names = "usb0_reset", 97*c66ec88fSEmmanuel Vadot "usb1_reset"; 98*c66ec88fSEmmanuel Vadot usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ 99*c66ec88fSEmmanuel Vadot usb0_vbus_power-supply = <&usb_power_supply>; 100*c66ec88fSEmmanuel Vadot usb0_vbus-supply = <®_drivevbus>; 101*c66ec88fSEmmanuel Vadot usb1_vbus-supply = <®_usb1_vbus>; 102*c66ec88fSEmmanuel Vadot }; 103