Skip to contentSkip to conversation

Amlogic Soc - Add missing ethernet mdio compatible string

PATCH In review Anand Moon 4 participants 17 messages Mar 25, 2021

Subsystems (5)
lore
Share & tools
lore

Anand Moon

author
#0 lore raw

cover Amlogic Soc - Add missing ethernet mdio compatible string

On most of the Amlogic SoC I observed that Ethernet would not get initialize when try to deploy the mainline kernel, earlier I tried to fix this issue with by setting ethernet reset but it did not resolve the issue see below.

	resets = <&reset RESET_ETHERNET>;
	reset-names = "stmmaceth";

After checking what was the missing with Rockchip SoC dts I tried to add this missing compatible string and then it started to working on my setup.

Also I tried to fix the device tree binding to validate the changes.

Tested this on my Odroid-N2 and Odroid-C2 (64 bit) setup. I do not have ready Odroid C1 (32 bit) setup so please somebody test.

Best Regards
-Anand

Anand Moon (6):
dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy
compatible string
arm: dts: meson: Add missing ethernet phy mdio compatible string
arm64: dts: meson-gxbb: Add missing ethernet phy mimo compatible
string
arm64: dts: meson-gxl: Add missing ethernet phy mdio compatible string
arm64: dts: meson-g12: Add missing ethernet phy mdio compatible string
arm64: dts: meson-glx: Fix the ethernet phy mdio compatible string

 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 arch/arm/boot/dts/meson8b-ec100.dts                     | 1 +
 arch/arm/boot/dts/meson8b-mxq.dts                       | 1 +
 arch/arm/boot/dts/meson8b-odroidc1.dts                  | 1 +
 arch/arm/boot/dts/meson8m2-mxiii-plus.dts               | 1 +
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts          | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi   | 3 ++-
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi        | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi  | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts  | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi       | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi              | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts          | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi      | 1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi       | 1 +
 26 files changed, 29 insertions(+), 5 deletions(-)
Signature · 7 lines
2.31.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author
#1 lore raw

PATCH 1/6 dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

As per the of_mdio below 2 are valid compatible string

	"ethernet-phy-ieee802.3-c22"
	"ethernet-phy-ieee802.3-c45"
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/ethernet-phy.yaml +3 -3
index 2766fe45bb98..cfc7909d3e56 100644
@@ -33,7 +33,7 @@ properties:
         description: PHYs that implement IEEE802.3 clause 22
       - const: ethernet-phy-ieee802.3-c45
         description: PHYs that implement IEEE802.3 clause 45
-      - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+      - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"
         description:
           If the PHY reports an incorrect ID (or none at all) then the
           compatible list may contain an entry with the correct PHY ID
@@ -44,10 +44,10 @@ properties:
           this is the chip vendor OUI bits 19:24, followed by 10
           bits of a vendor specific ID.
       - items:
-          - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+          - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"
           - const: ethernet-phy-ieee802.3-c22
       - items:
-          - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+          - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"
           - const: ethernet-phy-ieee802.3-c45
 
   reg:
Signature · 7 lines
2.31.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#2 lore raw

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

Quoted 6 lines · Anand Moon

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

As per the of_mdio below 2 are valid compatible string

	"ethernet-phy-ieee802.3-c22"
	"ethernet-phy-ieee802.3-c45"

Nope, this is not the full story. Yes, you can have these compatible strings. But you can also use the PHY ID,
e.g. ethernet-phy-idAAAA.BBBB, where AAAA and BBBB are what you find in registers 2 and 3 of the PHY.

Quoted 11 lines
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/ethernet-phy.yaml +0 -0
index 2766fe45bb98..cfc7909d3e56 100644

Documentation/devicetree/bindings/net/ethernet-phy.yaml properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/net/ethernet-phy.yaml +1 -1
@@ -33,7 +33,7 @@ properties:
         description: PHYs that implement IEEE802.3 clause 22
       - const: ethernet-phy-ieee802.3-c45
         description: PHYs that implement IEEE802.3 clause 45
-      - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+      - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"

So here you need, in addition to, not instead of.

Please test you change on for example imx6ul-14x14-evk.dtsi

Andrew

author
#3 lore raw

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

Hi Andrew,

Quoted 5 lines · Andrew Lunn
Quoted 3 lines · Anand Moon

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

Quoted 9 lines
Quoted 3 lines

As per the of_mdio below 2 are valid compatible string

      "ethernet-phy-ieee802.3-c22"
      "ethernet-phy-ieee802.3-c45"

Nope, this is not the full story. Yes, you can have these compatible strings. But you can also use the PHY ID,
e.g. ethernet-phy-idAAAA.BBBB, where AAAA and BBBB are what you find in registers 2 and 3 of the PHY.

Oops I did not read the drivers/net/mdio/of_mdio.c completely. Thanks for letting me know so in the next series,
I will try to add the below compatible string as per the description in the dts.

               compatible = "ethernet-phy-id001c.c916",
                            "ethernet-phy-ieee802.3-c22";
Quoted 19 lines
Quoted 11 lines
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/ethernet-phy.yaml +0 -0
index 2766fe45bb98..cfc7909d3e56 100644

Documentation/devicetree/bindings/net/ethernet-phy.yaml properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/net/ethernet-phy.yaml +1 -1
@@ -33,7 +33,7 @@ properties:
         description: PHYs that implement IEEE802.3 clause 22
       - const: ethernet-phy-ieee802.3-c45
         description: PHYs that implement IEEE802.3 clause 45
-      - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+      - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"

So here you need, in addition to, not instead of.

Quoted 2 lines

Please test you change on for example imx6ul-14x14-evk.dtsi

Yes I have gone through the test case.

Quoted 1 line

Andrew

- Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#4 lore raw

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

Quoted 18 lines · Anand Moon

Hi Andrew,

Quoted 5 lines · Andrew Lunn
Quoted 3 lines · Anand Moon

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

Quoted 9 lines
Quoted 3 lines

As per the of_mdio below 2 are valid compatible string

      "ethernet-phy-ieee802.3-c22"
      "ethernet-phy-ieee802.3-c45"

Nope, this is not the full story. Yes, you can have these compatible strings. But you can also use the PHY ID,
e.g. ethernet-phy-idAAAA.BBBB, where AAAA and BBBB are what you find in registers 2 and 3 of the PHY.

Quoted 3 lines

Oops I did not read the drivers/net/mdio/of_mdio.c completely. Thanks for letting me know so in the next series,
I will try to add the below compatible string as per the description in the dts.

That's not needed, typically the PHY ID is auto-detected. Before sending a new series, please describe in detail what your problem is. Simply there shouldn't be a need for such a series. As I said: e.g. Odroid-C2 worked fine for me with a mainline kernel.

Quoted 23 lines
               compatible = "ethernet-phy-id001c.c916",
                            "ethernet-phy-ieee802.3-c22";
Quoted 19 lines
Quoted 11 lines
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/net/ethernet-phy.yaml +0 -0
index 2766fe45bb98..cfc7909d3e56 100644

Documentation/devicetree/bindings/net/ethernet-phy.yaml properties: · line 36

Quoted 5 lines
Documentation/devicetree/bindings/net/ethernet-phy.yaml +1 -1
@@ -33,7 +33,7 @@ properties:
         description: PHYs that implement IEEE802.3 clause 22
       - const: ethernet-phy-ieee802.3-c45
         description: PHYs that implement IEEE802.3 clause 45
-      - pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
+      - pattern: "^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$"

So here you need, in addition to, not instead of.

Quoted 9 lines
Quoted 2 lines

Please test you change on for example imx6ul-14x14-evk.dtsi

Yes I have gone through the test case.

Quoted 1 line

Andrew

- Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#5 lore raw

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

In reply to Anand Moon
Quoted 4 lines · Anand Moon

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

As per the of_mdio below 2 are valid compatible string

Quoted 9 lines
	"ethernet-phy-ieee802.3-c22"
	"ethernet-phy-ieee802.3-c45"
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/ethernet-phy.example.dt.yaml: ethernet-phy@0: compatible: 'oneOf' conditional failed, one must be fixed:

	['ethernet-phy-id0141.0e90', 'ethernet-phy-ieee802.3-c45'] is too long
	Additional items are not allowed ('ethernet-phy-ieee802.3-c45' was unexpected)
	'ethernet-phy-ieee802.3-c22' was expected
	'ethernet-phy-ieee802.3-c45' was expected
	'ethernet-phy-id0141.0e90' does not match '^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/ethernet-phy.yaml

See https://patchwork.ozlabs.org/patch/1458341

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author
#6 lore raw

Re: [PATCHv1 1/6] dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy compatible string

Hi Rob

Quoted 34 lines · Rob Herring
Quoted 4 lines · Anand Moon

Fix the parsing of check of pattern ethernet-phy-ieee802.3 used by the device tree to initialize the mdio phy.

As per the of_mdio below 2 are valid compatible string

Quoted 9 lines
      "ethernet-phy-ieee802.3-c22"
      "ethernet-phy-ieee802.3-c45"
---
 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/ethernet-phy.example.dt.yaml: ethernet-phy@0: compatible: 'oneOf' conditional failed, one must be fixed:

        ['ethernet-phy-id0141.0e90', 'ethernet-phy-ieee802.3-c45'] is too long
        Additional items are not allowed ('ethernet-phy-ieee802.3-c45' was unexpected)
        'ethernet-phy-ieee802.3-c22' was expected
        'ethernet-phy-ieee802.3-c45' was expected
        'ethernet-phy-id0141.0e90' does not match '^ethernet-phy-ieee[0-9]{3}\\.[0-9][-][a-f0-9]{4}$'
        From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/net/ethernet-phy.yaml

See https://patchwork.ozlabs.org/patch/1458341

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

Quoted 8 lines

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

Now I have a better understanding on device tree shema in Documentation/devicetree/bindings/net/ethernet-phy.yaml changes it meant to parse *ethernet-phy-id0181.4400* for example and not ethernet-phy-ieee802.3-c22 and ethernet-phy-ieee802.3-c45.

So please dicard these changes.

-Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author
#7 lore raw

PATCH 2/6 arm: dts: meson: Add missing ethernet phy mdio compatible string

In reply to Anand Moon

Add missing ethernet phy mdio comatible string to help initiate the phy on Amlogic SoC SBC.

Cc Neil Armstrong <[email protected]>
Cc Martin Blumenstingl <[email protected]>
---
 arch/arm/boot/dts/meson8b-ec100.dts       | 1 +
 arch/arm/boot/dts/meson8b-mxq.dts         | 1 +
 arch/arm/boot/dts/meson8b-odroidc1.dts    | 1 +
 arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 1 +
 4 files changed, 4 insertions(+)
arch/arm/boot/dts/meson8b-ec100.dts +1 -0
index 8e48ccc6b634..09ce822308de 100644
@@ -262,6 +262,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* IC Plus IP101A/G (0x02430c54) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm/boot/dts/meson8b-mxq.dts +1 -0
index f3937d55472d..c1638f3c9edf 100644
@@ -109,6 +109,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* IC Plus IP101A/G (0x02430c54) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm/boot/dts/meson8b-odroidc1.dts +1 -0
index c440ef94e082..ca439302c74d 100644
@@ -216,6 +216,7 @@ mdio {
 
 		/* Realtek RTL8211F (0x001cc916) */
 		eth_phy: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm/boot/dts/meson8m2-mxiii-plus.dts +1 -0
index fa6d55f1cfb9..6c9b22605264 100644
@@ -73,6 +73,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
Signature · 7 lines
2.31.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
maintainer
#8 lore raw

Re: [PATCHv1 2/6] arm: dts: meson: Add missing ethernet phy mdio compatible string

Quoted 2 lines · Anand Moon

Add missing ethernet phy mdio comatible string to help initiate the phy on Amlogic SoC SBC.

"ethernet-phy-ieee802.3-c22" is the default. So this is not wrong, but it should not be required.

Andrew

author
#9 lore raw

PATCH 3/6 arm64: dts: meson-gxbb: Add missing ethernet phy mimo compatible string

In reply to Anand Moon

Add missing ethernet phy mdio comatible string to help initialize the phy on Amlogic SoC SBC.

Cc Neil Armstrong <[email protected]>
Cc Martin Blumenstingl <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts        | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi      | 1 +
 7 files changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts +1 -0
index e8394a8269ee..f3b0947b8586 100644
@@ -69,6 +69,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* IC Plus IP101GR (0x02430c54) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 			reset-assert-us = <10000>;
 			reset-deassert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +1 -0
index 7273eed5292c..a4c09f1af24a 100644
@@ -202,6 +202,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +1 -0
index f887bfb445fd..abbc5571efde 100644
@@ -209,6 +209,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* IC Plus IP101GR (0x02430c54) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -0
index bfaf7f41a2d6..4287d83d6f2a 100644
@@ -237,6 +237,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts +1 -0
index 3c93d1898b40..f7a1ffe453bc 100644
@@ -75,6 +75,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@3 {
 			/* Micrel KSZ9031 (0x00221620) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <3>;
 
 			reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +1 -0
index 9b0b81f191f1..0cf4bde81c6f 100644
@@ -123,6 +123,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +1 -0
index a350fee1264d..e652f112bc45 100644
@@ -144,6 +144,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 
 			reset-assert-us = <10000>;
Signature · 7 lines
2.31.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author
#10 lore raw

PATCH 4/6 arm64: dts: meson-gxl: Add missing ethernet phy mdio compatible string

In reply to Anand Moon

Add missing ethernet phy mdio comatible string to help initialize the phy on Amlogic SoC SBC.

Cc Neil Armstrong <[email protected]>
Cc Martin Blumenstingl <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts  | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts     | 1 +
 8 files changed, 8 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +1 -0
index 359589d1dfa9..d7cfcde40fc6 100644
@@ -374,6 +374,7 @@ mdio {
 
 		eth_phy0: ethernet-phy@0 {
 			/* Realtek RTL8211F (0x001cc916) */
+			compatible = "ethernet-phy-ieee802.3-c22";
 			reg = <0>;
 			interrupt-parent = <&gpio_intc>;
 			interrupts = <98 IRQ_TYPE_LEVEL_LOW>;
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi +1 -0
index 2d7032f41e4b..5bafb45f6c46 100644
@@ -272,6 +272,7 @@ &ethmac {
 
 &external_mdio {
 	external_phy: ethernet-phy@0 {
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 		reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts +1 -0
index b2ab05c22090..c0c2505081a5 100644
@@ -77,6 +77,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -0
index 18a4b7a6c5df..7cb834dcc91b 100644
@@ -229,6 +229,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 
 		reset-assert-us = <10000>;
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +1 -0
index dfa7a37a1281..abaf58b7b765 100644
@@ -108,6 +108,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts +1 -0
index 8edbfe040805..1342ca285d44 100644
@@ -59,6 +59,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +1 -0
index dde7cfe12cff..c96fc23fd8f1 100644
@@ -110,6 +110,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts +1 -0
index d3fdba4da9a6..a99a760f253b 100644
@@ -32,6 +32,7 @@ &ethmac {
 &external_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 	};
 };
Signature · 1 line
2.31.0
author
#11 lore raw

PATCH 5/6 arm64: dts: meson-g12: Add missing ethernet phy mdio compatible string

In reply to Anand Moon

Add missing ethernet phy mdio comatible string to help initialize the phy on Amlogic SoC sbc.

Cc Neil Armstrong <[email protected]>
Cc Martin Blumenstingl <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 3 ++-
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi      | 1 +
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi    | 1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi     | 1 +
 5 files changed, 6 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +1 -0
index 579f3d02d613..32c99035a18f 100644
@@ -335,6 +335,7 @@ &pwm_AO_cd {
 &ext_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 		eee-broken-1000t;
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +2 -1
index 58ce569b2ace..12f70b38ce67 100644
@@ -410,7 +410,8 @@ &cpu103 {
 
 &ext_mdio {
 	external_phy: ethernet-phy@0 {
-		/* Realtek RTL8211F (0x001cc916) */	
+		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi +1 -0
index feb088504740..cfb89f5e6eef 100644
@@ -260,6 +260,7 @@ cvbs_vdac_out: endpoint {
 &ext_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi +1 -0
index 877e3b989203..4d4a5d467bc7 100644
@@ -273,6 +273,7 @@ map {
 &ext_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +1 -0
index d14716b3d0f1..5bdbf0d09bc0 100644
@@ -253,6 +253,7 @@ &cpu3 {
 &ext_mdio {
 	external_phy: ethernet-phy@0 {
 		/* Realtek RTL8211F (0x001cc916) */
+		compatible = "ethernet-phy-ieee802.3-c22";
 		reg = <0>;
 		max-speed = <1000>;
 
Signature · 7 lines
2.31.0


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
author
#12 lore raw

PATCH 6/6 arm64: dts: meson-glx: Fix the ethernet phy mdio compatible string

In reply to Anand Moon

Fix the ethernet phy mdio comatible string to help initialize the phy on Amlogic SoC sbc.

make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/ethernet-phy.yaml

Cc Neil Armstrong <[email protected]>
Cc Martin Blumenstingl <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +1 -1
index c3ac531c4f84..303f54384a9a 100644
@@ -773,7 +773,7 @@ internal_mdio: mdio@e40908ff {
 			#size-cells = <0>;
 
 			internal_phy: ethernet-phy@8 {
-				compatible = "ethernet-phy-id0181.4400";
+				compatible = "ethernet-phy-ieee802.3-c22";
 				interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
 				reg = <8>;
 				max-speed = <100>;
Signature · 1 line
2.31.0
maintainer
#13 lore raw
In reply to Anand Moon
Quoted 10 lines · Anand Moon

On most of the Amlogic SoC I observed that Ethernet would not get initialize when try to deploy the mainline kernel, earlier I tried to fix this issue with by setting ethernet reset but it did not resolve the issue see below.

	resets = <&reset RESET_ETHERNET>;
	reset-names = "stmmaceth";

After checking what was the missing with Rockchip SoC dts I tried to add this missing compatible string and then it started to working on my setup.

Adding

compatible = "ethernet-phy-ieee802.3-c22"

should not fix anything, since that is the default. We need to better understand what is going on here.

Andrew

maintainer
#14 lore raw
In reply to Anand Moon
Quoted 7 lines · Anand Moon

On most of the Amlogic SoC I observed that Ethernet would not get initialize when try to deploy the mainline kernel, earlier I tried to fix this issue with by setting ethernet reset but it did not resolve the issue see below.

	resets = <&reset RESET_ETHERNET>;
	reset-names = "stmmaceth";
Quoted 9 lines

After checking what was the missing with Rockchip SoC dts I tried to add this missing compatible string and then it started to working on my setup.

Also I tried to fix the device tree binding to validate the changes.

Tested this on my Odroid-N2 and Odroid-C2 (64 bit) setup. I do not have ready Odroid C1 (32 bit) setup so please somebody test.

When working on the Odroid-C2 I did not have such a problem. And if you look at of_mdiobus_child_is_phy() and of_mdiobus_register_phy() you'll see that your change shouldn't be needed.

Could you please elaborate on:
- What is the exact problem you're facing? Best add a dmesg log.
- Which kernel version are you using?

Quoted 32 lines

Best Regards
-Anand

Anand Moon (6):
dt-bindings: net: ethernet-phy: Fix the parsing of ethernet-phy
compatible string
arm: dts: meson: Add missing ethernet phy mdio compatible string
arm64: dts: meson-gxbb: Add missing ethernet phy mimo compatible
string
arm64: dts: meson-gxl: Add missing ethernet phy mdio compatible string
arm64: dts: meson-g12: Add missing ethernet phy mdio compatible string
arm64: dts: meson-glx: Fix the ethernet phy mdio compatible string

 Documentation/devicetree/bindings/net/ethernet-phy.yaml | 6 +++---
 arch/arm/boot/dts/meson8b-ec100.dts                     | 1 +
 arch/arm/boot/dts/meson8b-mxq.dts                       | 1 +
 arch/arm/boot/dts/meson8b-odroidc1.dts                  | 1 +
 arch/arm/boot/dts/meson8m2-mxiii-plus.dts               | 1 +
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts          | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi   | 3 ++-
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi        | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi  | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-kii-pro.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts  | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts         | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi       | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi              | 2 +-
Quoted 9 lines
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts          | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi      | 1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi       | 1 +
 26 files changed, 29 insertions(+), 5 deletions(-)

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

author
#15 lore raw

Hi Heiner

Quoted 15 lines · Heiner Kallweit
Quoted 13 lines · Anand Moon

On most of the Amlogic SoC I observed that Ethernet would not get initialize when try to deploy the mainline kernel, earlier I tried to fix this issue with by setting ethernet reset but it did not resolve the issue see below.

      resets = <&reset RESET_ETHERNET>;
      reset-names = "stmmaceth";

After checking what was the missing with Rockchip SoC dts I tried to add this missing compatible string and then it started to working on my setup.

Also I tried to fix the device tree binding to validate the changes.

Quoted 8 lines
Quoted 3 lines

Tested this on my Odroid-N2 and Odroid-C2 (64 bit) setup. I do not have ready Odroid C1 (32 bit) setup so please somebody test.

When working on the Odroid-C2 I did not have such a problem. And if you look at of_mdiobus_child_is_phy() and of_mdiobus_register_phy() you'll see that your change shouldn't be needed.

I will check this out, thanks for your inputs.

Quoted 3 lines

Could you please elaborate on:
- What is the exact problem you're facing? Best add a dmesg log.

1> I am aware all the distro kernel I have tested ethernet will work file 2> My issue is when I compile the mainline kernel with the default setting,
Ethernet interface will not receive any DHCP IP address from the router Although the Ethernet interface comes up properly.
This does not happen frequently but I observed this at my end.
3> I tried to collect logs but I did not observe any kernel issue
like panic or warning.

Quoted 1 line

- Which kernel version are you using?

I am using the mainline kernel with default settings.

-Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

maintainer
#16 lore raw
Quoted 29 lines · Anand Moon

Hi Heiner

Quoted 15 lines · Heiner Kallweit
Quoted 13 lines · Anand Moon

On most of the Amlogic SoC I observed that Ethernet would not get initialize when try to deploy the mainline kernel, earlier I tried to fix this issue with by setting ethernet reset but it did not resolve the issue see below.

      resets = <&reset RESET_ETHERNET>;
      reset-names = "stmmaceth";

After checking what was the missing with Rockchip SoC dts I tried to add this missing compatible string and then it started to working on my setup.

Also I tried to fix the device tree binding to validate the changes.

Quoted 8 lines
Quoted 3 lines

Tested this on my Odroid-N2 and Odroid-C2 (64 bit) setup. I do not have ready Odroid C1 (32 bit) setup so please somebody test.

When working on the Odroid-C2 I did not have such a problem. And if you look at of_mdiobus_child_is_phy() and of_mdiobus_register_phy() you'll see that your change shouldn't be needed.

I will check this out, thanks for your inputs.

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

Could you please elaborate on:
- What is the exact problem you're facing? Best add a dmesg log.

1> I am aware all the distro kernel I have tested ethernet will work file 2> My issue is when I compile the mainline kernel with the default setting,
Ethernet interface will not receive any DHCP IP address from the router Although the Ethernet interface comes up properly.
This does not happen frequently but I observed this at my end.

If the PHY wouldn't be detected, then your network would never work. So there must be a different reason. You can manually assign a static IP and then check what's going wrong: checking for missed / error packets, running iperf, etc.

Quoted 8 lines

3> I tried to collect logs but I did not observe any kernel issue
like panic or warning.

Quoted 1 line

- Which kernel version are you using?

I am using the mainline kernel with default settings.

-Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic