Browse Source

fix(stm32mp15-fdts): use /omit-if-no-ref/ for spi and i2c

Use /omit-if-no-ref/ keyword in DT to remove extra device nodes only
when they are not used / not referenced.

If the board device tree only defines subnodes, dtc does not consider it
as usage, you have to specifically mention device's phandle, e.g.:

\ {
	i2c6-phandle = <&i2c6>;
};

or in aliases section
aliases {
	i2c6 = &i2c6;
};

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Change-Id: I431ecd93576f97fd021d82d23b93c659fc8f26b8
pull/1996/head
Vyacheslav Yurkov 2 years ago
parent
commit
d480df2116
  1. 5
      fdts/stm32mp15-bl2.dtsi
  2. 5
      fdts/stm32mp15-bl32.dtsi

5
fdts/stm32mp15-bl2.dtsi

@ -3,6 +3,9 @@
* Copyright (c) 2020-2023, STMicroelectronics - All Rights Reserved
*/
/omit-if-no-ref/ &i2c6;
/omit-if-no-ref/ &spi6;
/ {
#if !STM32MP_EMMC && !STM32MP_SDMMC
aliases {
@ -39,11 +42,9 @@
#if !STM32MP_USB_PROGRAMMER
/delete-node/ usbphyc@5a006000;
#endif
/delete-node/ spi@5c001000;
/delete-node/ rtc@5c004000;
/delete-node/ etzpc@5c007000;
/delete-node/ stgen@5c008000;
/delete-node/ i2c@5c009000;
/delete-node/ tamp@5c00a000;
};

5
fdts/stm32mp15-bl32.dtsi

@ -3,6 +3,9 @@
* Copyright (c) 2020-2023, STMicroelectronics - All Rights Reserved
*/
/omit-if-no-ref/ &i2c6;
/omit-if-no-ref/ &spi6;
/ {
aliases {
/delete-property/ mmc0;
@ -23,8 +26,6 @@
/delete-node/ mmc@58005000;
/delete-node/ mmc@58007000;
/delete-node/ usbphyc@5a006000;
/delete-node/ spi@5c001000;
/delete-node/ stgen@5c008000;
/delete-node/ i2c@5c009000;
};
};

Loading…
Cancel
Save