Skip to contentSkip to conversation

arm64: dts: meson: g12a: add network support

PATCH In review Jerome Brunet 3 participants 17 messages May 10, 2019 – May 15, 2019

Subsystems (2)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

cover arm64: dts: meson: g12a: add network support

Add network support for the g12a

Jerome Brunet (5):
arm64: dts: meson: g12a: add ethernet mac controller
arm64: dts: meson: g12a: add ethernet pinctrl definitions
arm64: dts: meson: g12a: add mdio multiplexer
arm64: dts: meson: u200: add internal network
arm64: dts: meson: sei510: add network support

 .../boot/dts/amlogic/meson-g12a-sei510.dts    |  7 ++
 .../boot/dts/amlogic/meson-g12a-u200.dts      |  7 ++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 90 +++++++++++++++++++
 3 files changed, 104 insertions(+)
Signature · 1 line
2.20.1
author reviewer
#1 lore raw

PATCH 1/5 arm64: dts: meson: g12a: add ethernet mac controller

Add the synopsys ethernet mac controller embedded in the g12a SoC family.

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +21 -0
index 2f4f4dd54cba..a32db09809f7 100644
@@ -102,6 +102,27 @@
 		#size-cells = <2>;
 		ranges;
 
+		ethmac: ethernet@ff3f0000 {
+			compatible = "amlogic,meson-axg-dwmac",
+				     "snps,dwmac-3.70a",
+				     "snps,dwmac";
+			reg = <0x0 0xff3f0000 0x0 0x10000
+			       0x0 0xff634540 0x0 0x8>;
+			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "macirq";
+			clocks = <&clkc CLKID_ETH>,
+				 <&clkc CLKID_FCLK_DIV2>,
+				 <&clkc CLKID_MPLL2>;
+			clock-names = "stmmaceth", "clkin0", "clkin1";
+			status = "disabled";
+
+			mdio0: mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "snps,dwmac-mdio";
+			};
+		};
+
 		apb: bus@ff600000 {
 			compatible = "simple-bus";
 			reg = <0x0 0xff600000 0x0 0x200000>;
Signature · 1 line
2.20.1
author reviewer
#2 lore raw

PATCH 2/5 arm64: dts: meson: g12a: add ethernet pinctrl definitions

In reply to Jerome Brunet

Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +37 -0
index a32db09809f7..fe0f73730525 100644
@@ -206,6 +206,43 @@
 						};
 					};
 
+					eth_leds_pins: eth-leds {
+						mux {
+							groups = "eth_link_led",
+								 "eth_act_led";
+							function = "eth";
+							bias-disable;
+						};
+					};
+
+					eth_rmii_pins: eth-rmii {
+						mux {
+							groups = "eth_mdio",
+								 "eth_mdc",
+								 "eth_rgmii_rx_clk",
+								 "eth_rx_dv",
+								 "eth_rxd0",
+								 "eth_rxd1",
+								 "eth_txen",
+								 "eth_txd0",
+								 "eth_txd1";
+							function = "eth";
+							bias-disable;
+						};
+					};
+
+					eth_rgmii_pins: eth-rgmii {
+						mux {
+							groups = "eth_rxd2_rgmii",
+								 "eth_rxd3_rgmii",
+								 "eth_rgmii_tx_clk",
+								 "eth_txd2_rgmii",
+								 "eth_txd3_rgmii";
+							function = "eth";
+							bias-disable;
+						};
+					};
+
 					hdmitx_ddc_pins: hdmitx_ddc {
 						mux {
 							groups = "hdmitx_sda",
Signature · 1 line
2.20.1
#3 lore raw

Re: [PATCH 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions

Hi Jerome,

Quoted 42 lines · Jerome Brunet

Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +26 -0
index a32db09809f7..fe0f73730525 100644
@@ -206,6 +206,43 @@
                                                };
                                        };
 
+                                       eth_leds_pins: eth-leds {
+                                               mux {
+                                                       groups = "eth_link_led",
+                                                                "eth_act_led";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rmii_pins: eth-rmii {
+                                               mux {
+                                                       groups = "eth_mdio",
+                                                                "eth_mdc",
+                                                                "eth_rgmii_rx_clk",
+                                                                "eth_rx_dv",
+                                                                "eth_rxd0",
+                                                                "eth_rxd1",
+                                                                "eth_txen",
+                                                                "eth_txd0",
+                                                                "eth_txd1";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rgmii_pins: eth-rgmii {

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 244

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +10 -0
+                                               mux {
+                                                       groups = "eth_rxd2_rgmii",
+                                                                "eth_rxd3_rgmii",
+                                                                "eth_rgmii_tx_clk",
+                                                                "eth_txd2_rgmii",
+                                                                "eth_txd3_rgmii";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };

it seems that the group definition is incomplete (missing things like eth_mdc, eth_rx_dv, ...)

we could also mix the eth_rmii_pins and eth_rgmii_pins in a board.dts (maybe that was your idea in the first place?):
phy-mode = "rgmii";
pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>; pinctrl-names = "default";
however, in this case I would prefer if "eth_rmii_pins" was named only "eth_pins" (following mostly what Amlogic does with the pin group
naming: eth_* for pins that are valid in both, rmii and rgmii mode and eth*rgmii* for pins that are only valid in rgmii mode)

Regards
Martin

author reviewer
#4 lore raw

Re: [PATCH 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions

Quoted 57 lines · Martin Blumenstingl

Hi Jerome,

Quoted 41 lines · Jerome Brunet

Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +26 -0
index a32db09809f7..fe0f73730525 100644
@@ -206,6 +206,43 @@
                                                };
                                        };
 
+                                       eth_leds_pins: eth-leds {
+                                               mux {
+                                                       groups = "eth_link_led",
+                                                                "eth_act_led";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rmii_pins: eth-rmii {
+                                               mux {
+                                                       groups = "eth_mdio",
+                                                                "eth_mdc",
+                                                                "eth_rgmii_rx_clk",
+                                                                "eth_rx_dv",
+                                                                "eth_rxd0",
+                                                                "eth_rxd1",
+                                                                "eth_txen",
+                                                                "eth_txd0",
+                                                                "eth_txd1";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rgmii_pins: eth-rgmii {

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 244

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +10 -0
+                                               mux {
+                                                       groups = "eth_rxd2_rgmii",
+                                                                "eth_rxd3_rgmii",
+                                                                "eth_rgmii_tx_clk",
+                                                                "eth_txd2_rgmii",
+                                                                "eth_txd3_rgmii";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };

it seems that the group definition is incomplete (missing things like eth_mdc, eth_rx_dv, ...)

Quoted 2 lines

we could also mix the eth_rmii_pins and eth_rgmii_pins in a board.dts (maybe that was your idea in the first place?):

yes that's the idea

Quoted 7 lines

phy-mode = "rgmii";
pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>; pinctrl-names = "default";
however, in this case I would prefer if "eth_rmii_pins" was named only "eth_pins" (following mostly what Amlogic does with the pin group
naming: eth_* for pins that are valid in both, rmii and rgmii mode and eth*rgmii* for pins that are only valid in rgmii mode)

I can't say I share your preference. I let Kevin decide what he wants.

Quoted 4 lines

Regards
Martin

maintainer
#5 lore raw

Re: [PATCH 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions

Quoted 71 lines · Jerome Brunet
Quoted 57 lines · Martin Blumenstingl

Hi Jerome,

Quoted 41 lines · Jerome Brunet

Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +26 -0
index a32db09809f7..fe0f73730525 100644
@@ -206,6 +206,43 @@
                                                };
                                        };
 
+                                       eth_leds_pins: eth-leds {
+                                               mux {
+                                                       groups = "eth_link_led",
+                                                                "eth_act_led";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rmii_pins: eth-rmii {
+                                               mux {
+                                                       groups = "eth_mdio",
+                                                                "eth_mdc",
+                                                                "eth_rgmii_rx_clk",
+                                                                "eth_rx_dv",
+                                                                "eth_rxd0",
+                                                                "eth_rxd1",
+                                                                "eth_txen",
+                                                                "eth_txd0",
+                                                                "eth_txd1";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };
+
+                                       eth_rgmii_pins: eth-rgmii {

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 244

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +10 -0
+                                               mux {
+                                                       groups = "eth_rxd2_rgmii",
+                                                                "eth_rxd3_rgmii",
+                                                                "eth_rgmii_tx_clk",
+                                                                "eth_txd2_rgmii",
+                                                                "eth_txd3_rgmii";
+                                                       function = "eth";
+                                                       bias-disable;
+                                               };
+                                       };

it seems that the group definition is incomplete (missing things like eth_mdc, eth_rx_dv, ...)

Quoted 2 lines

we could also mix the eth_rmii_pins and eth_rgmii_pins in a board.dts (maybe that was your idea in the first place?):

yes that's the idea

Quoted 7 lines

phy-mode = "rgmii";
pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>; pinctrl-names = "default";
however, in this case I would prefer if "eth_rmii_pins" was named only "eth_pins" (following mostly what Amlogic does with the pin group
naming: eth_* for pins that are valid in both, rmii and rgmii mode and eth*rgmii* for pins that are only valid in rgmii mode)

Quoted 2 lines

I can't say I share your preference. I let Kevin decide what he wants.

It seems we've gone the eth_pins route for meson-gxl.dtsi, so I'd prefer to be consistent with that.

Kevin

author reviewer
#6 lore raw

PATCH 3/5 arm64: dts: meson: g12a: add mdio multiplexer

In reply to Jerome Brunet

Add the g12a mdio multiplexer which allows to connect to either an external phy through the SoC pins or the internal 10/100 phy

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +32 -0
index fe0f73730525..6e9587aafb5d 100644
@@ -460,6 +460,38 @@
 				assigned-clock-rates = <100000000>;
 				#phy-cells = <1>;
 			};
+
+			eth_phy: mdio-multiplexer@4c000 {
+				compatible = "amlogic,g12a-mdio-mux";
+				reg = <0x0 0x4c000 0x0 0xa4>;
+				clocks = <&clkc CLKID_ETH_PHY>,
+					 <&xtal>,
+					 <&clkc CLKID_MPLL_5OM>;
+				clock-names = "pclk", "clkin0", "clkin1";
+				mdio-parent-bus = <&mdio0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ext_mdio: mdio@0 {
+					reg = <0>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+				};
+
+				int_mdio: mdio@1 {
+					reg = <1>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					internal_ephy: ethernet_phy@8 {
+						compatible = "ethernet-phy-id0180.3301",
+							     "ethernet-phy-ieee802.3-c22";
+						interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+						reg = <8>;
+						max-speed = <100>;
+					};
+				};
+			};
 		};
 
 		aobus: bus@ff800000 {
Signature · 1 line
2.20.1
#7 lore raw

Re: [PATCH 3/5] arm64: dts: meson: g12a: add mdio multiplexer

Hi Jerome,

Quoted 14 lines · Jerome Brunet

Add the g12a mdio multiplexer which allows to connect to either an external phy through the SoC pins or the internal 10/100 phy

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index fe0f73730525..6e9587aafb5d 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 469

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +7 -0
@@ -460,6 +460,38 @@
                                assigned-clock-rates = <100000000>;
                                #phy-cells = <1>;
                        };
+
+                       eth_phy: mdio-multiplexer@4c000 {
+                               compatible = "amlogic,g12a-mdio-mux";
+                               reg = <0x0 0x4c000 0x0 0xa4>;
+                               clocks = <&clkc CLKID_ETH_PHY>,
+                                        <&xtal>,
+                                        <&clkc CLKID_MPLL_5OM>;

I haven't noticed that before but there's a typo in the MPLL_5OM clock definition:
the O (capital o) should be a 0 (zero).
can you fix this typo in an additional clock patch for v5.2 - then we don't have to do it in v5.3 where this .dtsi might already use it

Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +9 -0
+                               clock-names = "pclk", "clkin0", "clkin1";
+                               mdio-parent-bus = <&mdio0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ext_mdio: mdio@0 {
+                                       reg = <0>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 488

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +10 -0
+                               };
+
+                               int_mdio: mdio@1 {
+                                       reg = <1>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       internal_ephy: ethernet_phy@8 {
+                                               compatible = "ethernet-phy-id0180.3301",
+                                                            "ethernet-phy-ieee802.3-c22";

please drop the compatible string and replace it with a comment (if you feel that it's needed).
quote from Documentation/devicetree/bindings/net/phy.txt:

Quoted 3 lines

If the PHY reports an incorrect ID (or none at all) then the "compatible" list may contain an entry with the correct PHY ID in the
form: "ethernet-phy-idAAAA.BBBB"

I am going to send a patch for other Amlogic boards to remove any ethernet-phy-id comaptible string

Regards
Martin

author reviewer
#8 lore raw

Re: [PATCH 3/5] arm64: dts: meson: g12a: add mdio multiplexer

Quoted 46 lines · Martin Blumenstingl

Hi Jerome,

Quoted 13 lines · Jerome Brunet

Add the g12a mdio multiplexer which allows to connect to either an external phy through the SoC pins or the internal 10/100 phy

---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +0 -0
index fe0f73730525..6e9587aafb5d 100644

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 469

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +7 -0
@@ -460,6 +460,38 @@
                                assigned-clock-rates = <100000000>;
                                #phy-cells = <1>;
                        };
+
+                       eth_phy: mdio-multiplexer@4c000 {
+                               compatible = "amlogic,g12a-mdio-mux";
+                               reg = <0x0 0x4c000 0x0 0xa4>;
+                               clocks = <&clkc CLKID_ETH_PHY>,
+                                        <&xtal>,
+                                        <&clkc CLKID_MPLL_5OM>;

I haven't noticed that before but there's a typo in the MPLL_5OM clock definition:
the O (capital o) should be a 0 (zero).
can you fix this typo in an additional clock patch for v5.2 - then we don't have to do it in v5.3 where this .dtsi might already use it

Quoted 14 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +14 -0
+                               clock-names = "pclk", "clkin0", "clkin1";
+                               mdio-parent-bus = <&mdio0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ext_mdio: mdio@0 {
+                                       reg = <0>;
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                               };
+
+                               int_mdio: mdio@1 {
+                                       reg = <1>;
+                                       #address-cells = <1>;
Quoted 11 lines

arch/arm64/boot/dts/amlogic/meson-g12a.dtsi line 488

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi +5 -0
+                                       #size-cells = <0>;
+
+                                       internal_ephy: ethernet_phy@8 {
+                                               compatible = "ethernet-phy-id0180.3301",
+                                                            "ethernet-phy-ieee802.3-c22";

please drop the compatible string and replace it with a comment (if you feel that it's needed).
quote from Documentation/devicetree/bindings/net/phy.txt:

Quoted 3 lines

If the PHY reports an incorrect ID (or none at all) then the "compatible" list may contain an entry with the correct PHY ID in the
form: "ethernet-phy-idAAAA.BBBB"

I would keep this for the internal phy. The id completely made up by the MDIO mux, so it is a lot weaker than the usual PHY.

The fact is that I made a mistake (which I'm going to correct) in the g12a mdio mux and the id is incorrect. Thanks to this, we know the PHY the correct internal phy driver is picked up.

Quoted 3 lines

I am going to send a patch for other Amlogic boards to remove any ethernet-phy-id comaptible string

Make sense for the external phys but I think it is wiser to keep it for the internal ones.

For external phys, A manufacturer could replace the device w/o any notice, so we should rely on the id to pick it up correctly. For a the PHY embedded in the SoC, we which one it is and it can't change (w/o notice at least)

Quoted 4 lines

Regards
Martin

author reviewer
#9 lore raw

PATCH 4/5 arm64: dts: meson: u200: add internal network

In reply to Jerome Brunet

The u200 is the main mother board for the S905D2. It can provide both the internal and external network. However, by default the resistance required for the external RGMII bus are not fitted, so enable the internal PHY.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +7 -0
index 7cc3e2d6a4f1..c2221eb4549e 100644
@@ -15,6 +15,7 @@
 
 	aliases {
 		serial0 = &uart_AO;
+		ethernet0 = &ethmac;
 	};
 
 	chosen {
@@ -145,6 +146,12 @@
 	};
 };
 
+&ethmac {
+	status = "okay";
+	phy-handle = <&internal_ephy>;
+	phy-mode = "rmii";
+};
+
 &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
Signature · 1 line
2.20.1
author reviewer
#10 lore raw

PATCH 5/5 arm64: dts: meson: sei510: add network support

In reply to Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +7 -0
index 61fb30047d7f..4a785b17c1af 100644
@@ -29,6 +29,7 @@
 
 	aliases {
 		serial0 = &uart_AO;
+		ethernet0 = &ethmac;
 	};
 
 	chosen {
@@ -144,6 +145,12 @@
 	};
 };
 
+&ethmac {
+	status = "okay";
+	phy-handle = <&internal_ephy>;
+	phy-mode = "rmii";
+};
+
 &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
Signature · 1 line
2.20.1
maintainer
#11 lore raw

Re: [PATCH 5/5] arm64: dts: meson: sei510: add network support

Quoted 3 lines · Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

I tried testing this series on SEI510, but I must still be missing some defconfig options, as the default defconfig doesn't lead to a working interface.

I tried adding this kconfig fragment[1], and the dwmac probes/inits but I must still be missing something, as the dwmac is still failing to find a PHY. Boot log: https://termbin.com/ivf3

I have the same result testing on the u200.

Kevin

[1] amlogic network kconfig fragment
CONFIG_STMMAC_ETH=y

# following are needed, but automatically enabled if above is set
#CONFIG_STMMAC_PLATFORM=m
#CONFIG_DWMAC_MESON=m

CONFIG_PHYLIB=y
CONFIG_MICREL_PHY=y
CONFIG_REALTEK_PHY=y

CONFIG_MDIO_BUS_MUX_MESON_G12A=y
CONFIG_MESON_GXL_PHY=y

author reviewer
#12 lore raw

Re: [PATCH 5/5] arm64: dts: meson: sei510: add network support

Quoted 9 lines · Kevin Hilman
Quoted 3 lines · Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

I tried testing this series on SEI510, but I must still be missing some defconfig options, as the default defconfig doesn't lead to a working interface.

That's weird. AFAICT, the net part has hit Linus's tree. You should have everything needed by default, the mdio mux has

Quoted 9 lines

default m if ARCH_MESON

I tried adding this kconfig fragment[1], and the dwmac probes/inits but I must still be missing something, as the dwmac is still failing to find a PHY. Boot log: https://termbin.com/ivf3

I have the same result testing on the u200.

I don't any other patch pending for the network of the g12a. Maybe I've done something wrong while rebasing. I'll check on monday.

Quoted 16 lines

Kevin

[1] amlogic network kconfig fragment
CONFIG_STMMAC_ETH=y

# following are needed, but automatically enabled if above is set
#CONFIG_STMMAC_PLATFORM=m
#CONFIG_DWMAC_MESON=m

CONFIG_PHYLIB=y
CONFIG_MICREL_PHY=y
CONFIG_REALTEK_PHY=y

CONFIG_MDIO_BUS_MUX_MESON_G12A=y
CONFIG_MESON_GXL_PHY=y

maintainer Tested-by
#13 lore raw

Re: [PATCH 5/5] arm64: dts: meson: sei510: add network support

Quoted 5 lines · Jerome Brunet
Quoted 4 lines · Kevin Hilman
Quoted 2 lines · Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I tried testing this series on SEI510, but I must still be missing some defconfig options, as the default defconfig doesn't lead to a working interface.

That's weird. AFAICT, the net part has hit Linus's tree.

Ah, that's the key ingredient. I was testing with a v5.1 baseline (not linus/master) along with all my queued up changes. I just pulled in linus/master to test this series, and indeed, everything works, and I don't need my config fragment either.

Thanks for clarifying.

If repost needed, feel free to add

Kevin

#14 lore raw

Re: [PATCH 5/5] arm64: dts: meson: sei510: add network support

In reply to Kevin Hilman

Hi Kevin,

Quoted 12 lines · Kevin Hilman
Quoted 3 lines · Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

I tried testing this series on SEI510, but I must still be missing some defconfig options, as the default defconfig doesn't lead to a working interface.

Quoted 5 lines

I tried adding this kconfig fragment[1], and the dwmac probes/inits but I must still be missing something, as the dwmac is still failing to find a PHY. Boot log: https://termbin.com/ivf3

I have the same result testing on the u200.

I wonder if we're simply missing the pinctrl definitions in the ethmac node:
pinctrl-0 = <&eth_rmii_pins>;
pinctrl-names = "default";

I don't know how the SoC works internally but I am assuming that the MDIO pins are routed to the "internal PHY" (within the chip). also we need the eth_rmii_pins anyways for the RXD/TXD pins which are connected to the physical Ethernet port on the board. bonus question: while writing this email I'm surprised to see that on GXL we don't use the rmii pins anywhere, why is Ethernet working fine there?

Martin

author reviewer
#15 lore raw

Re: [PATCH 5/5] arm64: dts: meson: sei510: add network support

Quoted 23 lines · Martin Blumenstingl

Hi Kevin,

Quoted 11 lines · Kevin Hilman
Quoted 3 lines · Jerome Brunet

Enable the network interface of the SEI510 which use the internal PHY.

I tried testing this series on SEI510, but I must still be missing some defconfig options, as the default defconfig doesn't lead to a working interface.

Quoted 5 lines

I tried adding this kconfig fragment[1], and the dwmac probes/inits but I must still be missing something, as the dwmac is still failing to find a PHY. Boot log: https://termbin.com/ivf3

I have the same result testing on the u200.

I wonder if we're simply missing the pinctrl definitions in the ethmac node:
pinctrl-0 = <&eth_rmii_pins>;
pinctrl-names = "default";

Quoted 7 lines

I don't know how the SoC works internally but I am assuming that the MDIO pins are routed to the "internal PHY" (within the chip). also we need the eth_rmii_pins anyways for the RXD/TXD pins which are connected to the physical Ethernet port on the board. bonus question: while writing this email I'm surprised to see that on GXL we don't use the rmii pins anywhere, why is Ethernet working fine there?

AFAIK, the pinmux is for the external pad Martin
The internal phy does not use those pads.

Quoted 3 lines

Martin

author reviewer
#16 lore raw
In reply to Jerome Brunet
Quoted 1 line · Jerome Brunet

Add network support for the g12a

I forgot to mention that series applies on top of the node re-order series [0]

[0]: https://lkml.kernel.org/r/[email protected]

Quoted 13 lines

Jerome Brunet (5):
arm64: dts: meson: g12a: add ethernet mac controller
arm64: dts: meson: g12a: add ethernet pinctrl definitions
arm64: dts: meson: g12a: add mdio multiplexer
arm64: dts: meson: u200: add internal network
arm64: dts: meson: sei510: add network support

 .../boot/dts/amlogic/meson-g12a-sei510.dts    |  7 ++
 .../boot/dts/amlogic/meson-g12a-u200.dts      |  7 ++
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi   | 90 +++++++++++++++++++
 3 files changed, 104 insertions(+)