2023-05-26 16:50:15 +00:00
|
|
|
From: John Crispin <blogic@openwrt.org>
|
|
|
|
Date: Sun, 28 Jul 2013 19:45:30 +0200
|
2024-10-23 13:56:23 +00:00
|
|
|
Subject: [PATCH 1/2] DT: Add documentation for gpio-ralink
|
2023-05-26 16:50:15 +00:00
|
|
|
|
|
|
|
Describe gpio-ralink binding.
|
|
|
|
|
|
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
---
|
2024-10-23 13:56:23 +00:00
|
|
|
.../devicetree/bindings/gpio/gpio-ralink.txt | 42 +++++++++++++++++++
|
|
|
|
1 file changed, 42 insertions(+)
|
2023-05-26 16:50:15 +00:00
|
|
|
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ralink.txt
|
|
|
|
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/Documentation/devicetree/bindings/gpio/gpio-ralink.txt
|
2024-10-23 13:56:23 +00:00
|
|
|
@@ -0,0 +1,42 @@
|
2023-05-26 16:50:15 +00:00
|
|
|
+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 ]
|
2024-10-23 13:56:23 +00:00
|
|
|
+- interrupt-controller : marks this as an interrupt controller
|
|
|
|
+- #interrupt-cells : a standard two-cell interrupt flag, see
|
|
|
|
+ interrupt-controller/interrupts.txt
|
2023-05-26 16:50:15 +00:00
|
|
|
+
|
|
|
|
+Example:
|
|
|
|
+
|
|
|
|
+ gpio0: gpio@600 {
|
2024-06-28 07:50:57 +00:00
|
|
|
+ compatible = "ralink,rt2880-gpio";
|
2023-05-26 16:50:15 +00:00
|
|
|
+
|
|
|
|
+ #gpio-cells = <2>;
|
|
|
|
+ gpio-controller;
|
|
|
|
+
|
|
|
|
+ reg = <0x600 0x34>;
|
|
|
|
+
|
2024-10-23 13:56:23 +00:00
|
|
|
+ interrupt-controller;
|
|
|
|
+ #interrupt-cells = <2>;
|
|
|
|
+
|
2023-05-26 16:50:15 +00:00
|
|
|
+ interrupt-parent = <&intc>;
|
|
|
|
+ interrupts = <6>;
|
|
|
|
+
|
|
|
|
+ ngpios = <24>;
|
|
|
|
+ ralink,register-map = [ 00 04 08 0c
|
|
|
|
+ 20 24 28 2c
|
|
|
|
+ 30 34 ];
|
|
|
|
+
|
|
|
|
+ };
|