Is your feature request related to a problem? Please describe.
Currently the memory mapped external flash address must be defined in the linker file and either set manually or the vendor must have a vendor specific binding for their MSPI device. For example: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/application_development/code_relocation_nocopy/linker_arm_nocopy.ld#L61
This becomes a messy when we might have multiple configurable start addresses for the memory mapped region. For example on nRF7120, you can use a start address of 0x60000000 for non-cached region and 0x0200_0000 for cached.
Describe the solution you'd like
I suggest that the start address becomes devicetree selectable so we can have common linker scripts for samples like the one linked above. This way I can add support for both cached and non-cached use-cases by just adding 2 devicetree overlays.
For this, we can update the xip-config variable in the mspi-device binding to include a aperture start address. https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/mspi/mspi-device.yaml#L153
Describe alternatives you've considered
An alternative would be to have a separate xip-aperture property which would simplify things as this change wouldn't break existing configurations. This would also separate the xip-config which is consumed by the drivers and xip-aperture which is consumed by a linker script.
Is your feature request related to a problem? Please describe.
Currently the memory mapped external flash address must be defined in the linker file and either set manually or the vendor must have a vendor specific binding for their MSPI device. For example: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/application_development/code_relocation_nocopy/linker_arm_nocopy.ld#L61
This becomes a messy when we might have multiple configurable start addresses for the memory mapped region. For example on nRF7120, you can use a start address of
0x60000000for non-cached region and0x0200_0000for cached.Describe the solution you'd like
I suggest that the start address becomes devicetree selectable so we can have common linker scripts for samples like the one linked above. This way I can add support for both cached and non-cached use-cases by just adding 2 devicetree overlays.
For this, we can update the
xip-configvariable in themspi-devicebinding to include a aperture start address. https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/mspi/mspi-device.yaml#L153Describe alternatives you've considered
An alternative would be to have a separate
xip-apertureproperty which would simplify things as this change wouldn't break existing configurations. This would also separate thexip-configwhich is consumed by the drivers andxip-aperturewhich is consumed by a linker script.