From patchwork Mon May 11 07:53:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1166 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1E6DF3F1DD for ; Mon, 11 May 2020 09:53:38 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id x3sf6788913plm.9 for ; Mon, 11 May 2020 00:53:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589183616; cv=pass; d=google.com; s=arc-20160816; b=Goxd2J/7yv1nFL9GbbhJcPAlMmnYREoyY9mUm5Y4YdOMn9hyX4+0EGBKCLebheU3/z L95VwGjZSk99Fv+EgbBoZ0ZG5VeUGhV9yYhn/TOASgvNdivrej0/Fc7ebXN99nAxO9at KRPlju1BV/ek04KbiJiR0CZi5pFcnfGqbOBPb7jAyySTwJU5hMM3k/gMHv1bt9lBZ7Hj xSlyCdi5CJsddd5fvgNzOvgxXiRIenyc1Vfj4QyocGjmQ6Q/mO8jV4ZYUeCiqV72zkGA A6etKJ0nNqsNRCd0VMJ7HZvF45gAW0QxgBCD5l/1ZKqts8hutUDJZKWJx+L6vKvleakX NdlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:message-id:date:subject:cc:to:from :mime-version:sender:dkim-signature; bh=0XpuDKoNJCiJOTvAWXVGkbcCopooFVvtG92qYR8+0fQ=; b=MvfQl22PImG90G1UWB7IY6HAihrALr2/vnRDdTSC6WP/hu6LPVqQ3fD4h70nZqLDD8 2AUC8b3g1QHVzb3ZnsY1AibP8/uSorUuNjvXCLMU3CIQ67v4fFRVuDHDcJnaBgNbAdvC vdj10k6iT/dm3kXlap+waB/IvrHk2uTgmmpUWgkHnlR8ITVXIprfXsAE+zxsz2+i/Hjk oj6wiRWLOpNQwaT1l286k11wi3aRX6qIqy8LFFefrxXt4d83gmzQbBqxWWoTLeulicqF JIs40mwK5CQ9+E7jEYR65zS/wJ4v6VzPI/knKthaFIU43Yfrchsm/MXOW3Qt/5Soeewr Ue6g== ARC-Authentication-Results: i=2; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0XpuDKoNJCiJOTvAWXVGkbcCopooFVvtG92qYR8+0fQ=; b=cF2lrsQ86xzmfmg/YIor+iu8rxH0SzfHZUjgF8u8BHM4Ki+IVg58nLDxe4YkDeehMd 22iVfk1Fkf4exm4pCGzvEh+EPCTbx8hn4OuOcawrzvPGzMCFqPIW28Uvhzo5R7rIs5Lq 8ulbzPjOMVNWHF/2VggORi0WeLhN3kipQqkQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-unsubscribe; bh=0XpuDKoNJCiJOTvAWXVGkbcCopooFVvtG92qYR8+0fQ=; b=kinS4EDEOKxe4SmRF+Eyz9Vqrj658AQwM6UHlaFKgxzyaqsH08/8DZ2TkN+rZzxNGG iwl9ZXcSeHN0bKJq8etRaZzi6IeE0wnydRRtucUURDbwnQ4wZuSyBXNfFwTa1o0eNrGf N9VSnAj9nPM6QakJP/PkXeFrWW2BETNSpXJMf6ca53n9R6zdEVQCjAosOgQfMQ4BZYOY QcQ6WBxyrWr6+EryNnF9NZ6Q0QPgJxVLdmCKFNDxCKW4YPDwgu1TN2PzzRtY+6EMQ6L8 KDqQOas2ZZAd8w63g8ylgv886tetwr3C/u+34oid5N3B/nM4h6Zbrsz5EzwB2xnWHHvU LZ7g== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0PubMIpkRQfSuplkZYLRfTMkpapDQAB5C5K5Pf5L0+OKwYAbDAaY0 8GpiOPqgH3xdLMNMfnmyFixTTGXs X-Google-Smtp-Source: APiQypIj1V+FBH87eg4hQGM3+EEVS0/9a0tIFA3N+9FDRadytIwM7TE2qFPTFK3OuN9k/+xEbHwO4g== X-Received: by 2002:a17:90a:8807:: with SMTP id s7mr11436647pjn.157.1589183616039; Mon, 11 May 2020 00:53:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:780a:: with SMTP id t10ls4415700pfc.1.gmail; Mon, 11 May 2020 00:53:35 -0700 (PDT) X-Received: by 2002:a65:64d7:: with SMTP id t23mr13520240pgv.275.1589183615307; Mon, 11 May 2020 00:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589183615; cv=none; d=google.com; s=arc-20160816; b=rjeXRuSPAdk45qyVio75nUREL2Er/713xwlpAX+D8joZOrj6SWgN+kS0V1J+xqQMA4 sm6wfxDTT9EsTe3gGKlyaNx4HTcYfMCM0xvgv3AZY8NYgM+Y5bFsIdwde4Jxkh9HEOnL h8PnMSFvFbxJs5V+NAeP55WUFS1nXHaE01slQeO1H5znve8XySB8oqwb4bJ8qKUhAto4 awMmNdN4Nj9odqbfyldSuLQY2i3ywGQ1MWixMBOHE66V6dLEEYN90qfie7mkZojdf2ql fDDdsz999wjYWMjg7QV0qahTPZ/Z/5ZArjsb0imhPCbOqH0g6Q1CsyyGTMrSlSD468/q d5WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=sX7vqkDUA2omWYAahW/LNebkagCDdq1J4FbP5H/t6eA=; b=avUTSWyQuCD8RAjbyUc15/w3FeZz2XaDVsjtG62irgtXRqydL0VCtQN7QoxJ7wD2UC gqyx60v1vXR+3J0mK11mMfZcyU48EOnXyt7Ivd2dxVbnjpC/Ci2TMK0uFWKynHCcvUR9 F0UUtJTIGi8Kz2qj60Tqbx5W93NSPhSMRxmRTQR/NlXFdn9AKtSZ6GrUe8d/n37wA1+n l0Y477TFucBUZww9QTU4LrXvvrjhmAI7S/Zr6WQCu0wtqwKVsafZX0swT/RAEfwNGwWJ KXcfYTiereV0PidObPfY1p9Gx52g1XNCyJ8obx1/rhfOs2AQenx/9RzTJrez1DZOhhRq 29Ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com Received: from lucky1.263xmail.com (lucky1.263xmail.com. [211.157.147.132]) by mx.google.com with ESMTPS id z12si7084780plk.182.2020.05.11.00.53.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2020 00:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) client-ip=211.157.147.132; Received: from localhost (unknown [192.168.167.69]) by lucky1.263xmail.com (Postfix) with ESMTP id D1888CCABB; Mon, 11 May 2020 15:53:32 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P27329T140438906509056S1589183610459145_; Mon, 11 May 2020 15:53:32 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <226d11f8b02a0d7c9c78d134a12f2e29> X-RL-SENDER: frank.wang@rock-chips.com X-SENDER: wmc@rock-chips.com X-LOGIN-NAME: frank.wang@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 X-System-Flag: 0 From: Frank Wang To: heiko@sntech.de, marex@denx.de, bmeng.cn@gmail.com, philipp.tomsich@theobroma-systems.com, klaus.goger@theobroma-systems.com, jagan@amarulasolutions.com, sjg@chromium.org, kever.yang@rock-chips.com Cc: u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, marek.belisko@gmail.com, william.wu@rock-chips.com, jianing.ren@rock-chips.com, chenjh@rock-chips.com, wmc@rock-chips.com, Frank Wang Subject: [PATCH v4 00/16] Add Rockchip RK3399 USB3.0 Host support Date: Mon, 11 May 2020 15:53:14 +0800 Message-Id: <20200511075330.26462-1-frank.wang@rock-chips.com> X-Mailer: git-send-email 2.17.1 X-Original-Sender: frank.wang@rock-chips.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of frank.wang@rock-chips.com designates 211.157.147.132 as permitted sender) smtp.mailfrom=frank.wang@rock-chips.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series add quirks for DWC3 and add Rockchip RK3399 USB3.0 host support. The function has been tested pass on rk3399-evb and roc-rk3399-pc board. For V4 update: - Collect Jagan's all fixed patches [1]. - Amend specific u-boot changes from dts to dtsi for [PATCH v3 6/7]. For V3 update: - Fix compile error for [PATCH v2 1/9]. - Use Jagan's Type-C driver instead of [PATCH v2 5/9]. - Cleanup dts changes for [PATCH v2 7/9]. - Cleanup config changes for [PATCH v2 8/9] and [PATCH v2 9/9]. For V2 update: - Amend type-c driver followed Jagan's comments for [PATCH 5/8]. - Fix dts commit for [PATCH 7/8]. - Split RK3399 default config for [PATCH 8/8]. - Add 'Reviewed-by' tag for [PATCH 1/8], [PATCH 2/8] and [PATCH 3/8]. [1] https://patchwork.ozlabs.org/project/uboot/cover/20200506075025.1677-1-jagan@amarulasolutions.com BR, Frank Frank Wang (7): usb: dwc3: add dis_enblslpm_quirk usb: dwc3: add dis_u2_freeclk_exists_quirk usb: dwc3: amend UTMI/UTMIW phy interface setup usb: dwc3: add make compatible for rockchip platform driver: usb: drop legacy rockchip xhci driver ARM: dts: rk3399-evb: usb3.0 host support configs: evb-rk3399: update support usb3.0 host Jagan Teki (9): clk: rk3399: Enable/Disable the USB2PHY clk clk: rk3399: Set empty for TCPHY assigned-clocks clk: rk3399: Enable/Disable TCPHY clocks phy: rockchip: Add Rockchip USB2PHY driver arm64: dts: rk3399: Move u2phy into root port phy: rockchip: Add Rockchip USB TypeC PHY driver usb: dwc3: Add disable u2mac linestate check quirk usb: dwc3: Enable AutoRetry feature in the controller roc-rk3399-pc: Enable USB3.0 Host arch/arm/dts/rk3399-evb-u-boot.dtsi | 13 + arch/arm/dts/rk3399.dtsi | 108 +-- configs/evb-rk3399_defconfig | 6 + configs/roc-pc-mezzanine-rk3399_defconfig | 5 + configs/roc-pc-rk3399_defconfig | 6 + drivers/Makefile | 1 + drivers/clk/rockchip/clk_rk3399.c | 38 + drivers/phy/Kconfig | 1 + drivers/phy/rockchip/Kconfig | 21 + drivers/phy/rockchip/Makefile | 7 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 312 +++++++ drivers/phy/rockchip/phy-rockchip-typec.c | 796 ++++++++++++++++++ drivers/usb/common/common.c | 25 + drivers/usb/dwc3/core.c | 106 ++- drivers/usb/dwc3/core.h | 19 + drivers/usb/dwc3/dwc3-generic.c | 33 +- drivers/usb/host/Kconfig | 9 - drivers/usb/host/Makefile | 1 - drivers/usb/host/xhci-rockchip.c | 196 ----- include/dwc3-uboot.h | 3 + include/linux/usb/phy.h | 18 + 21 files changed, 1427 insertions(+), 297 deletions(-) create mode 100644 drivers/phy/rockchip/Kconfig create mode 100644 drivers/phy/rockchip/Makefile create mode 100644 drivers/phy/rockchip/phy-rockchip-inno-usb2.c create mode 100644 drivers/phy/rockchip/phy-rockchip-typec.c delete mode 100644 drivers/usb/host/xhci-rockchip.c