Devicetree
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Peter Chen <peter.chen@oss.qualcomm.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] dt-bindings: qcom,snps-dwc3: Add property indicating presence of eUSB2 phy
Date: Thu, 16 Jul 2026 23:53:30 +0000	[thread overview]
Message-ID: <allhF1peV5QZ-QLh@vbox> (raw)
In-Reply-To: <alhDjZ0gJZq_7G6z@hu-petche-lv.qualcomm.com>

On Wed, Jul 15, 2026, Peter Chen wrote:
> On 26-07-16 00:09:47, Thinh Nguyen wrote:
> > > 
> > > Only the new user for adding phy_type="eusb2" at dts needs to check the
> > > controller logic, and this is what the user needs to do that check the
> > > new added device tree property logic at the driver.
> > 
> > To clarify, are you suggesting to introduce a new phy_type property to
> > indicate phy type? If so, that sounds similar to qcom,has-eusb2-phy but
> > more generic. Also, where do you plan to define it (dwc3 or phy node)?
> > 
> 
> No, I meant just adding new entry at below usbphy_modes array, that's the
> easier way. At the current code at of.c, it indeed mixes description of
> the phy interface (between controller and phy) and phy type, the array
> names phy interface, and dt property names "phy_type".

The naming of the property is unfortunate, but the usb.yaml explicitly
documents "phy_type" is for configuring the controller base on
phy-controller interface. Repurposing it to also mean phy type would be
a semantic change and may be harder to convince the DT maintainers to
accept.

> 
> diff --git a/drivers/usb/phy/of.c b/drivers/usb/phy/of.c
> index 1ab134f45d67..5cbf17d493ad 100644
> --- a/drivers/usb/phy/of.c
> +++ b/drivers/usb/phy/of.c
> @@ -16,6 +16,7 @@ static const char *const usbphy_modes[] = {
>  	[USBPHY_INTERFACE_MODE_ULPI]	= "ulpi",
>  	[USBPHY_INTERFACE_MODE_SERIAL]	= "serial",
>  	[USBPHY_INTERFACE_MODE_HSIC]	= "hsic",
> +	[USBPHY_INTERFACE_MODE_EUSB2]	= "eusb2",
>  };
> 
> line34: err = of_property_read_string(np, "phy_type", &phy_type);
> 
> In fact, HSIC is not the interface between controller and PHY, it is
> after UTMI(+) or ULPI, and similar with eUSB2.
> 
> The API of_usb_get_phy_mode is mainly used by controller driver
> to know what kinds of PHY it is connected, and do corresponding
> configuration, the configuration may not limit to interface between
> controller and PHY. Do you agree we just take "phy mode" and
> "phy type" are same thing, and delete "INTERFACE" in this file
> and add "eusb2" as a new "phy_type"?
> 	

So just deleting "INTERFACE" isn't enough. We'd also need to update the
documentation description and its enum list.

Also, for dwc3 core, phy_type = "eusb2" doesn't tell whether the UTMI
interface is 8-bit or 16-bit, which may be needed to configure
GUSB2PHYCFG.

BR,
Thinh

  reply	other threads:[~2026-07-16 23:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  8:52 [PATCH v4 0/2] Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-07-09  8:52 ` [PATCH v4 1/2] dt-bindings: qcom,snps-dwc3: Add property indicating presence of eUSB2 phy Krishna Kurapati
2026-07-09  9:01   ` sashiko-bot
2026-07-09 13:47   ` Dmitry Baryshkov
2026-07-10  1:52     ` Thinh Nguyen
2026-07-10  7:16       ` Krzysztof Kozlowski
2026-07-10  7:19         ` Krzysztof Kozlowski
2026-07-10 21:02           ` Thinh Nguyen
2026-07-13  6:26             ` Krzysztof Kozlowski
2026-07-13  7:20               ` Peter Chen
2026-07-13 23:41                 ` Thinh Nguyen
2026-07-14  3:20                   ` Peter Chen
2026-07-14 23:23                     ` Thinh Nguyen
2026-07-15  3:37                       ` Peter Chen
2026-07-16  0:09                         ` Thinh Nguyen
2026-07-16  2:35                           ` Peter Chen
2026-07-16 23:53                             ` Thinh Nguyen [this message]
2026-07-15  5:38                       ` Krishna Kurapati
2026-07-15 23:19                         ` Thinh Nguyen
2026-07-16  4:12                           ` Krishna Kurapati
2026-07-16 10:37                             ` Peter Chen
2026-07-17  0:06                               ` Thinh Nguyen
2026-07-17  1:20                                 ` Peter Chen
2026-07-17  1:56                                   ` Thinh Nguyen
2026-07-14  0:41               ` Thinh Nguyen
2026-07-09  8:52 ` [PATCH v4 2/2] usb: dwc3: qcom: Modify interrupt handling for eUSB2 Phy targets Krishna Kurapati
2026-07-09  9:07   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=allhF1peV5QZ-QLh@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@oss.qualcomm.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox