From patchwork Mon Jun 20 17:56:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9188363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9A1B607D1 for ; Mon, 20 Jun 2016 18:01:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCD352780C for ; Mon, 20 Jun 2016 18:01:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF62D27C14; Mon, 20 Jun 2016 18:01:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F41B72780C for ; Mon, 20 Jun 2016 18:01:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3VP-0007HG-Fw; Mon, 20 Jun 2016 18:01:03 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3VF-0007BD-TV for linux-rockchip@lists.infradead.org; Mon, 20 Jun 2016 18:00:55 +0000 Received: by mail-pf0-x230.google.com with SMTP id t190so56323083pfb.3 for ; Mon, 20 Jun 2016 11:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4w0KHfE3CxA3sRtTe9Rs9fsUdr25mnkervEAvbnH4b4=; b=mJ5ax//YopDVOORhytt5EKXxVLgwcpHnsdtRSqdR6KjZkdnHPRKVzjqNK5fLojtD75 iEuhHiE7/XaslXOHFsmg5kVnXFGACxEaWa2rYmdZfWPGjHVm6nG5QaAPHfw2yNOuST6a A/QAV+58ZDonO1dS2waryCL6H10Rnh8QOjEls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4w0KHfE3CxA3sRtTe9Rs9fsUdr25mnkervEAvbnH4b4=; b=JlShYUu0e8ValMeS8KlA2Dw8WB3CgHAbYy/oC82jt1Joht/0xvGWSBksH5jWy7nbzp Cp3veODb6tmuIjj7vKBOChevB8tUuKLdowslWlZvL4EYK5gK+x8yhpu81+7iMI2F0zrP OkfnREtrpZTr8/d1UHC+qg3+cYiLRTXZaq8Ryuesvt+GBEJ5MzS+v6Eko50H6XkA7xEN tChH+nWTyezh2y5ZS8bw6sN9KFYsZFPFcboK/1Tna0RVH6RdYB9LvfsirYq5ugYovCaR LtrtdHE6lXmmF6a8E0R9t4e0P5Gtl1apCUyKB7yBpPo9JvhcCaufb5bmIpJq+MaHViL4 82Kg== X-Gm-Message-State: ALyK8tJsOc1NK4VB15U8D0cMtIREXFBMGo7BIk3aBS8ryYSxg2pdnHjsXBvUIUpTBGKxBuxA X-Received: by 10.98.25.66 with SMTP id 63mr23024072pfz.94.1466445632727; Mon, 20 Jun 2016 11:00:32 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id c189sm60250353pfg.19.2016.06.20.11.00.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 11:00:31 -0700 (PDT) From: Douglas Anderson To: ulf.hansson@linaro.org, Heiko Stuebner Subject: [PATCH v3 01/15] phy: rockchip-emmc: give DLL some extra time to be ready Date: Mon, 20 Jun 2016 10:56:40 -0700 Message-Id: <1466445414-11974-2-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466445414-11974-1-git-send-email-dianders@chromium.org> References: <1466445414-11974-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_110054_012416_3B0C9E69 X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Douglas Anderson , devicetree@vger.kernel.org, xzy.xu@rock-chips.com, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, briannorris@chromium.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, kishon@ti.com, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, groeck@chromium.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shawn Lin According to the databook, 10.2us is the max time for dll to be ready to work. However in testing, some chips need 20us for dll to be ready. This patch adds some extra margin for dllrdy to be ready, fixing our -ETIMEDOUT issues. Signed-off-by: Shawn Lin Signed-off-by: Brian Norris Signed-off-by: Douglas Anderson Acked-by: Kishon Vijay Abraham I Tested-by: Heiko Stuebner --- Changes in v3: - Add Brian's PHY patches into my series Changes in v2: None drivers/phy/phy-rockchip-emmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 6ebcf3e41c46..48cbe691a889 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -119,10 +119,11 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy, PHYCTRL_ENDLL_MASK, PHYCTRL_ENDLL_SHIFT)); /* - * After enable analog DLL circuits, we need extra 10.2us - * for dll to be ready for work. + * After enable analog DLL circuits, we need an extra 10.2us + * for dll to be ready for work. But according to testing, we + * find some chips need more than 25us. */ - udelay(11); + udelay(30); regmap_read(rk_phy->reg_base, rk_phy->reg_offset + GRF_EMMCPHY_STATUS, &dllrdy);