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>,
Olof Johansson <olof@lixom.net>,
Patrice Chotard <patrice.chotard@st.com>, <lee.jones@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH 3/8] Documentation: dt: Add bindings for STM32 pinctrl
Date: Fri, 27 Jan 2017 17:15:16 +0100 [thread overview]
Message-ID: <1485533721-9019-4-git-send-email-alexandre.torgue@st.com> (raw)
In-Reply-To: <1485533721-9019-1-git-send-email-alexandre.torgue@st.com>
Adds "ngpios" and "gpio-ranges" bindings definition.
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
diff --git a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
index b24583a..25d9809 100644
--- a/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.txt
@@ -37,8 +37,23 @@ Optional properties:
- st,syscfg: Should be phandle/offset pair. The phandle to the syscon node
which includes IRQ mux selection register, and the offset of the IRQ mux
selection register.
+ - ngpios: Number of gpios in a bank (to use if bank gpio numbers is less
+ than 16).
+ - gpio-ranges: Define a dedicated mapping between a pin-controller and
+ a gpio controller. Format is <&phandle a b c> with:
+ -(phandle): phandle of pin-controller.
+ -(a): gpio base offset in range.
+ -(b): pin base offset in range.
+ -(c): gpio count in range
+ This entry has to be used either if there are holes inside a bank:
+ GPIOB0/B1/B2/B14/B15 (see example 2)
+ or if banks are not contiguous:
+ GPIOA/B/C/E...
+ NOTE: If "gpio-ranges" is used for a gpio controller, all gpio-controller
+ have to use a "gpio-ranges" entry.
+ More details in Documentation/devicetree/bindings/gpio/gpio.txt.
-Example:
+Example 1:
#include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
...
@@ -60,6 +75,43 @@ Example:
pin-functions nodes follow...
};
+Example 2:
+#include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
+...
+
+ pinctrl: pin-controller {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "st,stm32f429-pinctrl";
+ ranges = <0 0x40020000 0x3000>;
+ pins-are-numbered;
+
+ gpioa: gpio@40020000 {
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x0 0x400>;
+ resets = <&reset_ahb1 0>;
+ st,bank-name = "GPIOA";
+ gpio-ranges = <&pinctrl 0 0 16>;
+ };
+
+ gpiob: gpio@40020400 {
+ gpio-controller;
+ #gpio-cells = <2>;
+ reg = <0x0 0x400>;
+ resets = <&reset_ahb1 0>;
+ st,bank-name = "GPIOB";
+ ngpios = 4;
+ gpio-ranges = <&pinctrl 0 16 3>,
+ <&pinctrl 14 30 2>;
+ };
+
+
+ ...
+ pin-functions nodes follow...
+ };
+
+
Contents of function subnode node:
----------------------------------
Subnode format
--
1.9.1
next prev parent reply other threads:[~2017-01-27 16:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 16:15 [PATCH 0/8] Add STM32F469 pinctrl and fix issues in " Alexandre TORGUE
2017-01-27 16:15 ` [PATCH 1/8] pinctrl: stm32: fix bad location of gpiochip_lock_as_irq Alexandre TORGUE
2017-01-30 15:15 ` Linus Walleij
2017-01-27 16:15 ` [PATCH 2/8] pinctrl: stm32: use gpio-ranges to declare bank range Alexandre TORGUE
2017-01-30 15:19 ` Linus Walleij
2017-01-30 16:29 ` Alexandre Torgue
2017-02-01 15:01 ` Linus Walleij
2017-03-27 10:23 ` Alexandre Torgue
2017-01-27 16:15 ` Alexandre TORGUE [this message]
2017-02-01 15:04 ` [PATCH 3/8] Documentation: dt: Add bindings for STM32 pinctrl Rob Herring
2017-02-06 8:45 ` Linus Walleij
2017-01-27 16:15 ` [PATCH 4/8] includes: dt-bindings: Rename STM32F429 pinctrl DT bindings Alexandre TORGUE
2017-01-27 16:15 ` [PATCH 5/8] pinctrl: stm32: Add STM32F469 MCU support Alexandre TORGUE
2017-01-27 16:15 ` [PATCH 6/8] Documentation: dt: Add new compatible to STM32 pinctrl driver bindings Alexandre TORGUE
2017-02-01 15:06 ` Rob Herring
2017-02-01 15:58 ` Alexandre Torgue
2017-02-06 8:46 ` Linus Walleij
2017-02-06 11:21 ` Alexandre Torgue
2017-01-27 16:15 ` [PATCH 7/8] ARM: Kconfig: Introduce MACH_STM32F469 flag Alexandre TORGUE
2017-01-27 16:15 ` [PATCH 8/8] ARM: dts: stm32: create dedicated files for pinctrl definitions Alexandre TORGUE
2017-01-30 14:55 ` [PATCH 0/8] Add STM32F469 pinctrl and fix issues in STM32 pinctrl Alexandre Torgue
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=1485533721-9019-4-git-send-email-alexandre.torgue@st.com \
--to=alexandre.torgue@st.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=olof@lixom.net \
--cc=patrice.chotard@st.com \
--cc=robh+dt@kernel.org \
/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
all inboxes | Powered by JetHome®