Skip to contentSkip to conversation

irqchip: Broadcom STB interrupt controller updates

PATCH Applied Florian Fainelli 2 participants 8 messages Jul 9, 2020 – Jul 17, 2020

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover irqchip: Broadcom STB interrupt controller updates

Hi Marc,

This patch series contains a number of updates for Broadcom STB L2 interrupt controllers to enable them as wake-up interrupt controllers, and add missing compatible strings that should be matched.

Thanks!

Florian Fainelli (3):
dt-bindings: interrupt-controller: Document Broadcom STB HIF L2
dt-bindings: interrupt-controller: Document UPG auxiliary L2 irqchip/brcmstb-l2: Match UPG_AUX_AON_INTR2 compatible

Justin Chen (2):
irqchip/bcm7120-l2: Set controller as wake-up source irqchip/brcmstb-l2: Set controller as wake-up source

Kamal Dasu (1):
irqchip/brcmstb-l2: Match HIF_SPI_INTR2 compatible

 .../bindings/interrupt-controller/brcm,l2-intc.txt        | 5 ++++-
 drivers/irqchip/irq-bcm7120-l2.c                          | 8 +++++---
 drivers/irqchip/irq-brcmstb-l2.c                          | 5 +++++
 3 files changed, 14 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/6 irqchip/bcm7120-l2: Set controller as wake-up source

From: Justin Chen <[email protected]>

Utilize the Broadcom interrupt controller standard property "brcm,irq-can-wake" to flag whether this particular interrupt controller instance is wake-up capable.

Since we do not know what type of parent interrupt controller we are interfaced with, ensure that enable_irq_wake() is called early on.

---
 drivers/irqchip/irq-bcm7120-l2.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/irqchip/irq-bcm7120-l2.c +5 -3
index 586df3587be0..c7c9e976acbb 100644
@@ -143,6 +143,9 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn,
 
 	irq_set_chained_handler_and_data(parent_irq,
 					 bcm7120_l2_intc_irq_handle, l1_data);
+	if (data->can_wake)
+		enable_irq_wake(parent_irq);
+
 	return 0;
 }
 
@@ -247,6 +250,8 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
 	if (ret < 0)
 		goto out_free_l1_data;
 
+	data->can_wake = of_property_read_bool(dn, "brcm,irq-can-wake");
+
 	for (irq = 0; irq < data->num_parent_irqs; irq++) {
 		ret = bcm7120_l2_intc_init_one(dn, data, irq, valid_mask);
 		if (ret)
@@ -274,9 +279,6 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,
 		goto out_free_domain;
 	}
 
-	if (of_property_read_bool(dn, "brcm,irq-can-wake"))
-		data->can_wake = true;
-
 	for (idx = 0; idx < data->n_words; idx++) {
 		irq = idx * IRQS_PER_WORD;
 		gc = irq_get_domain_generic_chip(data->domain, irq);
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/6 irqchip/brcmstb-l2: Set controller as wake-up source

In reply to Florian Fainelli

From: Justin Chen <[email protected]>

Utilize the Broadcom interrupt controller standard property "brcm,irq-can-wake" to flag whether this particular interrupt controller instance is wake-up capable.

Since we do not know what type of parent interrupt controller we are interfaced with, ensure that enable_irq_wake() is called early on.

---
 drivers/irqchip/irq-brcmstb-l2.c | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/irq-brcmstb-l2.c +1 -0
index 0298ede67e51..157fad184bdc 100644
@@ -254,6 +254,7 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
 		 */
 		data->gc->wake_enabled = 0xffffffff;
 		ct->chip.irq_set_wake = irq_gc_set_wake;
+		enable_irq_wake(parent_irq);
 	}
 
 	pr_info("registered L2 intc (%pOF, parent irq: %d)\n", np, parent_irq);
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/6 dt-bindings: interrupt-controller: Document Broadcom STB HIF L2

In reply to Florian Fainelli

Add documentation for the brcm,hif-spi-l2-intc compatible string to the brcm,l2-intc.txt binding document.

---
 .../devicetree/bindings/interrupt-controller/brcm,l2-intc.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt +3 -1
index d514ec060a4a..98602f1d1e91 100644
@@ -2,7 +2,9 @@ Broadcom Generic Level 2 Interrupt Controller
 
 Required properties:
 
-- compatible: should be "brcm,l2-intc" for latched interrupt controllers
+- compatible: should be one of:
+	      "brcm,hif-spi-l2-intc" or
+	      "brcm,l2-intc" for latched interrupt controllers
               should be "brcm,bcm7271-l2-intc" for level interrupt controllers
 - reg: specifies the base physical address and size of the registers
 - interrupt-controller: identifies the node as an interrupt controller
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/6 irqchip/brcmstb-l2: Match HIF_SPI_INTR2 compatible

In reply to Florian Fainelli

From: Kamal Dasu <[email protected]>

The HIF_SPI_INTR2 Level 2 interrupt controller node is defined with the "brcm,hif-spi-l2-intc" compatible string in Device Tree and behaves as an edge triggered standard Broadcom STB L2 interrupt controller.

---
 drivers/irqchip/irq-brcmstb-l2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/irqchip/irq-brcmstb-l2.c +2 -0
index 157fad184bdc..b10fe5042a2f 100644
@@ -276,6 +276,8 @@ static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np,
 	return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init);
 }
 IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init);
+IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc",
+		brcmstb_l2_edge_intc_of_init);
 
 static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np,
 	struct device_node *parent)
Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/6 dt-bindings: interrupt-controller: Document UPG auxiliary L2

In reply to Florian Fainelli

Define the compatible string brcm,upg-aux-aon-l2-intc which is used by the Broadcom STB UPG auxiliary always-on interrupt controller.

---
 .../devicetree/bindings/interrupt-controller/brcm,l2-intc.txt    | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt +1 -0
index 98602f1d1e91..021cf822395c 100644
@@ -4,6 +4,7 @@ Required properties:
 
 - compatible: should be one of:
 	      "brcm,hif-spi-l2-intc" or
+	      "brcm,upg-aux-aon-l2-intc" or
 	      "brcm,l2-intc" for latched interrupt controllers
               should be "brcm,bcm7271-l2-intc" for level interrupt controllers
 - reg: specifies the base physical address and size of the registers
Signature · 1 line
2.17.1
#6 lore raw

PATCH 6/6 irqchip/brcmstb-l2: Match UPG_AUX_AON_INTR2 compatible

In reply to Florian Fainelli

The UPG_AUX_AON_INTR2 Level 2 interrupt controller node is defined with the "brcm,upg-aux-aon-l2-intc" compatible string in Device Tree and behaves as an edge triggered standard Broadcom STB L2 interrupt controller.

---
 drivers/irqchip/irq-brcmstb-l2.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/irqchip/irq-brcmstb-l2.c +2 -0
index b10fe5042a2f..cdd6a42d4efa 100644
@@ -278,6 +278,8 @@ static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np,
 IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init);
 IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc",
 		brcmstb_l2_edge_intc_of_init);
+IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc",
+		brcmstb_l2_edge_intc_of_init);
 
 static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np,
 	struct device_node *parent)
Signature · 1 line
2.17.1
Applied
#7 lore raw
In reply to Florian Fainelli
Quoted 4 lines · Florian Fainelli

This patch series contains a number of updates for Broadcom STB L2 interrupt controllers to enable them as wake-up interrupt controllers, and add missing compatible strings that should be matched.

Quoted 8 lines

Thanks!

Florian Fainelli (3):
dt-bindings: interrupt-controller: Document Broadcom STB HIF L2
dt-bindings: interrupt-controller: Document UPG auxiliary L2 irqchip/brcmstb-l2: Match UPG_AUX_AON_INTR2 compatible

[...]

Applied to irq/irqchip-5.9, thanks!

[1/6] irqchip/bcm7120-l2: Set controller as wake-up source

      commit: f4ccb74569aaf839c2830382e902dd50d564df55
[2/6] irqchip/brcmstb-l2: Set controller as wake-up source
      commit: c8d8d6fc478a30f3e8ea5372664dd2a808c4311e
[3/6] dt-bindings: interrupt-controller: Document Broadcom STB HIF L2
      commit: 90b06e2dc4d1e8e9311a5275d53f61d90b61efdc
[4/6] irqchip/brcmstb-l2: Match HIF_SPI_INTR2 compatible
      commit: 9ac793dc5c97691152818305974299604c67e110
[5/6] dt-bindings: interrupt-controller: Document UPG auxiliary L2
      commit: 03a7ac47c14c7ef50742a34b3cfba1a47a578a03
[6/6] irqchip/brcmstb-l2: Match UPG_AUX_AON_INTR2 compatible
      commit: 240e176a96187ee84e63626ca0d1aac92da503aa

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.