-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It adds device tree probe for gpio-mxs driver. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
- Loading branch information
Shawn Guo
committed
May 12, 2012
1 parent
164387d
commit 4052d45
Showing
2 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
* Freescale MXS GPIO controller | ||
|
||
The Freescale MXS GPIO controller is part of MXS PIN controller. The | ||
GPIOs are organized in port/bank. Each port consists of 32 GPIOs. | ||
|
||
As the GPIO controller is embedded in the PIN controller and all the | ||
GPIO ports share the same IO space with PIN controller, the GPIO node | ||
will be represented as sub-nodes of MXS pinctrl node. | ||
|
||
Required properties for GPIO node: | ||
- compatible : Should be "fsl,<soc>-gpio". The supported SoCs include | ||
imx23 and imx28. | ||
- interrupts : Should be the port interrupt shared by all 32 pins. | ||
- gpio-controller : Marks the device node as a gpio controller. | ||
- #gpio-cells : Should be two. The first cell is the pin number and | ||
the second cell is used to specify optional parameters (currently | ||
unused). | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells : Should be 2. The first cell is the GPIO number. | ||
The second cell bits[3:0] is used to specify trigger type and level flags: | ||
1 = low-to-high edge triggered. | ||
2 = high-to-low edge triggered. | ||
4 = active high level-sensitive. | ||
8 = active low level-sensitive. | ||
|
||
Note: Each GPIO port should have an alias correctly numbered in "aliases" | ||
node. | ||
|
||
Examples: | ||
|
||
aliases { | ||
gpio0 = &gpio0; | ||
gpio1 = &gpio1; | ||
gpio2 = &gpio2; | ||
gpio3 = &gpio3; | ||
gpio4 = &gpio4; | ||
}; | ||
|
||
pinctrl@80018000 { | ||
compatible = "fsl,imx28-pinctrl", "simple-bus"; | ||
reg = <0x80018000 2000>; | ||
|
||
gpio0: gpio@0 { | ||
compatible = "fsl,imx28-gpio"; | ||
interrupts = <127>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; | ||
|
||
gpio1: gpio@1 { | ||
compatible = "fsl,imx28-gpio"; | ||
interrupts = <126>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; | ||
|
||
gpio2: gpio@2 { | ||
compatible = "fsl,imx28-gpio"; | ||
interrupts = <125>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; | ||
|
||
gpio3: gpio@3 { | ||
compatible = "fsl,imx28-gpio"; | ||
interrupts = <124>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; | ||
|
||
gpio4: gpio@4 { | ||
compatible = "fsl,imx28-gpio"; | ||
interrupts = <123>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters