From patchwork Mon Jul 6 02:21:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 1323244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.a=rsa-sha256 header.s=dk header.b=iYQzJMrJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B0Trp17l5z9sDX for ; Mon, 6 Jul 2020 12:23:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB4F081C0D; Mon, 6 Jul 2020 04:22:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mediatek.com header.i=@mediatek.com header.b="iYQzJMrJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 662DC81C02; Mon, 6 Jul 2020 04:22:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MIME_BASE64_TEXT,RDNS_NONE,SPF_HELO_NONE, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by phobos.denx.de (Postfix) with ESMTP id 558E881BCD for ; Mon, 6 Jul 2020 04:22:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=mediatek.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chunfeng.yun@mediatek.com X-UUID: c67ec3283ef64cf5a2349969fb677d88-20200706 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=lBhTjTz8NDoJ1yt/sa6lfs3UB19oJ+lPSILxMSkfi88=; b=iYQzJMrJDiezMPsEQwIv4QA0RNCAfWwm9a0dg7BHWfTgSszT96esZsrxpwIpihAN+WedxdlUg6Q6z6opUg8WQeaSKOnpjCgL/WHjTpKnxPBrwunykdprCRXsxLTSntJFThlmokQIgxupFcw2M6arYrXOGNp3y7Gb32USLClleRk=; X-UUID: c67ec3283ef64cf5a2349969fb677d88-20200706 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 688957394; Mon, 06 Jul 2020 10:22:38 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jul 2020 10:22:35 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 6 Jul 2020 10:22:33 +0800 From: Chunfeng Yun To: Lukasz Majewski , Marek Vasut CC: Mingming lee , Ryder Lee , Weijie Gao , Simon Glass , Bin Meng , Jagan Teki , Heinrich Schuchardt , Kever Yang , Fabio Estevam , Fabien Parent , Chunfeng Yun , Michal Simek , Roger Quadros , Siva Durga Prasad Paladugu , T Karthik Reddy , , GSS_MTK_Uboot_upstream Subject: [PATCH v2 0/6] Add support MediaTek USB3 DRD driver Date: Mon, 6 Jul 2020 10:21:44 +0800 Message-ID: <1594002110-25624-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-MTK: N X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean These patches introduce the MediaTek USB3 Dual-Role Controller driver. The driver can be configured as Dual-Role Device, Peripheral only and Host only(xHCI) modes, and it's ported from Linux Kernel 5.7-rc1 v2 changes: 1. simplify QMU operations Chunfeng Yun (6): dt-binding: usb: add bindings for some common properties dt-bindings: usb: mtu3: add bindings for MediaTek USB3 DRD usb: add USB_SPEED_SUPER_PLUS usb: add MediaTek USB3 DRD driver arm: dts: mt8512: add usb related nodes configs: mt8512: enable fastboot Makefile | 1 + arch/arm/dts/mt8512-bm1-emmc.dts | 10 + arch/arm/dts/mt8512.dtsi | 41 +- configs/mt8512_bm1_emmc_defconfig | 19 + doc/device-tree-bindings/usb/generic.txt | 31 + doc/device-tree-bindings/usb/mediatek,mtu3.txt | 74 ++ drivers/usb/Kconfig | 2 + drivers/usb/mtu3/Kconfig | 45 ++ drivers/usb/mtu3/Makefile | 11 + drivers/usb/mtu3/mtu3.h | 404 +++++++++++ drivers/usb/mtu3/mtu3_core.c | 863 +++++++++++++++++++++++ drivers/usb/mtu3/mtu3_dr.h | 59 ++ drivers/usb/mtu3/mtu3_gadget.c | 705 +++++++++++++++++++ drivers/usb/mtu3/mtu3_gadget_ep0.c | 933 +++++++++++++++++++++++++ drivers/usb/mtu3/mtu3_host.c | 170 +++++ drivers/usb/mtu3/mtu3_hw_regs.h | 514 ++++++++++++++ drivers/usb/mtu3/mtu3_plat.c | 251 +++++++ drivers/usb/mtu3/mtu3_qmu.c | 505 +++++++++++++ drivers/usb/mtu3/mtu3_qmu.h | 37 + include/linux/usb/ch9.h | 1 + 20 files changed, 4675 insertions(+), 1 deletion(-) create mode 100644 doc/device-tree-bindings/usb/generic.txt create mode 100644 doc/device-tree-bindings/usb/mediatek,mtu3.txt create mode 100644 drivers/usb/mtu3/Kconfig create mode 100644 drivers/usb/mtu3/Makefile create mode 100644 drivers/usb/mtu3/mtu3.h create mode 100644 drivers/usb/mtu3/mtu3_core.c create mode 100644 drivers/usb/mtu3/mtu3_dr.h create mode 100644 drivers/usb/mtu3/mtu3_gadget.c create mode 100644 drivers/usb/mtu3/mtu3_gadget_ep0.c create mode 100644 drivers/usb/mtu3/mtu3_host.c create mode 100644 drivers/usb/mtu3/mtu3_hw_regs.h create mode 100644 drivers/usb/mtu3/mtu3_plat.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.c create mode 100644 drivers/usb/mtu3/mtu3_qmu.h