linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Icenowy Zheng <icenowy@aosc.io>,
	Paul Kocialkowski <contact@paulk.fr>
Subject: [PATCH v3 2/5] ARM: dts: sun8i-v3s: Add the V3s NMI IRQ controller
Date: Sun,  6 Dec 2020 17:51:28 +0100	[thread overview]
Message-ID: <20201206165131.1041983-3-contact@paulk.fr> (raw)
In-Reply-To: <20201206165131.1041983-1-contact@paulk.fr>

The V3s/V3 has a NMI interrupt controller, mainly used for the AXP209.
Its address follows the system controller block, which was previously
incorrectly described as spanning over 0x1000 address bytes.
Even though this is what the Allwinner documentation indicates,
precedence from other SoCs such as the R40 suggests that this is not
actually the case.

This reduces the system controller address span up to the NMI
controller and adds a node for the controller, with its dedicated
compatible.

While the interrupt number was found in Allwinner's documentation,
the address for the controller is specified in any Allwinner SDK
supporting sun8iw8 (V3/V3s) at:
drivers/power/axp_power/axp20/axp20-board.c

It was tested to work on a V3 board with an AXP209 connected to the
NMI interrupt line.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index f8f19d8fa795..b7b0e685e26b 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -157,12 +157,21 @@ mixer0_out_tcon0: endpoint {
 		syscon: system-control@1c00000 {
 			compatible = "allwinner,sun8i-v3s-system-control",
 				     "allwinner,sun8i-h3-system-control";
-			reg = <0x01c00000 0x1000>;
+			reg = <0x01c00000 0xd0>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
 		};
 
+		nmi_intc: interrupt-controller@1c000d0 {
+			compatible = "allwinner,sun8i-v3s-nmi",
+				     "allwinner,sun9i-a80-nmi";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			reg = <0x01c000d0 0x0c>;
+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		tcon0: lcd-controller@1c0c000 {
 			compatible = "allwinner,sun8i-v3s-tcon";
 			reg = <0x01c0c000 0x1000>;
-- 
2.29.2


  parent reply	other threads:[~2020-12-06 16:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 16:51 [PATCH v3 0/5] Allwinner V3 SL631 Action Camera Support and Related Fixes Paul Kocialkowski
2020-12-06 16:51 ` [PATCH v3 1/5] dt-bindings: irq: sun7i-nmi: Add binding documentation for the V3s NMI Paul Kocialkowski
2020-12-07 18:23   ` Rob Herring
2020-12-09 14:10     ` Paul Kocialkowski
2020-12-10 22:28       ` Rob Herring
2020-12-06 16:51 ` Paul Kocialkowski [this message]
2020-12-06 16:51 ` [PATCH v3 3/5] ARM: dts: sun8i: Cleanup the Pinecube AXP209 node Paul Kocialkowski
2020-12-06 16:51 ` [PATCH v3 4/5] dt-bindings: arm: sunxi: Add SL631 with IMX179 bindings Paul Kocialkowski
2020-12-06 16:51 ` [PATCH v3 5/5] ARM: dts: sun8i-v3: Add support for the SL631 Action Camera with IMX179 Paul Kocialkowski
2020-12-08 10:07 ` [PATCH v3 0/5] Allwinner V3 SL631 Action Camera Support and Related Fixes Maxime Ripard

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=20201206165131.1041983-3-contact@paulk.fr \
    --to=contact@paulk.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.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).