Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d54a25b authored by Shawn Lin's avatar Shawn Lin Committed by Ulf Hansson
Browse files

phy: rockchip-emmc: give DLL some extra time to be ready



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: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Acked-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 476bf3d6
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -119,10 +119,11 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy,
				   PHYCTRL_ENDLL_MASK,
				   PHYCTRL_ENDLL_MASK,
				   PHYCTRL_ENDLL_SHIFT));
				   PHYCTRL_ENDLL_SHIFT));
	/*
	/*
	 * After enable analog DLL circuits, we need extra 10.2us
	 * After enable analog DLL circuits, we need an extra 10.2us
	 * for dll to be ready for work.
	 * 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,
	regmap_read(rk_phy->reg_base,
		    rk_phy->reg_offset + GRF_EMMCPHY_STATUS,
		    rk_phy->reg_offset + GRF_EMMCPHY_STATUS,
		    &dllrdy);
		    &dllrdy);