net: Add ag7xxx driver for Atheros MIPS
Subsystems (2)
RFC PATCH 1/1 net: Add ag7xxx driver for Atheros MIPS
Add ethernet driver for the AR71xx and AR9xxx Atheros MIPS machines.
--- arch/mips/dts/ap121.dts | 8 + arch/mips/dts/ar933x.dtsi | 16 + arch/mips/mach-ath79/cpu.c | 47 +++ configs/ap121_defconfig | 1 + drivers/net/Kconfig | 9 + drivers/net/Makefile | 1 + drivers/net/ag7xxx.c | 794 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 876 insertions(+) create mode 100644 drivers/net/ag7xxx.c
NOTE: This is RFC patch, it is by no means a standard submission, but it should
give you some starting point for the ethernet driver.
NOTE: The driver works and I can transfer data via TFTP, but this patch needs
splitting and cleanup. Some FIXMEs need to be sorted out of course.
NOTE: This is only tested on ar9331.
arch/mips/dts/ap121.dts +8 -0
@@ -21,6 +21,14 @@ }; }; +&gmac0 { + status = "okay"; +}; + +&gmac1 { + status = "okay"; +}; + &xtal { clock-frequency = <25000000>; };
arch/mips/dts/ar933x.dtsi +16 -0
@@ -62,6 +62,22 @@ status = "disabled"; }; + + gmac0: eth at 0x19000000 { + compatible = "qca,ag7240-mac"; + reg = <0x19000000 0x200>; + phy-mode = "rmii"; + + status = "disabled"; + }; + + gmac1: eth at 0x1a000000 { + compatible = "qca,ag7240-mac"; + reg = <0x1a000000 0x200>; + phy-mode = "rgmii"; + + status = "disabled"; + }; }; spi0: spi at 1f000000 {
arch/mips/mach-ath79/cpu.c +47 -0
50 lines not on this page · raw message
configs/ap121_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y +CONFIG_AG7XXX=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y CONFIG_SPI_FLASH_WINBOND=y
drivers/net/Kconfig +9 -0
@@ -25,6 +25,15 @@ menuconfig NETDEVICES if NETDEVICES +config AG7XXX + bool "Atheros AG7xxx Ethernet MAC support" + depends on DM_ETH + select PHYLIB + help + This driver supports the Atheros AG7xxx Ethernet MAC. This MAC is + present in the Atheros AR7xxx, AR9xxx and QCA9xxx MIPS chips. + + config ALTERA_TSE bool "Altera Triple-Speed Ethernet MAC support" depends on DM_ETH
drivers/net/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o obj-$(CONFIG_ALTERA_TSE) += altera_tse.o +obj-$(CONFIG_AG7XXX) += ag7xxx.o obj-$(CONFIG_ARMADA100_FEC) += armada100_fec.o obj-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o obj-$(CONFIG_DRIVER_AX88180) += ax88180.o
drivers/net/ag7xxx.c new file +794 -0
794 lines not on this page · raw message
Signature · 1 line
2.1.4
RFC PATCH 1/1 net: Add ag7xxx driver for Atheros MIPS
Hi Marek,
Quoted 17 lines · Marek Vasut
Add ethernet driver for the AR71xx and AR9xxx Atheros MIPS machines.
Signed-off-by Marek Vasut <[email protected]>Cc Daniel Schwierzeck <[email protected]>Cc Joe Hershberger <[email protected]>Cc Wills Wang <[email protected]>--- arch/mips/dts/ap121.dts | 8 + arch/mips/dts/ar933x.dtsi | 16 + arch/mips/mach-ath79/cpu.c | 47 +++ configs/ap121_defconfig | 1 + drivers/net/Kconfig | 9 + drivers/net/Makefile | 1 + drivers/net/ag7xxx.c | 794 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 876 insertions(+) create mode 100644 drivers/net/ag7xxx.c
Quoted 5 lines
NOTE: This is RFC patch, it is by no means a standard submission, but it should
give you some starting point for the ethernet driver.
NOTE: The driver works and I can transfer data via TFTP, but this patch needs
splitting and cleanup. Some FIXMEs need to be sorted out of course.
NOTE: This is only tested on ar9331.
What is your plan for this?
Are you wanting a review to continue improvements (sounds like you already know of some improvements needed)?
Are you transferring it to someone else to complete? If so, who?
Thanks,
-Joe
RFC PATCH 1/1 net: Add ag7xxx driver for Atheros MIPS
Quoted 30 lines · Joe Hershberger
Hi Marek,
Quoted 27 lines · Marek Vasut
Add ethernet driver for the AR71xx and AR9xxx Atheros MIPS machines.
Signed-off-by Marek Vasut <[email protected]>Cc Daniel Schwierzeck <[email protected]>Cc Joe Hershberger <[email protected]>Cc Wills Wang <[email protected]>---
arch/mips/dts/ap121.dts | 8 + arch/mips/dts/ar933x.dtsi | 16 + arch/mips/mach-ath79/cpu.c | 47 +++ configs/ap121_defconfig | 1 + drivers/net/Kconfig | 9 + drivers/net/Makefile | 1 + drivers/net/ag7xxx.c | 794 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 876 insertions(+) create mode 100644 drivers/net/ag7xxx.cNOTE: This is RFC patch, it is by no means a standard submission, but it should
give you some starting point for the ethernet driver.
NOTE: The driver works and I can transfer data via TFTP, but this patch needs
Quoted 8 lines
Quoted 3 lines
splitting and cleanup. Some FIXMEs need to be sorted out of course.
NOTE: This is only tested on ar9331.
What is your plan for this?
Are you wanting a review to continue improvements (sounds like you already know of some improvements needed)?
A review (sans the few FIXME parts) would be nice. Also, the DT bindings and config bits should be split from the patch of course during the official submission.
Quoted 1 line
Are you transferring it to someone else to complete? If so, who?
Just wanted to get it out so others can have fun with it.
Best regards,
Marek Vasut