xref: /freebsd/sys/contrib/device-tree/Bindings/usb/mediatek,musb.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotMediaTek musb DRD/OTG controller
2*c66ec88fSEmmanuel Vadot-------------------------------------------
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotRequired properties:
5*c66ec88fSEmmanuel Vadot - compatible      : should be one of:
6*c66ec88fSEmmanuel Vadot                     "mediatek,mt2701-musb"
7*c66ec88fSEmmanuel Vadot                     ...
8*c66ec88fSEmmanuel Vadot                     followed by "mediatek,mtk-musb"
9*c66ec88fSEmmanuel Vadot - reg             : specifies physical base address and size of
10*c66ec88fSEmmanuel Vadot                     the registers
11*c66ec88fSEmmanuel Vadot - interrupts      : interrupt used by musb controller
12*c66ec88fSEmmanuel Vadot - interrupt-names : must be "mc"
13*c66ec88fSEmmanuel Vadot - phys            : PHY specifier for the OTG phy
14*c66ec88fSEmmanuel Vadot - dr_mode         : should be one of "host", "peripheral" or "otg",
15*c66ec88fSEmmanuel Vadot                     refer to usb/generic.txt
16*c66ec88fSEmmanuel Vadot - clocks          : a list of phandle + clock-specifier pairs, one for
17*c66ec88fSEmmanuel Vadot                     each entry in clock-names
18*c66ec88fSEmmanuel Vadot - clock-names     : must contain "main", "mcu", "univpll"
19*c66ec88fSEmmanuel Vadot                     for clocks of controller
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotOptional properties:
22*c66ec88fSEmmanuel Vadot - power-domains   : a phandle to USB power domain node to control USB's
23*c66ec88fSEmmanuel Vadot                     MTCMOS
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel VadotRequired child nodes:
26*c66ec88fSEmmanuel Vadot usb connector node as defined in bindings/connector/usb-connector.yaml
27*c66ec88fSEmmanuel VadotOptional properties:
28*c66ec88fSEmmanuel Vadot - id-gpios        : input GPIO for USB ID pin.
29*c66ec88fSEmmanuel Vadot - vbus-gpios      : input GPIO for USB VBUS pin.
30*c66ec88fSEmmanuel Vadot - vbus-supply     : reference to the VBUS regulator, needed when supports
31*c66ec88fSEmmanuel Vadot                     dual-role mode
32*c66ec88fSEmmanuel Vadot - usb-role-switch : use USB Role Switch to support dual-role switch, see
33*c66ec88fSEmmanuel Vadot                     usb/generic.txt.
34*c66ec88fSEmmanuel Vadot
35*c66ec88fSEmmanuel VadotExample:
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel Vadotusb2: usb@11200000 {
38*c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt2701-musb",
39*c66ec88fSEmmanuel Vadot		     "mediatek,mtk-musb";
40*c66ec88fSEmmanuel Vadot	reg = <0 0x11200000 0 0x1000>;
41*c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
42*c66ec88fSEmmanuel Vadot	interrupt-names = "mc";
43*c66ec88fSEmmanuel Vadot	phys = <&u2port2 PHY_TYPE_USB2>;
44*c66ec88fSEmmanuel Vadot	dr_mode = "otg";
45*c66ec88fSEmmanuel Vadot	clocks = <&pericfg CLK_PERI_USB0>,
46*c66ec88fSEmmanuel Vadot		 <&pericfg CLK_PERI_USB0_MCU>,
47*c66ec88fSEmmanuel Vadot		 <&pericfg CLK_PERI_USB_SLV>;
48*c66ec88fSEmmanuel Vadot	clock-names = "main","mcu","univpll";
49*c66ec88fSEmmanuel Vadot	power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
50*c66ec88fSEmmanuel Vadot	usb-role-switch;
51*c66ec88fSEmmanuel Vadot	connector{
52*c66ec88fSEmmanuel Vadot		compatible = "gpio-usb-b-connector", "usb-b-connector";
53*c66ec88fSEmmanuel Vadot		type = "micro";
54*c66ec88fSEmmanuel Vadot		id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
55*c66ec88fSEmmanuel Vadot		vbus-supply = <&usb_vbus>;
56*c66ec88fSEmmanuel Vadot	};
57*c66ec88fSEmmanuel Vadot};
58