Linux-Amlogic Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support
@ 2019-05-20 13:13 Jerome Brunet
  2019-05-20 13:13 ` [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller Jerome Brunet
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:13 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

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/20190510164940.13496-1-jbrunet@baylibre.com

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
@ 2019-05-20 13:13 ` Jerome Brunet
  2019-05-20 17:29   ` Martin Blumenstingl
  2019-05-20 13:13 ` [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions Jerome Brunet
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:13 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

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

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
  2019-05-20 13:13 ` [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller Jerome Brunet
@ 2019-05-20 13:13 ` Jerome Brunet
  2019-05-20 17:29   ` Martin Blumenstingl
  2019-05-20 13:13 ` [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer Jerome Brunet
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:13 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

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

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
  2019-05-20 13:13 ` [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller Jerome Brunet
  2019-05-20 13:13 ` [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions Jerome Brunet
@ 2019-05-20 13:13 ` Jerome Brunet
  2019-05-20 17:37   ` Martin Blumenstingl
  2019-05-20 13:14 ` [PATCH v2 4/5] arm64: dts: meson: u200: add internal network Jerome Brunet
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:13 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, 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

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
index def02ebf6501..90da7cc81681 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -1698,6 +1698,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_50M>;
+				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 {
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 4/5] arm64: dts: meson: u200: add internal network
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
                   ` (2 preceding siblings ...)
  2019-05-20 13:13 ` [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer Jerome Brunet
@ 2019-05-20 13:14 ` Jerome Brunet
  2019-05-20 17:38   ` Martin Blumenstingl
  2019-05-20 13:14 ` [PATCH v2 5/5] arm64: dts: meson: sei510: add network support Jerome Brunet
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:14 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, 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.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 5/5] arm64: dts: meson: sei510: add network support
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
                   ` (3 preceding siblings ...)
  2019-05-20 13:14 ` [PATCH v2 4/5] arm64: dts: meson: u200: add internal network Jerome Brunet
@ 2019-05-20 13:14 ` Jerome Brunet
  2019-05-20 17:38   ` Martin Blumenstingl
  2019-05-20 17:49 ` [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Kevin Hilman
  2019-05-23 17:20 ` Kevin Hilman
  6 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 13:14 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

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

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 484b93ef11d8..be1d9ed6d521 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 {
@@ -149,6 +150,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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller
  2019-05-20 13:13 ` [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller Jerome Brunet
@ 2019-05-20 17:29   ` Martin Blumenstingl
  0 siblings, 0 replies; 17+ messages in thread
From: Martin Blumenstingl @ 2019-05-20 17:29 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Add the synopsys ethernet mac controller embedded in the g12a SoC family.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions
  2019-05-20 13:13 ` [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions Jerome Brunet
@ 2019-05-20 17:29   ` Martin Blumenstingl
  0 siblings, 0 replies; 17+ messages in thread
From: Martin Blumenstingl @ 2019-05-20 17:29 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Add the ethernet pinctrl settings for RMII, RGMII and internal phy leds
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer
  2019-05-20 13:13 ` [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer Jerome Brunet
@ 2019-05-20 17:37   ` Martin Blumenstingl
  2019-05-20 19:05     ` Andrew Lunn
  0 siblings, 1 reply; 17+ messages in thread
From: Martin Blumenstingl @ 2019-05-20 17:37 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Andrew Lunn, f.fainelli, devicetree, Kevin Hilman, linux-kernel,
	linux-amlogic, hkallweit1

Hi Jerome,

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Add the g12a mdio multiplexer which allows to connect to either
> an external phy through the SoC pins or the internal 10/100 phy
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
>  arch/arm64/boot/dts/amlogic/meson-g12a.dtsi | 32 +++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> index def02ebf6501..90da7cc81681 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
> @@ -1698,6 +1698,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_50M>;
> +                               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";
Based on your comment on v1 of this patch [0] the Ethernet PHY ID is
defined by this "mdio-multiplexer" (write arbitrary value to a
register then that's the PHY ID which will show up on the bus)
I'm fine with explicitly listing the ID which the PHY driver binds to
because I don't know a better way.

+Cc Andrew, Florian and Heiner because I think they should be aware of
such cases (it seems like a special case to me).


Martin


[0] https://patchwork.kernel.org/patch/10939255/

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 4/5] arm64: dts: meson: u200: add internal network
  2019-05-20 13:14 ` [PATCH v2 4/5] arm64: dts: meson: u200: add internal network Jerome Brunet
@ 2019-05-20 17:38   ` Martin Blumenstingl
  0 siblings, 0 replies; 17+ messages in thread
From: Martin Blumenstingl @ 2019-05-20 17:38 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <jbrunet@baylibre.com> 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 <jbrunet@baylibre.com>
I don't have this board but it looks sane so:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 5/5] arm64: dts: meson: sei510: add network support
  2019-05-20 13:14 ` [PATCH v2 5/5] arm64: dts: meson: sei510: add network support Jerome Brunet
@ 2019-05-20 17:38   ` Martin Blumenstingl
  0 siblings, 0 replies; 17+ messages in thread
From: Martin Blumenstingl @ 2019-05-20 17:38 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Kevin Hilman, linux-amlogic, linux-kernel, devicetree

On Mon, May 20, 2019 at 3:14 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> Enable the network interface of the SEI510 which use the internal PHY.
>
> Tested-by: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
I don't have this board but it looks sane so:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
                   ` (4 preceding siblings ...)
  2019-05-20 13:14 ` [PATCH v2 5/5] arm64: dts: meson: sei510: add network support Jerome Brunet
@ 2019-05-20 17:49 ` Kevin Hilman
  2019-05-20 18:50   ` Kevin Hilman
  2019-05-23 17:20 ` Kevin Hilman
  6 siblings, 1 reply; 17+ messages in thread
From: Kevin Hilman @ 2019-05-20 17:49 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Jerome Brunet <jbrunet@baylibre.com> 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/20190510164940.13496-1-jbrunet@baylibre.com
>
> 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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support
  2019-05-20 17:49 ` [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Kevin Hilman
@ 2019-05-20 18:50   ` Kevin Hilman
  0 siblings, 0 replies; 17+ messages in thread
From: Kevin Hilman @ 2019-05-20 18:50 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Kevin Hilman <khilman@baylibre.com> writes:

> Jerome Brunet <jbrunet@baylibre.com> 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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer
  2019-05-20 17:37   ` Martin Blumenstingl
@ 2019-05-20 19:05     ` Andrew Lunn
  2019-05-20 21:51       ` Jerome Brunet
  0 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2019-05-20 19:05 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: devicetree, f.fainelli, Kevin Hilman, linux-kernel,
	linux-amlogic, hkallweit1, Jerome Brunet

> > +                               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";
> Based on your comment on v1 of this patch [0] the Ethernet PHY ID is
> defined by this "mdio-multiplexer" (write arbitrary value to a
> register then that's the PHY ID which will show up on the bus)
> I'm fine with explicitly listing the ID which the PHY driver binds to
> because I don't know a better way.

Does reading the ID registers give the correct ID, once you have poked
registers in the mdio-multiplexer? If so, you don't need this
compatible string.

If the read is giving the wrong ID, then yes, you do want this. But
then please add a comment in the DT blob. This is very unusual, so
should have some explanation why it is needed.

Thanks
	Andrew

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer
  2019-05-20 19:05     ` Andrew Lunn
@ 2019-05-20 21:51       ` Jerome Brunet
  2019-05-23 17:18         ` Kevin Hilman
  0 siblings, 1 reply; 17+ messages in thread
From: Jerome Brunet @ 2019-05-20 21:51 UTC (permalink / raw)
  To: Andrew Lunn, Martin Blumenstingl
  Cc: devicetree, f.fainelli, Kevin Hilman, linux-kernel,
	linux-amlogic, hkallweit1

On Mon, 2019-05-20 at 21:05 +0200, Andrew Lunn wrote:
> > > +                               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";
> > Based on your comment on v1 of this patch [0] the Ethernet PHY ID is
> > defined by this "mdio-multiplexer" (write arbitrary value to a
> > register then that's the PHY ID which will show up on the bus)
> > I'm fine with explicitly listing the ID which the PHY driver binds to
> > because I don't know a better way.

... 

> 
> Does reading the ID registers give the correct ID, once you have poked
> registers in the mdio-multiplexer? If so, you don't need this
> compatible string.

Hi Andrew,

In 5.1 the mdio-mux set a wrong simply because I got it wrong. I pushed a
fix for that, and maybe it has already hit mainline.

As I pointed to Martin on v1, this situation just shows that this setting is
weaker than the usual phy setup.

I do understand why we don't want to put the PHY id in DT. If the PHY fitted on
the board changes, we want to pick it up. This particular phy is embedded in
SoC, we know it won't change for this SoC, whatever the mdio-mux sets.

So yes it should (soon) work as usual, setting this id is not strictly
necessary but it nicely reflect that this particular phy is integrated in
the SoC and we know which driver to use. 

So, if this is ok with you, I'd prefer to keep this particular id around.

> 
> If the read is giving the wrong ID, then yes, you do want this. But
> then please add a comment in the DT blob. This is very unusual, so
> should have some explanation why it is needed.

Sure, can add a comment. I suggest to do it in follow-up. At least it keeps
things aligned between the gxl, which has been like this for quite a while now,
and g12a.


> 
> Thanks
> 	Andrew



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer
  2019-05-20 21:51       ` Jerome Brunet
@ 2019-05-23 17:18         ` Kevin Hilman
  0 siblings, 0 replies; 17+ messages in thread
From: Kevin Hilman @ 2019-05-23 17:18 UTC (permalink / raw)
  To: Jerome Brunet, Andrew Lunn, Martin Blumenstingl
  Cc: devicetree, hkallweit1, f.fainelli, linux-kernel, linux-amlogic

Jerome Brunet <jbrunet@baylibre.com> writes:

> On Mon, 2019-05-20 at 21:05 +0200, Andrew Lunn wrote:
>> > > +                               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";
>> > Based on your comment on v1 of this patch [0] the Ethernet PHY ID is
>> > defined by this "mdio-multiplexer" (write arbitrary value to a
>> > register then that's the PHY ID which will show up on the bus)
>> > I'm fine with explicitly listing the ID which the PHY driver binds to
>> > because I don't know a better way.
>
> ... 
>
>> 
>> Does reading the ID registers give the correct ID, once you have poked
>> registers in the mdio-multiplexer? If so, you don't need this
>> compatible string.
>
> Hi Andrew,
>
> In 5.1 the mdio-mux set a wrong simply because I got it wrong. I pushed a
> fix for that, and maybe it has already hit mainline.
>
> As I pointed to Martin on v1, this situation just shows that this setting is
> weaker than the usual phy setup.
>
> I do understand why we don't want to put the PHY id in DT. If the PHY fitted on
> the board changes, we want to pick it up. This particular phy is embedded in
> SoC, we know it won't change for this SoC, whatever the mdio-mux sets.
>
> So yes it should (soon) work as usual, setting this id is not strictly
> necessary but it nicely reflect that this particular phy is integrated in
> the SoC and we know which driver to use. 
>
> So, if this is ok with you, I'd prefer to keep this particular id around.

Seems OK to me, so I'm queuing this for v5.3 because we really need
network support.  It can be removed later if it's really insisted on.

>> 
>> If the read is giving the wrong ID, then yes, you do want this. But
>> then please add a comment in the DT blob. This is very unusual, so
>> should have some explanation why it is needed.
>
> Sure, can add a comment. I suggest to do it in follow-up. At least it keeps
> things aligned between the gxl, which has been like this for quite a while now,
> and g12a.

Follow-up is good for me,

Kevin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support
  2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
                   ` (5 preceding siblings ...)
  2019-05-20 17:49 ` [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Kevin Hilman
@ 2019-05-23 17:20 ` Kevin Hilman
  6 siblings, 0 replies; 17+ messages in thread
From: Kevin Hilman @ 2019-05-23 17:20 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: devicetree, linux-amlogic, linux-kernel, Jerome Brunet

Jerome Brunet <jbrunet@baylibre.com> 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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, back to index

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20 13:13 [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Jerome Brunet
2019-05-20 13:13 ` [PATCH v2 1/5] arm64: dts: meson: g12a: add ethernet mac controller Jerome Brunet
2019-05-20 17:29   ` Martin Blumenstingl
2019-05-20 13:13 ` [PATCH v2 2/5] arm64: dts: meson: g12a: add ethernet pinctrl definitions Jerome Brunet
2019-05-20 17:29   ` Martin Blumenstingl
2019-05-20 13:13 ` [PATCH v2 3/5] arm64: dts: meson: g12a: add mdio multiplexer Jerome Brunet
2019-05-20 17:37   ` Martin Blumenstingl
2019-05-20 19:05     ` Andrew Lunn
2019-05-20 21:51       ` Jerome Brunet
2019-05-23 17:18         ` Kevin Hilman
2019-05-20 13:14 ` [PATCH v2 4/5] arm64: dts: meson: u200: add internal network Jerome Brunet
2019-05-20 17:38   ` Martin Blumenstingl
2019-05-20 13:14 ` [PATCH v2 5/5] arm64: dts: meson: sei510: add network support Jerome Brunet
2019-05-20 17:38   ` Martin Blumenstingl
2019-05-20 17:49 ` [PATCH v2 0/5] arm64: dts: meson: g12a: add ethernet support Kevin Hilman
2019-05-20 18:50   ` Kevin Hilman
2019-05-23 17:20 ` Kevin Hilman

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org linux-amlogic@archiver.kernel.org
	public-inbox-index linux-amlogic


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/ public-inbox