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