Re: [PATCH net-next v7 4/9] net: dsa: lan9645x: add basic dsa driver for LAN9645X
From: Jens Emil Schulz Ostergaard
Date: Mon Jun 08 2026 - 04:30:51 EST
On Wed, 2026-06-03 at 14:37 +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Wed, Jun 03, 2026 at 09:25:23AM +0200, Jens Emil Schulz Østergaard wrote:
> > Add the LAN9645X basic DSA driver with initialization, parent regmap
> > requests, port module initialization for NPI, CPU ports and front ports,
> > and phylink integration for MAC side configuration.
>
> A terminology question. How does a NPI port differ from the CPU port?
> The datasheet defines NPI as "Node Processor Interface", which sounds
> a lot like the CPU port.
>
> 4.18 CPU Port Module
>
> The CPU port module (DEVCPU) contains eight CPU extraction queues
> and two CPU injection queues. These queues provide an interface for
> exchanging frames between an external CPU system and the switch. In
> addition, any Ethernet interface on the device can be used for
> extracting and injecting frames. The Ethernet interface used in this
> way is called a node processor interface (NPI).
>
> Andrew
With the way this driver works they are basically the same. In the datasheet
they are seperate because it is possible to extract frames from the CPU port to the
CPU using different methods, such as raw register IO, Ethernet interface or FDMA for
chips which has an internal cpu subsystem.
If you use an Ethernet port that is called an NPI port in the datasheet. As the
snippet says it is the physical port used for injection/extraction from a CPU port.
Since lan9645x does not have an internal cpu subsytem, this particular feature fits
nicely. There are actually two CPU ports at index 9 and 10. But we only use 9 now. It
would be possible to configure 9 for NPI injection/extraction and 10 for register
based injection/extraction say.
Emil