Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1091951pxu; Thu, 17 Dec 2020 01:49:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxX4mS7Tf6S6O5ejXrk+3IQB57NMMXH//UCMZ0eb7kDhaYejZvAaMhFF1HoB7eVaxINTPbG X-Received: by 2002:a05:6402:ca2:: with SMTP id cn2mr37607885edb.137.1608198560964; Thu, 17 Dec 2020 01:49:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608198560; cv=none; d=google.com; s=arc-20160816; b=JMP83HVsfHRLCI7j4A66hRq14VMNJ0zWyScAM9Zey6pv4x1SN/tKzGJhW9TfMevSpu pBziANL9B7WUruMoZZ1Yr/a41y8leXDz9wzYJfD2CDwWpC0vj0LtrKeapZXHM/kj+nr1 wjK8Xjy966EiRx4e2lQptjWAP78HLRrHFciVzDAzNyTT7g9eAP+fwL99uuRyB8NpBwzX MiMI9tV5faoZqOHznRIlL0e1vbJODlq7c6DRG7F28otNuw8OPgRRkkag/xI91dVqs/gN dQMiaNo4jGuHODG+bI/M6EjDeZGYMghN3zCY6x+6CwVwcd9qjx7+iob3TiRHVe87pjv7 hDzg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MY1cG7uVHPz9FWtjB6IqvDBgQ3Y86WR5onlr74UtS4s=; b=0CW5/27fbUpltD9s30OkUJ6LgIcvSV4zh7P8dXy7q2hjNhuFJgyveZ0wGz03F3r2Mz IbMuHjwSW2TW2ZMNHfjls4YAhDHxlbZSFkaiPvD/OhPfhIWHUT2Dh//YdNIWeBfSTA1f hDFQbtnxui8P0Lxv/jCRvOBXsXMZ65pxRFzjei4UAZ+Klmbsx2CwQj+S9hXENXZhVTy/ NwNrlivZ7pF7akpqBlGyqOnxDdcuZMDx0fVmeOgLOoTLsqFV3dW+Da4qJXGj89jDFUTB 06cT+d6MuzmtY8k6g0t2MElbn4e8P6dUxg3m2IGS0RDdIWhJ41LcpWR5Ma0JIxpXgtD8 uRjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LQlFNXaD; 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 z23si4412303edl.270.2020.12.17.01.48.58; Thu, 17 Dec 2020 01:49:20 -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=LQlFNXaD; 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 S1727417AbgLQJpu (ORCPT + 99 others); Thu, 17 Dec 2020 04:45:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbgLQJp3 (ORCPT ); Thu, 17 Dec 2020 04:45:29 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3777EC0617A7; Thu, 17 Dec 2020 01:44:49 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id m25so55696084lfc.11; Thu, 17 Dec 2020 01:44:49 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=MY1cG7uVHPz9FWtjB6IqvDBgQ3Y86WR5onlr74UtS4s=; b=LQlFNXaDge6mBrnicXRsp2uXt62N1+Nr4MRvPeb6mEzGO5E3ErHBgSAbEzUBUEcYCz rwAS09qjmZ3v+EzlF8I45GvZakIA3eRj0PNyk0gmIFr+FBHancRgRsu2pHW1SLVJk77q egUqlrm81Xk0Jztmew6yAZfpbiGeR9fOzwdMhvnb3ncdTTQR4ww2W+58J8hnDpQy68+P uMaecNud2G6LwdEgxJAzKDM6zMy6InHitEY3jzSobKohJ20UBiJ9ARHfKJjM2NH5D6Xr eTPXdRvvl0A46P5GFk5WeCq60I2wuQNAhqy5Ljkw3iRbeqiKG3rLc0deOp7xsR/yubjf zGHw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=MY1cG7uVHPz9FWtjB6IqvDBgQ3Y86WR5onlr74UtS4s=; b=gl6l2G1eUU+bJ2HPCmf4sNrN6GpfUdXJenz0atjQw6RvcSy1dESoD6e58ZgrwI6Soq ZTpuNk2K2ktUpdx93T4th8tMmYNZJw4nDlsFyYKjityT9tvuDJCtclpFbunnhNktBKIi Ny7zPxcosNLj5oXLQWE0uNgyGnW02oxXiXuCM/aA7iZZ6Q42sXttBULRCSlTL2yuTqHB xXpwbg55jzMWfFOdTWnxdF1plDhy4q031A0rQ4UUS00ZM55iMWugnEUuYN6/9g0iD06X 4CUaI/F3ubBdJUtbzXjx5x6xVtgi0g1DceSwftCco/d/gzTPV7SBlJjotdfwolje25zC 6TcQ== X-Gm-Message-State: AOAM530LvIBMDUcpGVuosSVb6HspqzeV0gu1ldZTkaRi+NwsxaN7rVum ZMzl+LvfvFNPd0O2ygJLeVY= X-Received: by 2002:a19:8213:: with SMTP id e19mr13676997lfd.600.1608198287714; Thu, 17 Dec 2020 01:44:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 01:44:47 -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 1/8] usb: phy: tegra: Add delay after power up Date: Thu, 17 Dec 2020 12:40:00 +0300 Message-Id: <20201217094007.19336-2-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201217094007.19336-1-digetx@gmail.com> References: <20201217094007.19336-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PHY hardware needs the delay of 2ms after power up, otherwise initial interrupt may be lost if USB controller is accessed before PHY is settled down. Previously this issue was masked by implicit delays, but now it pops up after squashing the older ehci-tegra driver into the ChipIdea driver. Tested-by: Matt Merhar Tested-by: Nicolas Chauvet Tested-by: Peter Geis Tested-by: Ion Agorria Signed-off-by: Dmitry Osipenko --- drivers/usb/phy/phy-tegra-usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c index 03a333797382..1296524e1bee 100644 --- a/drivers/usb/phy/phy-tegra-usb.c +++ b/drivers/usb/phy/phy-tegra-usb.c @@ -784,6 +784,9 @@ static int tegra_usb_phy_power_on(struct tegra_usb_phy *phy) phy->powered_on = true; + /* Let PHY settle down */ + usleep_range(2000, 2500); + return 0; } -- 2.29.2