Amlogic Meson G12A DWC3 USB SoC Controller Glue
Schema identifier ($id): "http://devicetree.org/schemas/usb/amlogic,meson-g12a-usb-ctrl.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Neil Armstrong <neil.armstrong@linaro.org>"
The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3 in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode only.
A glue connects the DWC3 core to USB2 PHYs and optionally to an USB3 PHY.
One of the USB2 PHYs can be re-routed in peripheral mode to a DWC2 USB IP.
The DWC3 Glue controls the PHY routing and power, an interrupt line is connected to the Glue to serve as OTG ID change detection.
The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in host-only mode.
The Amlogic GXL, GXM & AXG SoCs doesn't embed an USB3 PHY.
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "amlogic,meson-gxl-usb-ctrl", "amlogic,meson-gxm-usb-ctrl", "amlogic,meson-axg-usb-ctrl", "amlogic,meson-g12a-usb-ctrl", "amlogic,meson-a1-usb-ctrl"
ranges — required here #
true — No constraints added by this property rule.
#address-cells — required here #
#size-cells — required here #
clocks — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 3
clock-names — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 3
resets — required here #
Minimum number of items (minItems): 1
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
phy-names — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 3
phys — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 3
dr_mode — required here #
true — No constraints added by this property rule.
power-domains — not listed as required here #
Maximum number of items (maxItems): 1
vbus-supply — not listed as required here #
VBUS power supply when used in OTG switchable mode
Properties matching a name pattern (patternProperties) #
^usb@[0-9a-f]+$ — name matches this regular expression #
Exactly one of these rules must match (oneOf) #
Rule 1
Shared schema rule (
$ref):dwc2.yaml#
Rule 2
Shared schema rule (
$ref):snps,dwc3.yaml#
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "#address-cells", "#size-cells", "ranges", "clocks", "resets", "reg", "interrupts", "phy-names", "phys", "dr_mode"
All of these rules must match (allOf) #
Rule 1 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
phy-names— not listed as required hereMinimum number of items (
minItems):2Array item rules (
items)Item 1
Exact value (
const):"usb2-phy0"Item 2
Exact value (
const):"usb2-phy1"Item 3
Exact value (
const):"usb3-phy0"
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):2
clock-names— required hereArray item rules (
items)Item 1
Exact value (
const):"usb_ctrl"Item 2
Exact value (
const):"ddr"
phy-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"usb2-phy0"Item 2
Exact value (
const):"usb2-phy1"
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
clocks— not listed as required hereMinimum number of items (
minItems):2
clock-names— required hereArray item rules (
items)Item 1
Exact value (
const):"usb_ctrl"Item 2
Exact value (
const):"ddr"
phy-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"usb2-phy0"Item 2
Exact value (
const):"usb2-phy1"Item 3
Exact value (
const):"usb2-phy2"
Rule 4 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
phy-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"usb2-phy1"
clocks— not listed as required hereMinimum number of items (
minItems):2
clock-names— required hereArray item rules (
items)Item 1
Exact value (
const):"usb_ctrl"Item 2
Exact value (
const):"ddr"
Rule 5 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereWhen the condition matches (
then) #Properties and child nodes (
properties)
phy-names— not listed as required hereArray item rules (
items)Item 1
Exact value (
const):"usb2-phy1"
clocks— not listed as required hereMinimum number of items (
minItems):3
clock-names— required hereArray item rules (
items)Item 1
Exact value (
const):"usb_ctrl"Item 2
Exact value (
const):"usb_bus"Item 3
Exact value (
const):"xtal_usb_ctrl"
Examples (examples) #
usb: usb@ffe09000 {
compatible = "amlogic,meson-g12a-usb-ctrl";
reg = <0xffe09000 0xa0>;
interrupts = <16>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
clocks = <&clkc_usb>;
resets = <&reset_usb>;
dr_mode = "otg";
phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>;
phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0";
dwc2: usb@ff400000 {
compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
reg = <0xff400000 0x40000>;
interrupts = <31>;
clocks = <&clkc_usb1>;
clock-names = "otg";
phys = <&usb2_phy1>;
dr_mode = "peripheral";
g-rx-fifo-size = <192>;
g-np-tx-fifo-size = <128>;
g-tx-fifo-size = <128 128 16 16 16>;
};
dwc3: usb@ff500000 {
compatible = "snps,dwc3";
reg = <0xff500000 0x100000>;
interrupts = <30>;
dr_mode = "host";
snps,dis_u2_susphy_quirk;
snps,quirk-frame-length-adjustment = <0x20>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 2: Copyright 2019 BayLibre, SAS
Line 113: USB2 PHY0 if USBHOST_A port is used
Line 114: USB2 PHY1 if USBOTG_B port is used
Line 115: USB3 PHY if USB3_0 is used
Line 132: USB2 PHY0 if USBHOST_A port is used
Line 133: USB2 PHY1 if USBOTG_B port is used
Line 152: USB2 PHY0 if USBHOST_A port is used
Line 153: USB2 PHY1 if USBOTG_B port is used
Line 154: USB2 PHY2 if USBOTG_C port is used
Line 168: USB2 PHY1 if USBOTG_B port is used
Line 187: USB2 PHY1 if USBOTG_B port is used