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 256aec9751SNeil Armstrongproperties: 266aec9751SNeil Armstrong compatible: 276aec9751SNeil Armstrong enum: 286aec9751SNeil Armstrong - amlogic,meson-g12a-usb-ctrl 296aec9751SNeil Armstrong 306aec9751SNeil Armstrong ranges: true 316aec9751SNeil Armstrong 326aec9751SNeil Armstrong "#address-cells": 336aec9751SNeil Armstrong enum: [ 1, 2 ] 346aec9751SNeil Armstrong 356aec9751SNeil Armstrong "#size-cells": 366aec9751SNeil Armstrong enum: [ 1, 2 ] 376aec9751SNeil Armstrong 386aec9751SNeil Armstrong clocks: 396aec9751SNeil Armstrong minItems: 1 406aec9751SNeil Armstrong 416aec9751SNeil Armstrong resets: 426aec9751SNeil Armstrong minItems: 1 436aec9751SNeil Armstrong 446aec9751SNeil Armstrong reg: 456aec9751SNeil Armstrong maxItems: 1 466aec9751SNeil Armstrong 476aec9751SNeil Armstrong interrupts: 486aec9751SNeil Armstrong maxItems: 1 496aec9751SNeil Armstrong 506aec9751SNeil Armstrong phy-names: 516aec9751SNeil Armstrong items: 526aec9751SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 536aec9751SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 546aec9751SNeil Armstrong - const: usb3-phy0 # USB3 PHY if USB3_0 is used 556aec9751SNeil Armstrong 566aec9751SNeil Armstrong phys: 576aec9751SNeil Armstrong minItems: 1 586aec9751SNeil Armstrong maxItems: 3 596aec9751SNeil Armstrong 606aec9751SNeil Armstrong dr_mode: true 616aec9751SNeil Armstrong 626aec9751SNeil Armstrong power-domains: 636aec9751SNeil Armstrong maxItems: 1 646aec9751SNeil Armstrong 656aec9751SNeil Armstrong vbus-supply: 666aec9751SNeil Armstrong description: VBUS power supply when used in OTG switchable mode 676aec9751SNeil Armstrong 686aec9751SNeil ArmstrongpatternProperties: 696aec9751SNeil Armstrong "^usb@[0-9a-f]+$": 706aec9751SNeil Armstrong type: object 716aec9751SNeil Armstrong 726aec9751SNeil ArmstrongadditionalProperties: false 736aec9751SNeil Armstrong 746aec9751SNeil Armstrongrequired: 756aec9751SNeil Armstrong - compatible 766aec9751SNeil Armstrong - "#address-cells" 776aec9751SNeil Armstrong - "#size-cells" 786aec9751SNeil Armstrong - ranges 796aec9751SNeil Armstrong - clocks 806aec9751SNeil Armstrong - resets 816aec9751SNeil Armstrong - reg 826aec9751SNeil Armstrong - interrupts 836aec9751SNeil Armstrong - phy-names 846aec9751SNeil Armstrong - phys 856aec9751SNeil Armstrong - dr_mode 866aec9751SNeil Armstrong 876aec9751SNeil Armstrongexamples: 886aec9751SNeil Armstrong - | 896aec9751SNeil Armstrong usb: usb@ffe09000 { 906aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb-ctrl"; 916aec9751SNeil Armstrong reg = <0x0 0xffe09000 0x0 0xa0>; 926aec9751SNeil Armstrong interrupts = <16>; 936aec9751SNeil Armstrong #address-cells = <1>; 946aec9751SNeil Armstrong #size-cells = <1>; 956aec9751SNeil Armstrong ranges; 966aec9751SNeil Armstrong 976aec9751SNeil Armstrong clocks = <&clkc_usb>; 986aec9751SNeil Armstrong resets = <&reset_usb>; 996aec9751SNeil Armstrong 1006aec9751SNeil Armstrong dr_mode = "otg"; 1016aec9751SNeil Armstrong 1026aec9751SNeil Armstrong phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>; 1036aec9751SNeil Armstrong phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; 1046aec9751SNeil Armstrong 1056aec9751SNeil Armstrong dwc2: usb@ff400000 { 1066aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; 1076aec9751SNeil Armstrong reg = <0xff400000 0x40000>; 1086aec9751SNeil Armstrong interrupts = <31>; 1096aec9751SNeil Armstrong clocks = <&clkc_usb1>; 110*c5a05bd6SBenjamin Gaignard clock-names = "otg"; 1116aec9751SNeil Armstrong phys = <&usb2_phy1>; 1126aec9751SNeil Armstrong dr_mode = "peripheral"; 1136aec9751SNeil Armstrong g-rx-fifo-size = <192>; 1146aec9751SNeil Armstrong g-np-tx-fifo-size = <128>; 1156aec9751SNeil Armstrong g-tx-fifo-size = <128 128 16 16 16>; 1166aec9751SNeil Armstrong }; 1176aec9751SNeil Armstrong 1186aec9751SNeil Armstrong dwc3: usb@ff500000 { 1196aec9751SNeil Armstrong compatible = "snps,dwc3"; 1206aec9751SNeil Armstrong reg = <0xff500000 0x100000>; 1216aec9751SNeil Armstrong interrupts = <30>; 1226aec9751SNeil Armstrong dr_mode = "host"; 1236aec9751SNeil Armstrong snps,dis_u2_susphy_quirk; 1246aec9751SNeil Armstrong snps,quirk-frame-length-adjustment; 1256aec9751SNeil Armstrong }; 1266aec9751SNeil Armstrong }; 1276aec9751SNeil Armstrong 128