2020-01-07 12:40:04

by Patrice CHOTARD

[permalink] [raw]
Subject: [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node

From: Patrice Chotard <[email protected]>

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


2020-01-07 12:41:05

by Patrice CHOTARD

[permalink] [raw]
Subject: [PATCH 1/2] ARM: dts: stih410-b2260: Fix ethernet phy DT node

From: Patrice Chotard <[email protected]>

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 <[email protected]>
---
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

2020-01-07 12:41:22

by Patrice CHOTARD

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: stih410-b2260: Remove deprecated snps PHY properties

From: Patrice Chotard <[email protected]>

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

Signed-off-by: Patrice Chotard <[email protected]>
---
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

2020-01-08 11:21:21

by Patrice CHOTARD

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM: dts: stih410-b2260: Fix ethernet PHY DT node

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, [email protected] wrote:
> From: Patrice Chotard <[email protected]>
>
> 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(-)
>