Re: [PATCH v4 3/5] net: lan743x: Add support to software-nodes for SFP
From: Andrew Lunn
Date: Wed May 27 2026 - 09:43:58 EST
> >
> > > +#define PCI11X1X_TX_FAULT_GPIO 46
> > > +#define PCI11X1X_TX_DIS_GPIO 47
> > > +#define PCI11X1X_RATE_SEL0_GPIO 48
> > > +#define PCI11X1X_LOS_GPIO 49
> > > +#define PCI11X1X_MOD_DEF0_GPIO 51
> >
> > How do you know these values?
> >
> > Can i buy this device, design my own board, and decide to use a different
> > mapping of GPIO pins to SFP cage pins? Or does the data sheet say you MUST
> > use this mapping?
> >
> > Maybe consider drivers/misc/lan966x_pci.dtso.
> [Thangaraj Samynathan] ] These values are from the Microchip EVB reference design,
> not mandated by the datasheet. A board designer is free to wire SFP signals to
> different GPIO pins.
>
> However, the PCI11x1x is a PCIe add-in card that can also be used in
> standard x86 systems. A .dtso overlay has no base DT to attach to on
> x86, and ACPI _DSD properties require the platform firmware vendor to
> add them - which is not realistic for a PCIe add-in card in the field.
>
> We propose using the EVB default GPIO values as a fallback when no
> firmware description is present, and reading from DT/ACPI _DSD when
> available. Does this approach seem reasonable?
lan966x_pci.dtso can be used with a PCIe add in card. What is
important is that the PCI vendor/product ID represents the specific
board, so that the correct dtso file is loaded, which then has the
correct GPIO mappings.
The EVB documentation needs to be clear that the microchip
vendor/product should only be used when the board is 100% compatible
to the EVB, otherwise bad things will happen. Each OEM should use
their own values.
Or you need to stuff the complete configuration, including the GPIOs,
into the EEPROM/strapping pins.
Andrew