diff mbox series

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

Message ID 20190510164940.13496-6-jbrunet@baylibre.com
State New
Headers show
Series [1/5] arm64: dts: meson: g12a: add ethernet mac controller | expand

Commit Message

Jerome Brunet May 10, 2019, 4:49 p.m. UTC
Enable the network interface of the SEI510 which use the internal PHY.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.20.1

Comments

Jerome Brunet May 11, 2019, 3:46 p.m. UTC | #1
On Fri, 2019-05-10 at 15:45 -0700, Kevin Hilman wrote:
> Jerome Brunet <jbrunet@baylibre.com> writes:

> 

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

> > 

> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

> 

> 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

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

> 

> 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
Martin Blumenstingl May 11, 2019, 5:16 p.m. UTC | #2
Hi Kevin,

On Sat, May 11, 2019 at 12:45 AM Kevin Hilman <khilman@baylibre.com> wrote:
>

> Jerome Brunet <jbrunet@baylibre.com> writes:

>

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

> >

> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

>

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

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
Jerome Brunet May 11, 2019, 5:25 p.m. UTC | #3
On Sat, 2019-05-11 at 19:16 +0200, Martin Blumenstingl wrote:
> Hi Kevin,

> 

> On Sat, May 11, 2019 at 12:45 AM Kevin Hilman <khilman@baylibre.com> wrote:

> > Jerome Brunet <jbrunet@baylibre.com> writes:

> > 

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

> > > 

> > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

> > 

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

> 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?


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

> 

> 

> Martin
Kevin Hilman May 13, 2019, 4:31 p.m. UTC | #4
Jerome Brunet <jbrunet@baylibre.com> writes:

> On Fri, 2019-05-10 at 15:45 -0700, Kevin Hilman wrote:

>> Jerome Brunet <jbrunet@baylibre.com> writes:

>> 

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

>> > 

>> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

>> 

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

Tested-by: Kevin Hilman <khilman@baylibre.com>


Kevin
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 61fb30047d7f..4a785b17c1af 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -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>;