phy: rockchip-emmc: enable internal pull-down for strobe line
authorxiaoyao <xiaoyao@rock-chips.com>
Wed, 1 Mar 2017 02:14:22 +0000 (10:14 +0800)
committerxiaoyao <xiaoyao@rock-chips.com>
Wed, 1 Mar 2017 02:14:22 +0000 (10:14 +0800)
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 <shawn.lin@rock-chips.com>
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
drivers/phy/phy-rockchip-emmc.c

index fd57345ffed28709c1e76105cb4fd7df32debe1c..e1c093dc4673c1d991d8e1d185d0755023c3f827 100644 (file)
@@ -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);
 }