dts: stm32: add SPI nodes and give example for /delete-node/

Most STM32F429 SoCs have 6 SPIs, but STM32F429Vx SoCs only have
4 SPIs. This is one of the rare conditions where device-tree
directive /delete-node/ should be used.

Add spi5 and spi6 node to stm32f429.dtsi. Create file
stm32f429vX.dtsi to delete those nodes and document usage of
/delete-node/ directive.

Signed-off-by: Daniel Wagenknecht <wagenknecht.daniel@gmail.com>
This commit is contained in:
Daniel Wagenknecht 2018-02-14 23:22:13 +01:00 committed by Kumar Gala
commit ab20e83f78
2 changed files with 51 additions and 0 deletions

View file

@ -35,5 +35,31 @@
status = "disabled";
label = "SPI_4";
};
/* spi5 is present on all STM32F429XX SoCs except
* STM32F429vX SoCs. Delete node in stm32f429vX.dtsi.
*/
spi5: spi@40015000 {
compatible = "st,stm32-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40015000 0x400>;
interrupts = <85 5>;
status = "disabled";
label = "SPI_5";
};
/* spi6 is present on all STM32F429XX SoCs except
* STM32F429vX SoCs. Delete node in stm32f429vX.dtsi.
*/
spi6: spi@40015400 {
compatible = "st,stm32-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40015400 0x400>;
interrupts = <86 5>;
status = "disabled";
label = "SPI_6";
};
};
};

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2018 Daniel Wagenknecht
*
* Document the usage of /delete-node/ for device tree nodes
* that are missing on on only a small subset of SoCs of a given group
* of SoCs.
* Don't remove this file even if none of the SoCs currently
* implemented in zephyr use it.
*
* spi5 and spi6 are present on all STM32F429XX SoCs except
* STM32F429vX SoCs, so they are defined in stm32f429.dtsi and deleted
* here.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <st/stm32f429.dtsi>
/ {
soc {
/delete-node/ &spi5;
/delete-node/ &spi6;
};
};