Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1091022pxu; Thu, 17 Dec 2020 01:47:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXXw2zlF2q5PlFGyflwzRVz2LxWABL1YE4BBnOyz9BwHdz5nAQFwqwlhEbdEF4V0GSm6Hl X-Received: by 2002:aa7:db01:: with SMTP id t1mr37558190eds.185.1608198442731; Thu, 17 Dec 2020 01:47:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608198442; cv=none; d=google.com; s=arc-20160816; b=NNHohPnmWLGqXpl8cIypak2CkW6Pq25lsi6CFUv9hgmghAAYTeVqQ2JgJXTx9T3BaT qfZgE9zLVWXXwpPq26k0PoNfWkgQ8PBxAqMLrphKE5VtKtC7hv7q40gIupCNPu0l29Xw Ex7xAVqaOt7IQGIPPhXYHrZ/HazJ+N1G4Yd3ZxuWUOARbz4eKoGp0HK54LlZpMX4h0Xs MBopx5F+FUDHII1NWYLpoFMr2Qv8Nr01IcGs0f7UEbK9l5+P2PoXFsHm0+GCw29sFLsl n2fGucEMM+q7h/mp1jRa7Ou4kXMCAPWJMac6DhMYQiEpeNwMIdsdEQDWjO90pfi4c3iZ lLZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=49R7Nns8UoMP9HsytHse60/QY97t97BAUh7L1c4ruI8=; b=XPAZl9aIdwk5oK47fY+g0kkvqy6JkuHhBrM6nBkBhddT92Un1ZOt94aABGGK98qK36 0Mb+Z6ZbSjGusAVEXjjjr2/v8Ss5ZGvmJI++2pQTRvncOHZBInGR+bF3Y48a6uwUvGp1 vD66MRcBeYia1FEQMEUd6PUxgALCIhLj0N0/Uoy+hSamSNx/iFWirt5a8lR2UH0XEcTQ ZNdy6mSLjrcfKfjmu1Md2CvP7MNd01nfDt2Y8dpuigxdh7ndq2xr/xaJORzmg9Rh1dAd 0/iryDbiohd+rQbN/vSP1XaZU438yORFlLBA2RMBQty6TlZEHan2eK4RU2VBa4JeKcnx RsCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pIUh3ys2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si4050922edn.43.2020.12.17.01.47.00; Thu, 17 Dec 2020 01:47:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pIUh3ys2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727552AbgLQJpa (ORCPT + 99 others); Thu, 17 Dec 2020 04:45:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727381AbgLQJp2 (ORCPT ); Thu, 17 Dec 2020 04:45:28 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D3CFC061794; Thu, 17 Dec 2020 01:44:48 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id a12so55748344lfl.6; Thu, 17 Dec 2020 01:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=49R7Nns8UoMP9HsytHse60/QY97t97BAUh7L1c4ruI8=; b=pIUh3ys2X3Y2Y5mEsoy74nwUq4ANNjgtMacjyxPMO36VYUHX6mQ0/Yk9D+gLo+9Fa0 I6OD6c7aMPStv52wBeeL0pL5oX08UIKjs0i68rd2u231WALi5cg+/nlQj6swLTyZ8kJO qQ/CmhPmAJUBcvq+Df4mH9ZmNjUc7jl0Sxb+T7FO7mmhN8siDabUFQo4+sqy898q07Du JuA4lxkbeL+eLVBIelHyEanXMFPfoWQaLAehDuuMeIp+8INmWyPBlzFw8/zb21eLGlsh mbKtKs2XcZhHq9YjEVG0c3mhJOJXfuF+rWdoHe7t3HVZxa7QUjjZljjHNqBbEmY/TwDl ZrOQ== 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=49R7Nns8UoMP9HsytHse60/QY97t97BAUh7L1c4ruI8=; b=uNLalq/Admd/bOFZkVz2Ys88c6Sf5sQkV9Va7MfyP72UOPcA+T28IFh3pH/1SVggLH YgFF8VbMMvnNQKUMQeSqAPD1oySBVXgffOS3Kqkm0aGG28OEbvafApQdfsCkSvt8Tm+A V2SxlvZgeakpx0UOUl74LpSdENfCd1SbHqw65K49SCKq1TnYt87B0/umBe0CXGu1Xnub Z3oCqwmZ/lx6kiZBO1Y3S0FPHAijlRNbxVTagGUmOzZ0vOsDvkm4o2i5V11p1kt+kUtP 0uA2B8+IWgbqn2g7pIfRw5LW7xFDx09cZg2FpECt9zypt7vqfbkwrg2+rrJPfpBwS2Vg Huew== X-Gm-Message-State: AOAM531C1n8ubSjWIg4kKe3H8hDGJXhRvOyMJEY/vgR3vuU/ImO39zFo BciTkA03wCmrH/nOhLQ1tZU= X-Received: by 2002:ac2:46e4:: with SMTP id q4mr13924793lfo.413.1608198286791; Thu, 17 Dec 2020 01:44:46 -0800 (PST) Received: from localhost.localdomain (109-252-192-57.dynamic.spd-mgts.ru. [109.252.192.57]) by smtp.gmail.com with ESMTPSA id u19sm613917lji.2.2020.12.17.01.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:44:46 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter Chen , Greg Kroah-Hartman , Alan Stern , Felipe Balbi , Matt Merhar , Nicolas Chauvet , Peter Geis , Ion Agorria Cc: linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/8] Support Runtime PM and host mode by Tegra ChipIdea USB driver Date: Thu, 17 Dec 2020 12:39:59 +0300 Message-Id: <20201217094007.19336-1-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series implements Runtime PM support for the Tegra ChipIdea USB driver. It also squashes the older ehci-tegra driver into the ChipIdea driver, hence the RPM is supported by both UDC and host controllers, secondly this opens opportunity for implementing OTG support in the future. Patchset was tested on various Tegra20, Tegra30 and Tegra124 devices. Thanks to Peter Geis, Matt Merhar, Nicolas Chauvet and Ion Agorria for helping with the extensive and productive testing! Changelog: v2: - Improved comments in the code as it was suggested by Peter Chen and Sergei Shtylyov for v1. - Replaced mdelay() with fsleep() and made ci->hdc to reset to NULL in a error code path, like it was suggested by Peter Chen. - Redirected deprecated USB_EHCI_TEGRA Kconfig entry to USB_CHIPIDEA_TEGRA as was suggested by Alan Stern. - Improved commit message and added ACK from Thierry Reding to the patch that removes MODULE_ALIAS. - Fixed UDC PHY waking up on ASUS TF201 tablet device by utilizing additional VBUS sensor. This was reported and tested by Ion Agorria. - Added t-b from Ion Agorria. Dmitry Osipenko (7): usb: phy: tegra: Add delay after power up usb: phy: tegra: Support waking up from a low power mode usb: chipidea: tegra: Remove MODULE_ALIAS usb: chipidea: tegra: Rename UDC to USB usb: chipidea: tegra: Support runtime PM usb: host: ehci-tegra: Remove the driver ARM: tegra_defconfig: Enable USB_CHIPIDEA and remove USB_EHCI_TEGRA Peter Geis (1): usb: chipidea: tegra: Support host mode arch/arm/configs/tegra_defconfig | 3 +- drivers/usb/chipidea/Kconfig | 3 +- drivers/usb/chipidea/ci_hdrc_tegra.c | 327 +++++++++++++-- drivers/usb/chipidea/core.c | 10 +- drivers/usb/chipidea/host.c | 104 ++++- drivers/usb/host/Kconfig | 8 +- drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-tegra.c | 604 --------------------------- drivers/usb/phy/phy-tegra-usb.c | 97 ++++- include/linux/usb/chipidea.h | 6 + include/linux/usb/tegra_usb_phy.h | 2 + 11 files changed, 503 insertions(+), 662 deletions(-) delete mode 100644 drivers/usb/host/ehci-tegra.c -- 2.29.2