devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] ARM: dts: stm32: change pinctrl bindings definition
@ 2017-07-17 11:00 Alexandre TORGUE
  2017-07-17 11:00 ` Alexandre TORGUE
       [not found] ` <1500289258-3700-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre TORGUE @ 2017-07-17 11:00 UTC (permalink / raw)
  To: Maxime Coquelin, Linus Walleij, Rob Herring, Mark Rutland,
	Arnd Bergmann, Russell King
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Initially each pin was declared in "include/dt-bindings/stm32f429-pinfunc.h"
and each definition contained SOC names (ex: STM32F429_PA9_FUNC_USART1_TX).
Since this approach was approved, the number of supported MCU has
increased (STM32F429/STM32F469/STM32f746/STM32H743). To avoid to add a new
file in "include/dt-bindings" each time a new STM32 SOC arrives I propose
a new approach which consist to use a macro to define pin muxing in device
tree. All STM32 DT will use the common macro to define pinmux. Furthermore, it
will make easy maintenance and integration of new SOC.

To check that patch generate same dtb than befrore I used dtc binary to (re)generate dts files
(before and after apply the series).
Example on stm32f469-disco:

./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-after.dts
stm32f469-disco-after.dtb

./scripts/dtc/dtc -I dtb -O dts -o stm32f469-disco-before.dts
stm32f469-disco-before.dtb

Then diff -u stm32f469-disco-before.dts stm32f469-disco-after.dts

Regards
Alex

Alexandre TORGUE (1):
  ARM: dts: stm32: change pinctrl bindings definition

 arch/arm/boot/dts/stm32f429.dtsi                |  176 ++--
 include/dt-bindings/pinctrl/stm32-pinfunc.h     |   61 ++
 include/dt-bindings/pinctrl/stm32f429-pinfunc.h | 1239 -----------------------
 3 files changed, 149 insertions(+), 1327 deletions(-)
 create mode 100644 include/dt-bindings/pinctrl/stm32-pinfunc.h
 delete mode 100644 include/dt-bindings/pinctrl/stm32f429-pinfunc.h

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-02  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 11:00 [RFC PATCH] ARM: dts: stm32: change pinctrl bindings definition Alexandre TORGUE
2017-07-17 11:00 ` Alexandre TORGUE
     [not found]   ` <1500289258-3700-2-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-07-17 11:15     ` Arnd Bergmann
2017-07-17 11:19       ` Alexandre Torgue
     [not found] ` <1500289258-3700-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-08-02  9:32   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).