Skip to contentSkip to conversation

Add Northstar Plus support to PDC mailbox driver

PATCH In review Steve Lin 4 participants 7 messages Feb 23, 2017 – Mar 17, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Steve Lin

author
#0 lore raw

v2 cover Add Northstar Plus support to PDC mailbox driver

Adds support for Broadcom Northstar+ to mailbox (PDC) driver.

Patch 1/3: Driver code and Kconfig changes
Patch 2/3: Device tree changes
Patch 3/3: DT bindings documentation changes

v2 addresses Jon Mason's suggestion about making the bindings doc change a separate patch.

Steve Lin (3):
mailbox: bcm-pdc: Add Northstar Plus support to PDC driver
ARM: dts: NSP: Add mailbox (PDC) to NSP
dt-bindings: mailbox: Update doc with NSP PDC/mailbox support

 .../bindings/mailbox/brcm,iproc-pdc-mbox.txt       |  6 ++-
 arch/arm/boot/dts/bcm-nsp.dtsi                     |  9 ++++
 drivers/mailbox/Kconfig                            |  9 ++--
 drivers/mailbox/bcm-pdc-mailbox.c                  | 61 ++++++++++++++++------
 4 files changed, 63 insertions(+), 22 deletions(-)
Signature · 1 line
2.1.0
author
#1 lore raw

PATCH v2 1/3 mailbox: bcm-pdc: Add Northstar Plus support to PDC driver

Adds support for Northstar Plus (NS+) products to the PDC mailbox driver. The PDC driver was originally written to support the PDC ring manager in the Northstar2 (64-bit) device. The NS+ (32 bit device) uses an almost identical ring manager, though with a different name. We just need to check for the type of hardware in use, in order to write the appropriate interrupt configuration register. Also updated DMA width to be correct for both NS+ and NS2.

Tested on NS+ and NS2.

---
 drivers/mailbox/Kconfig           |  9 +++---
 drivers/mailbox/bcm-pdc-mailbox.c | 61 +++++++++++++++++++++++++++++----------
 2 files changed, 50 insertions(+), 20 deletions(-)
drivers/mailbox/Kconfig +4 -5
index ceff415..91eafb5 100644
@@ -144,12 +144,11 @@ config XGENE_SLIMPRO_MBOX
 	  want to use the APM X-Gene SLIMpro IPCM support.
 
 config BCM_PDC_MBOX
-	tristate "Broadcom PDC Mailbox"
-	depends on ARM64 || COMPILE_TEST
+	tristate "Broadcom FlexSparx DMA Mailbox"
+	depends on ARCH_BCM_IPROC || COMPILE_TEST
 	depends on HAS_DMA
-	default ARCH_BCM_IPROC
 	help
-	  Mailbox implementation for the Broadcom PDC ring manager,
+	  Mailbox implementation for the Broadcom FlexSparx DMA ring manager,
 	  which provides access to various offload engines on Broadcom
-	  SoCs. Say Y here if you want to use the Broadcom PDC.
+	  SoCs, including FA2/FA+ on Northstar Plus and PDC on Northstar 2.
 endif
drivers/mailbox/bcm-pdc-mailbox.c +46 -15

135 lines not on this page · raw message

Signature · 1 line
2.1.0
author
#2 lore raw

PATCH v2 2/3 ARM: dts: NSP: Add mailbox (PDC) to NSP

In reply to Steve Lin

Adds mailbox / PDC to NSP device tree. Needs new compatibility string to differentiate from NS2 version.

---
 arch/arm/boot/dts/bcm-nsp.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/bcm-nsp.dtsi +9 -0
index 15f07f9..8b56d74 100644
@@ -227,6 +227,15 @@
 			status = "disabled";
 		};
 
+		mailbox: mailbox at 25000 {
+			compatible = "brcm,iproc-fa2-mbox";
+			reg = <0x25000 0x445>;
+			interrupts = <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
+			#mbox-cells = <1>;
+			brcm,rx-status-len = <32>;
+			brcm,use-bcm-hdr;
+		};
+
 		nand: nand at 26000 {
 			compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
 			reg = <0x026000 0x600>,
Signature · 1 line
2.1.0
author
#3 lore raw

PATCH v2 3/3 dt-bindings: mailbox: Update doc with NSP PDC/mailbox support

In reply to Steve Lin

Update the DT bindings documentation to reflect the new NSP version of PDC driver compatibility string.

---
 Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt +4 -2
index 411ccf4..0f3ee81 100644
@@ -1,9 +1,11 @@
 The PDC driver manages data transfer to and from various offload engines
 on some Broadcom SoCs. An SoC may have multiple PDC hardware blocks. There is
-one device tree entry per block.
+one device tree entry per block.  On some chips, the PDC functionality is
+handled by the FA2 (Northstar Plus).
 
 Required properties:
-- compatible : Should be "brcm,iproc-pdc-mbox".
+- compatible : Should be "brcm,iproc-pdc-mbox" or "brcm,iproc-fa2-mbox" for
+  FA2/Northstar Plus.
 - reg: Should contain PDC registers location and length.
 - interrupts: Should contain the IRQ line for the PDC.
 - #mbox-cells: 1
Signature · 1 line
2.1.0
maintainer Acked-by on v2 3/3
#4 lore raw

Re: [PATCH v2 3/3] dt-bindings: mailbox: Update doc with NSP PDC/mailbox support

Quoted 7 lines · Steve Lin

Update the DT bindings documentation to reflect the new NSP version of PDC driver compatibility string.

---
 Documentation/devicetree/bindings/mailbox/brcm,iproc-pdc-mbox.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Acked-by on the v2 series
#5 lore raw
In reply to Steve Lin
Quoted 8 lines · Steve Lin

Adds support for Broadcom Northstar+ to mailbox (PDC) driver.

Patch 1/3: Driver code and Kconfig changes
Patch 2/3: Device tree changes
Patch 3/3: DT bindings documentation changes

v2 addresses Jon Mason's suggestion about making the bindings doc change a separate patch.

FWIW, looks good to me. Feel free to add my

to the relevant pieces

Quoted 14 lines

Steve Lin (3):
mailbox: bcm-pdc: Add Northstar Plus support to PDC driver
ARM: dts: NSP: Add mailbox (PDC) to NSP
dt-bindings: mailbox: Update doc with NSP PDC/mailbox support

 .../bindings/mailbox/brcm,iproc-pdc-mbox.txt       |  6 ++-
 arch/arm/boot/dts/bcm-nsp.dtsi                     |  9 ++++
 drivers/mailbox/Kconfig                            |  9 ++--
 drivers/mailbox/bcm-pdc-mailbox.c                  | 61 ++++++++++++++++------
 4 files changed, 63 insertions(+), 22 deletions(-)

--
2.1.0

A message that is not in the archive (sent off-list or not yet received): 1487861392-23039-3-git-send-email-steven.lin1-dY08KVG/lbpWk0Htik3J/[email protected]

#7 lore raw

Re: [PATCH v2 2/3] ARM: dts: NSP: Add mailbox (PDC) to NSP

Quoted 5 lines · Steve Lin

Adds mailbox / PDC to NSP device tree. Needs new compatibility string to differentiate from NS2 version.

---

Applied, thanks!
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html