On 8/28/2025 12:14 AM, Dmitry Baryshkov wrote: > On Wed, Aug 27, 2025 at 08:34:39PM +0800, Xiangxu Yin wrote: >> On 8/20/2025 7:42 PM, Dmitry Baryshkov wrote: >>> On Wed, Aug 20, 2025 at 05:34:53PM +0800, Xiangxu Yin wrote: >>>> Complete USB/DP switchable PHY integration by adding DP clock >>>> registration, aux bridge setup, and DT parsing. Implement clock >>>> provider logic for USB and DP branches, and extend PHY translation >>>> to support both USB and DP instances. >>>> >>>> Signed-off-by: Xiangxu Yin <xiangxu....@oss.qualcomm.com> >>>> --- >>>> drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 331 >>>> ++++++++++++++++++++++++++++--- >>>> 1 file changed, 299 insertions(+), 32 deletions(-) >>>> >>>> static int qmp_usbc_probe(struct platform_device *pdev) >>>> { >>>> struct device *dev = &pdev->dev; >>>> @@ -1703,16 +1944,32 @@ static int qmp_usbc_probe(struct platform_device >>>> *pdev) >>>> if (ret) >>>> return ret; >>>> >>>> - /* Check for legacy binding with child node. */ >>>> - np = of_get_child_by_name(dev->of_node, "phy"); >>>> - if (np) { >>>> - ret = qmp_usbc_parse_usb_dt_legacy(qmp, np); >>>> - } else { >>>> + if (qmp->cfg->type == QMP_PHY_USBC_USB3_DP) { >>> Should not be necessary. >> >> Got it. I’ll merge the parsing logic into a single qmp_usbc_parse_dt >> function. >> >> Also, I checked the compatible strings in the dtsi files for this PHY series >> looks like no current product uses the legacy binding. >> I’ll drop qmp_usbc_parse_usb_dt_legacy in the next version. > > No. It's _legacy_, it has been implemented in order to support old DTs, > which existed at some point but then were refactored into the current > state. You can't randomly drop DT support.
Ok, understand. >> >>>> np = of_node_get(dev->of_node); >>>> - ret = qmp_usbc_parse_usb_dt(qmp); >>>> + >>>> + ret = qmp_usbc_parse_usb3dp_dt(qmp); >>>> + if (ret) { >>>> + dev_err(qmp->dev, "parse DP dt fail ret=%d\n", ret); >>>> + goto err_node_put; >>>> + } >>>> + >>>> + ret = drm_aux_bridge_register(dev); >>>> + if (ret) { >>>> + dev_err(qmp->dev, "aux bridge reg fail ret=%d\n", ret); >>>> + goto err_node_put; >>>> + }