linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes
@ 2016-07-08 18:48 Florian Fainelli
  2016-07-08 18:48 ` [PATCH 1/3] ARM: dts: Enable SRAB switch and GMACs on 5301x DTS Florian Fainelli
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series is based on Broadcom/stblinux/devicetree/next which
contains proper support for the BCM958625HR board. To get working
Ethernet switch and CPU Ethernet support, the following dependencies
based on David Miller's net-next tree are required:

- Jon Mason's BGMAC/AMAC support: https://marc.info/?t=146793308300002&r=1&w=3
- dsa/b53 support for NSP switch: https://marc.info/?l=linux-netdev&m=146800324531914&w=3

Florian Fainelli (2):
  ARM: dts: NSP: Add Switch Register Access Block node
  ARM: dts: NSP: Add BCM958625HR switch ports

 arch/arm/boot/dts/bcm-nsp.dtsi    | 11 +++++++++
 arch/arm/boot/dts/bcm958625hr.dts | 49 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

-- 
2.7.4

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

* [PATCH 1/3] ARM: dts: Enable SRAB switch and GMACs on 5301x DTS
  2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
@ 2016-07-08 18:48 ` Florian Fainelli
  2016-07-08 18:48 ` [PATCH 1/2] ARM: dts: NSP: Add Switch Register Access Block node Florian Fainelli
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

Add the Switch Register Access Block which is a special piece of
hardware allowing us to perform indirect read/writes towards the
integrated BCM5301X Ethernet switch.

We also add the 4 Gigabit MAC Device Tree nodes within the brcm,bus-axi
bus node to get proper binding between the BCMA instantiated core and
the Device Tree nodes. We will need that to be able to reference
Ethernet Device Tree nodes in a future patch adding the switch ports
layout.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 7d4d29bf0ed3..9fb565841004 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -239,6 +239,22 @@
 				status = "disabled";
 			};
 		};
+
+		gmac0: ethernet at 24000 {
+			reg = <0x24000 0x800>;
+		};
+
+		gmac1: ethernet at 25000 {
+			reg = <0x25000 0x800>;
+		};
+
+		gmac2: ethernet at 26000 {
+			reg = <0x26000 0x800>;
+		};
+
+		gmac3: ethernet at 27000 {
+			reg = <0x27000 0x800>;
+		};
 	};
 
 	lcpll0: lcpll0 at 1800c100 {
@@ -260,6 +276,17 @@
 				     "sata2";
 	};
 
+	srab: srab at 18007000 {
+		compatible = "brcm,bcm5301x-srab";
+		reg = <0x18007000 0x1000>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		status = "disabled";
+
+		/* ports are defined in board DTS */
+	};
+
 	nand: nand at 18028000 {
 		compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
 		reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
-- 
2.7.4

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

* [PATCH 1/2] ARM: dts: NSP: Add Switch Register Access Block node
  2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
  2016-07-08 18:48 ` [PATCH 1/3] ARM: dts: Enable SRAB switch and GMACs on 5301x DTS Florian Fainelli
@ 2016-07-08 18:48 ` Florian Fainelli
  2016-07-08 18:48 ` [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts Florian Fainelli
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

Add the Switch Register Access Block node, this peripheral is identical
to the BCM5301x Northstar SoC, but we utilize the SoC-wide
"brcm,nsp-srab" compatible string to illustrate the integration
difference here.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 8d7b35a4b5f1..983fdba905e3 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -241,6 +241,17 @@
 			clock-names = "apb_pclk";
 		};
 
+		srab: srab at 36000 {
+			compatible = "brcm,nsp-srab";
+			reg = <0x36000 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+
+			/* ports are defined in board DTS */
+		};
+
 		i2c0: i2c at 38000 {
 			compatible = "brcm,iproc-i2c";
 			reg = <0x38000 0x50>;
-- 
2.7.4

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

* [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts
  2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
  2016-07-08 18:48 ` [PATCH 1/3] ARM: dts: Enable SRAB switch and GMACs on 5301x DTS Florian Fainelli
  2016-07-08 18:48 ` [PATCH 1/2] ARM: dts: NSP: Add Switch Register Access Block node Florian Fainelli
@ 2016-07-08 18:48 ` Florian Fainelli
  2016-07-08 18:48 ` [PATCH 2/2] ARM: dts: NSP: Add BCM958625HR switch ports Florian Fainelli
  2016-07-08 18:52 ` [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
  4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

Add interrupt mapping for the Switch Register Access Block. Only 12
interrupts are usable at the moment even though up to 32 are dedicated
to the SRAB.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 9fb565841004..a20ebd2ac9a2 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -153,6 +153,21 @@
 			/* ChipCommon */
 			<0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
 
+			/* Switch Register Access Block */
+			<0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+
 			/* PCIe Controller 0 */
 			<0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
 			<0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: NSP: Add BCM958625HR switch ports
  2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
                   ` (2 preceding siblings ...)
  2016-07-08 18:48 ` [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts Florian Fainelli
@ 2016-07-08 18:48 ` Florian Fainelli
  2016-07-08 18:52 ` [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
  4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

Add the layout of the switch ports found on the BCM958625HR reference
board. The CPU port is hooked up to the AMAC0 Ethernet controlelr
adapter, so we also enable it.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm958625hr.dts | 49 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index 03b8bbeb694f..4239e58cf97f 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -109,3 +109,52 @@
 		groups = "nand_grp";
 	};
 };
+
+&amac0 {
+	status = "okay";
+};
+
+&srab {
+	compatible = "brcm,bcm58625-srab", "brcm,nsp-srab";
+	status = "okay";
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			label = "port0";
+			reg = <0>;
+		};
+
+		port at 1 {
+			label = "port1";
+			reg = <1>;
+		};
+
+		port at 2 {
+			label = "port2";
+			reg = <2>;
+		};
+
+		port at 3 {
+			label = "port3";
+			reg = <3>;
+		};
+
+		port at 4 {
+			label = "port4";
+			reg = <4>;
+		};
+
+		port at 5 {
+			ethernet = <&amac0>;
+			label = "cpu";
+			reg = <5>;
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+};
-- 
2.7.4

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

* [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes
  2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
                   ` (3 preceding siblings ...)
  2016-07-08 18:48 ` [PATCH 2/2] ARM: dts: NSP: Add BCM958625HR switch ports Florian Fainelli
@ 2016-07-08 18:52 ` Florian Fainelli
  4 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-07-08 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/08/2016 11:48 AM, Florian Fainelli wrote:
> This patch series is based on Broadcom/stblinux/devicetree/next which
> contains proper support for the BCM958625HR board. To get working
> Ethernet switch and CPU Ethernet support, the following dependencies
> based on David Miller's net-next tree are required:
> 
> - Jon Mason's BGMAC/AMAC support: https://marc.info/?t=146793308300002&r=1&w=3
> - dsa/b53 support for NSP switch: https://marc.info/?l=linux-netdev&m=146800324531914&w=3

Please ignore this series, it contained patches from a previous
submission, see this one instead:
1468003769-26959-1-git-send-email-f.fainelli at gmail.com>

> 
> Florian Fainelli (2):
>   ARM: dts: NSP: Add Switch Register Access Block node
>   ARM: dts: NSP: Add BCM958625HR switch ports
> 
>  arch/arm/boot/dts/bcm-nsp.dtsi    | 11 +++++++++
>  arch/arm/boot/dts/bcm958625hr.dts | 49 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+)
> 


-- 
Florian

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

* [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts
  2016-06-10 18:35 [PATCH 0/3] ARM: dts: BCM5310x switch support Florian Fainelli
@ 2016-06-10 18:35 ` Florian Fainelli
  0 siblings, 0 replies; 7+ messages in thread
From: Florian Fainelli @ 2016-06-10 18:35 UTC (permalink / raw)
  To: linux-arm-kernel

Add interrupt mapping for the Switch Register Access Block. Only 12
interrupts are usable at the moment even though up to 32 are dedicated
to the SRAB.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/boot/dts/bcm5301x.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index 9fb565841004..a20ebd2ac9a2 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -153,6 +153,21 @@
 			/* ChipCommon */
 			<0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
 
+			/* Switch Register Access Block */
+			<0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+			<0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+
 			/* PCIe Controller 0 */
 			<0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
 			<0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>,
-- 
2.7.4

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

end of thread, other threads:[~2016-07-08 18:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 18:48 [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
2016-07-08 18:48 ` [PATCH 1/3] ARM: dts: Enable SRAB switch and GMACs on 5301x DTS Florian Fainelli
2016-07-08 18:48 ` [PATCH 1/2] ARM: dts: NSP: Add Switch Register Access Block node Florian Fainelli
2016-07-08 18:48 ` [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts Florian Fainelli
2016-07-08 18:48 ` [PATCH 2/2] ARM: dts: NSP: Add BCM958625HR switch ports Florian Fainelli
2016-07-08 18:52 ` [PATCH 0/2] ARM: dts: NSP: Add built-in Ethernet switch nodes Florian Fainelli
  -- strict thread matches above, loose matches on Subject: below --
2016-06-10 18:35 [PATCH 0/3] ARM: dts: BCM5310x switch support Florian Fainelli
2016-06-10 18:35 ` [PATCH 2/3] ARM: dts: BCM5301X: Add SRAB interrupts Florian Fainelli

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