zephyr/dts/arm/st/f0
Erwan Gouriou d3664b063e drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible
On stm32 spi devices, there are 2 main IP variants, with and w/o
fifo. Fifo is not really used today, but still there is some
additional code handling fifo. Today this code is protected under
Kconfig symbol SPI_STM32_HAS_FIFO.
This code carries redundant information vs dedicated compatible
"st,stm32-spi-fifo", which is provided as unique driver compatible
for devices supporting this IP as opposed to use of "st,stm32-spi"
when fifo is not supported.

Having these 2 compatibles defined exclusively is not convenient for
migration to DT_INST as DT_INST macros contain compatible string and
hence it cannot be used to provide common compatible code for devices
defining different compatibles.

Based on these observations, review stm32 spi devices compatible
declarations. Devices supporting fifo will now declare both
compatibles, as proposed by dt spec: "[compatible] property value
consists of a concatenated list of null terminated strings,
from most specific to most general". Hence field will now be:
"st,stm32-spi-fifo", "st,stm32-spi"

This way, fifo enabled stm32 spi devices will generate both:
DT_INST_STM32_SPI_FOO and DT_INST_STM32_SPI_FIFO_FOO
As well as:
DT_COMPAT_ST_STM32_SPI and DT_COMPAT_ST_STM32_SPI_FIFO
So, DT_INST_STM32_SPI_FOO could be used for device initialization.
Also DT_COMPAT_ST_STM32_SPI_FIFO could be used for FIFO handling
code inside driver. Hence use it to replace Kconfig symbol
SPI_STM32_HAS_FIFO.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-03-17 11:03:10 -06:00
..
stm32f0.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f030.dtsi
stm32f030X4.dtsi arm: stm32f0: introduce STM32F030X4 stuff 2019-10-08 16:31:48 -05:00
stm32f030X8.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f030Xc.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f051.dtsi
stm32f051X8.dtsi
stm32f070.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f070Xb.dtsi
stm32f072.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f072Xb.dtsi
stm32f091.dtsi drivers/spi: stm32: Modify use of "st,stm32-spi-fifo" compatible 2020-03-17 11:03:10 -06:00
stm32f091Xc.dtsi
stm32f098Xc.dtsi soc: stm32f0: Add support for STM32F098xx SOC 2019-12-20 20:27:20 -05:00