Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: stm32: remove timer5 duplicate unit-address on stm32f7 series

Remove the following warnings seen when building with W=1.
Warning (unique_unit_address): /soc/timer@40000c00: duplicate unit-address
(also used in node /soc/timers@40000c00)
This approach is based on some discussions[1], to restructure the dtsi
and dts files.

Timer5 is enabled by default on stm32f7 series, to act as clockevent. In
order to get rid of the W=1 warning, and be compliant with dt-schemas
(e.g. dtbs_check):
- In stm32f746.dtsi:
. Keep the more complete timers5 description
. Remove the most simple timer5 node that is duplicate
- In each board:
. adopt "st,stm32-timer" compatible for timers5, also add the interrupt
. use /delete-property/ and /delete-node/ so the it matches the
clockevent bindings

Note: all this is done in one shot (e.g. not split) to keep clockevent
functionality.

[1] https://lore.kernel.org/linux-arm-kernel/Yaf4jiZIp8+ndaXs@robh.at.kernel.org/

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

authored by

Fabrice Gasnier and committed by
Alexandre Torgue
b814f754 e6bc0d6a

+36 -7
+12
arch/arm/boot/dts/stm32746g-eval.dts
··· 194 194 bus-width = <4>; 195 195 }; 196 196 197 + &timers5 { 198 + /* Override timer5 to act as clockevent */ 199 + compatible = "st,stm32-timer"; 200 + interrupts = <50>; 201 + status = "okay"; 202 + /delete-property/#address-cells; 203 + /delete-property/#size-cells; 204 + /delete-property/clock-names; 205 + /delete-node/pwm; 206 + /delete-node/timer@4; 207 + }; 208 + 197 209 &usart1 { 198 210 pinctrl-0 = <&usart1_pins_a>; 199 211 pinctrl-names = "default";
+12
arch/arm/boot/dts/stm32f746-disco.dts
··· 109 109 bus-width = <4>; 110 110 }; 111 111 112 + &timers5 { 113 + /* Override timer5 to act as clockevent */ 114 + compatible = "st,stm32-timer"; 115 + interrupts = <50>; 116 + status = "okay"; 117 + /delete-property/#address-cells; 118 + /delete-property/#size-cells; 119 + /delete-property/clock-names; 120 + /delete-node/pwm; 121 + /delete-node/timer@4; 122 + }; 123 + 112 124 &usart1 { 113 125 pinctrl-0 = <&usart1_pins_b>; 114 126 pinctrl-names = "default";
-7
arch/arm/boot/dts/stm32f746.dtsi
··· 141 141 }; 142 142 }; 143 143 144 - timer5: timer@40000c00 { 145 - compatible = "st,stm32-timer"; 146 - reg = <0x40000c00 0x400>; 147 - interrupts = <50>; 148 - clocks = <&rcc 0 STM32F7_APB1_CLOCK(TIM5)>; 149 - }; 150 - 151 144 timers5: timers@40000c00 { 152 145 #address-cells = <1>; 153 146 #size-cells = <0>;
+12
arch/arm/boot/dts/stm32f769-disco.dts
··· 137 137 bus-width = <4>; 138 138 }; 139 139 140 + &timers5 { 141 + /* Override timer5 to act as clockevent */ 142 + compatible = "st,stm32-timer"; 143 + interrupts = <50>; 144 + status = "okay"; 145 + /delete-property/#address-cells; 146 + /delete-property/#size-cells; 147 + /delete-property/clock-names; 148 + /delete-node/pwm; 149 + /delete-node/timer@4; 150 + }; 151 + 140 152 &usart1 { 141 153 pinctrl-0 = <&usart1_pins_a>; 142 154 pinctrl-names = "default";