All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
To: gregkh@linuxfoundation.org
Cc: neil@brown.name, driverdev-devel@linuxdriverproject.org
Subject: [PATCH v4 01/11] staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio
Date: Sat, 19 May 2018 13:15:17 +0200	[thread overview]
Message-ID: <1526728527-15754-2-git-send-email-sergio.paracuellos@gmail.com> (raw)
In-Reply-To: <1526728527-15754-1-git-send-email-sergio.paracuellos@gmail.com>

This commit add missing dt bindings documentation for mt7621-gpio
driver. There is some missing stuff here about interrupts with is
not also being used in the mt7621.dtsi file. So just include in
staging a incomplete version before moving this to kernel's dt-bindings
place.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../staging/mt7621-gpio/mediatek,mt7621-gpio.txt   | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt

diff --git a/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt b/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt
new file mode 100644
index 0000000..54de9f7
--- /dev/null
+++ b/drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt
@@ -0,0 +1,51 @@
+Mediatek SoC GPIO controller bindings
+
+The IP core used inside these SoCs has 3 banks of 32 GPIOs each.
+The registers of all the banks are interwoven inside one single IO range.
+We load one GPIO controller instance per bank. To make this possible
+we support 2 types of nodes. The parent node defines the memory I/O range and
+has 3 children each describing a single bank.
+
+Required properties for the top level node:
+- compatible:
+  - "mediatek,mt7621-gpio" for Mediatek controllers
+- reg : Physical base address and length of the controller's registers
+
+Required properties for the GPIO bank node:
+- compatible:
+  - "mediatek,mt7621-gpio-bank" for Mediatek banks
+- #gpio-cells : Should be two.
+  - first cell is the pin number
+  - second cell is used to specify optional parameters (unused)
+- gpio-controller : Marks the device node as a GPIO controller
+- reg : The id of the bank that the node describes.
+
+Example:
+	gpio@600 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		compatible = "mediatek,mt7621-gpio";
+		reg = <0x600 0x100>;
+
+		gpio0: bank@0 {
+			reg = <0>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpio1: bank@1 {
+			reg = <1>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+
+		gpio2: bank@2 {
+			reg = <2>;
+			compatible = "mediatek,mt7621-gpio-bank";
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+	};
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-05-19 11:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19 11:15 [PATCH v4 00/11] staging: mt7621-gpio: use mediatek as binding instead of custom mtk Sergio Paracuellos
2018-05-19 11:15 ` Sergio Paracuellos [this message]
2018-05-19 11:15 ` [PATCH v4 02/11] staging: mt7621-gpio: update TODO file Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 03/11] staging: mt7621-dts: update gpios related entries to use 'mediatek' Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 04/11] staging: mt7621-gpio: replace 'mtk' to use correct one 'mediatek' Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 05/11] staging: mt7621-gpio: avoid use of globals and use platform_data instead Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 06/11] staging: mt7621-dts: add interrupt device tree nodes for the gpio controller Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 07/11] staging: mt7621-gpio: dt-bindings: add interrupt nodes to bindings doc Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 08/11] staging: mt7621-gpio: avoid devm_kzalloc() hidden inside declarations and refactor function a bit Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 09/11] staging: mt7621-gpio: use ternary operator in return in mediatek_gpio_get_direction Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 10/11] staging: mt7621-gpio: use MTK_BANK_WIDTH instead of magic number Sergio Paracuellos
2018-05-19 11:15 ` [PATCH v4 11/11] staging: mt7621-gpio: update TODO list Sergio Paracuellos

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=1526728527-15754-2-git-send-email-sergio.paracuellos@gmail.com \
    --to=sergio.paracuellos@gmail.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=neil@brown.name \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.