The SPI definition from the nice!nano should be removed because the pins defined there are low drive rated pins by Nordic. This means that you shouldn't run these pins above 10kHz otherwise you may have interference/degraded performance with the antenna. This is somewhat a design flaw of the nice!nano, however, I don't think it's a big deal.
While the Pro Micro pinout defines SPI, no AVR keyboard uses SPI from my understanding. Instead, bit-banging is used. In fact, it seems many keyboards don't even use those SPI pins for bit-banging (which is good news for the nice!nano). They utilize seemingly random pins because they use bit-banging.
Currently the main use of SPI will be addressable RGB lighting (until something else is found). This becomes a bit awkward because of how led_strip
(see here) is defined in the DT. When using SPI, it builds off of an existing SPI definition. However, for each shield, there will most likely be a different pin for RGB. Because of this we can't define inside of the nice!nano or Proton C an SPI output. This compounds with the fact that SPI can't be put on any pin with the Proton C (stm32 architecture limitation), and the nice!nano can't have SPI on any pin without degrading the antenna.
The solution for board + shield duos using SPI peripherals is for the shield to define the SPI. Once again though, we can't assume every pro micro compatible board is capable of having SPI on the pins defined in the shield. Is it possible to make different definitions for each board? If not, shields should probably utilize the bit-banged version of led_strip
.
Bit-banging will theoretically work on any board, but there's still a couple issues. First, the bit-banged version of the WS2812 driver isn't implemented for every architecture. Second is that still you can't bit-bang on low drive rated pins without degrading wireless performance. There still probably needs per-board definitions for shields to adjust the led_strip
definition.