Skip to contentSkip to conversation

ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

PATCH New Ley Foon Tan 3 participants 9 messages Mar 13, 2019 – Mar 14, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net: Failed to get syscon: -2

---
 arch/arm/dts/socfpga_stratix10.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/dts/socfpga_stratix10.dtsi +3 -0
index ccd3f32301..ee93725d64 100644
@@ -95,6 +95,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x44 0>;
 			status = "disabled";
 		};
 
@@ -106,6 +107,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x48 0>;
 			status = "disabled";
 		};
 
@@ -117,6 +119,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
 			status = "disabled";
 		};
 
Signature · 1 line
2.19.0
#1 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 8 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net: Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Quoted 33 lines
---
 arch/arm/dts/socfpga_stratix10.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/dts/socfpga_stratix10.dtsi +3 -0
index ccd3f32301..ee93725d64 100644
@@ -95,6 +95,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x44 0>;
 			status = "disabled";
 		};
 
@@ -106,6 +107,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x48 0>;
 			status = "disabled";
 		};
 
@@ -117,6 +119,7 @@
 			mac-address = [00 00 00 00 00 00];
 			resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
 			reset-names = "stmmaceth";
+			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
 			status = "disabled";
 		};
 
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 11 lines · Marek Vasut
Quoted 9 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20 kernel.

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data [    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with error -22

Regards
Ley Foon

Quoted 40 lines
Quoted 39 lines

---
 arch/arm/dts/socfpga_stratix10.dtsi | 3 +++

 1 file changed, 3 insertions(+)
arch/arm/dts/socfpga_stratix10.dtsi +0 -0
index ccd3f32301..ee93725d64 100644
@@ -95,6 +95,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x44 0>;

  status = "disabled";
  };

arch/arm/dts/socfpga_stratix10.dtsi +0 -0
@@ -106,6 +107,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x48 0>;

  status = "disabled";
  };

arch/arm/dts/socfpga_stratix10.dtsi +0 -0
@@ -117,6 +119,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;

  status = "disabled";
  };

#3 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 14 lines · Ley Foon Tan
Quoted 11 lines · Marek Vasut
Quoted 9 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Quoted 8 lines

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20 kernel.

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data [    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with error -22

You know what to do :)

Quoted 42 lines

Regards
Ley Foon

Quoted 40 lines
Quoted 39 lines

---
 arch/arm/dts/socfpga_stratix10.dtsi | 3 +++

 1 file changed, 3 insertions(+)
arch/arm/dts/socfpga_stratix10.dtsi +0 -0
index ccd3f32301..ee93725d64 100644
@@ -95,6 +95,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x44 0>;

  status = "disabled";
  };

arch/arm/dts/socfpga_stratix10.dtsi +0 -0
@@ -106,6 +107,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x48 0>;

  status = "disabled";
  };

arch/arm/dts/socfpga_stratix10.dtsi +0 -0
@@ -117,6 +119,7 @@
  			mac-address = [00 00 00 00 00 00];

  resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
  reset-names = "stmmaceth";

arch/arm/dts/socfpga_stratix10.dtsi +1 -0
+			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;

  status = "disabled";
  };

Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

In reply to Ley Foon Tan
Quoted 14 lines · Ley Foon Tan
Quoted 11 lines · Marek Vasut
Quoted 9 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Quoted 10 lines

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20 kernel.

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data [    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with error -22

I see this in mainline Linux:

[    0.911521] socfpga-dwmac ff800000.ethernet: PTP uses main clock
[    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
[    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
[    0.930944] stmmaceth ff800000.ethernet: PTP uses main clock
[    0.936723] stmmaceth ff800000.ethernet: User ID: 0x11, Synopsys ID: 0x37
[    0.943496] stmmaceth ff800000.ethernet:     DWMAC1000

It doesn't fail probing though. I'll look into it.

Dinh

#5 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 45 lines · Dinh Nguyen
Quoted 21 lines · Ley Foon Tan
Quoted 7 lines · Marek Vasut
Quoted 5 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Quoted 6 lines
Quoted 5 lines

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20
kernel.

Quoted 9 lines

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
[    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with
error -22

I see this in mainline Linux:

[    0.911521] socfpga-dwmac ff800000.ethernet: PTP uses main clock [    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
[    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
[    0.930944] stmmaceth ff800000.ethernet: PTP uses main clock [    0.936723] stmmaceth ff800000.ethernet: User ID: 0x11, Synopsys
ID: 0x37
[    0.943496] stmmaceth ff800000.ethernet:     DWMAC1000

Quoted 3 lines

It doesn't fail probing though. I'll look into it.

Dinh

Why it probes driver twice? One with "socfpga-dwmac", another with "stmmaceth".

There is error "No sysmgr-syscon node found". So, should we add "sysmgr-syscon" dts parameter to dts?

Regards
Ley Foon

#6 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

In reply to Dinh Nguyen
Quoted 17 lines · Dinh Nguyen
Quoted 14 lines · Ley Foon Tan
Quoted 11 lines · Marek Vasut
Quoted 9 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Quoted 8 lines
Quoted 8 lines

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20 kernel.

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data [    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with error -22

It looks like you're running downstream Linux. The failed to probe message is only in the downstream Linux, not upstream Linux.

Dinh

#7 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 34 lines · Dinh Nguyen
Quoted 25 lines · Dinh Nguyen
Quoted 21 lines · Ley Foon Tan
Quoted 7 lines · Marek Vasut
Quoted 5 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Quoted 6 lines
Quoted 5 lines

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20
kernel.

Quoted 7 lines
Quoted 7 lines

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
[    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with
error -22

Quoted 5 lines

It looks like you're running downstream Linux. The failed to probe message is only in the downstream Linux, not upstream Linux.

Dinh

Yes, I am using downstream socfpga-4.20 branch. Upstream Linux can ping IP address successfully?

Regards
Ley Foon

#8 lore raw

PATCH 1/1 ARM: dts: socfpga: Add missing altr, sysmgr-syscon for EMAC

Quoted 35 lines · Ley Foon Tan
Quoted 34 lines · Dinh Nguyen
Quoted 32 lines · Dinh Nguyen
Quoted 28 lines · Ley Foon Tan
Quoted 7 lines · Marek Vasut
Quoted 5 lines · Ley Foon Tan

Syscon register is required in dts to select correct PHY interface.

Quoted 6 lines
Quoted 5 lines

Fix error below:

Net:   Failed to get syscon: -2

Is this fixed in mainline Linux too ?

Didn't see this in mainline Linux.

Dinh, do you aware of this? I see sysmgr-syscon error in EMAC in v4.20
kernel.

[    1.427994] socfpga-dwmac ff800000.ethernet: Could not read reg_offset from sysmgr-syscon!
[    1.436241] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
[    1.442646] socfpga-dwmac: probe of ff800000.ethernet failed with
error -22

Quoted 8 lines
Quoted 5 lines

It looks like you're running downstream Linux. The failed to probe message is only in the downstream Linux, not upstream Linux.

Dinh

Yes, I am using downstream socfpga-4.20 branch. Upstream Linux can ping IP address successfully?

I can even mount an NFS. Anyways, I'm sending out a patch shortly.

Dinh