Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1734132 > unrolled thread
| Started by | Jerome Brunet <jbrunet@baylibre.com> |
|---|---|
| First post | 2017-09-18 15:50 +0200 |
| Last post | 2017-09-22 01:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v4 0/2] irqchip: meson: add support for the gpio interrupt controller Jerome Brunet <jbrunet@baylibre.com> - 2017-09-18 15:50 +0200
[PATCH v4 1/2] dt-bindings: interrupt-controller: add DT binding for meson GPIO interrupt controller Jerome Brunet <jbrunet@baylibre.com> - 2017-09-18 15:50 +0200
Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: add DT binding for meson GPIO interrupt controller Rob Herring <robh@kernel.org> - 2017-09-22 01:10 +0200
| From | Jerome Brunet <jbrunet@baylibre.com> |
|---|---|
| Date | 2017-09-18 15:50 +0200 |
| Subject | [PATCH v4 0/2] irqchip: meson: add support for the gpio interrupt controller |
| Message-ID | <ur4AV-6Xw-3@gated-at.bofh.it> |
This patch series adds support for the GPIO interrupt controller found on
Amlogic's meson SoC families.
Unlike what the name suggests, this controller is not part of the SoC
GPIO subsystem. It is a separate controller which can watch almost all
gpio pads of the SoC and generate and interrupt from it. "Almost" because
there are always exceptions and some specific gpios (TEST_N) lack this
capability.
Hardware wise, the controller is a 256 to 8 router with a filtering block
to select edge or level input and the polarity of the signal. We can't
setup the filtring to generate a signal on both the high and low polarity
so, ATM, IRQ_TYPE_EDGE_BOTH is not supported.
The number of interrupt line routed to the controller depends on the SoC,
and essentially the total number of GPIO available on the different gpio
controllers of the SoC.
This series has been tested on Amlogic S905-P200 board with the front
panel power button. Also tested on the Nanopi-k2 with the ethernet PHY
interrupt pin.
This work is derived from the previous work of Carlo Caione [1].
Changes since RFC : [2]
* Remove interrupt property in device tree: the controller cannot
generate interrupts on its own and is merely routing the interrupt to
the GIC, therefore it should not use the interrupt property. This data
is now stored directly in the driver, same as the pinctrl data.
* Improve compatibility checking of meson pinctrl on its interrupt
parent to activate gpio_to_irq callback
* Drop IRQ_BOTH hack. Need more work to have an acceptable solution for
this
Changes since v1 : [3]
* Correct mistake in patch 4 when no compatible
controller is found. Sorry for the inconvenience.
Changes since v2: [4]
* Address Marc's comment on the irqchip driver from v2
* Drop all gpio subsystem related patches. This will be dealt with
separately.
Changes since v3: [5]
* Replace "upstream" irq with "channel" irq
* Improve documentation a bit.
* Drop DT patches: these will be sent later on to the DT maintainer
if/when the driver is accepted.
[1] : https://lkml.kernel.org/r/1448987062-31225-1-git-send-email-carlo@caione.org
[2] : https://lkml.kernel.org/r/1475593708-10526-1-git-send-email-jbrunet@baylibre.com
[3] : https://lkml.kernel.org/r/1476871709-8359-1-git-send-email-jbrunet@baylibre.com
[4] : https://lkml.kernel.org/r/1476890480-8884-1-git-send-email-jbrunet@baylibre.com
[5] : https://lkml.kernel.org/r/20170615161804.32658-1-jbrunet@baylibre.com
Jerome Brunet (2):
dt-bindings: interrupt-controller: add DT binding for meson GPIO
interrupt controller
irqchip: meson: add support for gpio interrupt controller
.../amlogic,meson-gpio-intc.txt | 35 ++
drivers/irqchip/Kconfig | 8 +
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-meson-gpio.c | 414 +++++++++++++++++++++
4 files changed, 458 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt
create mode 100644 drivers/irqchip/irq-meson-gpio.c
--
2.13.5
[toc] | [next] | [standalone]
| From | Jerome Brunet <jbrunet@baylibre.com> |
|---|---|
| Date | 2017-09-18 15:50 +0200 |
| Subject | [PATCH v4 1/2] dt-bindings: interrupt-controller: add DT binding for meson GPIO interrupt controller |
| Message-ID | <ur4AX-6Xw-35@gated-at.bofh.it> |
| In reply to | #1734132 |
This commit adds the device tree bindings description for Amlogic's GPIO
interrupt controller available on the meson8b, gxbb and gxl SoC families
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
.../amlogic,meson-gpio-intc.txt | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt
diff --git a/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt
new file mode 100644
index 000000000000..633e21ce4b17
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt
@@ -0,0 +1,35 @@
+Amlogic meson GPIO interrupt controller
+
+Meson SoCs contains an interrupt controller which is able to watch the SoC
+pads and generate an interrupt on edge or level. The controller is essentially
+a 256 pads to 8 GIC interrupt multiplexer, with a filter block to select edge
+or level and polarity. It does not expose all 256 mux inputs because the
+documentation shows that the upper part is not mapped to any pad. The actual
+number of interrupt exposed depends on the SoC.
+
+Required properties:
+
+- compatible : must have "amlogic,meson8-gpio-intc” and either
+ “amlogic,meson8b-gpio-intc” for meson8b SoCs (S805) or
+ “amlogic,meson-gxbb-gpio-intc” for GXBB SoCs (S905) or
+ “amlogic,meson-gxl-gpio-intc” for GXL SoCs (S905X, S912)
+- interrupt-parent : a phandle to the GIC the interrupts are routed to.
+ Usually this is provided at the root level of the device tree as it is
+ common to most of the SoC.
+- reg : Specifies base physical address and size of the registers.
+- interrupt-controller : Identifies the node as an interrupt controller.
+- #interrupt-cells : Specifies the number of cells needed to encode an
+ interrupt source. The value must be 2.
+- meson,channel-interrupts: Array with the 8 upstream hwirq numbers. These
+ are the hwirqs used on the parent interrupt controller.
+
+Example:
+
+gpio_interrupt: interrupt-controller@9880 {
+ compatible = "amlogic,meson-gxbb-gpio-intc",
+ "amlogic,meson-gpio-intc";
+ reg = <0x0 0x9880 0x0 0x10>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ meson,channel-interrupts = <64 65 66 67 68 69 70 71>;
+};
--
2.13.5
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2017-09-22 01:10 +0200 |
| Subject | Re: [PATCH v4 1/2] dt-bindings: interrupt-controller: add DT binding for meson GPIO interrupt controller |
| Message-ID | <usiLv-77w-5@gated-at.bofh.it> |
| In reply to | #1734137 |
On Mon, Sep 18, 2017 at 03:46:09PM +0200, Jerome Brunet wrote: > This commit adds the device tree bindings description for Amlogic's GPIO > interrupt controller available on the meson8b, gxbb and gxl SoC families > > Cc: Heiner Kallweit <hkallweit1@gmail.com> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > --- > .../amlogic,meson-gpio-intc.txt | 35 ++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt Acked-by: Rob Herring <robh@kernel.org>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web