From patchwork Wed May 13 07:13:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1183 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5F6FE3F03F for ; Wed, 13 May 2020 09:13:54 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id r28sf14106596pfl.23 for ; Wed, 13 May 2020 00:13:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589354032; cv=pass; d=google.com; s=arc-20160816; b=moCcsVUdJqG1kdFAyb5nPQQYZcu2SBFPtGJbHwEbiWr+qMyldHX8YXrH6DRR6CUwSc nr+vGmgLyXH6ckcSSgtLzn9G9HEFwJoWqQLWXMCAeUNdwvAZTLvU/6ljBAF6iaOG3VDu MTcPpzrvhh+UxSN+BD0JCD87k1usKTtmeZYq91FhechnD6csgN/YdoAhgummKokwIQHG rBQNrVSS03zVXnY/3GJuUR9tqV1gk8OxtEGB38wVgRubCBxrt9Kd6UYRsAZWD1Ba9Hxw +wZDDJdBESipid3BL14l+s7+agucJD4004qx7kL9JskJL6HsZdmpQee3gD+3cHmxqg7d 0jzQ== 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=XZo8EHB6gDo0eEA5uaQo9AQmERynkIJnl9hbECrg5ig=; b=rf4j2amgpakn6FyS/+RcxnE8x0KuSq+pG62/7RVfWcz/PjIS1j3zVvG2GzhlNf3l4x vb+9+l522zrCU/y4WdFDKdPd3guVMku5vZkCRs3qynXPYAF/vpUrRRpkk0jfJ32H3wbn WfHSXTBEDM0qNzTgljXqRBUSDFTpxHcO6tgdVoISWvp1ELxoJoF7YElZfaiJIEkHm/GR TIwrxHWa2vQE2uEoiF59iQS3YyyqSEOCm+gQMVbytgQfCjs7PngOYkw9mQV7r3ac8jVy zyfxTmFeuh76ych4S8mu1A5p/wpEY62EBFilpNCXsytUJwrEYnpEqHEurG5kUUkkn0ay UgDA== 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=XZo8EHB6gDo0eEA5uaQo9AQmERynkIJnl9hbECrg5ig=; b=kgdVUr8ZoHUEQZQS2zdEKP1QkU/b5tNS06r1UgL/B9nDqmYveyinM8U8cJ/X+vw/gw Qgjw5jcqsVkiyI7HKaAeSugBSYrUw/tMLZlDouHB807Ih5fn7MbG9e15UyPtsRgS18Lt vR3QyRMevQkct8b06QZU9yT4UxNfrIi7/sOxk= 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=XZo8EHB6gDo0eEA5uaQo9AQmERynkIJnl9hbECrg5ig=; b=RJJwEY+fUgCv0QcW7uQ/jW7gVSQ50IrE1HLgdA0tLjk29oqFkN6ZVvSKOLNAN4DZo7 kzGIfp9Gv8snWifw6c75LQLIP+ony50nPzEIkI+Q4T3eJb9/LMkOaJ6/iCLKXs4vTkjG pYsrgLX4VdoKoOHb4KhWM6N5LJihG/UX42aVGNlCQu6DAQ8pW0KoARfLN01jPLiMTKYB 91Oq9CjIlmav9zb70nspHpvGmSR51ksMl5HTH5EuBvoHdNGM2GQri/5cV7cfMcuO5SRM E6WyRBLdOs8aRqzc96b4/8SzthNGcqFN8Cti3l/rAYUXHFXMkkQdrBuRzObC9kyFU6AW t9sw== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AGi0PubHawAcbsZYGppJwrh94N67SsWNl+T12+6YISVCjfyxsq3hp6PC tJYxd+5J4TyDZ4YKaxJJLhziI/V1 X-Google-Smtp-Source: APiQypJENZATio5R6V9pl1QS7Fv/YtfbHM+HOgD4DKn0dH35vfD6khKuznKIvb33dZy6oxpOzdDS4Q== X-Received: by 2002:a17:90a:384b:: with SMTP id l11mr33475557pjf.89.1589354032071; Wed, 13 May 2020 00:13:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:7c89:: with SMTP id x131ls468424pfc.5.gmail; Wed, 13 May 2020 00:13:51 -0700 (PDT) X-Received: by 2002:a63:1447:: with SMTP id 7mr22692458pgu.253.1589354031474; Wed, 13 May 2020 00:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589354031; cv=none; d=google.com; s=arc-20160816; b=cD+CO9ruo1vpXXeJ6+7/KV8j9nzLQ8AHCCjpL3Yezf+G82yQAOX/l0ni0KbXdTr2i+ AnESiZbvd2slN1unOjcwPx+aWpYttL4uWl8prooV5g6lbJL7oyPRVCyvqfkXceWO1RIl ti+JisC4JaEU1P9jyFTpOU3o9Z6RQnAcZ6qeB6hMYAcVCkCY9DqhSCLRuLq+OWWQHbAA vuA8ek+4puKBkTPFnXCbhJJnJUN240s0X+ksEspxxvhx8Y/CnQ+EnhmITWl9P8EJ8lZJ qnIL1Zk5SK+xZ+/JRZv240rFVSLLnHaNl52Ufsx/ZeQuzlyixjibyhhNlydsmo4fXRfx YKtw== 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=7BHSiyzqRzaq6CeKTEq5VTyfAWDswWuqABh7uBAjnbM=; b=XYHc00jih59fFBHLOVLVotF4+gW90z2bM2iOQ6ErLSmuxJCRf8P2MGJmy4nkETuFAk rRXEuR+pG0YlqAhsLfdufxKH563lYhbnludvH8czr0aCGh+Opkdfbm+OUTTjbGyCdfRQ /vBqhRVKng7tX11j0UynTi41gLaxyCPDc5yNH9pibOFyBEQuPyjhFBzNXOYF4O0lZJeW 72JfzlRQEOTPJ/BkjUoglLgr8gYZBIChGNKSKtjVkmSPDe8xl3VIapCdt/kfLOVdpxpY Bd2rwOhmO/zZsLz2kqFuvwMJwKDOo1SEyrlAZA+dXhfcLKEmxqG0GlIV+hg/a/1rZ0MD 4H0A== 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 f11si11818455pga.186.2020.05.13.00.13.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 00:13:51 -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.32]) by lucky1.263xmail.com (Postfix) with ESMTP id A7113CDD07; Wed, 13 May 2020 15:13:48 +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 P33519T140426061264640S1589354025823852_; Wed, 13 May 2020 15:13:47 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: 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 v5 00/16] Add Rockchip RK3399 USB3.0 Host support Date: Wed, 13 May 2020 15:13:28 +0800 Message-Id: <20200513071344.5430-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 V5 update: - Fix dwc3-generic driver followed Marek's comments for [PATCH v4 12/16]. - Add 'Reviewed-by' and 'Tested-by' tag for [PATCH v4 07/16] and [PATCH v4 08/16]. 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