From patchwork Tue May 26 03:32:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wang X-Patchwork-Id: 1231 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 211B53FA4F for ; Tue, 26 May 2020 05:33:00 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id gk8sf1542755pjb.8 for ; Mon, 25 May 2020 20:33:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1590463978; cv=pass; d=google.com; s=arc-20160816; b=mmINp3uR1zACPjQkpUxA0cPTiERe9rF8nSYyUAur2/nmaiGidyw0bsOy/zIsBHdeL2 NAD7d3MebfK2clRo/HlU3QDQs0MWwG1xmU5jl8O7xISi86+zX1RFZpTJ1PeXL68bTUBD CayR64QH+i2e51QMaMzYz5o447K8qirGAx4Ouhcii2SkWo60+FQZefcUAWyYSYM8O76e fppbcG15Nb8ZLXx/TsCtLrQW8GaJYwpSxB8yCL8PBGIReGluuYhjweDmzv50wzxBsmS8 Lk1pz4qZphNj2Qif6P7hZUXIHdkLLrX4TioHv1CdA2MBUAOw+csPV50lDRlndvIB+bMH ajhg== 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=iVveCLEtkdG257TOaGZQxN+NwxjkBeayjx9uGpAYu0I=; b=WfVH4/nFvTSVg9SP119GvcQY24XFF0d+dVnFgHxTM34XN99lvhxXcD+hTrj5oPEaqa TRDGyl/J/0P5qLwDjlZlxKpeRkAwO6+e9/C4aTZDYU6q/lu8GjnisyfAq2VmYqb5fCl8 28H8z2WUTIYlb/e6UEd+kSlBJyC/ZgnTGGJO2BdNuqlE4o41Nps6SEpwtTdOfYlh7VUw eaFpgk5VI75XXW5fkCIeSwzmqcBmIcPffY0k3pTibtnhDaT15oIcOYA+6FOIr/K18r8X 8wOQCUpXdf8O0a5zhI8in+YGX3XEutW23dIf8Mq0ViFsOBXQPe2j6pPCXlyxYG8oH0f4 YCDw== 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=iVveCLEtkdG257TOaGZQxN+NwxjkBeayjx9uGpAYu0I=; b=OuQctP6SXzwHL7xErw3xvfluTP6h27xSvzGydPwutOlUxqG4UIeYoPRKtNvliz5/24 v9gNVjxtc6qKbglTRib/8lTLfKK7bLCVwf1N+saUcpvp5I1av7avIwUVzuASpG1ubXMX nnl81zKpm4I5Li40BE9Lyd3qpO8AyA+MKnvn8= 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=iVveCLEtkdG257TOaGZQxN+NwxjkBeayjx9uGpAYu0I=; b=fizi5D40oH0CG+ETQrDQqDwhVUuX/stK87MUaKljk+NNy+T1HVF6n9xWcBLluhcoba /solXLIXS0sz+WeEFzOa/NpLcN6VEK3F4uTgaIw/XALs9Bi0v+cFsa6nEPpiGhzZaDa1 /tNxwAfPG+CO6YWpwbY5Jkw3Hbxi5O2VmPDg5ASferTZXIwL6h60ISQlFtPZ33TnfbbD kU6y44rADGFr7J7ex5u2LDcWkFmRt+Ut9qxoSv3fUBPrSXRuQwzK0BDgLabCgDIEpJua /ycbVB2tOEK8N8l0g/0pzvGIOQfuFbe4eHCbK+JQKkwJABydI6/wzcT7LjYILyrkqnnr 6/nQ== Sender: linux-amarula@amarulasolutions.com X-Gm-Message-State: AOAM533tbnA9PsXP5EV9ooHJUK+d6s3fzUma3KsUAiBqWkBX81x2DVPf T3pWWHNMCwTODzWc/FwqtNlerR12 X-Google-Smtp-Source: ABdhPJxk8kNW+K/w/nmfchHsZwChX0UfkrOcOjHDG+ZQZeNzTQjoClGAc2n4DYIb6BdPYqsrtRV/NA== X-Received: by 2002:a63:497:: with SMTP id 145mr28956042pge.356.1590463977953; Mon, 25 May 2020 20:32:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a605:: with SMTP id u5ls1183259plq.9.gmail; Mon, 25 May 2020 20:32:57 -0700 (PDT) X-Received: by 2002:a17:90b:789:: with SMTP id l9mr23590497pjz.111.1590463977272; Mon, 25 May 2020 20:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590463977; cv=none; d=google.com; s=arc-20160816; b=jJlQDVmEbpc7UTV2p8zKSqSFDm0Z5yMdQu+mfgv+QnI+a3aaUhH+4G49Ouy2VqARFH IkCUdLwFu6ImYnmmSEzmwAbaKcRltB/C+HCg2DBa0HIoI3Ikxnpw3HxTEd1EEev+o5uR HlLXwa8NzDBHHyJh0mm6csAgOPpRBqMvb+6j9XAF3bk8Qm+P2oAh8+L3gkrAgzkn/j6J FwUmpyVjSB22XEVbkhrNeXTY4O2lSHmjDKuI8c2hB5Tiw2BA0UgQXpxsvkinjG1dHIW0 Co/EdRvQtnU1J8CrDH8S9U1HBTR4Y/ujLVES+tLz3wjj5t1pUaIXW8dF3f9+EN5sVQcY B68g== 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=5WVvcnryacCuPJtd4eprisG6wkXQcOebfo3T3mpP7pI=; b=twpq8M9jP/EeaHL+ccblejPmVY+nPPSc6G34zp1olXTQakf+ffFwU33fXHoQq3ddWe MNNQloFbamMFOV7BxAoGZRMuJo0VqSWeX25ji8MdEeNByFDuRB+075QhDLmaQqSJkjBD y/4LbC0EIYiV5bG172ZVHXANV1dBi0f1cmitV5wtpwXfyd08lcy3twkfocqNu9W6Ncqz P5Zf+k4b7j712iHUjc/JS+RTY/R5XkQeHi60CYi+/DoYKP0ZZ3aONuTEbxtsoZebVzGi GZnweLNeoNPLn3UT3tBVVD+U0SninZcwUDGzyGpKkyby4yxDQkibOZGuPspEWfJV/4ZQ nUgA== 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 w187si15090885pfw.213.2020.05.25.20.32.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2020 20:32:57 -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.8]) by lucky1.263xmail.com (Postfix) with ESMTP id 1A2B4D5950; Tue, 26 May 2020 11:32:23 +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 P21206T140696379496192S1590463941416434_; Tue, 26 May 2020 11:32:23 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <47e9953dffa7647e6a938d540879b68b> 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 v6 00/16] Add Rockchip RK3399 USB3.0 Host support Date: Tue, 26 May 2020 11:32:04 +0800 Message-Id: <20200526033220.20047-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 V6 update: - Use [PATCH v6 04/16] instead of [PATCH v5 05/16] to fix that the current Generic PHY subsystem is unable to find PHY if the PHY node is not part of the root structure. - Add 'Reviewed-by' tag for all patches except [PATCH v6 04/16]. 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 (8): arm: mach-rockchip: bind sub-nodes for rk3399_syscon 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 (8): 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 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/mach-rockchip/rk3399/syscon_rk3399.c | 3 + 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, 1376 insertions(+), 243 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