From d480df2116fc0d629d52f654bc218ee36251cb33 Mon Sep 17 00:00:00 2001 From: Vyacheslav Yurkov Date: Tue, 4 Apr 2023 20:58:13 +0200 Subject: [PATCH] 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 Change-Id: I431ecd93576f97fd021d82d23b93c659fc8f26b8 --- fdts/stm32mp15-bl2.dtsi | 5 +++-- fdts/stm32mp15-bl32.dtsi | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fdts/stm32mp15-bl2.dtsi b/fdts/stm32mp15-bl2.dtsi index f956b0577..18a4ba932 100644 --- a/fdts/stm32mp15-bl2.dtsi +++ b/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; }; diff --git a/fdts/stm32mp15-bl32.dtsi b/fdts/stm32mp15-bl32.dtsi index c5a815e22..688222498 100644 --- a/fdts/stm32mp15-bl32.dtsi +++ b/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; }; };