16aec9751SNeil Armstrong# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 26aec9751SNeil Armstrong# Copyright 2019 BayLibre, SAS 36aec9751SNeil Armstrong%YAML 1.2 46aec9751SNeil Armstrong--- 56aec9751SNeil Armstrong$id: "http://devicetree.org/schemas/usb/amlogic,meson-g12a-usb-ctrl.yaml#" 66aec9751SNeil Armstrong$schema: "http://devicetree.org/meta-schemas/core.yaml#" 76aec9751SNeil Armstrong 86aec9751SNeil Armstrongtitle: Amlogic Meson G12A DWC3 USB SoC Controller Glue 96aec9751SNeil Armstrong 106aec9751SNeil Armstrongmaintainers: 116aec9751SNeil Armstrong - Neil Armstrong <narmstrong@baylibre.com> 126aec9751SNeil Armstrong 136aec9751SNeil Armstrongdescription: | 146aec9751SNeil Armstrong The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3 156aec9751SNeil Armstrong in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode 166aec9751SNeil Armstrong only. 176aec9751SNeil Armstrong 186aec9751SNeil Armstrong A glue connects the DWC3 core to USB2 PHYs and optionally to an USB3 PHY. 196aec9751SNeil Armstrong 206aec9751SNeil Armstrong One of the USB2 PHYs can be re-routed in peripheral mode to a DWC2 USB IP. 216aec9751SNeil Armstrong 226aec9751SNeil Armstrong The DWC3 Glue controls the PHY routing and power, an interrupt line is 236aec9751SNeil Armstrong connected to the Glue to serve as OTG ID change detection. 246aec9751SNeil Armstrong 258dcb5a11SHanjie Lin The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in 268dcb5a11SHanjie Lin host-only mode. 278dcb5a11SHanjie Lin 28*cdff2c94SNeil Armstrong The Amlogic GXL, GXM & AXG SoCs doesn't embed an USB3 PHY. 298f385b67SNeil Armstrong 306aec9751SNeil Armstrongproperties: 316aec9751SNeil Armstrong compatible: 326aec9751SNeil Armstrong enum: 338f385b67SNeil Armstrong - amlogic,meson-gxl-usb-ctrl 348f385b67SNeil Armstrong - amlogic,meson-gxm-usb-ctrl 35*cdff2c94SNeil Armstrong - amlogic,meson-axg-usb-ctrl 366aec9751SNeil Armstrong - amlogic,meson-g12a-usb-ctrl 378dcb5a11SHanjie Lin - amlogic,meson-a1-usb-ctrl 386aec9751SNeil Armstrong 396aec9751SNeil Armstrong ranges: true 406aec9751SNeil Armstrong 416aec9751SNeil Armstrong "#address-cells": 426aec9751SNeil Armstrong enum: [ 1, 2 ] 436aec9751SNeil Armstrong 446aec9751SNeil Armstrong "#size-cells": 456aec9751SNeil Armstrong enum: [ 1, 2 ] 466aec9751SNeil Armstrong 476aec9751SNeil Armstrong clocks: 486aec9751SNeil Armstrong minItems: 1 498f385b67SNeil Armstrong maxItems: 3 508f385b67SNeil Armstrong 518f385b67SNeil Armstrong clock-names: 528f385b67SNeil Armstrong minItems: 1 538f385b67SNeil Armstrong maxItems: 3 546aec9751SNeil Armstrong 556aec9751SNeil Armstrong resets: 566aec9751SNeil Armstrong minItems: 1 576aec9751SNeil Armstrong 586aec9751SNeil Armstrong reg: 596aec9751SNeil Armstrong maxItems: 1 606aec9751SNeil Armstrong 616aec9751SNeil Armstrong interrupts: 626aec9751SNeil Armstrong maxItems: 1 636aec9751SNeil Armstrong 646aec9751SNeil Armstrong phy-names: 658f385b67SNeil Armstrong minItems: 1 668f385b67SNeil Armstrong maxItems: 3 676aec9751SNeil Armstrong 686aec9751SNeil Armstrong phys: 696aec9751SNeil Armstrong minItems: 1 706aec9751SNeil Armstrong maxItems: 3 716aec9751SNeil Armstrong 726aec9751SNeil Armstrong dr_mode: true 736aec9751SNeil Armstrong 746aec9751SNeil Armstrong power-domains: 756aec9751SNeil Armstrong maxItems: 1 766aec9751SNeil Armstrong 776aec9751SNeil Armstrong vbus-supply: 786aec9751SNeil Armstrong description: VBUS power supply when used in OTG switchable mode 796aec9751SNeil Armstrong 806aec9751SNeil ArmstrongpatternProperties: 816aec9751SNeil Armstrong "^usb@[0-9a-f]+$": 826aec9751SNeil Armstrong type: object 836aec9751SNeil Armstrong 846aec9751SNeil ArmstrongadditionalProperties: false 856aec9751SNeil Armstrong 866aec9751SNeil Armstrongrequired: 876aec9751SNeil Armstrong - compatible 886aec9751SNeil Armstrong - "#address-cells" 896aec9751SNeil Armstrong - "#size-cells" 906aec9751SNeil Armstrong - ranges 916aec9751SNeil Armstrong - clocks 926aec9751SNeil Armstrong - resets 936aec9751SNeil Armstrong - reg 946aec9751SNeil Armstrong - interrupts 956aec9751SNeil Armstrong - phy-names 966aec9751SNeil Armstrong - phys 976aec9751SNeil Armstrong - dr_mode 986aec9751SNeil Armstrong 998dcb5a11SHanjie LinallOf: 1008dcb5a11SHanjie Lin - if: 1018dcb5a11SHanjie Lin properties: 1028dcb5a11SHanjie Lin compatible: 1038dcb5a11SHanjie Lin enum: 1048f385b67SNeil Armstrong - amlogic,meson-g12a-usb-ctrl 1058f385b67SNeil Armstrong 1068f385b67SNeil Armstrong then: 1078f385b67SNeil Armstrong properties: 1088f385b67SNeil Armstrong phy-names: 1098f385b67SNeil Armstrong items: 1108f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 1118f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 1128f385b67SNeil Armstrong - const: usb3-phy0 # USB3 PHY if USB3_0 is used 1138f385b67SNeil Armstrong - if: 1148f385b67SNeil Armstrong properties: 1158f385b67SNeil Armstrong compatible: 1168f385b67SNeil Armstrong enum: 1178f385b67SNeil Armstrong - amlogic,meson-gxl-usb-ctrl 1188f385b67SNeil Armstrong 1198f385b67SNeil Armstrong then: 1208f385b67SNeil Armstrong properties: 1218f385b67SNeil Armstrong clocks: 1228f385b67SNeil Armstrong minItems: 2 1238f385b67SNeil Armstrong clock-names: 1248f385b67SNeil Armstrong items: 1258f385b67SNeil Armstrong - const: usb_ctrl 1268f385b67SNeil Armstrong - const: ddr 1278f385b67SNeil Armstrong phy-names: 1288f385b67SNeil Armstrong items: 1298f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 1308f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 1318f385b67SNeil Armstrong required: 1328f385b67SNeil Armstrong - clock-names 1338f385b67SNeil Armstrong - if: 1348f385b67SNeil Armstrong properties: 1358f385b67SNeil Armstrong compatible: 1368f385b67SNeil Armstrong enum: 1378f385b67SNeil Armstrong - amlogic,meson-gxm-usb-ctrl 1388f385b67SNeil Armstrong 1398f385b67SNeil Armstrong then: 1408f385b67SNeil Armstrong properties: 1418f385b67SNeil Armstrong clocks: 1428f385b67SNeil Armstrong minItems: 2 1438f385b67SNeil Armstrong clock-names: 1448f385b67SNeil Armstrong items: 1458f385b67SNeil Armstrong - const: usb_ctrl 1468f385b67SNeil Armstrong - const: ddr 1478f385b67SNeil Armstrong phy-names: 1488f385b67SNeil Armstrong items: 1498f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 1508f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 1518f385b67SNeil Armstrong - const: usb2-phy2 # USB2 PHY2 if USBOTG_C port is used 1528f385b67SNeil Armstrong 1538f385b67SNeil Armstrong required: 1548f385b67SNeil Armstrong - clock-names 1558f385b67SNeil Armstrong - if: 1568f385b67SNeil Armstrong properties: 1578f385b67SNeil Armstrong compatible: 1588f385b67SNeil Armstrong enum: 159*cdff2c94SNeil Armstrong - amlogic,meson-axg-usb-ctrl 160*cdff2c94SNeil Armstrong 161*cdff2c94SNeil Armstrong then: 162*cdff2c94SNeil Armstrong properties: 163*cdff2c94SNeil Armstrong phy-names: 164*cdff2c94SNeil Armstrong items: 165*cdff2c94SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 166*cdff2c94SNeil Armstrong clocks: 167*cdff2c94SNeil Armstrong minItems: 2 168*cdff2c94SNeil Armstrong clock-names: 169*cdff2c94SNeil Armstrong items: 170*cdff2c94SNeil Armstrong - const: usb_ctrl 171*cdff2c94SNeil Armstrong - const: ddr 172*cdff2c94SNeil Armstrong required: 173*cdff2c94SNeil Armstrong - clock-names 174*cdff2c94SNeil Armstrong - if: 175*cdff2c94SNeil Armstrong properties: 176*cdff2c94SNeil Armstrong compatible: 177*cdff2c94SNeil Armstrong enum: 1788dcb5a11SHanjie Lin - amlogic,meson-a1-usb-ctrl 1798dcb5a11SHanjie Lin 1808dcb5a11SHanjie Lin then: 1818dcb5a11SHanjie Lin properties: 1828f385b67SNeil Armstrong phy-names: 1838f385b67SNeil Armstrong items: 1848f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 1858dcb5a11SHanjie Lin clocks: 1868dcb5a11SHanjie Lin minItems: 3 1878dcb5a11SHanjie Lin clock-names: 1888dcb5a11SHanjie Lin items: 1898dcb5a11SHanjie Lin - const: usb_ctrl 1908dcb5a11SHanjie Lin - const: usb_bus 1918dcb5a11SHanjie Lin - const: xtal_usb_ctrl 1928dcb5a11SHanjie Lin required: 1938dcb5a11SHanjie Lin - clock-names 1948dcb5a11SHanjie Lin 1956aec9751SNeil Armstrongexamples: 1966aec9751SNeil Armstrong - | 1976aec9751SNeil Armstrong usb: usb@ffe09000 { 1986aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb-ctrl"; 199fba56184SRob Herring reg = <0xffe09000 0xa0>; 2006aec9751SNeil Armstrong interrupts = <16>; 2016aec9751SNeil Armstrong #address-cells = <1>; 2026aec9751SNeil Armstrong #size-cells = <1>; 2036aec9751SNeil Armstrong ranges; 2046aec9751SNeil Armstrong 2056aec9751SNeil Armstrong clocks = <&clkc_usb>; 2066aec9751SNeil Armstrong resets = <&reset_usb>; 2076aec9751SNeil Armstrong 2086aec9751SNeil Armstrong dr_mode = "otg"; 2096aec9751SNeil Armstrong 2106aec9751SNeil Armstrong phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>; 2116aec9751SNeil Armstrong phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; 2126aec9751SNeil Armstrong 2136aec9751SNeil Armstrong dwc2: usb@ff400000 { 2146aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; 2156aec9751SNeil Armstrong reg = <0xff400000 0x40000>; 2166aec9751SNeil Armstrong interrupts = <31>; 2176aec9751SNeil Armstrong clocks = <&clkc_usb1>; 218c5a05bd6SBenjamin Gaignard clock-names = "otg"; 2196aec9751SNeil Armstrong phys = <&usb2_phy1>; 2206aec9751SNeil Armstrong dr_mode = "peripheral"; 2216aec9751SNeil Armstrong g-rx-fifo-size = <192>; 2226aec9751SNeil Armstrong g-np-tx-fifo-size = <128>; 2236aec9751SNeil Armstrong g-tx-fifo-size = <128 128 16 16 16>; 2246aec9751SNeil Armstrong }; 2256aec9751SNeil Armstrong 2266aec9751SNeil Armstrong dwc3: usb@ff500000 { 2276aec9751SNeil Armstrong compatible = "snps,dwc3"; 2286aec9751SNeil Armstrong reg = <0xff500000 0x100000>; 2296aec9751SNeil Armstrong interrupts = <30>; 2306aec9751SNeil Armstrong dr_mode = "host"; 2316aec9751SNeil Armstrong snps,dis_u2_susphy_quirk; 2326aec9751SNeil Armstrong snps,quirk-frame-length-adjustment; 2336aec9751SNeil Armstrong }; 2346aec9751SNeil Armstrong }; 235