1*f9924cafSChunfeng Yun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*f9924cafSChunfeng Yun# Copyright (c) 2020 MediaTek 3*f9924cafSChunfeng Yun%YAML 1.2 4*f9924cafSChunfeng Yun--- 5*f9924cafSChunfeng Yun$id: http://devicetree.org/schemas/usb/mediatek,musb.yaml# 6*f9924cafSChunfeng Yun$schema: http://devicetree.org/meta-schemas/core.yaml# 7*f9924cafSChunfeng Yun 8*f9924cafSChunfeng Yuntitle: MediaTek MUSB DRD/OTG Controller Device Tree Bindings 9*f9924cafSChunfeng Yun 10*f9924cafSChunfeng Yunmaintainers: 11*f9924cafSChunfeng Yun - Min Guo <min.guo@mediatek.com> 12*f9924cafSChunfeng Yun 13*f9924cafSChunfeng Yunproperties: 14*f9924cafSChunfeng Yun $nodename: 15*f9924cafSChunfeng Yun pattern: '^usb@[0-9a-f]+$' 16*f9924cafSChunfeng Yun 17*f9924cafSChunfeng Yun compatible: 18*f9924cafSChunfeng Yun items: 19*f9924cafSChunfeng Yun - enum: 20*f9924cafSChunfeng Yun - mediatek,mt2701-musb 21*f9924cafSChunfeng Yun - const: mediatek,mtk-musb 22*f9924cafSChunfeng Yun 23*f9924cafSChunfeng Yun reg: 24*f9924cafSChunfeng Yun maxItems: 1 25*f9924cafSChunfeng Yun 26*f9924cafSChunfeng Yun interrupts: 27*f9924cafSChunfeng Yun maxItems: 1 28*f9924cafSChunfeng Yun 29*f9924cafSChunfeng Yun interrupt-names: 30*f9924cafSChunfeng Yun items: 31*f9924cafSChunfeng Yun - const: mc 32*f9924cafSChunfeng Yun 33*f9924cafSChunfeng Yun clocks: 34*f9924cafSChunfeng Yun items: 35*f9924cafSChunfeng Yun - description: The main/core clock 36*f9924cafSChunfeng Yun - description: The system bus clock 37*f9924cafSChunfeng Yun - description: The 48Mhz clock 38*f9924cafSChunfeng Yun 39*f9924cafSChunfeng Yun clock-names: 40*f9924cafSChunfeng Yun items: 41*f9924cafSChunfeng Yun - const: main 42*f9924cafSChunfeng Yun - const: mcu 43*f9924cafSChunfeng Yun - const: univpll 44*f9924cafSChunfeng Yun 45*f9924cafSChunfeng Yun phys: 46*f9924cafSChunfeng Yun maxItems: 1 47*f9924cafSChunfeng Yun 48*f9924cafSChunfeng Yun usb-role-switch: 49*f9924cafSChunfeng Yun $ref: /schemas/types.yaml#/definitions/flag 50*f9924cafSChunfeng Yun description: Support role switch. See usb/generic.txt 51*f9924cafSChunfeng Yun type: boolean 52*f9924cafSChunfeng Yun 53*f9924cafSChunfeng Yun dr_mode: 54*f9924cafSChunfeng Yun enum: 55*f9924cafSChunfeng Yun - host 56*f9924cafSChunfeng Yun - otg 57*f9924cafSChunfeng Yun - peripheral 58*f9924cafSChunfeng Yun 59*f9924cafSChunfeng Yun power-domains: 60*f9924cafSChunfeng Yun description: A phandle to USB power domain node to control USB's MTCMOS 61*f9924cafSChunfeng Yun maxItems: 1 62*f9924cafSChunfeng Yun 63*f9924cafSChunfeng Yun connector: 64*f9924cafSChunfeng Yun $ref: /connector/usb-connector.yaml# 65*f9924cafSChunfeng Yun description: Connector for dual role switch 66*f9924cafSChunfeng Yun type: object 67*f9924cafSChunfeng Yun 68*f9924cafSChunfeng Yundependencies: 69*f9924cafSChunfeng Yun usb-role-switch: [ 'connector' ] 70*f9924cafSChunfeng Yun connector: [ 'usb-role-switch' ] 71*f9924cafSChunfeng Yun 72*f9924cafSChunfeng Yunrequired: 73*f9924cafSChunfeng Yun - compatible 74*f9924cafSChunfeng Yun - reg 75*f9924cafSChunfeng Yun - interrupts 76*f9924cafSChunfeng Yun - interrupt-names 77*f9924cafSChunfeng Yun - phys 78*f9924cafSChunfeng Yun - clocks 79*f9924cafSChunfeng Yun - clock-names 80*f9924cafSChunfeng Yun 81*f9924cafSChunfeng YunadditionalProperties: false 82*f9924cafSChunfeng Yun 83*f9924cafSChunfeng Yunexamples: 84*f9924cafSChunfeng Yun - | 85*f9924cafSChunfeng Yun #include <dt-bindings/clock/mt2701-clk.h> 86*f9924cafSChunfeng Yun #include <dt-bindings/gpio/gpio.h> 87*f9924cafSChunfeng Yun #include <dt-bindings/interrupt-controller/arm-gic.h> 88*f9924cafSChunfeng Yun #include <dt-bindings/interrupt-controller/irq.h> 89*f9924cafSChunfeng Yun #include <dt-bindings/phy/phy.h> 90*f9924cafSChunfeng Yun #include <dt-bindings/power/mt2701-power.h> 91*f9924cafSChunfeng Yun 92*f9924cafSChunfeng Yun usb@11200000 { 93*f9924cafSChunfeng Yun compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb"; 94*f9924cafSChunfeng Yun reg = <0x11200000 0x1000>; 95*f9924cafSChunfeng Yun interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>; 96*f9924cafSChunfeng Yun interrupt-names = "mc"; 97*f9924cafSChunfeng Yun phys = <&u2port2 PHY_TYPE_USB2>; 98*f9924cafSChunfeng Yun dr_mode = "otg"; 99*f9924cafSChunfeng Yun clocks = <&pericfg CLK_PERI_USB0>, 100*f9924cafSChunfeng Yun <&pericfg CLK_PERI_USB0_MCU>, 101*f9924cafSChunfeng Yun <&pericfg CLK_PERI_USB_SLV>; 102*f9924cafSChunfeng Yun clock-names = "main","mcu","univpll"; 103*f9924cafSChunfeng Yun power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>; 104*f9924cafSChunfeng Yun usb-role-switch; 105*f9924cafSChunfeng Yun 106*f9924cafSChunfeng Yun connector { 107*f9924cafSChunfeng Yun compatible = "gpio-usb-b-connector", "usb-b-connector"; 108*f9924cafSChunfeng Yun type = "micro"; 109*f9924cafSChunfeng Yun id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; 110*f9924cafSChunfeng Yun vbus-supply = <&usb_vbus>; 111*f9924cafSChunfeng Yun }; 112*f9924cafSChunfeng Yun }; 113*f9924cafSChunfeng Yun... 114