Message ID | 20250304-sm8750_usb_master-v2-0-a698a2e68e06@quicinc.com |
---|---|
Headers | show |
Series | phy: qcom: Introduce USB support for SM8750 | expand |
On Tue, Mar 04, 2025 at 01:56:37PM -0800, Melody Olvera wrote: > From: Wesley Cheng <quic_wcheng@quicinc.com> > > Add new register offsets and PHY values for SM8750. Some of the previous > definitions can be leveraged from older PHY versions as offsets within > registers have not changed. This also updates the PHY sequence that is > recommended after running hardware characterization. > > Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> > Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> > --- > drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 221 +++++++++++++++++++++ > drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v8.h | 38 ++++ > drivers/phy/qualcomm/phy-qcom-qmp-pcs-v8.h | 32 +++ > drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v8.h | 64 ++++++ > .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v8.h | 68 +++++++ > drivers/phy/qualcomm/phy-qcom-qmp.h | 5 + > 6 files changed, 428 insertions(+) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
On Tue, Mar 04, 2025 at 01:56:39PM -0800, Melody Olvera wrote: > From: Wesley Cheng <quic_wcheng@quicinc.com> > > SM8750 utilizes an eUSB2 PHY from M31. Add the initialization > sequences to bring it out of reset and into an operational state. This > differs to the M31 USB driver, in that the M31 eUSB2 driver will > require a connection to an eUSB2 repeater. This PHY driver will handle > the initialization of the associated eUSB2 repeater when required. > > Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com> > Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> > --- > drivers/phy/qualcomm/Kconfig | 10 + > drivers/phy/qualcomm/Makefile | 1 + > drivers/phy/qualcomm/phy-qcom-m31-eusb2.c | 296 ++++++++++++++++++++++++++++++ > 3 files changed, 307 insertions(+) > [...] > + > +static int msm_m31_eusb2_write_readback(void __iomem *base, u32 offset, m31eusb2_phy_write_readback() > + const u32 mask, u32 val) > +{ > + u32 write_val; > + u32 tmp; > + [..] > + > +static const struct phy_ops m31eusb2_phy_gen_ops = { > + .init = m31eusb2_phy_init, > + .exit = m31eusb2_phy_exit, > + .owner = THIS_MODULE, Strange alignment > +}; > + [...] > + > + phy->phy = devm_phy_create(dev, NULL, &m31eusb2_phy_gen_ops); > + if (IS_ERR(phy->phy)) > + return dev_err_probe(dev, PTR_ERR(phy->phy), > + "failed to create phy\n"); > + > + for (i = 0; i < M31_EUSB_NUM_VREGS; i++) > + phy->vregs[i].supply = m31_eusb_phy_vreg_names[i]; > + > + ret = devm_regulator_bulk_get(dev, M31_EUSB_NUM_VREGS, phy->vregs); devm_regulator_bulk_get_const() > + if (ret) > + return dev_err_probe(dev, ret, > + "failed to get regulator supplies\n"); > + > + [..] > +MODULE_DESCRIPTION("eUSB2 Qualcomm M31 HSPHY driver"); > +MODULE_LICENSE("GPL"); MODULE_AUTHOR()? > > -- > 2.46.1 >
On Tue, Mar 04, 2025 at 01:56:42PM -0800, Melody Olvera wrote: > Add configs for the M31 eUSB2 PHY for SM8750 USB. Please use git log on the defconfig to check what is usually required from the commit messages. The defconfig is not Qcom-specific so you can not expect somebody to know what is SM8750 or why does it require a PHY. > > Signed-off-by: Melody Olvera <quic_molvera@quicinc.com> > --- > arch/arm64/configs/defconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig > index 3a3706db29822036d25a7228f8936e2ad613b208..7a7187475a11206e708a5a2c6dd51736e16932e9 100644 > --- a/arch/arm64/configs/defconfig > +++ b/arch/arm64/configs/defconfig > @@ -1587,6 +1587,7 @@ CONFIG_PHY_QCOM_QUSB2=m > CONFIG_PHY_QCOM_SNPS_EUSB2=m > CONFIG_PHY_QCOM_EUSB2_REPEATER=m > CONFIG_PHY_QCOM_M31_USB=m > +CONFIG_PHY_QCOM_M31_EUSB=m > CONFIG_PHY_QCOM_USB_HS=m > CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=m > CONFIG_PHY_QCOM_USB_HS_28NM=m > > -- > 2.46.1 >
On Tue, Mar 04, 2025 at 01:56:35PM -0800, Melody Olvera wrote: > + vdd-supply: > + description: > + Phandle to 0.88V regulator supply to PHY digital circuit. > + > + vdda12-supply: > + description: > + Phandle to 1.2V regulator supply to PHY refclk pll block. > + > +required: > + - compatible > + - reg > + - "#phy-cells" > + - clocks > + - clock-names > + - vdd-supply > + - vdda12-supply > + - resets Keep the same order as in "properties" list. > + > +additionalProperties: false Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof