Re: [PATCH v7 08/13] PCI: tegra194: Apply pinctrl settings for both PCIe RP and EP
From: Manivannan Sadhasivam
Date: Sun Mar 15 2026 - 21:31:54 EST
On Sun, Mar 15, 2026 at 07:24:48PM +0530, Manikanta Maddireddy wrote:
>
>
> On 05/03/26 3:49 pm, Manivannan Sadhasivam wrote:
> > On Tue, Mar 03, 2026 at 12:24:43PM +0530, Manikanta Maddireddy wrote:
> > > From: Vidya Sagar <vidyas@xxxxxxxxxx>
> > >
> > > PERST# and CLKREQ# pinctrl settings should be applied for both Root Port
> > > and Endpoint mode. Move pinctrl_pm_select_default_state() function call
> > > from Root Port specific configuration function to probe().
> > >
> >
> > Why should this driver care about setting default pinctrl state? Why can't it
> > rely on the pinctrl framework as like other drivers?
> >
> > - Mani
>
> pinctrl framework doesn't know if PCIe controller is going to be configured
> in Endpoint or Root port mode. In Root port mode PERST# signal should be
> configured as special function IO pin(SFIO) and in Endpoint mode it should
> be configured as general purpose IO pin(GPIO). So, PCIe driver should
> request appropriate pinctl values.
>
So you are saying that irrespective of board design, you can configure the
controller in host/endpoint mode? Is it possible? Dual mode controllers are
quite common in other SoCs, but they rely on devicetree to either configure the
controller in host or endpoint mode.
If the devicetree enables the endpoint node, why can't it also define the
pinctrl config?
- Mani
--
மணிவண்ணன் சதாசிவம்