diff mbox series

arm64: dts: stratix10: add the sysmgr-syscon property from the gmac's

Message ID 20190314022956.32100-1-dinguyen@kernel.org (mailing list archive)
State Mainlined, archived
Commit 8efd6365417a044db03009724ecc1a9521524913
Headers show
Series arm64: dts: stratix10: add the sysmgr-syscon property from the gmac's | expand

Commit Message

Dinh Nguyen March 14, 2019, 2:29 a.m. UTC
The gmac ethernet driver uses the "altr,sysmgr-syscon" property to
configure phy settings for the gmac controller.

Add the "altr,sysmgr-syscon" property to all gmac nodes.

This patch fixes:

[    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
[    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data

Cc: stable@vger.kernel.org
Reported-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
 arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 3 +++
 1 file changed, 3 insertions(+)

Comments

Aaro Koskinen April 12, 2019, 5:19 p.m. UTC | #1
Hi,

On Wed, Mar 13, 2019 at 09:29:56PM -0500, Dinh Nguyen wrote:
> The gmac ethernet driver uses the "altr,sysmgr-syscon" property to
> configure phy settings for the gmac controller.
> 
> Add the "altr,sysmgr-syscon" property to all gmac nodes.
> 
> This patch fixes:
> 
> [    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
> [    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
> 
> Cc: stable@vger.kernel.org
> Reported-by: Ley Foon Tan <ley.foon.tan@intel.com>
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>

This patch broke the boot on my board when upgrading from v5.1-rc3
to -rc4 (using a simple custom DTS including socfpga_stratix10.dtsi,
basically enabling just ethernet and serial console). Previously, when
the socfpga-dwmac probe failed with above messages, the generic dwmac
driver was used instead to get working networking.

Now that the socfpga-dwmac probe succeeds, there's a sudden reset/crash
due to exception. Apparently the reason is that the access to these
registers is restricted from the kernel and the mainline socfpga-dwmac
driver is missing the support for the SMC call access? Am I missing
something, or was it too early to apply this patch to mainline?

A.

> ---
>  arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> index 7c649f6b14cb..cd7c76e58b09 100644
> --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
> @@ -162,6 +162,7 @@
>  			rx-fifo-depth = <16384>;
>  			snps,multicast-filter-bins = <256>;
>  			iommus = <&smmu 1>;
> +			altr,sysmgr-syscon = <&sysmgr 0x44 0>;
>  			status = "disabled";
>  		};
>  
> @@ -179,6 +180,7 @@
>  			rx-fifo-depth = <16384>;
>  			snps,multicast-filter-bins = <256>;
>  			iommus = <&smmu 2>;
> +			altr,sysmgr-syscon = <&sysmgr 0x48 0>;
>  			status = "disabled";
>  		};
>  
> @@ -196,6 +198,7 @@
>  			rx-fifo-depth = <16384>;
>  			snps,multicast-filter-bins = <256>;
>  			iommus = <&smmu 3>;
> +			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
>  			status = "disabled";
>  		};
>  
> -- 
> 2.20.0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Dinh Nguyen April 15, 2019, 4:10 p.m. UTC | #2
Hi Aaro,

On 4/12/19 12:19 PM, Aaro Koskinen wrote:
> Hi,
> 
> On Wed, Mar 13, 2019 at 09:29:56PM -0500, Dinh Nguyen wrote:
>> The gmac ethernet driver uses the "altr,sysmgr-syscon" property to
>> configure phy settings for the gmac controller.
>>
>> Add the "altr,sysmgr-syscon" property to all gmac nodes.
>>
>> This patch fixes:
>>
>> [    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
>> [    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
>>
>> Cc: stable@vger.kernel.org
>> Reported-by: Ley Foon Tan <ley.foon.tan@intel.com>
>> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> 
> This patch broke the boot on my board when upgrading from v5.1-rc3
> to -rc4 (using a simple custom DTS including socfpga_stratix10.dtsi,
> basically enabling just ethernet and serial console). Previously, when
> the socfpga-dwmac probe failed with above messages, the generic dwmac
> driver was used instead to get working networking.
> 
> Now that the socfpga-dwmac probe succeeds, there's a sudden reset/crash
> due to exception. Apparently the reason is that the access to these
> registers is restricted from the kernel and the mainline socfpga-dwmac
> driver is missing the support for the SMC call access? Am I missing
> something, or was it too early to apply this patch to mainline?
> 

Argh, you're right! Apologies, but I think this patch is to early to
apply to mainline. As there was a patch that we have downstream to
support the SMC call access, I made a mistake and tested this patch with
it. Let me try to clean up the downstream patch for submission to fix this.

Meanwhile, are you ok with just using the generic dwmac driver to get
around this issue? Otherwise, I can ask the to revert the patch.

Dinh
Aaro Koskinen April 15, 2019, 6:25 p.m. UTC | #3
Hi,

On Mon, Apr 15, 2019 at 11:10:49AM -0500, Dinh Nguyen wrote:
> On 4/12/19 12:19 PM, Aaro Koskinen wrote:
> > On Wed, Mar 13, 2019 at 09:29:56PM -0500, Dinh Nguyen wrote:
> >> The gmac ethernet driver uses the "altr,sysmgr-syscon" property to
> >> configure phy settings for the gmac controller.
> >>
> >> Add the "altr,sysmgr-syscon" property to all gmac nodes.
> >>
> >> This patch fixes:
> >>
> >> [    0.917530] socfpga-dwmac ff800000.ethernet: No sysmgr-syscon node found
> >> [    0.924209] socfpga-dwmac ff800000.ethernet: Unable to parse OF data
> >>
> >> Cc: stable@vger.kernel.org
> >> Reported-by: Ley Foon Tan <ley.foon.tan@intel.com>
> >> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> > 
> > This patch broke the boot on my board when upgrading from v5.1-rc3
> > to -rc4 (using a simple custom DTS including socfpga_stratix10.dtsi,
> > basically enabling just ethernet and serial console). Previously, when
> > the socfpga-dwmac probe failed with above messages, the generic dwmac
> > driver was used instead to get working networking.
> > 
> > Now that the socfpga-dwmac probe succeeds, there's a sudden reset/crash
> > due to exception. Apparently the reason is that the access to these
> > registers is restricted from the kernel and the mainline socfpga-dwmac
> > driver is missing the support for the SMC call access? Am I missing
> > something, or was it too early to apply this patch to mainline?
> 
> Argh, you're right! Apologies, but I think this patch is to early to
> apply to mainline. As there was a patch that we have downstream to
> support the SMC call access, I made a mistake and tested this patch with
> it. Let me try to clean up the downstream patch for submission to fix this.

Ok, thanks for comforming.

> Meanwhile, are you ok with just using the generic dwmac driver to get
> around this issue? Otherwise, I can ask the to revert the patch.

Personally I'm fine with the generic dwmac for time being.

A.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index 7c649f6b14cb..cd7c76e58b09 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -162,6 +162,7 @@ 
 			rx-fifo-depth = <16384>;
 			snps,multicast-filter-bins = <256>;
 			iommus = <&smmu 1>;
+			altr,sysmgr-syscon = <&sysmgr 0x44 0>;
 			status = "disabled";
 		};
 
@@ -179,6 +180,7 @@ 
 			rx-fifo-depth = <16384>;
 			snps,multicast-filter-bins = <256>;
 			iommus = <&smmu 2>;
+			altr,sysmgr-syscon = <&sysmgr 0x48 0>;
 			status = "disabled";
 		};
 
@@ -196,6 +198,7 @@ 
 			rx-fifo-depth = <16384>;
 			snps,multicast-filter-bins = <256>;
 			iommus = <&smmu 3>;
+			altr,sysmgr-syscon = <&sysmgr 0x4c 0>;
 			status = "disabled";
 		};