MediaTek MUSB DRD/OTG Controller

Schema identifier ($id): "http://devicetree.org/schemas/usb/mediatek,musb.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Min Guo <min.guo@mediatek.com>"

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^usb@[0-9a-f]+$"

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "mediatek,mt8516-musb", "mediatek,mt2701-musb", "mediatek,mt7623-musb"

Item 2

Exact value (const): "mediatek,mtk-musb"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Maximum number of items (maxItems): 1

interrupt-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "mc"

clocks — required here #

Array item rules (items) #

Item 1

The main/core clock

Item 2

The system bus clock

Item 3

The 48Mhz clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "main"

Item 2

Exact value (const): "mcu"

Item 3

Exact value (const): "univpll"

phys — required here #

Maximum number of items (maxItems): 1

usb-role-switch — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

Support role switch. See usb/generic.txt

Value type (type): "boolean"

dr_mode — not listed as required here #

Allowed values (enum): "host", "otg", "peripheral"

power-domains — not listed as required here #

A phandle to USB power domain node to control USB's MTCMOS

Maximum number of items (maxItems): 1

connector — not listed as required here #

Shared schema rule ($ref): /schemas/connector/usb-connector.yaml#

Connector for dual role switch

Value type (type): "object"

Property dependencies (dependencies) #

usb-role-switch — applies when this property is present #

Also requires: "connector"

connector — applies when this property is present #

Also requires: "usb-role-switch"

Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "phys", "clocks", "clock-names"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/mt2701-clk.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/power/mt2701-power.h>

usb@11200000 {
    compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb";
    reg = <0x11200000 0x1000>;
    interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
    interrupt-names = "mc";
    phys = <&u2port2 PHY_TYPE_USB2>;
    dr_mode = "otg";
    clocks = <&pericfg CLK_PERI_USB0>,
             <&pericfg CLK_PERI_USB0_MCU>,
             <&pericfg CLK_PERI_USB_SLV>;
    clock-names = "main","mcu","univpll";
    power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
    usb-role-switch;

    connector {
        compatible = "gpio-usb-b-connector", "usb-b-connector";
        type = "micro";
        id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
        vbus-supply = <&usb_vbus>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 2: Copyright (c) 2020 MediaTek

Edit this page