Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2047726pxu; Fri, 18 Dec 2020 04:23:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcy67+F/y/dd7KcjfMMmWHJy4D5dIhiqjF0EB1bWvAL+cduy6uhVgbfAYz0gNi5YxXPJa8 X-Received: by 2002:a17:906:447:: with SMTP id e7mr3807652eja.172.1608294191826; Fri, 18 Dec 2020 04:23:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608294191; cv=none; d=google.com; s=arc-20160816; b=BlkPxl72g4cqcU4FBo6ELsr3BTk9kLETHBamcv8pes7Ux2H0YEMe4vK/LuZlsyWPA4 KgkoekTnXq1QCHcALuyqzIMViA3qqG6Nj4hfLo02JmE6b4sJZ316DjJhsNC1NTvxzsb/ OMT+RAlNfiNwvtNdXrHfVuKOD80UMKqRlJRK6MRAtMnaq1iRS0eYIAnoxeF+IFhSF53z nW88mNMZzmZMN72F0WP8Wl43OtraEvvl/BnYgX110WPsOlVw52DQ7d7axNIs7WRClGeM 1I6RPEIzCTAjIrETuJrNWV2aT/ZHG2SdiLQlZi9XhY5VQpWDU075w/zR/8I6/67jod3c uDaA== 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=wmKmmssP571GSjnFYi6HX98tL6vYtUuHsqmX9JpWAKE=; b=GkvAYeBkDyTTVajVETDweTSGn6RI67E4hdbsd/UJq+r6s5lL2ujb2k1WfDcbsu4Glc E8snMtMBfq1nuF5kcAnATxPc92AlKwFL/2GEtiNSQ8d6hg1v+SeB/YptAA9Wi6mn2nAt zzeJ+ajafpBAlmVMCg9muO3sbaRGfH45JTWA6L/mRJ0kq83PrXcLakTUk58WswrPkHfk sUI3xVB1K1gXWpY7RgcBcvOgXYB3+qAtWiS31gpkcCh2vCF9DOMFr6/HZWijOiXJjfzK OzcDSk9EzPCSttj+Nc5WTLXdwcq8sZBAVvbSHOmvJ6Raata4Z6VxD7SCwPrSxy2rpMRB dEYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="YOn3/2Ua"; 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 qk3si4553024ejb.83.2020.12.18.04.22.49; Fri, 18 Dec 2020 04:23:11 -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="YOn3/2Ua"; 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 S1726555AbgLRMMK (ORCPT + 99 others); Fri, 18 Dec 2020 07:12:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbgLRMMJ (ORCPT ); Fri, 18 Dec 2020 07:12:09 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A46CC0617A7; Fri, 18 Dec 2020 04:11:29 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id y19so4754978lfa.13; Fri, 18 Dec 2020 04:11:29 -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=wmKmmssP571GSjnFYi6HX98tL6vYtUuHsqmX9JpWAKE=; b=YOn3/2Ua2DaHNl9slwXBL4Mu9YvF0aqiet7j6Wj6tmddHMH8oNolTsbuumtocs46OY ZUfM6sUwG9Spfexy7NsVoZ3ZI9mi11iTueOpdn4I5hIDiaHxUPDI6A7LnycXkIkT/3Xo Med+wxfO4lZPHS+jXwsaxzk7yP190TcHZPW03QFtuLOWxOWzSwfjdjmOyZ04xt8VcjDi O1I9EgSQw01QkpVbY4kQcJ7z6wv+Cse0dDhcmoA6kSr2v5Fu3A44xLBHTClXN7ItJHJj oWcEfiLGmvVpHwIHXKlEdEPGRIryDZFEPmxBq8qV8R62GbaZi0tDDyB+p5grMvM1l3bC zXsQ== 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=wmKmmssP571GSjnFYi6HX98tL6vYtUuHsqmX9JpWAKE=; b=D8zpYLurLt98/4Q2FgPB/k+jSxutjNVitTdWTjEdSrOl19WIUfu6EXZWxXFRM6i28D wYREgTJJawRSGQRGMX1MCqT6u4FANLDNeTM8trCEu5eOqkBvHapWKQ2oPqYqWxVr1ipy 0JjNI9bbVqXoHogBPdXU8Ej5riNAx+PUTYBrC/nzYpDdRZpZ5aR66PwXTRoN5sXEWUuj Qxb0cE4gdLyrtqN4srYbW5t1DeNEVQtmIoFb+5Jae2Gx5p92Bb8VnPxCesvNMMusjBMy f4fPObAmtZvH4iakDpkpKOFVNvEJ5cusSaPoMqSQQSw6RZIN7OfhWVfNtcjNV4jcJJzP V7FA== X-Gm-Message-State: AOAM533GZWrV2gkSiRvEcM9RXyAhme1qn8szgvQ9OxRmHBtEZPsOI4jF rS3+XJr3aFus1cP02CKYch8= X-Received: by 2002:a19:c70b:: with SMTP id x11mr1353353lff.258.1608293487769; Fri, 18 Dec 2020 04:11:27 -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 i9sm1036472ljn.18.2020.12.18.04.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 04:11:27 -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 v3 0/9] Support Runtime PM and host mode by Tegra ChipIdea USB driver Date: Fri, 18 Dec 2020 15:02:37 +0300 Message-Id: <20201218120246.7759-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: v3: - Replaced "goto" with if-statements as was suggested by Thierry Reding. - Improved wording of the deprecated Kconfig entry as was suggested by Alan Stern. - Added ACKs from Thierry Reding and Alan Stern. - Added a new minor patch "Specify TX FIFO threshold in UDC SoC info" just for completeness, since we can now switch OTG to host mode in the ChipIdea driver. Although, OTG support remains a work-in-progress for now. 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 (8): 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: chipidea: tegra: Specify TX FIFO threshold in UDC SoC info usb: host: ehci-tegra: Remove the driver ARM: tegra_defconfig: Enable USB_CHIPIDEA_HOST 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 | 344 ++++++++++++--- drivers/usb/chipidea/core.c | 10 +- drivers/usb/chipidea/host.c | 104 ++++- drivers/usb/host/Kconfig | 10 +- drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-tegra.c | 604 --------------------------- drivers/usb/phy/phy-tegra-usb.c | 103 ++++- include/linux/usb/chipidea.h | 6 + include/linux/usb/tegra_usb_phy.h | 2 + 11 files changed, 518 insertions(+), 672 deletions(-) delete mode 100644 drivers/usb/host/ehci-tegra.c -- 2.29.2