Skip to contentSkip to conversation

ARM: dts: mvebu: linksys: enable buffer manager support

PATCH Superseded Ralph Sennhauser 2 participants 3 messages Mar 8, 2017 – Mar 16, 2017 Device tree bindings

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: mvebu: linksys: enable buffer manager support

Add appropriate properties to devices in the Linksys WRT AC Series for the mvneta driver to use hardware buffer management.

Also update "soc" ranges property and set the status of bm and bm-bppi to "okay" (SRAM).

---
 arch/arm/boot/dts/armada-385-linksys.dtsi     | 17 ++++++++++++++++-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 17 ++++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-385-linksys.dtsi +16 -1
index df47bf1..4aac375 100644
@@ -59,7 +59,8 @@
 		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
 			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
 			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
 
 		internal-regs {
 			i2c at 11000 {
@@ -88,6 +89,9 @@
 			ethernet at 70000 {
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <1>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -97,6 +101,9 @@
 			ethernet at 34000 {
 				status = "okay";
 				phy-mode = "sgmii";
+				buffer-manager = <&bm>;
+				bm,pool-long = <0>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -159,6 +166,10 @@
 				status = "okay";
 			};
 
+			bm at c8000 {
+				status = "okay";
+			};
+
 			/* USB part of the eSATA/USB 2.0 port */
 			usb at 58000 {
 				status = "okay";
@@ -241,6 +252,10 @@
 			};
 		};
 
+		bm-bppi {
+			status = "okay";
+		};
+
 		pcie-controller {
 			status = "okay";
 
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +16 -1
index 3744ba3..b188a4dc 100644
@@ -71,7 +71,8 @@
 		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
 			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
 			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
 
 		internal-regs {
 
@@ -95,6 +96,9 @@
 				pinctrl-names = "default";
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <0>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -106,6 +110,9 @@
 				pinctrl-names = "default";
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <1>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -186,6 +193,10 @@
 				};
 			};
 
+			bm at c8000 {
+				status = "okay";
+			};
+
 			nand at d0000 {
 				status = "okay";
 				num-cs = <1>;
@@ -259,6 +270,10 @@
 				};
 			};
 		};
+
+		bm-bppi {
+			status = "okay";
+		};
 	};
 
 	gpio_keys {
Signature · 1 line
2.10.2
#1 lore raw

Hi Ralph,

Quoted 37 lines · Ralph Sennhauser

Add appropriate properties to devices in the Linksys WRT AC Series for the mvneta driver to use hardware buffer management.

Also update "soc" ranges property and set the status of bm and bm-bppi to "okay" (SRAM).

---
 arch/arm/boot/dts/armada-385-linksys.dtsi     | 17 ++++++++++++++++-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 17 ++++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-385-linksys.dtsi +5 -1
index df47bf1..4aac375 100644
@@ -59,7 +59,8 @@
 		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
 			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
 			  MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
 
 		internal-regs {
 			i2c at 11000 {
@@ -88,6 +89,9 @@
 			ethernet at 70000 {
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <1>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;

arch/arm/boot/dts/armada-385-linksys.dtsi line 106

Quoted 6 lines
arch/arm/boot/dts/armada-385-linksys.dtsi +3 -0
@@ -97,6 +101,9 @@
 			ethernet at 34000 {
 				status = "okay";
 				phy-mode = "sgmii";
+				buffer-manager = <&bm>;
+				bm,pool-long = <0>;
+				bm,pool-short = <3>;

Any reason to reuse the same pool than the other port?

As only two ports are used here, then each of them can have use 2 of the 4 availables pools.

Quoted 50 lines
arch/arm/boot/dts/armada-385-linksys.dtsi +8 -0
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -159,6 +166,10 @@
 				status = "okay";
 			};
 
+			bm at c8000 {
+				status = "okay";
+			};
+
 			/* USB part of the eSATA/USB 2.0 port */
 			usb at 58000 {
 				status = "okay";
@@ -241,6 +252,10 @@
 			};
 		};
 
+		bm-bppi {
+			status = "okay";
+		};
+
 		pcie-controller {
 			status = "okay";
 
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +5 -1
index 3744ba3..b188a4dc 100644
@@ -71,7 +71,8 @@
 		ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
 			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
 			  MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
-			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
+			  MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000
+			  MBUS_ID(0x0c, 0x04) 0 0 0xf1200000 0x100000>;
 
 		internal-regs {
 
@@ -95,6 +96,9 @@
 				pinctrl-names = "default";
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <0>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;

arch/arm/boot/dts/armada-xp-linksys-mamba.dts line 115

Quoted 6 lines
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +3 -0
@@ -106,6 +110,9 @@
 				pinctrl-names = "default";
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <1>;
+				bm,pool-short = <3>;

Same question that above.

Gregory

Quoted 28 lines
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +8 -0
 				fixed-link {
 					speed = <1000>;
 					full-duplex;
@@ -186,6 +193,10 @@
 				};
 			};
 
+			bm at c8000 {
+				status = "okay";
+			};
+
 			nand at d0000 {
 				status = "okay";
 				num-cs = <1>;
@@ -259,6 +270,10 @@
 				};
 			};
 		};
+
+		bm-bppi {
+			status = "okay";
+		};
 	};
 
 	gpio_keys {
Signature · 1 line
2.10.2
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw
Quoted 26 lines · On Wed, 15 Mar 2017 20:17:35 +0100 Gregory CLEMENT…

Hi Ralph,

On mer., mars 08 2017, Ralph Sennhauser <[email protected]>
wrote:

</snip>

Quoted 11 lines
arch/arm/boot/dts/armada-385-linksys.dtsi +3 -0
@@ -88,6 +89,9 @@
 			ethernet at 70000 {
 				status = "okay";
 				phy-mode = "rgmii-id";
+				buffer-manager = <&bm>;
+				bm,pool-long = <1>;
+				bm,pool-short = <3>;
 				fixed-link {
 					speed = <1000>;
 					full-duplex;

arch/arm/boot/dts/armada-385-linksys.dtsi line 106

Quoted 6 lines
arch/arm/boot/dts/armada-385-linksys.dtsi +3 -0
@@ -97,6 +101,9 @@
 			ethernet at 34000 {
 				status = "okay";
 				phy-mode = "sgmii";
+				buffer-manager = <&bm>;
+				bm,pool-long = <0>;
+				bm,pool-short = <3>;  

Any reason to reuse the same pool than the other port?

Quoted 4 lines

As only two ports are used here, then each of them can have use 2 of the 4 availables pools.

</snip>

Hi Gregory,

It has been quite a while since I have written that patch. Something written somewhere in the Documentation / commit message which I can't find anymore gave me the impression that using the same for short doesn't make a difference. So I went with the pool IDs used for other similar boards for "consistency".

Will send a v2 shortly using all independent pools using the IDs witch come most natural in context.

Thanks
Ralph