Devicetree
 help / color / mirror / Atom feed
From: Alexandre Torgue <alexandre.torgue@st.com>
To: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Russell King <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, vikas.manocha@st.com
Subject: [PATCH v4] ARM: dts: stm32: change pinctrl bindings definition
Date: Wed, 30 Aug 2017 16:50:52 +0200	[thread overview]
Message-ID: <1504104653-26804-1-git-send-email-alexandre.torgue@st.com> (raw)

Initially each pin was declared in "include/dt-bindings/stm32<SOC>-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 maintenance and integration of new SOC easier.

I made only one patch to avoid dependencies. Let me know if you prefer that I
split it.

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

Changes since v3:
 -Rewrite documentation part
 -Simplify macro

Changes since v2:
 -Drop RFC tag
 -Add reviewers
 -Enhance modifications to all STM32 (F4/F7/H7)

Changes since v1:
 -According to Vikas Manocha review, use generic macro to define port.


Regards
Alex

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

 .../bindings/pinctrl/st,stm32-pinctrl.txt          |   22 +-
 arch/arm/boot/dts/stm32f429.dtsi                   |  176 +--
 arch/arm/boot/dts/stm32f746.dtsi                   |   10 +-
 arch/arm/boot/dts/stm32h743-pinctrl.dtsi           |   10 +-
 include/dt-bindings/pinctrl/stm32-pinfunc.h        |   30 +
 include/dt-bindings/pinctrl/stm32f429-pinfunc.h    | 1239 ---------------
 include/dt-bindings/pinctrl/stm32f746-pinfunc.h    | 1324 ----------------
 include/dt-bindings/pinctrl/stm32h7-pinfunc.h      | 1612 --------------------
 8 files changed, 148 insertions(+), 4275 deletions(-)
 create mode 100644 include/dt-bindings/pinctrl/stm32-pinfunc.h
 delete mode 100644 include/dt-bindings/pinctrl/stm32f429-pinfunc.h
 delete mode 100644 include/dt-bindings/pinctrl/stm32f746-pinfunc.h
 delete mode 100644 include/dt-bindings/pinctrl/stm32h7-pinfunc.h

-- 
2.7.4

             reply	other threads:[~2017-08-30 14:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 14:50 Alexandre Torgue [this message]
     [not found] ` <1504104653-26804-1-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-08-30 14:50   ` [PATCH v4] ARM: dts: stm32: change pinctrl bindings definition Alexandre Torgue
     [not found]     ` <1504104653-26804-2-git-send-email-alexandre.torgue-qxv4g6HH51o@public.gmane.org>
2017-09-11 21:07       ` Rob Herring
2017-09-11 21:05 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504104653-26804-1-git-send-email-alexandre.torgue@st.com \
    --to=alexandre.torgue@st.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.gaignard@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=vikas.manocha@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox