On Tue, Nov 26, 2019 at 8:14 PM Christophe Leroy <christophe.leroy@xxxxxx> wrote: > > Digging a bit further, I see that devm_spi_register_master() fails in > > spi_register_controler() because ctlr->num_chipselect is 0 Aha, I see what the problem is I think. The old code for mpc8xxx had this: ngpios = of_gpio_count(np); ngpios = max(ngpios, 0); if (ngpios == 0 && !spisel_boot) { /* * SPI w/o chip-select line. One SPI device is still permitted * though. */ pdata->max_chipselect = 1; return 0; } (...) master->num_chipselect = pdata->max_chipselect; But the new code in the core has this: nb = gpiod_count(dev, "cs"); ctlr->num_chipselect = max_t(int, nb, ctlr->num_chipselect); So it relied on inspecting the device tree and set this to 1 if it didn't find anything. I will send a patch to test! Yours, Linus Walleij