provide ethernet support for ar9344 and ar9331
Subsystems (3)
v3 cover provide ethernet support for ar9344 and ar9331
changes v3:
- ag71xx_ether_halt had wrong timeout test.
- ag71xx_ether_init should return 0
changes v2:
- merge all ag71xx in to one patch
- make sere all new driver use dev_* instead of printk
- rework miibus functions.
- use it_timedout instead of own implementation
- add comments to the patches.
Oleksij Rempel (9):
add ar9331.dtsi and enable mac0
MIPS: dts: ar9344: add mac0 node
MIPS: dts: tl_wdr4300: enable mac0
MIPS: dts: tl_wdr4300: add alias for spiflash
MIPS: dts: tl_wdr4300: remove RO flag from barebox partition add phy: ar8327 driver
MIPS: dts: tl_wdr4300: rename it to tl_wdr4300 v1.7
MIPS: tplink-wdr4300_defconfig: add network support
MIPS: dts: ar9344: add APB bus
Yegor Yefremov (1):
net: ath79: add ag71xx Ethernet driver
arch/mips/configs/tplink-wdr4300_defconfig | 12 +-
arch/mips/dts/ar9331.dtsi | 12 +
...4_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} | 10 +-
arch/mips/dts/ar9344.dtsi | 44 +-
arch/mips/dts/tplink-mr3020.dts | 5 +
arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 12 +
drivers/net/Kconfig | 7 +
drivers/net/Makefile | 1 +
drivers/net/ag71xx.c | 673 +++++++++++++++++++++
drivers/net/phy/Kconfig | 5 +
drivers/net/phy/Makefile | 1 +
drivers/net/phy/ar8327.c | 280 +++++++++
12 files changed, 1042 insertions(+), 20 deletions(-)
create mode 100644 arch/mips/dts/ar9331.dtsi
rename arch/mips/dts/{ar9344_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} (85%)
create mode 100644 drivers/net/ag71xx.c
create mode 100644 drivers/net/phy/ar8327.cSignature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 1/10 net: ath79: add ag71xx Ethernet driver
From: Yegor Yefremov <[email protected]>
--- arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 12 + drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/ag71xx.c | 673 ++++++++++++++++++++++++ 4 files changed, 693 insertions(+) create mode 100644 drivers/net/ag71xx.c
arch/mips/mach-ath79/include/mach/ar71xx_regs.h +12 -0
@@ -102,6 +102,8 @@#define AR933X_PLL_CLOCK_CTRL_REG 0x08#define AR933X_PLL_DITHER_FRAC_REG 0x10#define AR933X_PLL_DITHER_REG 0x14 +#define AR933X_ETHSW_CLOCK_CONTROL_REG 0x24 +#define AR933X_ETH_XMII_CONTROL_REG 0x2c#define AR933X_PLL_CPU_CONFIG_NINT_SHIFT 10#define AR933X_PLL_CPU_CONFIG_NINT_MASK 0x3f
@@ -125,6 +127,16 @@#define AR933X_RESET_REG_RESET_MODULE 0x1c#define AR933X_RESET_REG_BOOTSTRAP 0xac +#define AR933X_RESET_GE1_MDIO BIT(23) +#define AR933X_RESET_GE0_MDIO BIT(22) +#define AR933X_RESET_GE1_MAC BIT(13) +#define AR933X_RESET_WMAC BIT(11) +#define AR933X_RESET_GE0_MAC BIT(9) +#define AR933X_RESET_SWITCH BIT(8) +#define AR933X_RESET_USB_HOST BIT(5) +#define AR933X_RESET_USB_PHY BIT(4) +#define AR933X_RESET_USBSUS_OVERRIDE BIT(3) +#define AR71XX_RESET_FULL_CHIP BIT(24)#define AR933X_BOOTSTRAP_REF_CLK_40 BIT(0)
drivers/net/Kconfig +7 -0
@@ -204,6 +204,13 @@ config DRIVER_NET_EFI_SNP bool "EFI SNP ethernet driver" depends on EFI_BOOTUP +config DRIVER_NET_AG71XX + bool "Atheros AG71xx ethernet driver" + depends on MACH_MIPS_ATH79 + select PHYLIB + help + This option enables support for Atheros AG71XX ethernet chip. + config DRIVER_NET_TSE depends on NIOS2 bool "Altera TSE ethernet driver"
drivers/net/Makefile +1 -0
@@ -30,3 +30,4 @@ obj-$(CONFIG_DRIVER_NET_SMC91111) += smc91111.o obj-$(CONFIG_DRIVER_NET_TAP) += tap.o obj-$(CONFIG_DRIVER_NET_TSE) += altera_tse.o obj-$(CONFIG_DRIVER_NET_EFI_SNP) += efi-snp.o +obj-$(CONFIG_DRIVER_NET_AG71XX) += ag71xx.o
drivers/net/ag71xx.c new file +673 -0
673 lines not on this page · raw message
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 3/10 MIPS: dts: ar9344: add mac0 node
In reply to Oleksij Rempelthis node is supported by ag71xx driver
--- arch/mips/dts/ar9344.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/mips/dts/ar9344.dtsi +10 -0
@@ -40,6 +40,16 @@ status = "disabled"; }; + mac0: mac@19000000 { + compatible = "qca,ar9344-gmac0"; + reg = <0x18070000 0x00000100>, + <0x19000000 0x01000000>; + reg-names = "gmac", "ge0"; + phy-mode = "rgmii"; + + status = "disabled"; + }; + spi: spi@1f000000 { compatible = "qca,ar7100-spi", "qca,ar9344-spi"; reg = <0x1f000000 0x1c>;
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 2/10 add ar9331.dtsi and enable mac0
In reply to Oleksij Rempel--- arch/mips/dts/ar9331.dtsi | 12 ++++++++++++ arch/mips/dts/tplink-mr3020.dts | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 arch/mips/dts/ar9331.dtsi
arch/mips/dts/ar9331.dtsi new file +12 -0
@@ -0,0 +1,12 @@ +/ { + ahb { + mac0: mac@19000000 { + compatible = "qca,ar9331-ge0"; + reg = <0x18070000 0x00000100>, + <0x19000000 0x01000000>; + reg-names = "gmac", "ge0"; + phy-mode = "mii"; + status = "disabled"; + }; + }; +};
arch/mips/dts/tplink-mr3020.dts +5 -0
@@ -1,4 +1,5 @@ #include <mips/qca/ar9331_tl_mr3020.dts> +#include "ar9331.dtsi" / { aliases {
@@ -24,3 +25,7 @@ reg = <0x80000 0x10000>; }; }; + +&mac0 { + status = "okay"; +};
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 5/10 MIPS: dts: tl_wdr4300: add alias for spiflash
In reply to Oleksij Rempelto unify the naming with TP-Link TL-MR3020.
--- arch/mips/dts/ar9344_tl_wdr4300.dts | 1 + 1 file changed, 1 insertion(+)
arch/mips/dts/ar9344_tl_wdr4300.dts +1 -0
@@ -11,6 +11,7 @@ aliases { serial0 = &uart0; + spiflash = &spiflash; }; memory@0 {
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 4/10 MIPS: dts: tl_wdr4300: enable mac0
In reply to Oleksij Rempel--- arch/mips/dts/ar9344_tl_wdr4300.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/mips/dts/ar9344_tl_wdr4300.dts +4 -0
@@ -61,3 +61,7 @@ }; }; }; + +&mac0 { + status = "okay"; +};
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 7/10 add phy: ar8327 driver
In reply to Oleksij Rempel--- drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/ar8327.c | 280 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 286 insertions(+) create mode 100644 drivers/net/phy/ar8327.c
drivers/net/phy/Kconfig +5 -0
@@ -8,6 +8,11 @@ if PHYLIB comment "MII PHY device drivers" +config AR8327N_PHY + bool "Driver for QCA AR8327N PHYs" + ---help--- + Currently supports the AR8327N PHY. + config AT803X_PHY bool "Driver for Atheros AT803X PHYs" ---help---
drivers/net/phy/Makefile +1 -0
@@ -1,4 +1,5 @@ obj-y += phy.o mdio_bus.o +obj-$(CONFIG_AR8327N_PHY) += ar8327.o obj-$(CONFIG_AT803X_PHY) += at803x.o obj-$(CONFIG_LXT_PHY) += lxt.o obj-$(CONFIG_MARVELL_PHY) += marvell.o
drivers/net/phy/ar8327.c new file +280 -0
280 lines not on this page · raw message
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 6/10 MIPS: dts: tl_wdr4300: remove RO flag from barebox partition
In reply to Oleksij Rempelwe need it RW for barebox updates.
--- arch/mips/dts/ar9344_tl_wdr4300.dts | 1 - 1 file changed, 1 deletion(-)
arch/mips/dts/ar9344_tl_wdr4300.dts +0 -1
@@ -53,7 +53,6 @@ partition@0 { label = "barebox"; reg = <0 0x80000>; - read-only; }; partition@80000 {
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 8/10 MIPS: dts: tl_wdr4300: rename it to tl_wdr4300 v1.7
In reply to Oleksij RempelThe minor version of TP-Link are usually big enough that it need extra vendor partition on the flash with additional configurations like PLL, CPU and RAM freqs.
Visually I was able to confirm at least different SPI Flash and RAM chips.
---
arch/mips/configs/tplink-wdr4300_defconfig | 2 +-
arch/mips/dts/{ar9344_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
rename arch/mips/dts/{ar9344_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} (91%)arch/mips/configs/tplink-wdr4300_defconfig +1 -1
@@ -1,5 +1,5 @@ CONFIG_BUILTIN_DTB=y -CONFIG_BUILTIN_DTB_NAME="ar9344_tl_wdr4300" +CONFIG_BUILTIN_DTB_NAME="ar9344-tl-wdr4300-v1.7" CONFIG_MACH_MIPS_ATH79=y CONFIG_BOARD_TPLINK_WDR4300=y CONFIG_PBL_IMAGE=y
arch/mips/dts/ar9344-tl-wdr4300-v1.7.dts renamed from arch/mips/dts/ar9344_tl_wdr4300.dts +2 -2
@@ -6,8 +6,8 @@ #include "ar9344.dtsi" / { - model = "TP-Link WDR4300"; - compatible = "tplink,tl-wdr4300"; + model = "TP-Link WDR4300 v1.7"; + compatible = "tplink,tl-wdr4300", "tplink,tl-wdr4300-v1.7"; aliases { serial0 = &uart0;
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 10/10 MIPS: dts: ar9344: add APB bus
In reply to Oleksij Rempeland move nodes which belong to APB.
--- arch/mips/dts/ar9344.dtsi | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-)
arch/mips/dts/ar9344.dtsi +25 -17
@@ -29,15 +29,33 @@ #address-cells = <1>; #size-cells = <1>; - uart0: uart@18020000 { - compatible = "ns16550a", "qca,ar9344-uart0"; - reg = <0x18020000 0x20>; + apb { + compatible = "simple-bus"; + ranges; - reg-shift = <2>; - reg-io-width = <4>; - big-endian; + #address-cells = <1>; + #size-cells = <1>; - status = "disabled"; + uart0: uart@18020000 { + compatible = "ns16550a", "qca,ar9344-uart0"; + reg = <0x18020000 0x20>; + + reg-shift = <2>; + reg-io-width = <4>; + big-endian; + + status = "disabled"; + }; + + spi: spi@1f000000 { + compatible = "qca,ar7100-spi", "qca,ar9344-spi"; + reg = <0x1f000000 0x1c>; + + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + }; }; mac0: mac@19000000 {
@@ -49,15 +67,5 @@ status = "disabled"; }; - - spi: spi@1f000000 { - compatible = "qca,ar7100-spi", "qca,ar9344-spi"; - reg = <0x1f000000 0x1c>; - - #address-cells = <1>; - #size-cells = <0>; - - status = "disabled"; - }; }; };
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 9/10 MIPS: tplink-wdr4300_defconfig: add network support
In reply to Oleksij Rempel--- arch/mips/configs/tplink-wdr4300_defconfig | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
arch/mips/configs/tplink-wdr4300_defconfig +7 -3
@@ -32,6 +32,10 @@ CONFIG_CMD_LET=y CONFIG_CMD_MSLEEP=y CONFIG_CMD_READF=y CONFIG_CMD_SLEEP=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_HOST=y +CONFIG_CMD_MIITOOL=y +CONFIG_CMD_PING=y CONFIG_CMD_ECHO_E=y CONFIG_CMD_EDIT=y CONFIG_CMD_READLINE=y
@@ -55,15 +59,13 @@ CONFIG_CMD_TIME=y CONFIG_NET=y CONFIG_NET_NFS=y CONFIG_NET_NETCONSOLE=y -CONFIG_NET_RESOLV=y -CONFIG_NET_DHCP=y CONFIG_NET_SNTP=y CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y CONFIG_OF_BAREBOX_ENV_IN_FS=y CONFIG_DRIVER_SERIAL_NS16550=y CONFIG_DRIVER_NET_AG71XX=y -CONFIG_AT803X_PHY=y +CONFIG_AR8327N_PHY=y CONFIG_MDIO_BITBANG=y CONFIG_MDIO_GPIO=y CONFIG_DRIVER_SPI_ATH79=y
@@ -74,5 +76,7 @@ CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_LED_GPIO_OF=y CONFIG_LED_TRIGGERS=y +CONFIG_FS_TFTP=y +CONFIG_FS_NFS=y CONFIG_DIGEST_SHA224_GENERIC=y CONFIG_DIGEST_SHA256_GENERIC=y
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 22 lines · Oleksij Rempel
changes v3:
-ag71xx_ether_halthad wrong timeout test.
-ag71xx_ether_initshould return 0changes v2:
- merge all ag71xx in to one patch
- make sere all new driver use dev_* instead of printk
- rework miibus functions.
- useit_timedoutinstead of own implementation
- add comments to the patches.Oleksij Rempel (9):
addar9331.dtsiand enable mac0
MIPS: dts: ar9344: add mac0 node
MIPS: dts:tl_wdr4300: enable mac0
MIPS: dts:tl_wdr4300: add alias for spiflash
MIPS: dts:tl_wdr4300: remove RO flag from barebox partition add phy: ar8327 driver
MIPS: dts:tl_wdr4300: rename it totl_wdr4300v1.7
MIPS: tplink-wdr4300_defconfig: add network support
MIPS: dts: ar9344: add APB bus
Quoted 2 lines
Yegor Yefremov (1):
net: ath79: add ag71xx Ethernet driver
Applied, thanks
Sascha
Quoted 28 lines
arch/mips/configs/tplink-wdr4300_defconfig | 12 +- arch/mips/dts/ar9331.dtsi | 12 + ...4_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} | 10 +- arch/mips/dts/ar9344.dtsi | 44 +- arch/mips/dts/tplink-mr3020.dts | 5 + arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 12 + drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/ag71xx.c | 673 +++++++++++++++++++++ drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/ar8327.c | 280 +++++++++ 12 files changed, 1042 insertions(+), 20 deletions(-) create mode 100644 arch/mips/dts/ar9331.dtsi rename arch/mips/dts/{ar9344_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} (85%) create mode 100644 drivers/net/ag71xx.c create mode 100644 drivers/net/phy/ar8327.cSignature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 12 lines · On Mon, 18 Sep 2017 08:41:03 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 11 lines · Oleksij Rempel
changes v3:
-ag71xx_ether_halthad wrong timeout test.
-ag71xx_ether_initshould return 0changes v2:
- merge all ag71xx in to one patch
- make sere all new driver use dev_* instead of printk
- rework miibus functions.
- useit_timedoutinstead of own implementation
- add comments to the patches.
Quoted 7 lines
Quoted 7 lines
Oleksij Rempel (9):
addar9331.dtsiand enable mac0
MIPS: dts: ar9344: add mac0 node
MIPS: dts:tl_wdr4300: enable mac0
MIPS: dts:tl_wdr4300: add alias for spiflash
MIPS: dts:tl_wdr4300: remove RO flag from barebox partition add phy: ar8327 driver
'add phy: ar8327 driver' -> 'phy: add ar8327 driver' ?
Quoted 50 lines
Quoted 6 lines
MIPS: dts:
tl_wdr4300: rename it totl_wdr4300v1.7
MIPS: tplink-wdr4300_defconfig: add network support
MIPS: dts: ar9344: add APB busYegor Yefremov (1):
net: ath79: add ag71xx Ethernet driverApplied, thanks
Sascha
Quoted 28 lines
arch/mips/configs/tplink-wdr4300_defconfig | 12 +- arch/mips/dts/ar9331.dtsi | 12 + ...4_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} | 10 +- arch/mips/dts/ar9344.dtsi | 44 +- arch/mips/dts/tplink-mr3020.dts | 5 + arch/mips/mach-ath79/include/mach/ar71xx_regs.h | 12 + drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 + drivers/net/ag71xx.c | 673 +++++++++++++++++++++ drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/ar8327.c | 280 +++++++++ 12 files changed, 1042 insertions(+), 20 deletions(-) create mode 100644 arch/mips/dts/ar9331.dtsi rename arch/mips/dts/{ar9344_tl_wdr4300.dts => ar9344-tl-wdr4300-v1.7.dts} (85%) create mode 100644 drivers/net/ag71xx.c create mode 100644 drivers/net/phy/ar8327.cSignature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/bareboxSignature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 7 lines
Best regards, Antony Pavlov _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 24 lines · Antony Pavlov
Quoted 12 lines · On Mon, 18 Sep 2017 08:41:03 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 11 lines · Oleksij Rempel
changes v3:
-ag71xx_ether_halthad wrong timeout test.
-ag71xx_ether_initshould return 0changes v2:
- merge all ag71xx in to one patch
- make sere all new driver use dev_* instead of printk
- rework miibus functions.
- useit_timedoutinstead of own implementation
- add comments to the patches.Quoted 7 lines
Quoted 7 lines
Oleksij Rempel (9):
addar9331.dtsiand enable mac0
MIPS: dts: ar9344: add mac0 node
MIPS: dts:tl_wdr4300: enable mac0
MIPS: dts:tl_wdr4300: add alias for spiflash
MIPS: dts:tl_wdr4300: remove RO flag from barebox partition add phy: ar8327 driver
Quoted 1 line
'add phy: ar8327 driver' -> 'phy: add ar8327 driver' ?
Yes, changed that.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox