aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt7621-gpio
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-05-20 15:00:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-25 18:49:32 +0200
commitaf315a5b04adc3af4a580a1649ee8c861284729e (patch)
treedf79c70572b0e7f08e65cec1f8eb603e074a1b7f /drivers/staging/mt7621-gpio
parentstaging: rtl8723bs: Fix grammar error in comment. (diff)
downloadlinux-dev-af315a5b04adc3af4a580a1649ee8c861284729e.tar.xz
linux-dev-af315a5b04adc3af4a580a1649ee8c861284729e.zip
staging: mt7621-gpio: dt-bindings: add documentation for mt7621-gpio
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> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-gpio')
-rw-r--r--drivers/staging/mt7621-gpio/mediatek,mt7621-gpio.txt51
1 files changed, 51 insertions, 0 deletions
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 000000000000..54de9f79bd1d
--- /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>;
+ };
+ };