All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>, Wei Fu <wefu@redhat.com>,
	Drew Fustini <dfustini@tenstorrent.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	Han Gao <rabenda.cn@gmail.com>
Subject: Re: [PATCH v4 2/2] phy: add a driver for T-Head TH1520 USB PHY
Date: Fri, 27 Nov 2026 13:05:38 -0800	[thread overview]
Message-ID: <awnwop97gErg2d9L@x1> (raw)
In-Reply-To: <2da5ea0d928af93418c54f70ea52bd9b1f0fc36d.camel@iscas.ac.cn>

On Thu, Nov 26, 2026 at 05:41:33PM +0800, Icenowy Zheng wrote:
> 在 2026-11-26四的 17:33 +0800,Icenowy Zheng写道:
> > 在 2026-11-24二的 11:55 -0800,Drew Fustini写道:
> > > On Tue, Nov 03, 2026 at 04:14:44PM +0800, Icenowy Zheng wrote:
> > > > The USB PHY on T-Head TH1520 SoC is a Synopsys USB 3.0 FemtoPHY, with
> > > > some PHY parameters exported as another system controller along with it.
> > > > 
> > > > A few PHY parameters have unusable defaults. Add a driver that programs
> > > > them before releasing the PHY from reset in addition to
> > > > clock/reset/regulator management.
> > > > 
> > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > ---
> > > > Changes in v4:
> > > > - Make exit callback always success to prevent PHY state machine desync
> > > >   with clk/rst state as suggested by Sashiko.
> > > > - Re-wrap some comments targetting full 80 columns.
> > > > - Use dev_err_probe for PHY creation error handling, to prevent spamming
> > > >   the kernel log with -EPROBE_DEFER.
> > > > Changes in v3:
> > > > - Use fsleep() to replace udelay(), and add proper inclusion of
> > > >   linux/delay.h for this function. (fsleep() suggested by Drew and
> > > >   inclusion suggested by Sashiko)
> > > > - Adapt Drew's suggestion on the wording of the commit message's 2nd
> > > >   paragraph.
> > > > Changes in v2:
> > > > - Removed unreferenced register names.
> > > > - Changed the behavior to leaving bus clock on instead of binding it to
> > > >   the regmap.
> > > > - Removed early return for reset deassert failure in phy exit callback.
> > > > - Tweaked the Kconfig item (removed default value and added "select
> > > >   REGMAP_MMIO).
> > > > 
> > > >  drivers/phy/Kconfig                |   1 +
> > > >  drivers/phy/Makefile               |   1 +
> > > >  drivers/phy/thead/Kconfig          |  12 ++
> > > >  drivers/phy/thead/Makefile         |   2 +
> > > >  drivers/phy/thead/phy-th1520-usb.c | 179 +++++++++++++++++++++++++++++
> > > >  5 files changed, 195 insertions(+)
> > > >  create mode 100644 drivers/phy/thead/Kconfig
> > > >  create mode 100644 drivers/phy/thead/Makefile
> > > >  create mode 100644 drivers/phy/thead/phy-th1520-usb.c
> > > 
> > > Sorry for the delay in review. I think binding and driver dir should be
> > > added under thead soc support in MAINTAINERS, right?
> > 
> > I am adding it, but maybe it'd be worth to add a N: clause into the
> > MAINTAINERS file?
> > 
> > Although this wouldn't belong to this patchset.
> 
> Well to prevent merging conflict, maybe it'd be better to substitute the
> file list with an N: item in a commit going through the SoC tree, and
> prevent changing this file in the PHY tree.

Okay, good idea.

Thanks,
Drew

WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>, Wei Fu <wefu@redhat.com>,
	Drew Fustini <dfustini@tenstorrent.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	Han Gao <rabenda.cn@gmail.com>
Subject: Re: [PATCH v4 2/2] phy: add a driver for T-Head TH1520 USB PHY
Date: Fri, 27 Nov 2026 13:05:38 -0800	[thread overview]
Message-ID: <awnwop97gErg2d9L@x1> (raw)
In-Reply-To: <2da5ea0d928af93418c54f70ea52bd9b1f0fc36d.camel@iscas.ac.cn>

On Thu, Nov 26, 2026 at 05:41:33PM +0800, Icenowy Zheng wrote:
> 在 2026-11-26四的 17:33 +0800,Icenowy Zheng写道:
> > 在 2026-11-24二的 11:55 -0800,Drew Fustini写道:
> > > On Tue, Nov 03, 2026 at 04:14:44PM +0800, Icenowy Zheng wrote:
> > > > The USB PHY on T-Head TH1520 SoC is a Synopsys USB 3.0 FemtoPHY, with
> > > > some PHY parameters exported as another system controller along with it.
> > > > 
> > > > A few PHY parameters have unusable defaults. Add a driver that programs
> > > > them before releasing the PHY from reset in addition to
> > > > clock/reset/regulator management.
> > > > 
> > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > ---
> > > > Changes in v4:
> > > > - Make exit callback always success to prevent PHY state machine desync
> > > >   with clk/rst state as suggested by Sashiko.
> > > > - Re-wrap some comments targetting full 80 columns.
> > > > - Use dev_err_probe for PHY creation error handling, to prevent spamming
> > > >   the kernel log with -EPROBE_DEFER.
> > > > Changes in v3:
> > > > - Use fsleep() to replace udelay(), and add proper inclusion of
> > > >   linux/delay.h for this function. (fsleep() suggested by Drew and
> > > >   inclusion suggested by Sashiko)
> > > > - Adapt Drew's suggestion on the wording of the commit message's 2nd
> > > >   paragraph.
> > > > Changes in v2:
> > > > - Removed unreferenced register names.
> > > > - Changed the behavior to leaving bus clock on instead of binding it to
> > > >   the regmap.
> > > > - Removed early return for reset deassert failure in phy exit callback.
> > > > - Tweaked the Kconfig item (removed default value and added "select
> > > >   REGMAP_MMIO).
> > > > 
> > > >  drivers/phy/Kconfig                |   1 +
> > > >  drivers/phy/Makefile               |   1 +
> > > >  drivers/phy/thead/Kconfig          |  12 ++
> > > >  drivers/phy/thead/Makefile         |   2 +
> > > >  drivers/phy/thead/phy-th1520-usb.c | 179 +++++++++++++++++++++++++++++
> > > >  5 files changed, 195 insertions(+)
> > > >  create mode 100644 drivers/phy/thead/Kconfig
> > > >  create mode 100644 drivers/phy/thead/Makefile
> > > >  create mode 100644 drivers/phy/thead/phy-th1520-usb.c
> > > 
> > > Sorry for the delay in review. I think binding and driver dir should be
> > > added under thead soc support in MAINTAINERS, right?
> > 
> > I am adding it, but maybe it'd be worth to add a N: clause into the
> > MAINTAINERS file?
> > 
> > Although this wouldn't belong to this patchset.
> 
> Well to prevent merging conflict, maybe it'd be better to substitute the
> file list with an N: item in a commit going through the SoC tree, and
> prevent changing this file in the PHY tree.

Okay, good idea.

Thanks,
Drew

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Drew Fustini <fustini@kernel.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>, Wei Fu <wefu@redhat.com>,
	Drew Fustini <dfustini@tenstorrent.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	Han Gao <rabenda.cn@gmail.com>
Subject: Re: [PATCH v4 2/2] phy: add a driver for T-Head TH1520 USB PHY
Date: Fri, 27 Nov 2026 13:05:38 -0800	[thread overview]
Message-ID: <awnwop97gErg2d9L@x1> (raw)
In-Reply-To: <2da5ea0d928af93418c54f70ea52bd9b1f0fc36d.camel@iscas.ac.cn>

On Thu, Nov 26, 2026 at 05:41:33PM +0800, Icenowy Zheng wrote:
> 在 2026-11-26四的 17:33 +0800,Icenowy Zheng写道:
> > 在 2026-11-24二的 11:55 -0800,Drew Fustini写道:
> > > On Tue, Nov 03, 2026 at 04:14:44PM +0800, Icenowy Zheng wrote:
> > > > The USB PHY on T-Head TH1520 SoC is a Synopsys USB 3.0 FemtoPHY, with
> > > > some PHY parameters exported as another system controller along with it.
> > > > 
> > > > A few PHY parameters have unusable defaults. Add a driver that programs
> > > > them before releasing the PHY from reset in addition to
> > > > clock/reset/regulator management.
> > > > 
> > > > Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> > > > ---
> > > > Changes in v4:
> > > > - Make exit callback always success to prevent PHY state machine desync
> > > >   with clk/rst state as suggested by Sashiko.
> > > > - Re-wrap some comments targetting full 80 columns.
> > > > - Use dev_err_probe for PHY creation error handling, to prevent spamming
> > > >   the kernel log with -EPROBE_DEFER.
> > > > Changes in v3:
> > > > - Use fsleep() to replace udelay(), and add proper inclusion of
> > > >   linux/delay.h for this function. (fsleep() suggested by Drew and
> > > >   inclusion suggested by Sashiko)
> > > > - Adapt Drew's suggestion on the wording of the commit message's 2nd
> > > >   paragraph.
> > > > Changes in v2:
> > > > - Removed unreferenced register names.
> > > > - Changed the behavior to leaving bus clock on instead of binding it to
> > > >   the regmap.
> > > > - Removed early return for reset deassert failure in phy exit callback.
> > > > - Tweaked the Kconfig item (removed default value and added "select
> > > >   REGMAP_MMIO).
> > > > 
> > > >  drivers/phy/Kconfig                |   1 +
> > > >  drivers/phy/Makefile               |   1 +
> > > >  drivers/phy/thead/Kconfig          |  12 ++
> > > >  drivers/phy/thead/Makefile         |   2 +
> > > >  drivers/phy/thead/phy-th1520-usb.c | 179 +++++++++++++++++++++++++++++
> > > >  5 files changed, 195 insertions(+)
> > > >  create mode 100644 drivers/phy/thead/Kconfig
> > > >  create mode 100644 drivers/phy/thead/Makefile
> > > >  create mode 100644 drivers/phy/thead/phy-th1520-usb.c
> > > 
> > > Sorry for the delay in review. I think binding and driver dir should be
> > > added under thead soc support in MAINTAINERS, right?
> > 
> > I am adding it, but maybe it'd be worth to add a N: clause into the
> > MAINTAINERS file?
> > 
> > Although this wouldn't belong to this patchset.
> 
> Well to prevent merging conflict, maybe it'd be better to substitute the
> file list with an N: item in a commit going through the SoC tree, and
> prevent changing this file in the PHY tree.

Okay, good idea.

Thanks,
Drew

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-11-27 21:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  8:14 [PATCH v4 0/2] phy: add support for TH1520 USB PHY Icenowy Zheng
2026-11-03  8:14 ` Icenowy Zheng
2026-11-03  8:14 ` Icenowy Zheng
2026-11-03  8:14 ` [PATCH v4 1/2] dt-bindings: phy: add binding for T-Head " Icenowy Zheng
2026-11-03  8:14   ` Icenowy Zheng
2026-11-03  8:14   ` Icenowy Zheng
2026-11-03  8:14 ` [PATCH v4 2/2] phy: add a driver " Icenowy Zheng
2026-11-03  8:14   ` Icenowy Zheng
2026-11-03  8:14   ` Icenowy Zheng
2026-11-24 19:55   ` Drew Fustini
2026-11-24 19:55     ` Drew Fustini
2026-11-24 19:55     ` Drew Fustini
2026-11-25  9:56     ` Icenowy Zheng
2026-11-25  9:56       ` Icenowy Zheng
2026-11-25  9:56       ` Icenowy Zheng
2026-11-26  9:33     ` Icenowy Zheng
2026-11-26  9:33       ` Icenowy Zheng
2026-11-26  9:33       ` Icenowy Zheng
2026-11-26  9:41       ` Icenowy Zheng
2026-11-26  9:41         ` Icenowy Zheng
2026-11-26  9:41         ` Icenowy Zheng
2026-11-27 21:05         ` Drew Fustini [this message]
2026-11-27 21:05           ` Drew Fustini
2026-11-27 21:05           ` Drew Fustini
2026-11-27 11:30   ` Manivannan Sadhasivam
2026-11-27 11:30     ` Manivannan Sadhasivam
2026-11-27 11:30     ` Manivannan Sadhasivam
2026-11-04  8:26 ` [PATCH v4 0/2] phy: add support for " Krzysztof Kozlowski
2026-11-04  8:26   ` Krzysztof Kozlowski
2026-11-04  8:26   ` Krzysztof Kozlowski
2026-11-04  9:01   ` Icenowy Zheng
2026-11-04  9:01     ` Icenowy Zheng
2026-11-04  9:01     ` Icenowy Zheng
2026-11-04  9:56     ` Krzysztof Kozlowski
2026-11-04  9:56       ` Krzysztof Kozlowski
2026-11-04  9:56       ` Krzysztof Kozlowski
2026-11-23 13:01 ` Icenowy Zheng
2026-11-23 13:01   ` Icenowy Zheng
2026-11-23 13:01   ` Icenowy Zheng

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=awnwop97gErg2d9L@x1 \
    --to=fustini@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dfustini@tenstorrent.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rabenda.cn@gmail.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wefu@redhat.com \
    --cc=zhengxingda@iscas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.