[PATCH v6 0/7] PCI: mediatek-gen3: add power control support

Manivannan Sadhasivam mani at kernel.org
Tue Mar 24 04:22:41 PDT 2026


On Tue, Mar 24, 2026 at 04:26:22PM +0800, Chen-Yu Tsai wrote:
> On Tue, Mar 24, 2026 at 4:01 PM Manivannan Sadhasivam <mani at kernel.org> wrote:
> >
> > On Tue, Mar 24, 2026 at 03:52:33PM +0800, Chen-Yu Tsai wrote:
> > > On Tue, Mar 24, 2026 at 3:44 PM Manivannan Sadhasivam <mani at kernel.org> wrote:
> > > >
> > > > On Tue, Mar 24, 2026 at 01:19:52PM +0800, Chen-Yu Tsai wrote:
> > > > > Hi folks,
> > > > >
> > > > > This is v6 of my MediaTek PCIe gen3 controller driver power control
> > > > > support series. This series is based on next-20260323, with the
> > > > > commit a2b2ca0c2477 ("Merge branch 'pci/controller/mediatek-gen3'")
> > > > > reverted to drop the older version.
> > > > >
> > > > > This series is ready to be merged. Please drop the older version and use
> > > > > this one instead.
> > > > >
> > > > > Changes since v5:
> > > > > - Link to v5: https://lore.kernel.org/all/20260311075223.3303497-1-wenst@chromium.org/
> > > > > - Adapt to PCI_PWRCTRL_SLOT -> PCI_PWRCTRL_GENERIC Kconfig symbol name change
> > > > >
> > > > > Changes since v4:
> > > > > - Link to v4: https://lore.kernel.org/all/20260310091947.2742004-1-wenst@chromium.org/
> > > > > - Patch 1
> > > > >   - Expanded tabs in commit message
> > > > > - Patch 5
> > > > >   - s/mtk_pcie_device_power_(up|down)/mtk_pcie_devices_power_(up|down)/
> > > > > - Patch 6
> > > > >   - Adapted to mtk_pcie_devices_power_down() name change
> > > > > - Patch 7
> > > > >   - Fixed label typo causing build break
> > > > >   - Replaced "exploded" with "populated" in commit message, and added
> > > > >     more explanation about what "populated onto the mainboard" means.
> > > > >
> > > > > Changes since v3:
> > > > > - Link to v3: https://lore.kernel.org/all/20260302053109.1117091-1-wenst@chromium.org/
> > > > > - Added two patches to move kernel setup code before controller setup
> > > > >   code, and controller setup code before device setup code, as requested
> > > > >   by Bjorn
> > > > > - Dropped dts patches as they are already merged
> > > > >
> > > > > I kept all the existing reviewed-by tags, since the changes to the
> > > > > existing patches aren't that big.
> > > > >
> > > > > Changes since v2:
> > > > > - Link to v2: https://lore.kernel.org/all/20260226092234.3859740-1-wenst@chromium.org/
> > > > > - Made PCIE_MEDIATEK_GEN3 select PCI_PWRCTRL_SLOT, following existing
> > > > >   examples
> > > > >
> > > > > I do wonder why the existing ones don't select PCI_PWRCTRL instead.
> > > > > As there are multiple providers, and now even the M.2 power sequencing
> > > > > driver, I think either we enable the common ones by default, or let
> > > > > the user pick and choose.
> > > > >
> > > >
> > > > I agree with you. I've sent a patch [1] to select these drivers in defconfig to
> > > > make the users life easier. But in the meantime, let's have this dependency
> > > > as-is, otherwise, until my defconfig patch lands, there is no guarantee that
> > > > these drivers will get selected by default.
> > >
> > > I would probably just make PCI_PWRCTRL_GENERIC default m or y.
> > >
> > > Or make CONFIG_PCI (and probably CONFIG_USB later on) imply
> > > CONFIG_POWER_SEQUENCING_PCIE_M2.
> > >
> >
> > The problem is, these drivers are mostly targeted for DT systems as of now. If
> > we select it by default for all archs, it will bloat the image size for other
> > archs that don't need these drivers. That's why I wanted to enable these in arch
> > defconfig.
> 
> How about
> 
>     imply CONFIG_POWER_SEQUENCING_PCIE_M2 if OF

I'm not sure if PCI Kconfig is the right place to put it. We don't select any
drivers using 'imply' as of now and OF conditional also means that this driver
could be selected for PowerPC archs which don't use this driver at all.

Same argument could be used for ARM defconfig as well as we have server based
ARM64 SoCs, but I don't have a better choice atm.

- Mani

-- 
மணிவண்ணன் சதாசிவம்



More information about the Linux-mediatek mailing list