xref: /linux/Documentation/devicetree/bindings/gpio/cdns,gpio.txt (revision 597473720f4dc69749542bfcfed4a927a43d935e)
1*e4b194aaSJan KotasCadence GPIO controller bindings
2*e4b194aaSJan Kotas
3*e4b194aaSJan KotasRequired properties:
4*e4b194aaSJan Kotas- compatible: should be "cdns,gpio-r1p02".
5*e4b194aaSJan Kotas- reg: the register base address and size.
6*e4b194aaSJan Kotas- #gpio-cells: should be 2.
7*e4b194aaSJan Kotas	* first cell is the GPIO number.
8*e4b194aaSJan Kotas	* second cell specifies the GPIO flags, as defined in
9*e4b194aaSJan Kotas		<dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH
10*e4b194aaSJan Kotas		and GPIO_ACTIVE_LOW flags are supported.
11*e4b194aaSJan Kotas- gpio-controller: marks the device as a GPIO controller.
12*e4b194aaSJan Kotas- clocks: should contain one entry referencing the peripheral clock driving
13*e4b194aaSJan Kotas	the GPIO controller.
14*e4b194aaSJan Kotas
15*e4b194aaSJan KotasOptional properties:
16*e4b194aaSJan Kotas- ngpios: integer number of gpio lines supported by this controller, up to 32.
17*e4b194aaSJan Kotas- interrupts: interrupt specifier for the controllers interrupt.
18*e4b194aaSJan Kotas- interrupt-controller: marks the device as an interrupt controller. When
19*e4b194aaSJan Kotas	defined, interrupts, interrupt-parent and #interrupt-cells
20*e4b194aaSJan Kotas	are required.
21*e4b194aaSJan Kotas- interrupt-cells: should be 2.
22*e4b194aaSJan Kotas	* first cell is the GPIO number you want to use as an IRQ source.
23*e4b194aaSJan Kotas	* second cell specifies the IRQ type, as defined in
24*e4b194aaSJan Kotas		<dt-bindings/interrupt-controller/irq.h>.
25*e4b194aaSJan Kotas		Currently only level sensitive IRQs are supported.
26*e4b194aaSJan Kotas
27*e4b194aaSJan Kotas
28*e4b194aaSJan KotasExample:
29*e4b194aaSJan Kotas	gpio0: gpio-controller@fd060000 {
30*e4b194aaSJan Kotas		compatible = "cdns,gpio-r1p02";
31*e4b194aaSJan Kotas		reg =<0xfd060000 0x1000>;
32*e4b194aaSJan Kotas
33*e4b194aaSJan Kotas		clocks = <&gpio_clk>;
34*e4b194aaSJan Kotas
35*e4b194aaSJan Kotas		interrupt-parent = <&gic>;
36*e4b194aaSJan Kotas		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
37*e4b194aaSJan Kotas
38*e4b194aaSJan Kotas		gpio-controller;
39*e4b194aaSJan Kotas		#gpio-cells = <2>;
40*e4b194aaSJan Kotas
41*e4b194aaSJan Kotas		interrupt-controller;
42*e4b194aaSJan Kotas		#interrupt-cells = <2>;
43*e4b194aaSJan Kotas	};
44