15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25def4c47SEmmanuel Vadot# Copyright (c) 2020 MediaTek 35def4c47SEmmanuel Vadot%YAML 1.2 45def4c47SEmmanuel Vadot--- 55def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/usb/mediatek,musb.yaml# 65def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 75def4c47SEmmanuel Vadot 87ef62cebSEmmanuel Vadottitle: MediaTek MUSB DRD/OTG Controller 95def4c47SEmmanuel Vadot 105def4c47SEmmanuel Vadotmaintainers: 115def4c47SEmmanuel Vadot - Min Guo <min.guo@mediatek.com> 125def4c47SEmmanuel Vadot 135def4c47SEmmanuel Vadotproperties: 145def4c47SEmmanuel Vadot $nodename: 155def4c47SEmmanuel Vadot pattern: '^usb@[0-9a-f]+$' 165def4c47SEmmanuel Vadot 175def4c47SEmmanuel Vadot compatible: 185def4c47SEmmanuel Vadot items: 195def4c47SEmmanuel Vadot - enum: 205def4c47SEmmanuel Vadot - mediatek,mt8516-musb 215def4c47SEmmanuel Vadot - mediatek,mt2701-musb 22354d7675SEmmanuel Vadot - mediatek,mt7623-musb 235def4c47SEmmanuel Vadot - const: mediatek,mtk-musb 245def4c47SEmmanuel Vadot 255def4c47SEmmanuel Vadot reg: 265def4c47SEmmanuel Vadot maxItems: 1 275def4c47SEmmanuel Vadot 285def4c47SEmmanuel Vadot interrupts: 295def4c47SEmmanuel Vadot maxItems: 1 305def4c47SEmmanuel Vadot 315def4c47SEmmanuel Vadot interrupt-names: 325def4c47SEmmanuel Vadot items: 335def4c47SEmmanuel Vadot - const: mc 345def4c47SEmmanuel Vadot 355def4c47SEmmanuel Vadot clocks: 365def4c47SEmmanuel Vadot items: 375def4c47SEmmanuel Vadot - description: The main/core clock 385def4c47SEmmanuel Vadot - description: The system bus clock 395def4c47SEmmanuel Vadot - description: The 48Mhz clock 405def4c47SEmmanuel Vadot 415def4c47SEmmanuel Vadot clock-names: 425def4c47SEmmanuel Vadot items: 435def4c47SEmmanuel Vadot - const: main 445def4c47SEmmanuel Vadot - const: mcu 455def4c47SEmmanuel Vadot - const: univpll 465def4c47SEmmanuel Vadot 475def4c47SEmmanuel Vadot phys: 485def4c47SEmmanuel Vadot maxItems: 1 495def4c47SEmmanuel Vadot 505def4c47SEmmanuel Vadot usb-role-switch: 515def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 525def4c47SEmmanuel Vadot description: Support role switch. See usb/generic.txt 535def4c47SEmmanuel Vadot type: boolean 545def4c47SEmmanuel Vadot 555def4c47SEmmanuel Vadot dr_mode: 565def4c47SEmmanuel Vadot enum: 575def4c47SEmmanuel Vadot - host 585def4c47SEmmanuel Vadot - otg 595def4c47SEmmanuel Vadot - peripheral 605def4c47SEmmanuel Vadot 615def4c47SEmmanuel Vadot power-domains: 625def4c47SEmmanuel Vadot description: A phandle to USB power domain node to control USB's MTCMOS 635def4c47SEmmanuel Vadot maxItems: 1 645def4c47SEmmanuel Vadot 655def4c47SEmmanuel Vadot connector: 66c9ccf3a3SEmmanuel Vadot $ref: /schemas/connector/usb-connector.yaml# 675def4c47SEmmanuel Vadot description: Connector for dual role switch 685def4c47SEmmanuel Vadot type: object 695def4c47SEmmanuel Vadot 705def4c47SEmmanuel Vadotdependencies: 71*fac71e4eSEmmanuel Vadot usb-role-switch: [ connector ] 72*fac71e4eSEmmanuel Vadot connector: [ usb-role-switch ] 735def4c47SEmmanuel Vadot 745def4c47SEmmanuel Vadotrequired: 755def4c47SEmmanuel Vadot - compatible 765def4c47SEmmanuel Vadot - reg 775def4c47SEmmanuel Vadot - interrupts 785def4c47SEmmanuel Vadot - interrupt-names 795def4c47SEmmanuel Vadot - phys 805def4c47SEmmanuel Vadot - clocks 815def4c47SEmmanuel Vadot - clock-names 825def4c47SEmmanuel Vadot 835def4c47SEmmanuel VadotadditionalProperties: false 845def4c47SEmmanuel Vadot 855def4c47SEmmanuel Vadotexamples: 865def4c47SEmmanuel Vadot - | 875def4c47SEmmanuel Vadot #include <dt-bindings/clock/mt2701-clk.h> 885def4c47SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 895def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 905def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 915def4c47SEmmanuel Vadot #include <dt-bindings/phy/phy.h> 925def4c47SEmmanuel Vadot #include <dt-bindings/power/mt2701-power.h> 935def4c47SEmmanuel Vadot 945def4c47SEmmanuel Vadot usb@11200000 { 955def4c47SEmmanuel Vadot compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb"; 965def4c47SEmmanuel Vadot reg = <0x11200000 0x1000>; 975def4c47SEmmanuel Vadot interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>; 985def4c47SEmmanuel Vadot interrupt-names = "mc"; 995def4c47SEmmanuel Vadot phys = <&u2port2 PHY_TYPE_USB2>; 1005def4c47SEmmanuel Vadot dr_mode = "otg"; 1015def4c47SEmmanuel Vadot clocks = <&pericfg CLK_PERI_USB0>, 1025def4c47SEmmanuel Vadot <&pericfg CLK_PERI_USB0_MCU>, 1035def4c47SEmmanuel Vadot <&pericfg CLK_PERI_USB_SLV>; 1045def4c47SEmmanuel Vadot clock-names = "main","mcu","univpll"; 1055def4c47SEmmanuel Vadot power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>; 1065def4c47SEmmanuel Vadot usb-role-switch; 1075def4c47SEmmanuel Vadot 1085def4c47SEmmanuel Vadot connector { 1095def4c47SEmmanuel Vadot compatible = "gpio-usb-b-connector", "usb-b-connector"; 1105def4c47SEmmanuel Vadot type = "micro"; 1115def4c47SEmmanuel Vadot id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; 1125def4c47SEmmanuel Vadot vbus-supply = <&usb_vbus>; 1135def4c47SEmmanuel Vadot }; 1145def4c47SEmmanuel Vadot }; 1155def4c47SEmmanuel Vadot... 116