Skip to contentSkip to conversation

board: sl28: add DSA support for variant 2

PATCH In review Michael Walle 3 participants 5 messages Jun 23, 2021 – Jul 2, 2021 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 board: sl28: add DSA support for variant 2

Now that u-boot gained DSA support, and it is already enabled for the kontron_sl28 board, add the last missing piece and enable the corresponding devices it in the device tree.

---
changes since v1:
- renamed ethernet alias stem, because it was changed in commit 82a3c9ef20d43d97416589854b4bbcb4c2450c24 ("net: use the same alias stem for ethernet as linux")

Now that the mentioned commit made it finally into u-boot. We can move forward here. It would be nice if this would still make it into 2021.07, given that this is only a device tree change for a this particular board.

 .../fsl-ls1028a-kontron-sl28-var2-u-boot.dtsi |  7 ++++
 .../arm/dts/fsl-ls1028a-kontron-sl28-var2.dts | 40 +++++++++++++++++++
 2 files changed, 47 insertions(+)
arch/arm/dts/fsl-ls1028a-kontron-sl28-var2-u-boot.dtsi +7 -0
index 79b771e074..4e0ce3f77d 100644
@@ -1,2 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0+
 #include "fsl-ls1028a-kontron-sl28-u-boot.dtsi"
+
+/ {
+	aliases {
+		ethernet0 = &mscc_felix_port0;
+		ethernet1 = &mscc_felix_port1;
+	};
+};
arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dts +40 -0
index 1ea1265bcf..7a3aa21408 100644
@@ -22,4 +22,44 @@
 	/delete-property/ phy-handle;
 };
 
+&enetc2 {
+	status = "okay";
+};
+
+&mscc_felix {
+	status = "okay";
+};
+
+&mscc_felix_port0 {
+	label = "gbe0";
+	phy-handle = <&phy0>;
+	phy-mode = "sgmii";
+	status = "okay";
+};
+
+&mscc_felix_port1 {
+	label = "gbe1";
+	phy-handle = <&phy1>;
+	phy-mode = "sgmii";
+	status = "okay";
+};
+
+&mscc_felix_port4 {
+	ethernet = <&enetc2>;
+	status = "okay";
+};
+
 /delete-node/ &phy0;
+&mdio0 {
+	phy0: ethernet-phy@5 {
+		reg = <0x5>;
+		eee-broken-1000t;
+		eee-broken-100tx;
+	};
+
+	phy1: ethernet-phy@4 {
+		reg = <0x4>;
+		eee-broken-1000t;
+		eee-broken-100tx;
+	};
+};
Signature · 1 line
2.20.1
#1 lore raw

Am 2021-06-23 13:56, schrieb Michael Walle:

Quoted 11 lines

Now that u-boot gained DSA support, and it is already enabled for the kontron_sl28 board, add the last missing piece and enable the corresponding devices it in the device tree.

---
changes since v1:
- renamed ethernet alias stem, because it was changed in commit 82a3c9ef20d43d97416589854b4bbcb4c2450c24 ("net: use the same alias stem for ethernet as linux")

Quoted 3 lines

Now that the mentioned commit made it finally into u-boot. We can move forward here. It would be nice if this would still make it into 2021.07, given that this is only a device tree change for a this particular board.

Can this please go through the net queue?

By chance, I've seen this patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Now I'm lucky that I have the following chunk, otherwise the patch wouldn't work.

+&enetc2 {
+ status = "okay";
+};

In any case, I'd retest this patch today based on u-boot-net/master (together with Vladimirs new patch series which configures the autoneg at probe time).

-michael

Quoted 70 lines
 .../fsl-ls1028a-kontron-sl28-var2-u-boot.dtsi |  7 ++++
 .../arm/dts/fsl-ls1028a-kontron-sl28-var2.dts | 40 +++++++++++++++++++
 2 files changed, 47 insertions(+)
arch/arm/dts/fsl-ls1028a-kontron-sl28-var2-u-boot.dtsi +7 -0
index 79b771e074..4e0ce3f77d 100644
@@ -1,2 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0+
 #include "fsl-ls1028a-kontron-sl28-u-boot.dtsi"
+
+/ {
+	aliases {
+		ethernet0 = &mscc_felix_port0;
+		ethernet1 = &mscc_felix_port1;
+	};
+};
arch/arm/dts/fsl-ls1028a-kontron-sl28-var2.dts +40 -0
index 1ea1265bcf..7a3aa21408 100644
@@ -22,4 +22,44 @@
 	/delete-property/ phy-handle;
 };
 
+&enetc2 {
+	status = "okay";
+};
+
+&mscc_felix {
+	status = "okay";
+};
+
+&mscc_felix_port0 {
+	label = "gbe0";
+	phy-handle = <&phy0>;
+	phy-mode = "sgmii";
+	status = "okay";
+};
+
+&mscc_felix_port1 {
+	label = "gbe1";
+	phy-handle = <&phy1>;
+	phy-mode = "sgmii";
+	status = "okay";
+};
+
+&mscc_felix_port4 {
+	ethernet = <&enetc2>;
+	status = "okay";
+};
+
 /delete-node/ &phy0;
+&mdio0 {
+	phy0: ethernet-phy@5 {
+		reg = <0x5>;
+		eee-broken-1000t;
+		eee-broken-100tx;
+	};
+
+	phy1: ethernet-phy@4 {
+		reg = <0x4>;
+		eee-broken-1000t;
+		eee-broken-100tx;
+	};
+};
Signature · 1 line
-michael
#2 lore raw

Review

Quoted 11 lines · Michael Walle

Can this please go through the net queue?

By chance, I've seen this patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Now I'm lucky that I have the following chunk, otherwise the patch wouldn't work.

+&enetc2 {

(quoted diff) +2 -0
+	status = "okay";
+};

Why "lucky"? I remember you were pushing this device tree style in the first place.

Quoted 3 lines

In any case, I'd retest this patch today based on u-boot-net/master (together
with Vladimirs new patch series which configures the autoneg at probe time).

I think it's best to just resend with Ramon in CC once you retest.

#3 lore raw

Am 2021-06-30 12:34, schrieb Vladimir Oltean:

Quoted 9 lines · Michael Walle
Quoted 8 lines

Can this please go through the net queue?

By chance, I've seen this patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Now I'm lucky that I have the following chunk, otherwise the patch wouldn't work.

Quoted 6 lines

Review

Quoted 3 lines

+&enetc2 {

(quoted diff) +2 -0
+	status = "okay";
+};

Why "lucky"? I remember you were pushing this device tree style in the first place.

Thats correct, but in u-boot this device was still defaulting to status = "okay", thus it would have been superfluous to still enable it in the board dts. And tbh, I don't exactly know why I enabled it nonetheless. Normally I keep things small ;)

Its not about the change (which is good), but there seems to be a disconnect between which patches goes through which queue and you have to be lucky that a (newer) patch doesn't break your patch which is sitting on another queue to be picked up while the newer one is already pulled in.

Signature · 1 line
-michael
#4 lore raw
Quoted 24 lines · Michael Walle

Am 2021-06-30 12:34, schrieb Vladimir Oltean:

Quoted 10 lines · Michael Walle
Quoted 9 lines

Can this please go through the net queue?

By chance, I've seen this patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Now I'm lucky that I have the following chunk, otherwise the patch wouldn't
work.

Quoted 6 lines

Review

Quoted 3 lines

+&enetc2 {

(quoted diff) +2 -0
+    status = "okay";
+};

Why "lucky"? I remember you were pushing this device tree style in the first place.

Thats correct, but in u-boot this device was still defaulting to status = "okay", thus it would have been superfluous to still enable it in the board dts. And tbh, I don't exactly know why I enabled it nonetheless. Normally I keep things small ;)

Quoted 8 lines

Its not about the change (which is good), but there seems to be a disconnect between which patches goes through which queue and you have to be lucky that a (newer) patch doesn't break your patch which is sitting on another queue to be picked up while the newer one is already pulled in.

--
-michael

Applied to u-boot-net/master, Thanks !
Ramon