overlays: sc16is75x: Add generic SPI overlay#6865
Conversation
Currently four nearly identical overlays (sc16is750-spi0 / -spi1 and sc16is752-spi0 / -spi1) are provided. Besides the redundant configuration all of them lack support for other SPI interfaces than spi0 and spi1. Thus refactor the common definitions into a generic sc16is75x-spi overlay which provides support for all known spi / cs combinations. Also choose the chip type via dtparam rather than different overlay. In order to keep existing setups keep the old overlays, but add a deprecation message via overlay map. Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com>
|
As talked about yesterday, I will think about some generic solution in order to avoid duplication of the boilerplate spi cs tuples. But this is stuff for another PR (once I found something which will work for most of the overlays) |
|
I'm looking at this now. The deprecation breaking the overlay check is unfortunate, but I think it would be fixed by actually deleting the original overlays. A more serious problem is the reference to labels that don't exist in the older Pis' dtbs, eg. If you don't mind sticking to the old naming scheme - I'm currently getting an error about overlay 'sc16is750-spi0' not being supported on the bcm2835 platform, but I should be able to fix (or at least understand) that. |
|
Doh, it's obvious - the correct syntax is: Note the |
|
Thanks, the changes sound resonable. I will update the branch |
|
I'd hang on until I've got it all working, especially the automated checks. When I've done that I'll push a patch with my changes. |
As discussed, here are a few minor improvements to the original PR: 1. Use target-path with aliases to allow the overlay to be loaded on older devices that lack the higher numbered SPI interfacs. 2. Change the "deprecated" errors to "renamed", so that the old names continue to work without requiring a config.txt change. 3. Use the same parameter names as the old overlays, partly so that existing installations continue to work even though they are now using the new overlay, and partly to match the -i2c variants. 4. Actually delete the old overlays. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
Assuming the other tests pass, we can fix up the over-long commit message when we "Squash and merge". |
|
Looks good so far. Will do some tests with real hardware and then this should be ready |
|
Tests look good so far. From my side this is ready to be squashed and merged |
kernel: overlays: sc16is75x: Add generic SPI overlay See: raspberrypi/linux#6865 kernel: add mira220 image sensor See: raspberrypi/linux#6717 kernel: defconfigs: Enable WATCHDOG_SYSFS See: raspberrypi/linux#6875 kernel: drivers: pci: hailo: Better lock handling when calling find_vdma() See: raspberrypi/linux#6868 kernel: drivers: media: imx500: Enable sensor temperature monitoring See: raspberrypi/linux#6877 kernel: firmware: rp1: Rename to rp1-fw to avoid module name collision See: raspberrypi/linux#6879 kernel: Candidate fixes for camera sync issues See: raspberrypi/linux#6863
kernel: overlays: sc16is75x: Add generic SPI overlay See: raspberrypi/linux#6865 kernel: add mira220 image sensor See: raspberrypi/linux#6717 kernel: defconfigs: Enable WATCHDOG_SYSFS See: raspberrypi/linux#6875 kernel: drivers: pci: hailo: Better lock handling when calling find_vdma() See: raspberrypi/linux#6868 kernel: drivers: media: imx500: Enable sensor temperature monitoring See: raspberrypi/linux#6877 kernel: firmware: rp1: Rename to rp1-fw to avoid module name collision See: raspberrypi/linux#6879 kernel: Candidate fixes for camera sync issues See: raspberrypi/linux#6863
Currently four nearly identical overlays (sc16is750-spi0 / -spi1 and sc16is752-spi0 / -spi1) are provided. Besides the redundant configuration all of them lack support for other SPI interfaces than spi0 and spi1.
Thus refactor the common definitions into a generic sc16is75x-spi overlay which provides support for all known spi / cs combinations. Also choose the chip type via dtparam rather than different overlay.
In order to keep existing setups keep the old overlays, but add a deprecation message via overlay map.