devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] arm64: Realtek RTD1195/RTD1295 IRQ mux
@ 2017-10-17 12:47 Andreas Färber
  2017-10-17 12:47 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: Add Realtek RTD1295 Andreas Färber
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andreas Färber @ 2017-10-17 12:47 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Bizon, Roc He,
	蒋丽琴, Andreas Färber,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Andrew Lunn

Hello,

This series adds two IRQ muxes for the Realtek RTD1295 and RTD1195 SoCs.

The implementation is based on register offsets seen in the vendor DT,
split up into two separate nodes, as well as code from QNAP's rtk119x and
Synology's RTD1293/96 GPL code dumps.

v3 does various cleanups, renames variables, reworks unmask vs. enable/disable
and adds an isr/scpu_int_en map as well as full RTD1195 support.

More experimental patches at:
https://github.com/afaerber/linux/commits/rtd1295-next

Have a lot of fun!

Cheers,
Andreas

v2 -> v3:
* Rebased, adding nodes to rtd129x.dtsi instead of rtd1295.dtsi
* Adopted {readl,writel}_relaxed() (Marc)
* Adopted spin_lock_irqsave() (Marc)
* Implemented RTD1195
* Implemented mapping for non-linear bits such as i2c3

v1 -> v2:
* Rebased, avoiding dependency on reset series for DT nodes
* Don't forward set_affinity to GIC (Marc)
* Added more spinlocks (Marc)
* Code cleanups
* Investigated quirk
* Fixed spinlock initialization (Andrew)

Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
Cc: Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>
Cc: Roc He <hepeng-qoVzM6YEWSw@public.gmane.org>
Cc: 蒋丽琴 <jiang.liqin-31gW8twSeR21Z/+hSey0Gg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>

Andreas Färber (5):
  dt-bindings: interrupt-controller: Add Realtek RTD1295
  irqchip: Add Realtek RTD1295 mux driver
  arm64: dts: realtek: Add irq mux to RTD129x
  dt-bindings: interrupt-controller: Document RTD1195
  irqchip: rtd119x: Add RTD1195 definitions

 .../interrupt-controller/realtek,rtd119x-mux.txt   |  25 ++
 arch/arm64/boot/dts/realtek/rtd129x.dtsi           |  22 ++
 drivers/irqchip/Makefile                           |   1 +
 drivers/irqchip/irq-rtd119x-mux.c                  | 388 +++++++++++++++++++++
 4 files changed, 436 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
 create mode 100644 drivers/irqchip/irq-rtd119x-mux.c

-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/5] dt-bindings: interrupt-controller: Add Realtek RTD1295
  2017-10-17 12:47 [PATCH v3 0/5] arm64: Realtek RTD1195/RTD1295 IRQ mux Andreas Färber
@ 2017-10-17 12:47 ` Andreas Färber
       [not found] ` <20171017124708.6242-1-afaerber-l3A5Bk7waGM@public.gmane.org>
  2017-10-17 12:47 ` [PATCH v3 4/5] dt-bindings: interrupt-controller: Document RTD1195 Andreas Färber
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2017-10-17 12:47 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-arm-kernel
  Cc: linux-kernel, Bizon, Roc He, 蒋丽琴,
	Andreas Färber, Rob Herring, Mark Rutland, devicetree

Add binding for Realtek RTD1295 IRQ mux.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2 -> v3:
 * Renamed non-iso irq mux to "misc" for clarity

 v1 -> v2:
 * Dropped reference to common interrupt.txt bindings (Rob)
 
 .../interrupt-controller/realtek,rtd119x-mux.txt   | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt

diff --git a/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
new file mode 100644
index 000000000000..f39ce341adbd
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
@@ -0,0 +1,23 @@
+Realtek RTD119x/129x IRQ Mux Controller
+=======================================
+
+Required properties:
+
+- compatible           :  Should be one of the following:
+                          - "realtek,rtd1295-misc-irq-mux"
+                          - "realtek,rtd1295-iso-irq-mux"
+- reg                  :  Specifies base physical address and size of the registers.
+- interrupts           :  Specifies the interrupt line which is mux'ed.
+- interrupt-controller :  Presence indicates the node as interrupt controller.
+- #interrupt-cells     :  Shall be 1. See common bindings in interrupt.txt.
+
+
+Example:
+
+	interrupt-controller@98007000 {
+		compatible = "realtek,rtd1295-iso-irq-mux";
+		reg = <0x98007000 0x100>;
+		interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+	};
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/5] arm64: dts: realtek: Add irq mux to RTD129x
       [not found] ` <20171017124708.6242-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-10-17 12:47   ` Andreas Färber
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2017-10-17 12:47 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Bizon, Roc He,
	蒋丽琴, Andreas Färber, Rob Herring,
	Mark Rutland, Catalin Marinas, Will Deacon,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Update UART nodes with interrupts.

Signed-off-by: Andreas Färber <afaerber-l3A5Bk7waGM@public.gmane.org>
---
 v2 -> v3:
 * Added nodes to rtd129x.dtsi instead of rtd1295.dtsi
 * Adopted misc compatible string
 * Renamed node label from irq_mux to misc_irq_mux for clarity
 
 v1 -> v2:
 * Rebased
 
 arch/arm64/boot/dts/realtek/rtd129x.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
index b9cb92466fc7..bd07194154a4 100644
--- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi
+++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi
@@ -31,21 +31,41 @@
 		/* Exclude up to 2 GiB of RAM */
 		ranges = <0x80000000 0x80000000 0x80000000>;
 
+		iso_irq_mux: interrupt-controller@98007000 {
+			compatible = "realtek,rtd1295-iso-irq-mux";
+			reg = <0x98007000 0x100>;
+			interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+
 		uart0: serial@98007800 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x98007800 0x400>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clock-frequency = <27000000>;
+			interrupt-parent = <&iso_irq_mux>;
+			interrupts = <2>;
 			status = "disabled";
 		};
 
+		misc_irq_mux: interrupt-controller@9801b000 {
+			compatible = "realtek,rtd1295-misc-irq-mux";
+			reg = <0x9801b000 0x100>;
+			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+		};
+
 		uart1: serial@9801b200 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x9801b200 0x100>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clock-frequency = <432000000>;
+			interrupt-parent = <&misc_irq_mux>;
+			interrupts = <3>, <5>;
 			status = "disabled";
 		};
 
@@ -55,6 +75,8 @@
 			reg-shift = <2>;
 			reg-io-width = <4>;
 			clock-frequency = <432000000>;
+			interrupt-parent = <&misc_irq_mux>;
+			interrupts = <8>, <13>;
 			status = "disabled";
 		};
 
-- 
2.13.6

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 4/5] dt-bindings: interrupt-controller: Document RTD1195
  2017-10-17 12:47 [PATCH v3 0/5] arm64: Realtek RTD1195/RTD1295 IRQ mux Andreas Färber
  2017-10-17 12:47 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: Add Realtek RTD1295 Andreas Färber
       [not found] ` <20171017124708.6242-1-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-10-17 12:47 ` Andreas Färber
       [not found]   ` <20171017124708.6242-5-afaerber-l3A5Bk7waGM@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2017-10-17 12:47 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Roc He, 蒋丽琴, Bizon,
	linux-kernel, Rob Herring, Andreas Färber

Add compatible strings for Realtek RTD1195.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v3: New
 
 Could be squashed into 1/5 if acked.
 
 .../devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
index f39ce341adbd..67be0653528b 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt
@@ -4,6 +4,8 @@ Realtek RTD119x/129x IRQ Mux Controller
 Required properties:
 
 - compatible           :  Should be one of the following:
+                          - "realtek,rtd1195-misc-irq-mux"
+                          - "realtek,rtd1195-iso-irq-mux"
                           - "realtek,rtd1295-misc-irq-mux"
                           - "realtek,rtd1295-iso-irq-mux"
 - reg                  :  Specifies base physical address and size of the registers.
-- 
2.13.6


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 4/5] dt-bindings: interrupt-controller: Document RTD1195
       [not found]   ` <20171017124708.6242-5-afaerber-l3A5Bk7waGM@public.gmane.org>
@ 2017-10-24 16:37     ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2017-10-24 16:37 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Thomas Gleixner, Jason Cooper, Marc Zyngier,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Bizon, Roc He,
	蒋丽琴, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Oct 17, 2017 at 02:47:06PM +0200, Andreas Färber wrote:
> Add compatible strings for Realtek RTD1195.
> 
> Signed-off-by: Andreas Färber <afaerber-l3A5Bk7waGM@public.gmane.org>
> ---
>  v3: New
>  
>  Could be squashed into 1/5 if acked.

Yes.

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

>  
>  .../devicetree/bindings/interrupt-controller/realtek,rtd119x-mux.txt    | 2 ++
>  1 file changed, 2 insertions(+)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-24 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 12:47 [PATCH v3 0/5] arm64: Realtek RTD1195/RTD1295 IRQ mux Andreas Färber
2017-10-17 12:47 ` [PATCH v3 1/5] dt-bindings: interrupt-controller: Add Realtek RTD1295 Andreas Färber
     [not found] ` <20171017124708.6242-1-afaerber-l3A5Bk7waGM@public.gmane.org>
2017-10-17 12:47   ` [PATCH v3 3/5] arm64: dts: realtek: Add irq mux to RTD129x Andreas Färber
2017-10-17 12:47 ` [PATCH v3 4/5] dt-bindings: interrupt-controller: Document RTD1195 Andreas Färber
     [not found]   ` <20171017124708.6242-5-afaerber-l3A5Bk7waGM@public.gmane.org>
2017-10-24 16:37     ` Rob Herring

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).