As per a commit from Qualcomm's downstream 6.1 kernel[0], the init
sequence is missing writing 0x00 to USB_PHY_CFG0 at the end, as per the
'latest' HPG revision (as of November 2023).
[0] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/b77774a89e3fda3246e09dd39e16e2ab43cd1329
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/phy/phy-snps-eusb2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c
index b73a1d7e57b32cfdfbe314ab938ec54746ed53be..e232b8b4d29100b8fee9e913e2124788af09f2aa 100644
--- a/drivers/phy/phy-snps-eusb2.c
+++ b/drivers/phy/phy-snps-eusb2.c
@@ -437,6 +437,9 @@ static int qcom_snps_eusb2_hsphy_init(struct phy *p)
snps_eusb2_hsphy_write_mask(phy->base, QCOM_USB_PHY_HS_PHY_CTRL2,
USB2_SUSPEND_N_SEL, 0);
+ snps_eusb2_hsphy_write_mask(phy->base, QCOM_USB_PHY_CFG0,
+ CMN_CTRL_OVERRIDE_EN, 0);
+
return 0;
}
--
2.50.0
On 6/25/25 11:14 AM, Luca Weiss wrote: > As per a commit from Qualcomm's downstream 6.1 kernel[0], the init > sequence is missing writing 0x00 to USB_PHY_CFG0 at the end, as per the > 'latest' HPG revision (as of November 2023). > > [0] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/b77774a89e3fda3246e09dd39e16e2ab43cd1329 > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- Both the original and your commit messages are slightly misleading, the HPG (and the code which is indeed in sync with it after the change is made) only sets the value of 0 to BIT(1), a.k.a. CMN_CTRL_OVERRIDE_EN. You most definitely don't want to set the entire register to 0. With that fixed: Fixes: 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver") Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
On Wed Jun 25, 2025 at 1:51 PM CEST, Konrad Dybcio wrote: > On 6/25/25 11:14 AM, Luca Weiss wrote: >> As per a commit from Qualcomm's downstream 6.1 kernel[0], the init >> sequence is missing writing 0x00 to USB_PHY_CFG0 at the end, as per the >> 'latest' HPG revision (as of November 2023). >> >> [0] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/b77774a89e3fda3246e09dd39e16e2ab43cd1329 >> >> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> >> --- > > Both the original and your commit messages are slightly misleading, the > HPG (and the code which is indeed in sync with it after the change is > made) only sets the value of 0 to BIT(1), a.k.a. CMN_CTRL_OVERRIDE_EN. > You most definitely don't want to set the entire register to 0. After reading your message twice I think I've got it. Code is correct, but commit message is wrong (it's saying writing 0x00 but it's not actually doing this in the code, just setting the bit to 0). > > With that fixed: > > Fixes: 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver") > Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Thanks for taking a look! Regards Luca > > Konrad
On 25/06/2025 11:14, Luca Weiss wrote: > As per a commit from Qualcomm's downstream 6.1 kernel[0], the init > sequence is missing writing 0x00 to USB_PHY_CFG0 at the end, as per the > 'latest' HPG revision (as of November 2023). > > [0] https://git.codelinaro.org/clo/la/kernel/qcom/-/commit/b77774a89e3fda3246e09dd39e16e2ab43cd1329 > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com> > --- > drivers/phy/phy-snps-eusb2.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/phy/phy-snps-eusb2.c b/drivers/phy/phy-snps-eusb2.c > index b73a1d7e57b32cfdfbe314ab938ec54746ed53be..e232b8b4d29100b8fee9e913e2124788af09f2aa 100644 > --- a/drivers/phy/phy-snps-eusb2.c > +++ b/drivers/phy/phy-snps-eusb2.c > @@ -437,6 +437,9 @@ static int qcom_snps_eusb2_hsphy_init(struct phy *p) > snps_eusb2_hsphy_write_mask(phy->base, QCOM_USB_PHY_HS_PHY_CTRL2, > USB2_SUSPEND_N_SEL, 0); > > + snps_eusb2_hsphy_write_mask(phy->base, QCOM_USB_PHY_CFG0, > + CMN_CTRL_OVERRIDE_EN, 0); > + > return 0; > } > > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
© 2016 - 2025 Red Hat, Inc.