[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b6utbnibia767bp55vhvg6ghdavb66ubdpabyguohuwtmz3mp@unvm36jttota>
Date: Wed, 20 Aug 2025 14:47:24 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Xiangxu Yin <xiangxu.yin@....qualcomm.com>
Cc: Rob Clark <robin.clark@....qualcomm.com>,
Dmitry Baryshkov <lumag@...nel.org>,
Abhinav Kumar <abhinav.kumar@...ux.dev>,
Jessica Zhang <jessica.zhang@....qualcomm.com>,
Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Kuogee Hsieh <quic_khsieh@...cinc.com>, Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, linux-arm-msm@...r.kernel.org,
dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org, fange.zhang@....qualcomm.com,
yongxing.mou@....qualcomm.com, tingwei.zhang@....qualcomm.com,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, quic_lliu6@...cinc.com
Subject: Re: [PATCH v3 05/14] phy: qcom: qmp-usbc: Add DP-related fields for
USB/DP switchable PHY
On Wed, Aug 20, 2025 at 05:34:47PM +0800, Xiangxu Yin wrote:
> Extend qmp_usbc_offsets and qmp_phy_cfg with DP-specific fields,
> including register offsets, init tables, and callback hooks. Also
> update qmp_usbc struct to track DP-related resources and state.
> This enables support for USB/DP switchable Type-C PHYs that operate
> in either mode.
>
> Signed-off-by: Xiangxu Yin <xiangxu.yin@....qualcomm.com>
> ---
> drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 73 ++++++++++++++++++++++++--------
> 1 file changed, 55 insertions(+), 18 deletions(-)
>
>
> + struct regmap *tcsr_map;
> + u32 vls_clamp_reg;
> + u32 dp_phy_mode_reg;
> +
> struct mutex phy_mutex;
>
> + struct phy *usb_phy;
Should be a part of the previous patch.
> enum phy_mode mode;
> unsigned int usb_init_count;
>
> - struct phy *phy;
Similarly.
> -
> - struct clk_fixed_rate pipe_clk_fixed;
> + struct phy *dp_phy;
> + unsigned int dp_aux_cfg;
> + struct phy_configure_opts_dp dp_opts;
> + unsigned int dp_init_count;
>
> struct typec_switch_dev *sw;
> enum typec_orientation orientation;
> @@ -874,11 +911,11 @@ static int qmp_usbc_typec_switch_set(struct typec_switch_dev *sw,
> qmp->orientation = orientation;
>
> if (qmp->usb_init_count) {
> - qmp_usbc_usb_power_off(qmp->phy);
> - qmp_usbc_com_exit(qmp->phy);
> + qmp_usbc_usb_power_off(qmp->usb_phy);
> + qmp_usbc_com_exit(qmp->usb_phy);
>
> - qmp_usbc_com_init(qmp->phy);
> - qmp_usbc_usb_power_on(qmp->phy);
> + qmp_usbc_com_init(qmp->usb_phy);
> + qmp_usbc_usb_power_on(qmp->usb_phy);
and these.
> }
>
> mutex_unlock(&qmp->phy_mutex);
> @@ -1106,14 +1143,14 @@ static int qmp_usbc_probe(struct platform_device *pdev)
> if (ret)
> goto err_node_put;
>
> - qmp->phy = devm_phy_create(dev, np, &qmp_usbc_usb_phy_ops);
> - if (IS_ERR(qmp->phy)) {
> - ret = PTR_ERR(qmp->phy);
> + qmp->usb_phy = devm_phy_create(dev, np, &qmp_usbc_usb_phy_ops);
> + if (IS_ERR(qmp->usb_phy)) {
> + ret = PTR_ERR(qmp->usb_phy);
> dev_err(dev, "failed to create PHY: %d\n", ret);
> goto err_node_put;
> }
>
> - phy_set_drvdata(qmp->phy, qmp);
> + phy_set_drvdata(qmp->usb_phy, qmp);
>
> of_node_put(np);
>
>
> --
> 2.34.1
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists