Re: [PATCH v4 12/25] scsi: ufs: mediatek: Remove vendor kernel quirks cruft

Nicolas Frattaroli
2026-01-08T09:28:42Z

On Tuesday, 6 January 2026 14:25:22 Central European Standard Time Peter Wang (王信友) wrote:
> On Thu, 2025-12-18 at 13:55 +0100, Nicolas Frattaroli wrote:
> >
> > Both ufs_mtk_vreg_fix_vcc and ufs_mtk_vreg_fix_vccqx look like they
> > are
> > vendor kernel hacks to work around existing downstream device trees.
> > Mainline does not need or want them, so remove them.
> >
>
> Hi Nicolas,
>
> This is a flexible approach to implement one software supporting
> multiple
> hardware configurations. Because you cannot guarantee that your SOC
> will
> always use UFS 2.0 or UFS 3.0, or that the PMIC you use will only have
> one set.

By "one software supporting multiple hardware configurations", do you
mean one device tree? Because if so, I don't think that's a good idea.
Device tree is meant to describe non-enumerable hardware.

Even if you want to make it easier for your customers to ship one image
for several SKUs, there's better ways to do this than having drivers
fix up individual DT nodes. The platform firmware like u-boot can choose
a DT based on differences it can probe. E.g. on Radxa ROCK 5B/5B+ boards,
we have u-boot choose between the 5B and 5B+ DT based on whether LPDDR5
is present, as 5B does not have LPDDR5, so as long as u-boot is told it's
either a ROCK 5B or ROCK 5B+, it can figure out which one specifically based
on that. Similarly, for whichever boards this is for, there may be
differences that can be probed to disambiguate between several SKUs of the
board as long as it's known it must be at least one of those SKUs.

>
> Thanks
> Peter
>
>
>