From: xiaoyao Date: Wed, 1 Mar 2017 02:14:22 +0000 (+0800) Subject: phy: rockchip-emmc: enable internal pull-down for strobe line X-Git-Tag: firefly_0821_release~508 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=52b7442b0564902c20cbb3d91220965f1c7e3aaa;p=firefly-linux-kernel-4.4.55.git phy: rockchip-emmc: enable internal pull-down for strobe line We enable it by default as we could see the usage of PCB layout will not stuff this registor. For currently boards which soldered it already, there should be no harmful. Change-Id: I913d6412d9e4589ded5ca012e46fe3e93075cc0d Signed-off-by: Shawn Lin Signed-off-by: xiaoyao --- diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index fd57345ffed2..e1c093dc4673 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -75,6 +75,9 @@ #define PHYCTRL_OTAPDLYENA_SHIFT 0xb #define PHYCTRL_OTAPDLYSEL_MASK 0xf #define PHYCTRL_OTAPDLYSEL_SHIFT 0x7 +#define PHYCTRL_REN_STRB_ENABLE 0x1 +#define PHYCTRL_REN_STRB_MASK 0x1 +#define PHYCTRL_REN_STRB_SHIFT 0x9 struct rockchip_emmc_phy { unsigned int reg_offset; @@ -306,6 +309,13 @@ static int rockchip_emmc_phy_power_on(struct phy *phy) PHYCTRL_OTAPDLYSEL_MASK, PHYCTRL_OTAPDLYSEL_SHIFT)); + /* Internal pull-down for strobe line: enable */ + regmap_write(rk_phy->reg_base, + rk_phy->reg_offset + GRF_EMMCPHY_CON2, + HIWORD_UPDATE(PHYCTRL_REN_STRB_ENABLE, + PHYCTRL_REN_STRB_MASK, + PHYCTRL_REN_STRB_SHIFT)); + /* Power up emmc phy analog blocks */ return rockchip_emmc_phy_power(phy, PHYCTRL_PDB_PWR_ON); }