From patchwork Tue Mar 26 15:15:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1065705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="DHF1CcRr"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44TF7k58J3z9sSp for ; Wed, 27 Mar 2019 02:15:46 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6D7D6C21E15; Tue, 26 Mar 2019 15:15:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B9B72C21D8A; Tue, 26 Mar 2019 15:15:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0177EC21D8A; Tue, 26 Mar 2019 15:15:40 +0000 (UTC) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by lists.denx.de (Postfix) with ESMTPS id AEC7EC21D65 for ; Tue, 26 Mar 2019 15:15:40 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id h18so13376111wml.1 for ; Tue, 26 Mar 2019 08:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i956hLeRMBcMAp7u0yfDNxHU0oLRtOL7OWgMd6HkPbY=; b=DHF1CcRruJluXX502pqjqNCPP1AVNYADuC1Zg8SFc2XYhCZv2x/N30pon88bQ8QHBJ 1AEFOqzfZPBYpICfBLXzk0jU+wN0clSUMIoVqRlNiQbELpJd/WM72q1++efN5qIJY4mm D4VpwpEe91bOH4urvByP7iq7Y3FYZjcURJBECISZNXy1SBa17E+BRtDT71CaniDbuU7L JEPwmeJbSjSalvHneBfiNTxFe48ijDx7r3olp/TLUMPuxDjZyPtxlK/mjMexVrafQgRl fDvuZgyu9bVlQk9VjAXrkmTappvVufsQhiPEyIO1WTpQE3A5giuuqsIxOdHmtaiw6SuY JSjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i956hLeRMBcMAp7u0yfDNxHU0oLRtOL7OWgMd6HkPbY=; b=S22LSxmrlTeuueVuDVwLSmX/GvisyHFaHS5a2to/0CmM64DPYEhvX9ZrrmhaPlvoFW gk/oCJg56A7OjXbn9BbqSS/xaoeEbYc9/6uHd55y0739LBHAXRAgyk/kmpmWGQZ5Z/t5 6bHkuxCGQVWQeqLVdkvfsH2oaaFkTluXRv0UCD+cw78GaCuBssAKxtIqGIqbr7OIZS0v 66V3whtxEmtNgWHtBpHZe0FfxAS89ruPjXgBeuyLLiYBfPpbIeid5iFoSeargbw9u/jW pssoft/X8+Qc81z4AymZYQa+mcJm5YF+Nq2A6yqQwk5jAE+8TkaAcXPkH9sWEV5uIUq/ tVcA== X-Gm-Message-State: APjAAAUN8Onjsi5pH3SKs7lQ+FiudR4li9DAgASJhKEg3UFojC1xEfvL zhJdOQ3rWaJFXdpfTckTDQmmbA== X-Google-Smtp-Source: APXvYqzDjiC8qPYiywstJtlAQXiHv8JqnTZ1LnzYQcsd8jEkRM8eDlAADtJ0se4IG+7XCQTj2RhkQw== X-Received: by 2002:a7b:cb04:: with SMTP id u4mr16626409wmj.18.1553613340220; Tue, 26 Mar 2019 08:15:40 -0700 (PDT) Received: from localhost.localdomain (wal59-h01-176-150-251-154.dsl.sta.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id e12sm21282537wrt.94.2019.03.26.08.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Mar 2019 08:15:39 -0700 (PDT) From: Neil Armstrong To: marex@denx.de Date: Tue, 26 Mar 2019 16:15:34 +0100 Message-Id: <20190326151537.23118-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io Subject: [U-Boot] [PATCH 0/3] ARM: meson: Add G12A USB Support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patchset adds support for USB on Amlogic G12A SoCs. This patchset is composed with : - PHY Drivers - USB Control Glue driver - G12A board setup for Device mode Device Tree nodes will be added in a separate patchset when applied on a tagged Linux tree. The Amlogic G12A USB Complex is composed of : - 2 USB Controllers : * DWC3 for USB2 and USB3 Host functionality * DWC2 for USB2 Peripheral functionality - 2 USB2 OTG PHYs, only a single one will be routed to either DWC2 to DWC3 - 1 USB3 PHY shared with PCIE funcionnality - A Glue to control PHY routing, setup and OTG detection The Glue configures the UTMI 8bit interfaces for the USB2 PHYs, including routing of the OTG PHY between the DWC3 and DWC2 controllers, and setups the on-chip OTG mode selection for this PHY. This drivers supports the on-probe setup of the OTG mode, and manually via a setup function in the G12A common board code. Neil Armstrong (3): usb: dwc3: Add Meson G12A USB Glue phy: meson: add Amlogic G12A USB2 and USB3+PCIE PHY drivers mach-meson: g12a: add DWC2 peripheral mode support arch/arm/include/asm/arch-meson/usb.h | 12 + arch/arm/mach-meson/board-g12a.c | 126 +++++++ drivers/phy/Kconfig | 8 + drivers/phy/Makefile | 1 + drivers/phy/meson-g12a-usb2.c | 216 ++++++++++++ drivers/phy/meson-g12a-usb3-pcie.c | 345 +++++++++++++++++++ drivers/usb/dwc3/Kconfig | 8 + drivers/usb/dwc3/Makefile | 1 + drivers/usb/dwc3/dwc3-meson-g12a.c | 456 ++++++++++++++++++++++++++ 9 files changed, 1173 insertions(+) create mode 100644 arch/arm/include/asm/arch-meson/usb.h create mode 100644 drivers/phy/meson-g12a-usb2.c create mode 100644 drivers/phy/meson-g12a-usb3-pcie.c create mode 100644 drivers/usb/dwc3/dwc3-meson-g12a.c