MediaTek USB3 xHCI
Schema identifier ($id): "http://devicetree.org/schemas/usb/mediatek,mtk-xhci.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Chunfeng Yun <chunfeng.yun@mediatek.com>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):usb-xhci.yaml
There are two scenarios: case 1: only supports xHCI driver; case 2: supports dual-role mode, and the host is based on xHCI driver.
Properties and child nodes (properties) #
compatible — required here #
Array item rules (items) #
Item 1
Allowed values (
enum):"mediatek,mt2701-xhci","mediatek,mt2712-xhci","mediatek,mt7622-xhci","mediatek,mt7623-xhci","mediatek,mt7629-xhci","mediatek,mt7986-xhci","mediatek,mt7988-xhci","mediatek,mt8173-xhci","mediatek,mt8183-xhci","mediatek,mt8186-xhci","mediatek,mt8188-xhci","mediatek,mt8189-xhci","mediatek,mt8192-xhci","mediatek,mt8195-xhci","mediatek,mt8365-xhci"
Item 2
Exact value (
const):"mediatek,mtk-xhci"
reg — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
the registers of xHCI MAC
Item 2
the registers of IP Port Control
reg-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"mac"
Item 2
Exact value (
const):"ippc"
interrupts — required here #
use "interrupts-extended" when the interrupts are connected to the separate interrupt controllers
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
xHCI host controller interrupt
Item 2
optional, wakeup interrupt used to support runtime PM
interrupt-names — not listed as required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"host"
Item 2
Exact value (
const):"wakeup"
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
clocks — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Controller clock used by normal mode
Item 2
Reference clock used by low power mode etc
Item 3
Mcu bus clock for register access
Item 4
DMA bus clock for data transfer
Item 5
controller clock
Item 6
frame count clock
clock-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"sys_ck"
Item 2
Exact value (
const):"ref_ck"
Item 3
Exact value (
const):"mcu_ck"
Item 4
Exact value (
const):"dma_ck"
Item 5
Exact value (
const):"xhci_ck"
Item 6
Exact value (
const):"frmcnt_ck"
phys — not listed as required here #
List of all PHYs used on this HCD, it's better to keep PHYs in order as the hardware layout
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
USB2/HS PHY
Item 2
USB3/SS(P) PHY
Item 3
USB2/HS PHY
Item 4
USB3/SS(P) PHY
Item 5
USB2/HS PHY
Item 6
USB3/SS(P) PHY
Item 7
USB2/HS PHY
Item 8
USB3/SS(P) PHY
Item 9
USB2/HS PHY
port — not listed as required here #
Shared schema rule ($ref): /schemas/graph.yaml#/properties/port
Super Speed (SS) Output endpoint to a Type-C connector
vusb33-supply — not listed as required here #
Regulator of USB AVDD3.3v
vbus-supply — not listed as required here #
Regulator of USB VBUS5v
resets — not listed as required here #
Maximum number of items (maxItems): 1
usb3-lpm-capable — not listed as required here #
true — No constraints added by this property rule.
usb2-lpm-disable — not listed as required here #
true — No constraints added by this property rule.
imod-interval-ns — not listed as required here #
Interrupt moderation interval value, it is 8 times as much as that defined in the xHCI spec on MTK's controller.
Default value (default): 5000
rx-fifo-depth — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
It is a quirk used to work around Gen1 isoc-in endpoint transfer issue that still send out unexpected ACK after device finishes the burst transfer with a short packet and cause an exception, specially on a 4K camera device, it happens on controller before about IPM v1.6.0; the side-effect is that it may cause performance drop about 10%, including bulk transfer, prefer to use 3k here. The size is in bytes.
Allowed values (enum): 1024, 2048, 3072, 4096
wakeup-source — not listed as required here #
enable USB remote wakeup, see power/wakeup-source.txt
Value type (type): "boolean"
mediatek,syscon-wakeup — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array
Maximum number of items (maxItems): 1
A phandle to syscon used to access the register of the USB wakeup glue layer between xHCI and SPM, the field should always be 3 cells long.
Array item rules (items) #
Array item rules (
items)Item 1
The first cell represents a phandle to syscon
Item 2
The second cell represents the register base address of the glue layer in syscon
Item 3
The third cell represents the hardware version of the glue layer, 1 - used by mt8173 etc, revision 1 without following IPM rule; 2 - used by mt2712 etc, revision 2 following IPM rule; 101 - used by mt8183, specific 1.01; 102 - used by mt8192, specific 1.02; 103 - used by mt8195, IP0, specific 1.03; 104 - used by mt8195, IP1, specific 1.04; 105 - used by mt8195, IP2, specific 1.05; 106 - used by mt8195, IP3, specific 1.06; 110 - used by mt8189, IP4, specific 1.10;
Allowed values (
enum):1,2,101,102,103,104,105,106,110
mediatek,u3p-dis-msk — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
The mask to disable u3ports, bit0 for u3port0, bit1 for u3port1, ... etc
mediatek,u2p-dis-msk — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
The mask to disable u2ports, bit0 for u2port0, bit1 for u2port1, ... etc
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 0
Properties matching a name pattern (patternProperties) #
@[0-9a-f]{1}$ — name matches this regular expression #
Value type (type): "object"
The hard wired USB devices.
Property dependencies (dependencies) #
wakeup-source — applies when this property is present #
Also requires: "mediatek,syscon-wakeup"
Required in this object (required): "compatible", "reg", "reg-names", "interrupts", "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/mt8173-clk.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/mt8173-power.h>
usb@11270000 {
compatible = "mediatek,mt8173-xhci", "mediatek,mtk-xhci";
reg = <0x11270000 0x1000>, <0x11280700 0x0100>;
reg-names = "mac", "ippc";
interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_LOW>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_USB>;
clocks = <&topckgen CLK_TOP_USB30_SEL>, <&clk26m>;
clock-names = "sys_ck", "ref_ck";
phys = <&u3port0 PHY_TYPE_USB3>, <&u2port1 PHY_TYPE_USB2>;
vusb33-supply = <&mt6397_vusb_reg>;
vbus-supply = <&usb_p1_vbus>;
imod-interval-ns = <10000>;
mediatek,syscon-wakeup = <&pericfg 0x400 1>;
wakeup-source;
usb3-lpm-capable;
};
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
Line 22: common properties for both case 1 and case 2
Line 53: optional, only needed for case 1.
Line 87: required, the following ones are optional
Line 100: required, others are optional
Line 144: the following properties are only used for case 1