mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v1] MIPS: net: ag71xx/ar9331: partially sync network support with upstream
@ 2019-10-01  8:15 Oleksij Rempel
  2019-10-02  6:49 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksij Rempel @ 2019-10-01  8:15 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

Ethernet support for ar9331 is upstream now. So, drop every thing what
is provided by upstream devicetree and rename compatible in the driver.

barebox network driver will need more work to be upstream compliant. For
example we should not request or touch the gmac register directly. Since
currently it is not clear how this should be implemented, patch the
upstream dts with reg-names = "ge0", "gmac".

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/mips/dts/ar9331-dptechnics-dpt-module.dts |  6 +-----
 arch/mips/dts/ar9331.dtsi                      | 15 ++++++---------
 arch/mips/dts/tplink-mr3020.dts                |  2 +-
 drivers/net/ag71xx.c                           |  2 +-
 4 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
index 315589aab9..cbaf5ab39e 100644
--- a/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
+++ b/arch/mips/dts/ar9331-dptechnics-dpt-module.dts
@@ -15,7 +15,7 @@
 		art@0 {
 			compatible = "qca,art-ar9331", "qca,art";
 			device-path = &spiflash_art;
-			barebox,provide-mac-address = <&mac0>;
+			barebox,provide-mac-address = <&eth0>;
 		};
 	};
 
@@ -48,7 +48,3 @@
 		reg = <0x7f0000 0x10000>;
 	};
 };
-
-&mac0 {
-	status = "okay";
-};
diff --git a/arch/mips/dts/ar9331.dtsi b/arch/mips/dts/ar9331.dtsi
index 42baae1e89..72f029754e 100644
--- a/arch/mips/dts/ar9331.dtsi
+++ b/arch/mips/dts/ar9331.dtsi
@@ -5,14 +5,11 @@
 			reg = <0x18060008 0x8>;
 			clocks = <&pll ATH79_CLK_CPU>;
 		};
-
-		mac0: mac@19000000 {
-			compatible = "qca,ar9331-ge0";
-			reg = <0x18070000 0x00000100>,
-			      <0x19000000 0x01000000>;
-			reg-names = "gmac", "ge0";
-			phy-mode = "mii";
-			status = "disabled";
-               };
 	};
 };
+
+&eth0 {
+	reg = <0x19000000 0x200>,
+	      <0x18070000 0x00000100>;
+	reg-names = "ge0", "gmac";
+};
diff --git a/arch/mips/dts/tplink-mr3020.dts b/arch/mips/dts/tplink-mr3020.dts
index e30eae1578..c6ae154f4f 100644
--- a/arch/mips/dts/tplink-mr3020.dts
+++ b/arch/mips/dts/tplink-mr3020.dts
@@ -28,6 +28,6 @@
 	};
 };
 
-&mac0 {
+&eth0 {
 	status = "okay";
 };
diff --git a/drivers/net/ag71xx.c b/drivers/net/ag71xx.c
index 0565c90490..70aaa60f1a 100644
--- a/drivers/net/ag71xx.c
+++ b/drivers/net/ag71xx.c
@@ -667,7 +667,7 @@ static void ag71xx_remove(struct device_d *dev)
 }
 
 static __maybe_unused struct of_device_id ag71xx_dt_ids[] = {
-	{ .compatible = "qca,ar9331-ge0", .data = &ag71xx_cfg_ar9331_ge0, },
+	{ .compatible = "qca,ar9330-eth", .data = &ag71xx_cfg_ar9331_ge0, },
 	{ .compatible = "qca,ar9344-gmac0", .data = &ag71xx_cfg_ar9344_gmac0, },
 	{ /* sentinel */ }
 };
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v1] MIPS: net: ag71xx/ar9331: partially sync network support with upstream
  2019-10-01  8:15 [PATCH v1] MIPS: net: ag71xx/ar9331: partially sync network support with upstream Oleksij Rempel
@ 2019-10-02  6:49 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-10-02  6:49 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On Tue, Oct 01, 2019 at 10:15:09AM +0200, Oleksij Rempel wrote:
> Ethernet support for ar9331 is upstream now. So, drop every thing what
> is provided by upstream devicetree and rename compatible in the driver.
> 
> barebox network driver will need more work to be upstream compliant. For
> example we should not request or touch the gmac register directly. Since
> currently it is not clear how this should be implemented, patch the
> upstream dts with reg-names = "ge0", "gmac".
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  arch/mips/dts/ar9331-dptechnics-dpt-module.dts |  6 +-----
>  arch/mips/dts/ar9331.dtsi                      | 15 ++++++---------
>  arch/mips/dts/tplink-mr3020.dts                |  2 +-
>  drivers/net/ag71xx.c                           |  2 +-
>  4 files changed, 9 insertions(+), 16 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2019-10-02  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01  8:15 [PATCH v1] MIPS: net: ag71xx/ar9331: partially sync network support with upstream Oleksij Rempel
2019-10-02  6:49 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox