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*8f385b67SNeil Armstrong The Amlogic GXL & GXM SoCs doesn't embed an USB3 PHY. 29*8f385b67SNeil Armstrong 306aec9751SNeil Armstrongproperties: 316aec9751SNeil Armstrong compatible: 326aec9751SNeil Armstrong enum: 33*8f385b67SNeil Armstrong - amlogic,meson-gxl-usb-ctrl 34*8f385b67SNeil Armstrong - amlogic,meson-gxm-usb-ctrl 356aec9751SNeil Armstrong - amlogic,meson-g12a-usb-ctrl 368dcb5a11SHanjie Lin - amlogic,meson-a1-usb-ctrl 376aec9751SNeil Armstrong 386aec9751SNeil Armstrong ranges: true 396aec9751SNeil Armstrong 406aec9751SNeil Armstrong "#address-cells": 416aec9751SNeil Armstrong enum: [ 1, 2 ] 426aec9751SNeil Armstrong 436aec9751SNeil Armstrong "#size-cells": 446aec9751SNeil Armstrong enum: [ 1, 2 ] 456aec9751SNeil Armstrong 466aec9751SNeil Armstrong clocks: 476aec9751SNeil Armstrong minItems: 1 48*8f385b67SNeil Armstrong maxItems: 3 49*8f385b67SNeil Armstrong 50*8f385b67SNeil Armstrong clock-names: 51*8f385b67SNeil Armstrong minItems: 1 52*8f385b67SNeil Armstrong maxItems: 3 536aec9751SNeil Armstrong 546aec9751SNeil Armstrong resets: 556aec9751SNeil Armstrong minItems: 1 566aec9751SNeil Armstrong 576aec9751SNeil Armstrong reg: 586aec9751SNeil Armstrong maxItems: 1 596aec9751SNeil Armstrong 606aec9751SNeil Armstrong interrupts: 616aec9751SNeil Armstrong maxItems: 1 626aec9751SNeil Armstrong 636aec9751SNeil Armstrong phy-names: 64*8f385b67SNeil Armstrong minItems: 1 65*8f385b67SNeil Armstrong maxItems: 3 666aec9751SNeil Armstrong 676aec9751SNeil Armstrong phys: 686aec9751SNeil Armstrong minItems: 1 696aec9751SNeil Armstrong maxItems: 3 706aec9751SNeil Armstrong 716aec9751SNeil Armstrong dr_mode: true 726aec9751SNeil Armstrong 736aec9751SNeil Armstrong power-domains: 746aec9751SNeil Armstrong maxItems: 1 756aec9751SNeil Armstrong 766aec9751SNeil Armstrong vbus-supply: 776aec9751SNeil Armstrong description: VBUS power supply when used in OTG switchable mode 786aec9751SNeil Armstrong 796aec9751SNeil ArmstrongpatternProperties: 806aec9751SNeil Armstrong "^usb@[0-9a-f]+$": 816aec9751SNeil Armstrong type: object 826aec9751SNeil Armstrong 836aec9751SNeil ArmstrongadditionalProperties: false 846aec9751SNeil Armstrong 856aec9751SNeil Armstrongrequired: 866aec9751SNeil Armstrong - compatible 876aec9751SNeil Armstrong - "#address-cells" 886aec9751SNeil Armstrong - "#size-cells" 896aec9751SNeil Armstrong - ranges 906aec9751SNeil Armstrong - clocks 916aec9751SNeil Armstrong - resets 926aec9751SNeil Armstrong - reg 936aec9751SNeil Armstrong - interrupts 946aec9751SNeil Armstrong - phy-names 956aec9751SNeil Armstrong - phys 966aec9751SNeil Armstrong - dr_mode 976aec9751SNeil Armstrong 988dcb5a11SHanjie LinallOf: 998dcb5a11SHanjie Lin - if: 1008dcb5a11SHanjie Lin properties: 1018dcb5a11SHanjie Lin compatible: 1028dcb5a11SHanjie Lin enum: 103*8f385b67SNeil Armstrong - amlogic,meson-g12a-usb-ctrl 104*8f385b67SNeil Armstrong 105*8f385b67SNeil Armstrong then: 106*8f385b67SNeil Armstrong properties: 107*8f385b67SNeil Armstrong phy-names: 108*8f385b67SNeil Armstrong items: 109*8f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 110*8f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 111*8f385b67SNeil Armstrong - const: usb3-phy0 # USB3 PHY if USB3_0 is used 112*8f385b67SNeil Armstrong - if: 113*8f385b67SNeil Armstrong properties: 114*8f385b67SNeil Armstrong compatible: 115*8f385b67SNeil Armstrong enum: 116*8f385b67SNeil Armstrong - amlogic,meson-gxl-usb-ctrl 117*8f385b67SNeil Armstrong 118*8f385b67SNeil Armstrong then: 119*8f385b67SNeil Armstrong properties: 120*8f385b67SNeil Armstrong clocks: 121*8f385b67SNeil Armstrong minItems: 2 122*8f385b67SNeil Armstrong clock-names: 123*8f385b67SNeil Armstrong items: 124*8f385b67SNeil Armstrong - const: usb_ctrl 125*8f385b67SNeil Armstrong - const: ddr 126*8f385b67SNeil Armstrong phy-names: 127*8f385b67SNeil Armstrong items: 128*8f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 129*8f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 130*8f385b67SNeil Armstrong required: 131*8f385b67SNeil Armstrong - clock-names 132*8f385b67SNeil Armstrong - if: 133*8f385b67SNeil Armstrong properties: 134*8f385b67SNeil Armstrong compatible: 135*8f385b67SNeil Armstrong enum: 136*8f385b67SNeil Armstrong - amlogic,meson-gxm-usb-ctrl 137*8f385b67SNeil Armstrong 138*8f385b67SNeil Armstrong then: 139*8f385b67SNeil Armstrong properties: 140*8f385b67SNeil Armstrong clocks: 141*8f385b67SNeil Armstrong minItems: 2 142*8f385b67SNeil Armstrong clock-names: 143*8f385b67SNeil Armstrong items: 144*8f385b67SNeil Armstrong - const: usb_ctrl 145*8f385b67SNeil Armstrong - const: ddr 146*8f385b67SNeil Armstrong phy-names: 147*8f385b67SNeil Armstrong items: 148*8f385b67SNeil Armstrong - const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used 149*8f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 150*8f385b67SNeil Armstrong - const: usb2-phy2 # USB2 PHY2 if USBOTG_C port is used 151*8f385b67SNeil Armstrong 152*8f385b67SNeil Armstrong required: 153*8f385b67SNeil Armstrong - clock-names 154*8f385b67SNeil Armstrong - if: 155*8f385b67SNeil Armstrong properties: 156*8f385b67SNeil Armstrong compatible: 157*8f385b67SNeil Armstrong enum: 1588dcb5a11SHanjie Lin - amlogic,meson-a1-usb-ctrl 1598dcb5a11SHanjie Lin 1608dcb5a11SHanjie Lin then: 1618dcb5a11SHanjie Lin properties: 162*8f385b67SNeil Armstrong phy-names: 163*8f385b67SNeil Armstrong items: 164*8f385b67SNeil Armstrong - const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used 1658dcb5a11SHanjie Lin clocks: 1668dcb5a11SHanjie Lin minItems: 3 1678dcb5a11SHanjie Lin clock-names: 1688dcb5a11SHanjie Lin items: 1698dcb5a11SHanjie Lin - const: usb_ctrl 1708dcb5a11SHanjie Lin - const: usb_bus 1718dcb5a11SHanjie Lin - const: xtal_usb_ctrl 1728dcb5a11SHanjie Lin required: 1738dcb5a11SHanjie Lin - clock-names 1748dcb5a11SHanjie Lin 1756aec9751SNeil Armstrongexamples: 1766aec9751SNeil Armstrong - | 1776aec9751SNeil Armstrong usb: usb@ffe09000 { 1786aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb-ctrl"; 1796aec9751SNeil Armstrong reg = <0x0 0xffe09000 0x0 0xa0>; 1806aec9751SNeil Armstrong interrupts = <16>; 1816aec9751SNeil Armstrong #address-cells = <1>; 1826aec9751SNeil Armstrong #size-cells = <1>; 1836aec9751SNeil Armstrong ranges; 1846aec9751SNeil Armstrong 1856aec9751SNeil Armstrong clocks = <&clkc_usb>; 1866aec9751SNeil Armstrong resets = <&reset_usb>; 1876aec9751SNeil Armstrong 1886aec9751SNeil Armstrong dr_mode = "otg"; 1896aec9751SNeil Armstrong 1906aec9751SNeil Armstrong phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>; 1916aec9751SNeil Armstrong phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0"; 1926aec9751SNeil Armstrong 1936aec9751SNeil Armstrong dwc2: usb@ff400000 { 1946aec9751SNeil Armstrong compatible = "amlogic,meson-g12a-usb", "snps,dwc2"; 1956aec9751SNeil Armstrong reg = <0xff400000 0x40000>; 1966aec9751SNeil Armstrong interrupts = <31>; 1976aec9751SNeil Armstrong clocks = <&clkc_usb1>; 198c5a05bd6SBenjamin Gaignard clock-names = "otg"; 1996aec9751SNeil Armstrong phys = <&usb2_phy1>; 2006aec9751SNeil Armstrong dr_mode = "peripheral"; 2016aec9751SNeil Armstrong g-rx-fifo-size = <192>; 2026aec9751SNeil Armstrong g-np-tx-fifo-size = <128>; 2036aec9751SNeil Armstrong g-tx-fifo-size = <128 128 16 16 16>; 2046aec9751SNeil Armstrong }; 2056aec9751SNeil Armstrong 2066aec9751SNeil Armstrong dwc3: usb@ff500000 { 2076aec9751SNeil Armstrong compatible = "snps,dwc3"; 2086aec9751SNeil Armstrong reg = <0xff500000 0x100000>; 2096aec9751SNeil Armstrong interrupts = <30>; 2106aec9751SNeil Armstrong dr_mode = "host"; 2116aec9751SNeil Armstrong snps,dis_u2_susphy_quirk; 2126aec9751SNeil Armstrong snps,quirk-frame-length-adjustment; 2136aec9751SNeil Armstrong }; 2146aec9751SNeil Armstrong }; 2156aec9751SNeil Armstrong 216