mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
powerpc/8xx: Adding support of IRQ in MPC8xx GPIO
This patch allows the use of IRQ to notify the change of GPIO status
on MPC8xx CPM IO ports. This then allows to associate IRQs to GPIOs
in the Device Tree.
Ex:
CPM1_PIO_C: gpio-controller@960 {
#gpio-cells = <2>;
compatible = "fsl,cpm1-pario-bank-c";
reg = <0x960 0x10>;
fsl,cpm1-gpio-irq-mask = <0x0fff>;
interrupts = <1 2 6 9 10 11 14 15 23 24 26 31>;
interrupt-parent = <&CPM_PIC>;
gpio-controller;
};
The property 'fsl,cpm1-gpio-irq-mask' defines which of the 16 GPIOs
have the associated interrupts defined in the 'interrupts' property.
Signed-off-by: Christophe Leroy <[email protected]>
Signed-off-by: Scott Wood <[email protected]>
This commit is contained in:
parent
e21c7316d8
commit
726bd22310
3 changed files with 47 additions and 1 deletions
|
|
@ -13,8 +13,17 @@ Required properties:
|
|||
- #gpio-cells : Should be two. The first cell is the pin number and the
|
||||
second cell is used to specify optional parameters (currently unused).
|
||||
- gpio-controller : Marks the port as GPIO controller.
|
||||
Optional properties:
|
||||
- fsl,cpm1-gpio-irq-mask : For banks having interrupt capability (like port C
|
||||
on CPM1), this item tells which ports have an associated interrupt (ports are
|
||||
listed in the same order as in PCINT register)
|
||||
- interrupts : This property provides the list of interrupt for each GPIO having
|
||||
one as described by the fsl,cpm1-gpio-irq-mask property. There should be as
|
||||
many interrupts as number of ones in the mask property. The first interrupt in
|
||||
the list corresponds to the most significant bit of the mask.
|
||||
- interrupt-parent : Parent for the above interrupt property.
|
||||
|
||||
Example of three SOC GPIO banks defined as gpio-controller nodes:
|
||||
Example of four SOC GPIO banks defined as gpio-controller nodes:
|
||||
|
||||
CPM1_PIO_A: gpio-controller@950 {
|
||||
#gpio-cells = <2>;
|
||||
|
|
@ -30,6 +39,16 @@ Example of three SOC GPIO banks defined as gpio-controller nodes:
|
|||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_C: gpio-controller@960 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-c";
|
||||
reg = <0x960 0x10>;
|
||||
fsl,cpm1-gpio-irq-mask = <0x0fff>;
|
||||
interrupts = <1 2 6 9 10 11 14 15 23 24 26 31>;
|
||||
interrupt-parent = <&CPM_PIC>;
|
||||
gpio-controller;
|
||||
};
|
||||
|
||||
CPM1_PIO_E: gpio-controller@ac8 {
|
||||
#gpio-cells = <2>;
|
||||
compatible = "fsl,cpm1-pario-bank-e";
|
||||
|
|
|
|||
Loading…
Reference in a new issue