Re: [PATCH v2 4/7] thunderbolt: add platform NHI driver

From: Chunfeng Yun (云春峰)

Date: Wed Nov 11 2026 - 08:42:41 EST


On 二, 2026-11-10 at 13:43 +0100, Konrad Dybcio wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> On 11/10/26 12:48 PM, Chunfeng Yun wrote:
> > Historically, the Thunderbolt/USB4 Native Host Interface (NHI)
> > controller has been exposed as a PCI device handled by
> > drivers/thunderbolt/pci.c. However, some SoCs (such as MediaTek
> > mt8901/mt8992) integrate the NHI as a memory-mapped platform device
> > described via Device Tree or ACPI.
> >
> > To support platform-attached NHI controllers:
> >
> > Introduce platform.c to register a platform driver matching
> > "usb4-nhi-platform" (OF) and "ACPI0015" (ACPI);
> > Implement platform tb_nhi_ops hooks for pm, interrupts related;
> >
> > Support an optional dedicated wake interrupt: on integrated SoCs,
> > the MAC/PHY reside in a power domain whose clocks and power can be
> > gated during sleep, preventing the primary NHI interrupt from
> > acting as a wakeup source; so add an optional dedicated wakeup
> > interrupt which comes from the always-on power domain.
> >
> > Clean up the unused nhi_enable_int_throttling() prototype.
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@xxxxxxxxxxxx>
> > ---
> > v2 changes:
> > * Added CONFIG_USB4_PLATFORM to build the platform driver as a
> > separate
> >   module (thunderbolt_platform.ko), instead of statically embedding
> > it
> >   into thunderbolt.o.
> > * Renamed plat.c to platform.c, renamed internal functions from
> > nhi_plat_*
> >   to nhi_platform_*, and updated the Device Tree compatible string
> > from
> >   "thunderbolt-platform" to "usb4-nhi-platform".
>
> There are still no dt-bindings for this meaning it can't be merged.
> You also haven't answered Sven and mine's concerns about this being
> actually used.
Sorry, I missed your comments on v1 before sending out v2, already
answered your comments.

Thanks

>
> Konrad