On 14/06/2023 13:15, Xu Yang wrote: > Whether the data line is disconnected when vbus is not present is related > to whether the platform data set MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS > flag. This will provide a override from dts node if the user want to hold > the data line when vbus is not present. > > Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx> > --- > drivers/usb/phy/phy-mxs-usb.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c > index e1a2b2ea098b..036bb58a3a71 100644 > --- a/drivers/usb/phy/phy-mxs-usb.c > +++ b/drivers/usb/phy/phy-mxs-usb.c > @@ -199,7 +199,7 @@ MODULE_DEVICE_TABLE(of, mxs_phy_dt_ids); > struct mxs_phy { > struct usb_phy phy; > struct clk *clk; > - const struct mxs_phy_data *data; > + struct mxs_phy_data *data; > struct regmap *regmap_anatop; > int port_id; > u32 tx_reg_set; > @@ -774,6 +774,11 @@ static int mxs_phy_probe(struct platform_device *pdev) > mxs_phy->tx_reg_set |= GM_USBPHY_TX_D_CAL(val); > } > > + mxs_phy->data = (struct mxs_phy_data *)of_device_get_match_data(&pdev->dev); > + > + if (of_property_present(np, "fsl,hold-line-without-vbus")) > + mxs_phy->data->flags &= ~MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS; How did you test it? What type of memory are you modifying? Best regards, Krzysztof