linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node
@ 2020-01-07 12:38 patrice.chotard
  2020-01-07 12:38 ` [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy " patrice.chotard
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: patrice.chotard @ 2020-01-07 12:38 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel, devicetree
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

This series is fixing a kernel Oops and is removing deprecated PHY properties: 

 - Since commit 'd3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for 
   platforms without PHY")', a kernel Oops occurs and ethernet is no more
   functional.

 - Some deprecated Synopsys phy properties was always present in DT, 
   remove them.

Patrice Chotard (2):
  ARM: dts: stih410-b2260: Fix ethernet phy DT node
  ARM: dts: stih410-b2260: Remove deprecated snps PHY properties

 arch/arm/boot/dts/stih410-b2260.dts | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

-- 
2.17.1


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

* [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy DT node
  2020-01-07 12:38 [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node patrice.chotard
@ 2020-01-07 12:38 ` patrice.chotard
  2020-01-07 12:38 ` [PATCH 2/2] ARM: dts: stih410-b2260: Remove deprecated snps PHY properties patrice.chotard
  2020-01-08 10:53 ` [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node Patrice CHOTARD
  2 siblings, 0 replies; 4+ messages in thread
From: patrice.chotard @ 2020-01-07 12:38 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel, devicetree
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

Since 'd3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")'
we got the following kernel Oops :

Unable to handle kernel NULL pointer dereference at virtual address 00000260
pgd = (ptrval)
[00000260] *pgd=79a79831
Internal error: Oops: 17 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 201 Comm: ip Not tainted 5.5.0-rc5 #13
Hardware name: STi SoC with Flattened Device Tree
PC is at mdiobus_get_phy+0x4/0x20
LR is at stmmac_open+0x278/0xaa8
pc : [<c0a7e41c>]    lr : [<c0b1755c>]    psr: a0070013
sp : ed663930  ip : 00000000  fp : c110079c
r10: ed663d4c  r9 : ed663d4c  r8 : ee774028
r7 : ee22ad00  r6 : ee776000  r5 : 00000000  r4 : ee774000
r3 : ee775000  r2 : ca451a07  r1 : 00000098  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 6d75404a  DAC: 00000051
Process ip (pid: 201, stack limit = 0x(ptrval))

This is due to lack of mdio DT subnode, so add it.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/boot/dts/stih410-b2260.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 4fbd8e9eb5b7..1df2c37eb3a7 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -176,6 +176,7 @@
 
 		ethernet0: dwmac@9630000 {
 			phy-mode = "rgmii";
+			phy-handle = <&phy0>;
 			pinctrl-0 = <&pinctrl_rgmii1 &pinctrl_rgmii1_mdio_1>;
 
 			snps,phy-bus-name = "stmmac";
@@ -186,6 +187,15 @@
 			snps,reset-delays-us = <0 10000 1000000>;
 
 			status = "okay";
+
+			mdio0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "snps,dwmac-mdio";
+				phy0: ethernet-phy@0 {
+					reg = <0>;
+				};
+			};
 		};
 
 		sti_uni_player0: sti-uni-player@8d80000 {
-- 
2.17.1


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

* [PATCH 2/2] ARM: dts: stih410-b2260: Remove deprecated snps PHY properties
  2020-01-07 12:38 [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node patrice.chotard
  2020-01-07 12:38 ` [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy " patrice.chotard
@ 2020-01-07 12:38 ` patrice.chotard
  2020-01-08 10:53 ` [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node Patrice CHOTARD
  2 siblings, 0 replies; 4+ messages in thread
From: patrice.chotard @ 2020-01-07 12:38 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel, devicetree
  Cc: patrice.chotard

From: Patrice Chotard <patrice.chotard@st.com>

Remove "snps,phy-bus-name", "snps,phy-bus-id" and "snps,phy-addr"
properties.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/boot/dts/stih410-b2260.dts | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 1df2c37eb3a7..3dd7f4b18856 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -179,9 +179,6 @@
 			phy-handle = <&phy0>;
 			pinctrl-0 = <&pinctrl_rgmii1 &pinctrl_rgmii1_mdio_1>;
 
-			snps,phy-bus-name = "stmmac";
-			snps,phy-bus-id = <0>;
-			snps,phy-addr = <0>;
 			snps,reset-gpio = <&pio0 7 0>;
 			snps,reset-active-low;
 			snps,reset-delays-us = <0 10000 1000000>;
-- 
2.17.1


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

* Re: [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node
  2020-01-07 12:38 [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node patrice.chotard
  2020-01-07 12:38 ` [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy " patrice.chotard
  2020-01-07 12:38 ` [PATCH 2/2] ARM: dts: stih410-b2260: Remove deprecated snps PHY properties patrice.chotard
@ 2020-01-08 10:53 ` Patrice CHOTARD
  2 siblings, 0 replies; 4+ messages in thread
From: Patrice CHOTARD @ 2020-01-08 10:53 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, linux-arm-kernel, linux-kernel, devicetree

Hi

This series is abandonned:

   - Patch 1 is no more needed due to https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=224637

   - Patch 2 will be resend alone

Thanks

Patrice


On 1/7/20 1:38 PM, patrice.chotard@st.com wrote:
> From: Patrice Chotard <patrice.chotard@st.com>
>
> This series is fixing a kernel Oops and is removing deprecated PHY properties: 
>
>  - Since commit 'd3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for 
>    platforms without PHY")', a kernel Oops occurs and ethernet is no more
>    functional.
>
>  - Some deprecated Synopsys phy properties was always present in DT, 
>    remove them.
>
> Patrice Chotard (2):
>   ARM: dts: stih410-b2260: Fix ethernet phy DT node
>   ARM: dts: stih410-b2260: Remove deprecated snps PHY properties
>
>  arch/arm/boot/dts/stih410-b2260.dts | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
>

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

end of thread, other threads:[~2020-01-08 10:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 12:38 [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node patrice.chotard
2020-01-07 12:38 ` [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy " patrice.chotard
2020-01-07 12:38 ` [PATCH 2/2] ARM: dts: stih410-b2260: Remove deprecated snps PHY properties patrice.chotard
2020-01-08 10:53 ` [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node Patrice CHOTARD

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