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

Chen-Yu Tsai posted 7 patches 1 month, 2 weeks ago
There is a newer version of this series
.../dts/mediatek/mt8195-cherry-dojo-r1.dts    |  38 ++++
.../boot/dts/mediatek/mt8195-cherry.dtsi      |  47 +++--
drivers/pci/controller/pcie-mediatek-gen3.c   | 185 +++++++++++-------
3 files changed, 183 insertions(+), 87 deletions(-)
[PATCH 0/7] PCI: mediatek-gen3: add power control support
Posted by Chen-Yu Tsai 1 month, 2 weeks ago
Hi folks,

This series adds power control support to the MediaTek PCIe gen3
controller driver. This allows proper modeling of WiFi and NVMe
adapters in the device tree and control over their power supplies.

Patch 1 through 4 are cleanups and minor improvements to the driver.

Patch 5 adds power control support using the new pwrctrl API to the
PCIe controller driver.

Patch 6 adds the WiFi and BT power supplies for the MT8195 Cherry design.
This is actually a M.2 E-key slot, but support for that is still WIP [1].
And even with it merged, support for the USB side still needs to be
figured out.

We can either merge this as is for now, and do another conversion later,
or just keep this one out. However this is still an improvement over
the current device tree, in which the power for the slot is always on
using a pinctrl setting.

Patch 7 adds the M.2 M-key NVMe slot found on MT8195 Dojo Chromebooks.
This change actually makes use of the M.2 pwrseq driver.


Please have a look.


Thanks
ChenYu

[1] https://lore.kernel.org/linux-pci/20260224-pci-m2-e-v5-0-dd9b9501d33c@oss.qualcomm.com/

Chen-Yu Tsai (7):
  PCI: mediatek-gen3: Clean up mtk_pcie_parse_port() with
    dev_err_probe()
  PCI: mediatek-gen3: Add error path for probe and resume driver
    callbacks
  PCI: mediatek-gen3: Split out device power helpers
  PCI: mediatek-gen3: Disable device if further setup fails
  PCI: mediatek-gen3: Integrate new pwrctrl API
  arm64: dts: mediatek: mt8195-cherry: add WiFi PCIe and BT USB power
    supplies
  arm64: dts: mediatek: mt8195-cherry-dojo: Describe M.2 M-key NVMe slot

 .../dts/mediatek/mt8195-cherry-dojo-r1.dts    |  38 ++++
 .../boot/dts/mediatek/mt8195-cherry.dtsi      |  47 +++--
 drivers/pci/controller/pcie-mediatek-gen3.c   | 185 +++++++++++-------
 3 files changed, 183 insertions(+), 87 deletions(-)

-- 
2.53.0.414.gf7e9f6c205-goog
Re: [PATCH 0/7] PCI: mediatek-gen3: add power control support
Posted by Manivannan Sadhasivam 1 month, 2 weeks ago
On Wed, Feb 25, 2026 at 03:22:17PM +0800, Chen-Yu Tsai wrote:
> Hi folks,
> 
> This series adds power control support to the MediaTek PCIe gen3
> controller driver. This allows proper modeling of WiFi and NVMe
> adapters in the device tree and control over their power supplies.
> 
> Patch 1 through 4 are cleanups and minor improvements to the driver.
> 
> Patch 5 adds power control support using the new pwrctrl API to the
> PCIe controller driver.
> 
> Patch 6 adds the WiFi and BT power supplies for the MT8195 Cherry design.
> This is actually a M.2 E-key slot, but support for that is still WIP [1].
> And even with it merged, support for the USB side still needs to be
> figured out.
> 
> We can either merge this as is for now, and do another conversion later,
> or just keep this one out. However this is still an improvement over
> the current device tree, in which the power for the slot is always on
> using a pinctrl setting.
> 
> Patch 7 adds the M.2 M-key NVMe slot found on MT8195 Dojo Chromebooks.
> This change actually makes use of the M.2 pwrseq driver.
> 

Thanks a lot for doing this! I'll also try to get the Key E support for v7.1.

For the whole series,

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

- Mani

> 
> Please have a look.
> 
> 
> Thanks
> ChenYu
> 
> [1] https://lore.kernel.org/linux-pci/20260224-pci-m2-e-v5-0-dd9b9501d33c@oss.qualcomm.com/
> 
> Chen-Yu Tsai (7):
>   PCI: mediatek-gen3: Clean up mtk_pcie_parse_port() with
>     dev_err_probe()
>   PCI: mediatek-gen3: Add error path for probe and resume driver
>     callbacks
>   PCI: mediatek-gen3: Split out device power helpers
>   PCI: mediatek-gen3: Disable device if further setup fails
>   PCI: mediatek-gen3: Integrate new pwrctrl API
>   arm64: dts: mediatek: mt8195-cherry: add WiFi PCIe and BT USB power
>     supplies
>   arm64: dts: mediatek: mt8195-cherry-dojo: Describe M.2 M-key NVMe slot
> 
>  .../dts/mediatek/mt8195-cherry-dojo-r1.dts    |  38 ++++
>  .../boot/dts/mediatek/mt8195-cherry.dtsi      |  47 +++--
>  drivers/pci/controller/pcie-mediatek-gen3.c   | 185 +++++++++++-------
>  3 files changed, 183 insertions(+), 87 deletions(-)
> 
> -- 
> 2.53.0.414.gf7e9f6c205-goog
> 

-- 
மணிவண்ணன் சதாசிவம்
Re: [PATCH 0/7] PCI: mediatek-gen3: add power control support
Posted by Chen-Yu Tsai 1 month, 2 weeks ago
On Wed, Feb 25, 2026 at 9:25 PM Manivannan Sadhasivam <mani@kernel.org> wrote:
>
> On Wed, Feb 25, 2026 at 03:22:17PM +0800, Chen-Yu Tsai wrote:
> > Hi folks,
> >
> > This series adds power control support to the MediaTek PCIe gen3
> > controller driver. This allows proper modeling of WiFi and NVMe
> > adapters in the device tree and control over their power supplies.
> >
> > Patch 1 through 4 are cleanups and minor improvements to the driver.
> >
> > Patch 5 adds power control support using the new pwrctrl API to the
> > PCIe controller driver.
> >
> > Patch 6 adds the WiFi and BT power supplies for the MT8195 Cherry design.
> > This is actually a M.2 E-key slot, but support for that is still WIP [1].
> > And even with it merged, support for the USB side still needs to be
> > figured out.
> >
> > We can either merge this as is for now, and do another conversion later,
> > or just keep this one out. However this is still an improvement over
> > the current device tree, in which the power for the slot is always on
> > using a pinctrl setting.
> >
> > Patch 7 adds the M.2 M-key NVMe slot found on MT8195 Dojo Chromebooks.
> > This change actually makes use of the M.2 pwrseq driver.
> >
>
> Thanks a lot for doing this! I'll also try to get the Key E support for v7.1.

Ack. I'll try to look into how to hook up USB for Key E.

> For the whole series,
>
> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
>
> - Mani
>
> >
> > Please have a look.
> >
> >
> > Thanks
> > ChenYu
> >
> > [1] https://lore.kernel.org/linux-pci/20260224-pci-m2-e-v5-0-dd9b9501d33c@oss.qualcomm.com/
> >
> > Chen-Yu Tsai (7):
> >   PCI: mediatek-gen3: Clean up mtk_pcie_parse_port() with
> >     dev_err_probe()
> >   PCI: mediatek-gen3: Add error path for probe and resume driver
> >     callbacks
> >   PCI: mediatek-gen3: Split out device power helpers
> >   PCI: mediatek-gen3: Disable device if further setup fails
> >   PCI: mediatek-gen3: Integrate new pwrctrl API
> >   arm64: dts: mediatek: mt8195-cherry: add WiFi PCIe and BT USB power
> >     supplies
> >   arm64: dts: mediatek: mt8195-cherry-dojo: Describe M.2 M-key NVMe slot
> >
> >  .../dts/mediatek/mt8195-cherry-dojo-r1.dts    |  38 ++++
> >  .../boot/dts/mediatek/mt8195-cherry.dtsi      |  47 +++--
> >  drivers/pci/controller/pcie-mediatek-gen3.c   | 185 +++++++++++-------
> >  3 files changed, 183 insertions(+), 87 deletions(-)
> >
> > --
> > 2.53.0.414.gf7e9f6c205-goog
> >
>
> --
> மணிவண்ணன் சதாசிவம்