Shawn Guo | 8937cb6 | 2011-07-07 00:37:43 +0800 | [diff] [blame] | 1 | * Freescale i.MX/MXC GPIO controller |
| 2 | |
| 3 | Required properties: |
| 4 | - compatible : Should be "fsl,<soc>-gpio" |
| 5 | - reg : Address and length of the register set for the device |
| 6 | - interrupts : Should be the port interrupt shared by all 32 pins, if |
| 7 | one number. If two numbers, the first one is the interrupt shared |
| 8 | by low 16 pins and the second one is for high 16 pins. |
| 9 | - gpio-controller : Marks the device node as a gpio controller. |
| 10 | - #gpio-cells : Should be two. The first cell is the pin number and |
Shawn Guo | c1cb438 | 2012-06-28 11:15:37 +0800 | [diff] [blame] | 11 | the second cell is used to specify the gpio polarity: |
| 12 | 0 = active high |
| 13 | 1 = active low |
Shawn Guo | 88cde8b | 2012-07-06 20:03:37 +0800 | [diff] [blame] | 14 | - interrupt-controller: Marks the device node as an interrupt controller. |
| 15 | - #interrupt-cells : Should be 2. The first cell is the GPIO number. |
| 16 | The second cell bits[3:0] is used to specify trigger type and level flags: |
| 17 | 1 = low-to-high edge triggered. |
| 18 | 2 = high-to-low edge triggered. |
| 19 | 4 = active high level-sensitive. |
| 20 | 8 = active low level-sensitive. |
Shawn Guo | 8937cb6 | 2011-07-07 00:37:43 +0800 | [diff] [blame] | 21 | |
| 22 | Example: |
| 23 | |
| 24 | gpio0: gpio@73f84000 { |
Benoît Thébaudeau | aeb2774 | 2012-06-22 21:04:06 +0200 | [diff] [blame] | 25 | compatible = "fsl,imx51-gpio", "fsl,imx35-gpio"; |
Shawn Guo | 8937cb6 | 2011-07-07 00:37:43 +0800 | [diff] [blame] | 26 | reg = <0x73f84000 0x4000>; |
| 27 | interrupts = <50 51>; |
| 28 | gpio-controller; |
| 29 | #gpio-cells = <2>; |
Shawn Guo | 88cde8b | 2012-07-06 20:03:37 +0800 | [diff] [blame] | 30 | interrupt-controller; |
| 31 | #interrupt-cells = <2>; |
Shawn Guo | 8937cb6 | 2011-07-07 00:37:43 +0800 | [diff] [blame] | 32 | }; |