phy: rockchip-emmc: enable internal pull-down for strobe line
[firefly-linux-kernel-4.4.55.git] / drivers / phy / phy-rockchip-emmc.c
index 2853e0e89bc019b1030ebcfcfa071f32f737a72b..a184a0fe60838ff89f7cc758a7ab272853782e71 100644 (file)
@@ -79,6 +79,9 @@
 #define PHYCTRL_OTAPDLYENA_SHIFT       11
 #define PHYCTRL_OTAPDLYSEL_MASK                0xf
 #define PHYCTRL_OTAPDLYSEL_SHIFT       7
+#define PHYCTRL_REN_STRB_ENABLE                0x1
+#define PHYCTRL_REN_STRB_MASK          0x1
+#define PHYCTRL_REN_STRB_SHIFT         9
 
 struct rockchip_emmc_phy {
        unsigned int    reg_offset;
@@ -203,6 +206,12 @@ static int rockchip_emmc_phy_init(struct phy *phy)
                                   PHYCTRL_OTAPDLYENA_MASK,
                                   PHYCTRL_OTAPDLYENA_SHIFT));
 
+       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));
+
        regmap_write(rk_phy->reg_base,
                     rk_phy->reg_offset + GRF_EMMCPHY_CON0,
                     HIWORD_UPDATE(rk_phy->opdelay,