mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
24459dc108
The new numberspace base starts from 512 instead of 0. The number base seems come from the kernel symbol CONFIG_GPIOLIB_FASTPATH_LIMIT. Suppress warning: gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
52 lines
1.5 KiB
Diff
52 lines
1.5 KiB
Diff
From: John Crispin <blogic@openwrt.org>
|
|
Date: Sun, 28 Jul 2013 19:45:30 +0200
|
|
Subject: [PATCH 1/3] DT: Add documentation for gpio-ralink
|
|
|
|
Describe gpio-ralink binding.
|
|
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
---
|
|
.../devicetree/bindings/gpio/gpio-ralink.txt | 36 +++++++++++++++++++
|
|
1 file changed, 36 insertions(+)
|
|
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt
|
|
|
|
--- /dev/null
|
|
+++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
|
|
@@ -0,0 +1,36 @@
|
|
+Ralink SoC GPIO controller bindings
|
|
+
|
|
+Required properties:
|
|
+- compatible:
|
|
+ - "ralink,rt2880-gpio" for Ralink controllers
|
|
+- #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 : Physical base address and length of the controller's registers
|
|
+- interrupt-parent: phandle to the INTC device node
|
|
+- interrupts : Specify the INTC interrupt number
|
|
+- ngpios : Specify the number of GPIOs
|
|
+- ralink,register-map : The register layout depends on the GPIO bank and actual
|
|
+ SoC type. Register offsets need to be in this order.
|
|
+ [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
|
|
+
|
|
+Example:
|
|
+
|
|
+ gpio0: gpio@600 {
|
|
+ compatible = "ralink,rt2880-gpio";
|
|
+
|
|
+ #gpio-cells = <2>;
|
|
+ gpio-controller;
|
|
+
|
|
+ reg = <0x600 0x34>;
|
|
+
|
|
+ interrupt-parent = <&intc>;
|
|
+ interrupts = <6>;
|
|
+
|
|
+ ngpios = <24>;
|
|
+ ralink,register-map = [ 00 04 08 0c
|
|
+ 20 24 28 2c
|
|
+ 30 34 ];
|
|
+
|
|
+ };
|