* [PATCH net 0/3] net: fsl/fman: address erratum A011043
@ 2020-01-22 13:20 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 1/3] dt-bindings: net: add fsl,erratum-a011043 Madalin Bucur
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-01-22 13:20 UTC (permalink / raw)
To: davem, netdev; +Cc: robh+dt, mark.rutland, devicetree, Madalin Bucur
This addresses a HW erratum on some QorIQ DPAA devices.
MDIO reads to internal PCS registers may result in having
the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no
error and read data (MDIO_DATA[MDIO_DATA]) is correct.
Software may get false read error when reading internal
PCS registers through MDIO. As a workaround, all internal
MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
When the issue was present, one could see such errors
during boot:
mdio_bus ffe4e5000: Error while reading PHY0 reg at 3.3
Madalin Bucur (3):
dt-bindings: net: add fsl,erratum-a011043
powerpc/fsl/dts: add fsl,erratum-a011043
net/fsl: treat fsl,erratum-a011043
Documentation/devicetree/bindings/net/fsl-fman.txt | 13 +++++++++++++
.../boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 1 +
.../boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 1 +
drivers/net/ethernet/freescale/xgmac_mdio.c | 7 ++++++-
20 files changed, 37 insertions(+), 1 deletion(-)
--
2.1.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net 1/3] dt-bindings: net: add fsl,erratum-a011043
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
@ 2020-01-22 13:20 ` Madalin Bucur
2020-01-22 13:20 ` [PATCH net 2/3] powerpc/fsl/dts: " Madalin Bucur
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-01-22 13:20 UTC (permalink / raw)
To: davem, netdev; +Cc: robh+dt, mark.rutland, devicetree, Madalin Bucur
Add an entry for erratum A011043: the MDIO_CFG[MDIO_RD_ER]
bit may be falsely set when reading internal PCS registers.
MDIO reads to internal PCS registers may result in having
the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no
error and read data (MDIO_DATA[MDIO_DATA]) is correct.
Software may get false read error when reading internal
PCS registers through MDIO. As a workaround, all internal
MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
Documentation/devicetree/bindings/net/fsl-fman.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/fsl-fman.txt b/Documentation/devicetree/bindings/net/fsl-fman.txt
index 299c0dcd67db..250f8d8cdce4 100644
--- a/Documentation/devicetree/bindings/net/fsl-fman.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fman.txt
@@ -403,6 +403,19 @@ PROPERTIES
The settings and programming routines for internal/external
MDIO are different. Must be included for internal MDIO.
+- fsl,erratum-a011043
+ Usage: optional
+ Value type: <boolean>
+ Definition: Indicates the presence of the A011043 erratum
+ describing that the MDIO_CFG[MDIO_RD_ER] bit may be falsely
+ set when reading internal PCS registers. MDIO reads to
+ internal PCS registers may result in having the
+ MDIO_CFG[MDIO_RD_ER] bit set, even when there is no error and
+ read data (MDIO_DATA[MDIO_DATA]) is correct.
+ Software may get false read error when reading internal
+ PCS registers through MDIO. As a workaround, all internal
+ MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
+
For internal PHY device on internal mdio bus, a PHY node should be created.
See the definition of the PHY node in booting-without-of.txt for an
example of how to define a PHY (Internal PHY has no interrupt line).
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 2/3] powerpc/fsl/dts: add fsl,erratum-a011043
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 1/3] dt-bindings: net: add fsl,erratum-a011043 Madalin Bucur
@ 2020-01-22 13:20 ` Madalin Bucur
2020-01-22 13:20 ` [PATCH net 3/3] net/fsl: treat fsl,erratum-a011043 Madalin Bucur
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-01-22 13:20 UTC (permalink / raw)
To: davem, netdev; +Cc: robh+dt, mark.rutland, devicetree, Madalin Bucur
Add fsl,erratum-a011043 to internal MDIO buses.
Software may get false read error when reading internal
PCS registers through MDIO. As a workaround, all internal
MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 1 +
arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 1 +
18 files changed, 18 insertions(+)
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
index e1a961f05dcd..baa0c503e741 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
@@ -63,6 +63,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe1000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy0: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
index c288f3c6c637..93095600e808 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
@@ -60,6 +60,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xf1000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy6: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
index 94f3e7175012..ff4bd38f0645 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
@@ -63,6 +63,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe3000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy1: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
index 94a76982d214..1fa38ed6f59e 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
@@ -60,6 +60,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xf3000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy7: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
index b5ff5f71c6b8..a8cc9780c0c4 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe1000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy0: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
index ee44182c6348..8b8bd70c9382 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe3000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy1: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
index f05f0d775039..619c880b54d8 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe5000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy2: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
index a9114ec51075..d7ebb73a400d 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe7000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy3: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
index 44dd00ac7367..b151d696a069 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe9000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy4: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
index 5b1b84b58602..adc0ae0013a3 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
@@ -59,6 +59,7 @@ fman@400000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xeb000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy5: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
index 0e1daaef9e74..435047e0e250 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
@@ -60,6 +60,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xf1000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy14: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
index 68c5ef779266..c098657cca0a 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
@@ -60,6 +60,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xf3000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy15: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
index 605363cc1117..9d06824815f3 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe1000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy8: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
index 1955dfa13634..70e947730c4b 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe3000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy9: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
index 2c1476454ee0..ad96e6529595 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe5000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy10: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
index b8b541ff5fb0..034bc4b71f7a 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe7000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy11: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
index 4b2cfddd1b15..93ca23d82b39 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xe9000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy12: ethernet-phy@0 {
reg = <0x0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
index 0a52ddf7cc17..23b3117a2fd2 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
@@ -59,6 +59,7 @@ fman@500000 {
#size-cells = <0>;
compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
reg = <0xeb000 0x1000>;
+ fsl,erratum-a011043; /* must ignore read errors */
pcsphy13: ethernet-phy@0 {
reg = <0x0>;
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net 3/3] net/fsl: treat fsl,erratum-a011043
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 1/3] dt-bindings: net: add fsl,erratum-a011043 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 2/3] powerpc/fsl/dts: " Madalin Bucur
@ 2020-01-22 13:20 ` Madalin Bucur
2020-01-23 20:17 ` [PATCH net 0/3] net: fsl/fman: address erratum A011043 David Miller
2020-01-23 21:09 ` Florian Fainelli
4 siblings, 0 replies; 6+ messages in thread
From: Madalin Bucur @ 2020-01-22 13:20 UTC (permalink / raw)
To: davem, netdev; +Cc: robh+dt, mark.rutland, devicetree, Madalin Bucur
When fsl,erratum-a011043 is set, adjust for erratum A011043:
MDIO reads to internal PCS registers may result in having
the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no
error and read data (MDIO_DATA[MDIO_DATA]) is correct.
Software may get false read error when reading internal
PCS registers through MDIO. As a workaround, all internal
MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index e03b30c60dcf..c82c85ef5fb3 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -49,6 +49,7 @@ struct tgec_mdio_controller {
struct mdio_fsl_priv {
struct tgec_mdio_controller __iomem *mdio_base;
bool is_little_endian;
+ bool has_a011043;
};
static u32 xgmac_read32(void __iomem *regs,
@@ -226,7 +227,8 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
return ret;
/* Return all Fs if nothing was there */
- if (xgmac_read32(®s->mdio_stat, endian) & MDIO_STAT_RD_ER) {
+ if ((xgmac_read32(®s->mdio_stat, endian) & MDIO_STAT_RD_ER) &&
+ !priv->has_a011043) {
dev_err(&bus->dev,
"Error while reading PHY%d reg at %d.%hhu\n",
phy_id, dev_addr, regnum);
@@ -274,6 +276,9 @@ static int xgmac_mdio_probe(struct platform_device *pdev)
priv->is_little_endian = of_property_read_bool(pdev->dev.of_node,
"little-endian");
+ priv->has_a011043 = of_property_read_bool(pdev->dev.of_node,
+ "fsl,erratum-a011043");
+
ret = of_mdiobus_register(bus, np);
if (ret) {
dev_err(&pdev->dev, "cannot register MDIO bus\n");
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net 0/3] net: fsl/fman: address erratum A011043
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
` (2 preceding siblings ...)
2020-01-22 13:20 ` [PATCH net 3/3] net/fsl: treat fsl,erratum-a011043 Madalin Bucur
@ 2020-01-23 20:17 ` David Miller
2020-01-23 21:09 ` Florian Fainelli
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-01-23 20:17 UTC (permalink / raw)
To: madalin.bucur; +Cc: netdev, robh+dt, mark.rutland, devicetree
From: Madalin Bucur <madalin.bucur@oss.nxp.com>
Date: Wed, 22 Jan 2020 15:20:26 +0200
> This addresses a HW erratum on some QorIQ DPAA devices.
>
> MDIO reads to internal PCS registers may result in having
> the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no
> error and read data (MDIO_DATA[MDIO_DATA]) is correct.
> Software may get false read error when reading internal
> PCS registers through MDIO. As a workaround, all internal
> MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
> When the issue was present, one could see such errors
> during boot:
>
> mdio_bus ffe4e5000: Error while reading PHY0 reg at 3.3
Series applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net 0/3] net: fsl/fman: address erratum A011043
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
` (3 preceding siblings ...)
2020-01-23 20:17 ` [PATCH net 0/3] net: fsl/fman: address erratum A011043 David Miller
@ 2020-01-23 21:09 ` Florian Fainelli
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2020-01-23 21:09 UTC (permalink / raw)
To: madalin.bucur, davem, netdev; +Cc: robh+dt, mark.rutland, devicetree
On 1/22/20 5:20 AM, Madalin Bucur wrote:
> This addresses a HW erratum on some QorIQ DPAA devices.
>
> MDIO reads to internal PCS registers may result in having
> the MDIO_CFG[MDIO_RD_ER] bit set, even when there is no
> error and read data (MDIO_DATA[MDIO_DATA]) is correct.
> Software may get false read error when reading internal
> PCS registers through MDIO. As a workaround, all internal
> MDIO accesses should ignore the MDIO_CFG[MDIO_RD_ER] bit.
> When the issue was present, one could see such errors
> during boot:
>
> mdio_bus ffe4e5000: Error while reading PHY0 reg at 3.3
Did you consider using the standard broken-turn-around property/support
and set your mii_bus::phy_ignore_ta_mask to all relevant bits?
>
> Madalin Bucur (3):
> dt-bindings: net: add fsl,erratum-a011043
> powerpc/fsl/dts: add fsl,erratum-a011043
> net/fsl: treat fsl,erratum-a011043
>
> Documentation/devicetree/bindings/net/fsl-fman.txt | 13 +++++++++++++
> .../boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi | 1 +
> .../boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi | 1 +
> arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi | 1 +
> drivers/net/ethernet/freescale/xgmac_mdio.c | 7 ++++++-
> 20 files changed, 37 insertions(+), 1 deletion(-)
>
--
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-23 21:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 13:20 [PATCH net 0/3] net: fsl/fman: address erratum A011043 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 1/3] dt-bindings: net: add fsl,erratum-a011043 Madalin Bucur
2020-01-22 13:20 ` [PATCH net 2/3] powerpc/fsl/dts: " Madalin Bucur
2020-01-22 13:20 ` [PATCH net 3/3] net/fsl: treat fsl,erratum-a011043 Madalin Bucur
2020-01-23 20:17 ` [PATCH net 0/3] net: fsl/fman: address erratum A011043 David Miller
2020-01-23 21:09 ` Florian Fainelli
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).