2019-05-20 18:00:11

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support

Add network support to the g12a SoC family

This is series is based on 5.2-rc1 and the patches I already sent last
week. If this is not convient for you, please let me know, I'll rebase.

Also, you will need to get the clk tag "clk-meson-5.3-1-fixes" (to get
the update MPLL50M id) from clk-meson [0].

Changes since v1: [1]
* rebased on v5.2-rc1
* s/eth_rmii_pins/eth_pins
* fix MPLL50M typo

[0]: git://github.com/BayLibre/clk-meson.git
[1]: https://lkml.kernel.org/r/[email protected]

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(+)

--
2.20.1



2019-05-20 18:01:14

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions

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

Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 37 +++++++++++++++++++++
1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index 1d16cd2107ea..def02ebf6501 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -1109,6 +1109,43 @@
};
};

+ eth_leds_pins: eth-leds {
+ mux {
+ groups = "eth_link_led",
+ "eth_act_led";
+ function = "eth";
+ bias-disable;
+ };
+ };
+
+ eth_pins: eth {
+ 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;
+ };
+ };
+
tdm_c_din2_z_pins: tdm-c-din2-z {
mux {
groups = "tdm_c_din2_z";
--
2.20.1


2019-05-20 18:01:18

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH v2 4/5] arm64: dts: meson: u200: add internal network

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.

Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index e02534ab7673..8551fbd4a488 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -15,6 +15,7 @@

aliases {
serial0 = &uart_AO;
+ ethernet0 = &ethmac;
};

chosen {
@@ -150,6 +151,12 @@
};
};

+&ethmac {
+ status = "okay";
+ phy-handle = <&internal_ephy>;
+ phy-mode = "rmii";
+};
+
&hdmi_tx {
status = "okay";
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
--
2.20.1


2019-05-20 18:21:43

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 4/5] arm64: dts: meson: u200: add internal network

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <[email protected]> wrote:
>
> 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.
>
> Signed-off-by: Jerome Brunet <[email protected]>
I don't have this board but it looks sane so:
Acked-by: Martin Blumenstingl <[email protected]>

2019-05-20 18:22:03

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support

Jerome Brunet <[email protected]> writes:

> Add network support to the g12a SoC family
>
> This is series is based on 5.2-rc1 and the patches I already sent last
> week. If this is not convient for you, please let me know, I'll rebase.

Could you apply this on top of the "consistently order nodes" patches
that are already in my v5.3/dt64 branch?

More specifically, if you rebase this onto this commit[1], I'll be able
to easily replace the v1 of this series that's already in v5.3/dt64.

Kevin

[1] 5b9533f6de2a arm64: dts: meson: u200: consistently order nodes

> Also, you will need to get the clk tag "clk-meson-5.3-1-fixes" (to get
> the update MPLL50M id) from clk-meson [0].
>
> Changes since v1: [1]
> * rebased on v5.2-rc1
> * s/eth_rmii_pins/eth_pins
> * fix MPLL50M typo
>
> [0]: git://github.com/BayLibre/clk-meson.git
> [1]: https://lkml.kernel.org/r/[email protected]
>
> 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(+)
>
> --
> 2.20.1

2019-05-20 18:22:27

by Martin Blumenstingl

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

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <[email protected]> wrote:
>
> Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds
>
> Signed-off-by: Jerome Brunet <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-05-20 18:51:37

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller

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

Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index fd24fd29f4ed..1d16cd2107ea 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -137,6 +137,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>;
--
2.20.1


2019-05-20 18:54:39

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support

Kevin Hilman <[email protected]> writes:

> Jerome Brunet <[email protected]> writes:
>
>> Add network support to the g12a SoC family
>>
>> This is series is based on 5.2-rc1 and the patches I already sent last
>> week. If this is not convient for you, please let me know, I'll rebase.
>
> Could you apply this on top of the "consistently order nodes" patches
> that are already in my v5.3/dt64 branch?

Nevermind, I mis-read the above and thought it was on v5.2-rc1, but now
see that it's on -rc1 + all your other series, so it's all good.

Kevin

2019-05-23 17:21:55

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support

Jerome Brunet <[email protected]> writes:

> Add network support to the g12a SoC family
>
> This is series is based on 5.2-rc1 and the patches I already sent last
> week. If this is not convient for you, please let me know, I'll rebase.

Queued for v5.3.

> Also, you will need to get the clk tag "clk-meson-5.3-1-fixes" (to get
> the update MPLL50M id) from clk-meson [0].

I merged this tag in to v5.3/dt64 before applying this series. Thanks
for explaining the dependencies.

Kevin