Re: [PATCH 2/6] PCI/pwrctrl: tc9563: Fix parsing the integrated Ethernet MAC Endpoint node

From: Manivannan Sadhasivam

Date: Tue Jul 28 2026 - 09:40:25 EST


On Tue, Jul 28, 2026 at 03:12:49PM +0200, Manivannan Sadhasivam wrote:
> On Mon, Jul 27, 2026 at 10:59:05AM -0500, Alex Elder wrote:
> > On 7/25/26 3:59 AM, Manivannan Sadhasivam via B4 Relay wrote:
> > > From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
> > >
> > > DSP3 has an integrated Ethernet MAC Endpoint which has its own set of
> > > config registers for configuring settings such as ASPM. The Endpoint
> > > device has 2 physical functions and those 2 functions share the same
> > > settings.
> >
> > This was not clear from the code. So this explanation alone
> > represents an improvement.
> >
> > > Hence, parse the Endpoint node under DSP3 instead of parsing both the
> > > functions. The existing parsing logic also has one OOB issue as parsing
> > > both functions will result in accessing past the tc9563_pwrctrl->cfg array.
> >
> > The issue you mention is that the array has exactly one entry
> > available for the Ethernet MAC endpoints, so parsing more than
> > one (if defined in devicetree) references a non-existent entry.
> > Right?
> >
>
> Yes.
>
> > But this constraint only applies to power control. There can be
> > multiple MAC nodes (for their PCI functions) defined. And it
> > seems the pwrctl settings (if any) *must* be specified for
> > function 0 and if specified for any others, they are quietly
> > ignored.
> >
> > Is that accurate?
> >
>
> Exactly. DT can define both functions, but since there is no per-function
> tuning, these properties cannot exist in both nodes, but only in function 0,
> which also corresponds to the Endpoint.
>
> > If so I think the DT binding could explain and possibly enforce
> > that, but I won't insist on that...
> >
>
> It is being enforced in Patch 1.
>

Sorry, the current enforcement is only for PHY related properties like Tx
Amplitude, DFE and N_FTS. I didn't limit ASPM properties in function 1 though.
Doesn't seem to be strictly needed as no one would configure per-function ASPM
settings in DT (mostly unlikely).

- Mani

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