#gpio-cells = <2>;
ngpios = <18>;
+
+ interrupt-parent = <&ext_intc>;
+ interrupts = <0 0>, <1 0>;
+ interrupt-names = "gpio1", "gpio2";
};
gpio0: gpio-controller@10000084 {
#gpio-cells = <2>;
ngpios = <20>;
+
+ interrupt-parent = <&periph_intc>;
+ interrupts = <0 0>, <1 0>, <2 0>, <3 0>;
+ interrupt-names = "gpio0", "gpio1", "gpio2", "gpio3";
};
gpio0: gpio-controller@100000c4 {
gpio-controller;
#gpio-cells = <2>;
+
+ interrupt-parent = <&ext_intc>;
+ interrupts = <3 0>, <2 0>, <0 0>, <1 0>;
+ interrupt-names = "gpio12", "gpio15",
+ "gpio23", "gpio24";
};
};
};
#gpio-cells = <2>;
ngpios = <5>;
+
+ interrupt-parent = <&ext_intc>;
+ interrupts = <0 0>, <1 0>, <2 0>, <3 0>;
+ interrupt-names = "gpio0", "gpio1", "gpio2", "gpio3";
};
gpio0: gpio-controller@fffe0404 {
#gpio-cells = <2>;
ngpios = <8>;
+
+ interrupts-extended = <&ext_intc1 0 0>,
+ <&ext_intc1 1 0>,
+ <&ext_intc0 0 0>,
+ <&ext_intc0 1 0>,
+ <&ext_intc0 2 0>,
+ <&ext_intc0 3 0>;
+ interrupt-names = "gpio0", "gpio1", "gpio2", "gpio3",
+ "gpio4", "gpio5";
};
gpio0: gpio-controller@fffe0084 {
gpio-controller;
#gpio-cells = <2>;
+
+ interrupt-parent = <&ext_intc>;
+ interrupts = <0 0>, <1 0>, <2 0>, <3 0>;
+ interrupt-names = "gpio24", "gpio25",
+ "gpio26", "gpio27";
};
};
};
#gpio-cells = <2>;
ngpios = <6>;
+
+ interrupts-extended = <&ext_intc1 0 0>,
+ <&ext_intc1 1 0>,
+ <&ext_intc0 0 0>,
+ <&ext_intc0 1 0>,
+ <&ext_intc0 2 0>,
+ <&ext_intc0 3 0>;
+ interrupt-names = "gpio0", "gpio1", "gpio2", "gpio3",
+ "gpio4", "gpio5";
};
gpio0: gpio-controller@10000084 {
obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o
--- /dev/null
+++ b/drivers/gpio/gpio-bcm63xx.c
-@@ -0,0 +1,122 @@
+@@ -0,0 +1,134 @@
+/*
+ * Driver for BCM63XX memory-mapped GPIO controllers, based on
+ * Generic driver for memory-mapped GPIO controllers.
+#include <linux/mod_devicetable.h>
+#include <linux/basic_mmio_gpio.h>
+#include <linux/of.h>
++#include <linux/of_irq.h>
+#include <linux/of_gpio.h>
+
++static int bcm63xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
++{
++ char irq_name[7]; /* "gpioXX" */
++
++ sprintf(irq_name, "gpio%d", gpio);
++ return of_irq_get_byname(chip->of_node, irq_name);
++}
++
+static int bcm63xx_gpio_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ if (!of_property_read_u32(dev->of_node, "ngpios", &ngpios))
+ bgc->gc.ngpio = ngpios;
+
++ if (of_get_property(dev->of_node, "interrupt-names", NULL))
++ bgc->gc.to_irq = bcm63xx_gpio_to_irq;
++
+ } else if (pdata) {
+ bgc->gc.base = pdata->base;
+ if (pdata->ngpio > 0)