linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [RFC 00/10] irqchip: meson: add support for the gpio interrupt controller
Date: Tue,  4 Oct 2016 17:08:18 +0200	[thread overview]
Message-ID: <1475593708-10526-1-git-send-email-jbrunet@baylibre.com> (raw)

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's an indepedent controller which can watch almost all pad of
the SoC and generate and interrupt from it. Some pins, which are not part
of the public datasheet, don't seem to have this capability though.

Hardware wise, the controller is a 256 to 8 multiplexer. It can take up
to 256 input pads and route them to any of 8 GIC's interrupts. There is also
a filter block in the middle to select the appropriate edge or level.

The number of interrupt declared by the irqchip is lowered from 256 to the
actual number of signal routed to the controller on each SoC family. As we
have access to only 8 GIC?s interrupts, these are allocated when an
interrupt is requested from the controller, on a first come, first served
basis.

This series has been tested on Amlogic S905-P200 board with the front
panel power button. Directly passing an IRQ or using gpio_to_irq both work
with this driver.

This work is derived from the previous work of Carlo Caione [1].

http://lkml.kernel.org/r/1448987062-31225-1-git-send-email-carlo at caione.org

Note:
As the comment will explain, patch 10 is not strictly required but would
be an appreciated bonus.

Jerome Brunet (10):
  irqchip: meson: add support for gpio interrupt controller
  dt-bindings: interrupt-controller: add DT binding for meson GPIO
    interrupt controller
  pinctrl: meson: update pinctrl data with gpio irq base number
  pinctrl: meson: allow gpio to request irq
  dt-bindings: pinctrl: meson: update gpio dt-bindings
  ARM64: meson: enable MESON_IRQ_GPIO in Kconfig
  ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8
  ARM64: dts: amlogic: enable gpio interrupt controller on gxbb
  ARM: dts: amlogic: enable gpio interrupt controller on meson8
  irqchip: meson: Add support for IRQ_TYPE_EDGE_BOTH

 .../amlogic,meson-gpio-intc.txt                    |  39 ++
 .../devicetree/bindings/pinctrl/meson,pinctrl.txt  |   4 +
 arch/arm/boot/dts/meson8.dtsi                      |  19 +
 arch/arm/boot/dts/meson8b.dtsi                     |  19 +
 arch/arm/mach-meson/Kconfig                        |   2 +
 arch/arm64/Kconfig.platforms                       |   1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi        |  17 +
 drivers/irqchip/Kconfig                            |   9 +
 drivers/irqchip/Makefile                           |   1 +
 drivers/irqchip/irq-meson-gpio.c                   | 437 +++++++++++++++++++++
 drivers/pinctrl/Kconfig                            |   2 +
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c         |  22 +-
 drivers/pinctrl/meson/pinctrl-meson.c              |  83 +++-
 drivers/pinctrl/meson/pinctrl-meson.h              |  16 +-
 drivers/pinctrl/meson/pinctrl-meson8.c             |  20 +-
 drivers/pinctrl/meson/pinctrl-meson8b.c            |  32 +-
 16 files changed, 686 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/amlogic,meson-gpio-intc.txt
 create mode 100644 drivers/irqchip/irq-meson-gpio.c

-- 
2.7.4

             reply	other threads:[~2016-10-04 15:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 15:08 Jerome Brunet [this message]
2016-10-04 15:08 ` [RFC 01/10] irqchip: meson: add support for gpio interrupt controller Jerome Brunet
2016-10-04 15:08 ` [RFC 02/10] dt-bindings: interrupt-controller: add DT binding for meson GPIO " Jerome Brunet
2016-10-09  1:29   ` Rob Herring
2016-10-10  8:11     ` Jerome Brunet
2016-10-04 15:08 ` [RFC 03/10] pinctrl: meson: update pinctrl data with gpio irq base number Jerome Brunet
2016-10-04 15:08 ` [RFC 04/10] pinctrl: meson: allow gpio to request irq Jerome Brunet
2016-10-04 15:08 ` [RFC 05/10] dt-bindings: pinctrl: meson: update gpio dt-bindings Jerome Brunet
2016-10-09  1:29   ` Rob Herring
2016-10-04 15:08 ` [RFC 06/10] ARM64: meson: enable MESON_IRQ_GPIO in Kconfig Jerome Brunet
2016-10-04 15:08 ` [RFC 07/10] ARM: meson: enable MESON_IRQ_GPIO in Kconfig for meson8 Jerome Brunet
2016-10-04 15:08 ` [RFC 08/10] ARM64: dts: amlogic: enable gpio interrupt controller on gxbb Jerome Brunet
2016-10-04 15:08 ` [RFC 09/10] ARM: dts: amlogic: enable gpio interrupt controller on meson8 Jerome Brunet
2016-10-04 15:08 ` [RFC 10/10] irqchip: meson: Add support for IRQ_TYPE_EDGE_BOTH Jerome Brunet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475593708-10526-1-git-send-email-jbrunet@baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=linus-amlogic@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).