Re: [PATCH 2/5] drivers: spi: spidev: add compatible for arduino spi mcu interface

From: Riccardo Mereu Linux Kernel

Date: Tue Nov 11 2025 - 08:33:23 EST


On Fri, Nov 7, 2025 at 8:13 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>
> > ---
> > drivers/spi/spidev.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> > index 5300c942a2a4..f0dd516c2083 100644
> > --- a/drivers/spi/spidev.c
> > +++ b/drivers/spi/spidev.c
> > @@ -704,6 +704,7 @@ static const struct class spidev_class = {
> > */
> > static const struct spi_device_id spidev_spi_ids[] = {
> > { .name = /* abb */ "spi-sensor" },
> > + { .name = /* arduino */ "mcu" },
> > { .name = /* cisco */ "spi-petra" },
> > { .name = /* dh */ "dhcom-board" },
> > { .name = /* elgin */ "jg10309-01" },
> > @@ -737,6 +738,7 @@ static int spidev_of_check(struct device *dev)
> >
> > static const struct of_device_id spidev_dt_ids[] = {
> > { .compatible = "abb,spi-sensor", .data = &spidev_of_check },
> > + { .compatible = "arduino,mcu", .data = &spidev_of_check },
>
> That's way too generic, IMO. First, I am not aware of Arduino boards
> mounted on top of regular development boards, so basically you are not
> describing actual hardware setup but what could be potentially plugged
> into box with Linux... and then it is like saying "you can plug
> anything" because MCU covers everything, like calling it "Raspberry
> Pi-clone".

This is used to describe one of the interfaces between the
microcontroller and the microprocessor on the Arduino UnoQ board.
Since this could be used in other layouts in the future, we thought to
keep it generic enough to reuse it.
If this isn't possible, do you have any suggestions?

>
> Best regards,
> Krzysztof