Skip to content

Commit

Permalink
ARM: at91/pio: add new PIO3 features
Browse files Browse the repository at this point in the history
This patch adds the support for new PIO controller found on some
at91sam SOCs.
- more peripheral multiplexing
- more features to configure on a PIO (pull-down, Schmitt trigger, debouncer)
- support for several IRQ triggering features (type and polarity)

Support for those new features are retrieved from the device tree
compatibility string.

Debugfs at91_gpio file is updated to monitor configuration.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
  • Loading branch information
Nicolas Ferre committed Mar 1, 2012
1 parent 9a9fe01 commit 582d5fb
Show file tree
Hide file tree
Showing 6 changed files with 282 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/gpio/gpio_atmel.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* Atmel GPIO controller (PIO)

Required properties:
- compatible: "atmel,at91rm9200-gpio"
- compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5.
- reg: Should contain GPIO controller registers location and length
- interrupts: Should be the port interrupt shared by all the pins.
- #gpio-cells: Should be two. The first cell is the pin number and
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/boot/dts/at91sam9x5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
};

pioA: gpio@fffff400 {
compatible = "atmel,at91rm9200-gpio";
compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
reg = <0xfffff400 0x100>;
interrupts = <2 4>;
#gpio-cells = <2>;
Expand All @@ -98,7 +98,7 @@
};

pioB: gpio@fffff600 {
compatible = "atmel,at91rm9200-gpio";
compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
reg = <0xfffff600 0x100>;
interrupts = <2 4>;
#gpio-cells = <2>;
Expand All @@ -107,7 +107,7 @@
};

pioC: gpio@fffff800 {
compatible = "atmel,at91rm9200-gpio";
compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
reg = <0xfffff800 0x100>;
interrupts = <3 4>;
#gpio-cells = <2>;
Expand All @@ -116,7 +116,7 @@
};

pioD: gpio@fffffa00 {
compatible = "atmel,at91rm9200-gpio";
compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
reg = <0xfffffa00 0x100>;
interrupts = <3 4>;
#gpio-cells = <2>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-at91/board-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static const struct of_device_id irq_of_match[] __initconst = {

{ .compatible = "atmel,at91rm9200-aic", .data = at91_aic_of_init },
{ .compatible = "atmel,at91rm9200-gpio", .data = at91_gpio_of_irq_setup },
{ .compatible = "atmel,at91sam9x5-gpio", .data = at91_gpio_of_irq_setup },
{ /*sentinel*/ }
};

Expand Down
Loading

0 comments on commit 582d5fb

Please sign in to comment.