From patchwork Mon Apr 1 12:46:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1072730 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="xI2AQBar"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44XsYY05rGz9sPv for ; Mon, 1 Apr 2019 23:47:12 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 9898BC21E7D; Mon, 1 Apr 2019 12:47:06 +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=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 D7D59C21DA6; Mon, 1 Apr 2019 12:47:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6AFBAC21DA2; Mon, 1 Apr 2019 12:47:03 +0000 (UTC) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by lists.denx.de (Postfix) with ESMTPS id 24F0AC21D4A for ; Mon, 1 Apr 2019 12:47:03 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id y13so11881686wrd.3 for ; Mon, 01 Apr 2019 05:47:03 -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=fPn6U6xBlk2tBb43Uin0L3V02afgwxyxVXCNTu7kydM=; b=xI2AQBarLqpjfrYQLH0HT4yyTpRYS573AyGTKclIpVsTK75JRRfaQap2+4Jy9nRln2 p239TuD7lVCQPjmoDbBpEPKvAbgJHu3BxQvrFdWZkypEtekLWxpiD0oUvN/tN5g0TWxc T/B6jt0B4I9Yo27AZuG1emQHWPnSU38WjKDPSfzhffK0ByXtP8PNgpQN1fCkW905wWVI drPM7AfQdcOFIRYfEjTolARpwuP9DShcOuiCNcrWcnPDriENCGpR4u0sz9yxIyqUD0xF w09ob0oZya5GNH+t4sDnODg8gmq09+KtpP3UcXfqUyL1csNtQ+U+pVqWyViu9lXilgCc 7JSA== 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=fPn6U6xBlk2tBb43Uin0L3V02afgwxyxVXCNTu7kydM=; b=f9FwlGHEuSUXg8wcpF9warPUGNq81d+3euL+v0hA8D3E1hT2umKSPfUYF3iSsK00Ea rCYO78xXUVEKDxWj78ffiAhkkkz9cyPDILiL7CHdWT4eQ8jJnhAfi0HGnqLWqq0veFi7 GM3arMHK4KknndrQknhp6WrJGczWLPTiWj+0wH6bqc+Axa+2ehhEJaszXKTbw8YveMIQ /HZzMw9qLILgIlJTEcm6ZgumAw45Z0MeZrd4JqTvflvbnglGJx/klDB89pQ3ztAZPfke B2ayVZzgTLAZkkaL63Aj0kRyfgmt1/QniS6TeE2QTZwVScJZulqA19aB035bb3tHqUar wnKQ== X-Gm-Message-State: APjAAAVnBrcSu1Pzh8iCytItP8y6yYZc3//rXqkcu1Rlvc8lTaDPtRwD hE/qu5o2JnqaKmLM+Fd6OdTWag== X-Google-Smtp-Source: APXvYqzyMfpeHQ/7dqP17n826HWM+5SqDxynBzK6xUMKg0tZswizIr0nUvPPpTSAHQ/MaSYsh+l3nQ== X-Received: by 2002:a5d:6a0b:: with SMTP id m11mr24698546wru.290.1554122822576; Mon, 01 Apr 2019 05:47:02 -0700 (PDT) Received: from localhost.localdomain (176-150-251-154.abo.bbox.fr. [176.150.251.154]) by smtp.gmail.com with ESMTPSA id c189sm11817320wme.32.2019.04.01.05.47.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Apr 2019 05:47:01 -0700 (PDT) From: Neil Armstrong To: marex@denx.de Date: Mon, 1 Apr 2019 14:46:54 +0200 Message-Id: <20190401124657.29736-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 v2 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. Changes since v1: - switch printf() to debug() in patch 1 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