Our nRF5340 application requires a lot of serial ports, but 2 of them are only used for a second during configuration and are otherwise (99.9% of the time) idle. If we could share a SPI port and UART port with the same ID but different pins, for example, then our problem of not enough ports would be solved.
Section 7.1.2 (Peripherals with Shared ID) describes how you can have two peripherals with the same ID, and swap back and forth between them by disabling one while the other is being used. I had actually done that once with the old nRF5 SDK. But I'm new to nRF Connect and all the complications with the Devicetree, device drivers and so forth.
Are there any examples of how to do this with Zephyr?
I haven't used the Zephyr power management features yet (we are not worried about power), but I see that there are functions to suspend and resume a device. But I believe that is handled by the device driver and aimed at power managing an external device (like an external Flash chip), not the port itself. How can I enable/disable a port dynamically?
The Devicetree allows me to enable two peripherals with the same ID and base address (e.g.- both I2C1 and SPI1 can enabled in the Devicetree, with different pin assignments). So all I need is a way to disable and enable the two peripherals at the same ID at run time.