On Mon, Mar 29, 2021 at 3:45 AM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > > On Mon, Mar 29, 2021 at 5:01 AM Brad Larson <brad@xxxxxxxxxxx> wrote: > > > > Pensando Elba SoC platforms have a SPI connected CPLD > > for platform management. > > And? It's not a good justification to spread the (debugging only) > spidev interface. > > What tool is going to use it? Why can't you have a driver for that in > the kernel? The driver is in userspace and we need to instantiate /dev/spi0.N in the /dev directory. The CPLD includes a device id and version id that userspace applications use to differentiate functionality on different boards. It wouldn't really be appropriate to use one of the existing entries. For example even with high pin count SoCs we are offloading low speed functionality into the CPLD connected over SPI. The elba-asic-common.dtsi file shows a compatible string of "pensando,cpld-rd1173" which does have a kernel driver we intend to contribute later if there is interest. This IP in the CPLD is readily available from Lattice which provides two I2C Masters which in our case we use for access to the network port transceivers. What was missing in the kernel was a bridge driver that exposes what looks like a standard I2C device to userspace where the drivers/i2c/busses/i2c-rd1173.c handles the spi transfers to the Lattice IP in the CPLD. > > -- > With Best Regards, > Andy Shevchenko