Skip to content

Commit cb7f49a

Browse files
smaeulvinodkoul
authored andcommitted
phy: allwinner: phy-sun6i-mipi-dphy: Set the enable bit last
The A100 variant of the DPHY requires configuring the analog registers before setting the global enable bit. Since this order also works on the other variants, always use it, to minimize the differences between them. Reviewed-by: Paul Kocialkowski <[email protected]> Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent a709ae5 commit cb7f49a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/phy/allwinner/phy-sun6i-mipi-dphy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,6 @@ static int sun6i_dphy_tx_power_on(struct sun6i_dphy *dphy)
183183
SUN6I_DPHY_TX_TIME4_HS_TX_ANA0(3) |
184184
SUN6I_DPHY_TX_TIME4_HS_TX_ANA1(3));
185185

186-
regmap_write(dphy->regs, SUN6I_DPHY_GCTL_REG,
187-
SUN6I_DPHY_GCTL_LANE_NUM(dphy->config.lanes) |
188-
SUN6I_DPHY_GCTL_EN);
189-
190186
regmap_write(dphy->regs, SUN6I_DPHY_ANA0_REG,
191187
SUN6I_DPHY_ANA0_REG_PWS |
192188
SUN6I_DPHY_ANA0_REG_DMPC |
@@ -244,6 +240,10 @@ static int sun6i_dphy_tx_power_on(struct sun6i_dphy *dphy)
244240
SUN6I_DPHY_ANA2_EN_P2S_CPU_MASK,
245241
SUN6I_DPHY_ANA2_EN_P2S_CPU(lanes_mask));
246242

243+
regmap_write(dphy->regs, SUN6I_DPHY_GCTL_REG,
244+
SUN6I_DPHY_GCTL_LANE_NUM(dphy->config.lanes) |
245+
SUN6I_DPHY_GCTL_EN);
246+
247247
return 0;
248248
}
249249

0 commit comments

Comments
 (0)