[PATCH v4 2/2] phy: add a driver for T-Head TH1520 USB PHY
Drew Fustini
fustini at kernel.org
Fri Nov 27 13:05:38 PST 2026
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 at 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
More information about the linux-riscv
mailing list