Skip to content

Commit 18e8817

Browse files
committed
Merge branch 'ath79-add-ag71xx-support'
Oleksij Rempel says: ==================== MIPS: ath79: add ag71xx support 2019.05.24 v6: - ag71xx: remove double union - ag71xx: reverse Christmas tree for all functions - ag71xx: add Reviewed-by: Andrew Lunn <[email protected]> 2019.05.20 v5: - ag71xx: remove MII_CMD_WRITE, the name is confusing. It is actually disables MII_CMD_READ. - ag71xx: rework ag71xx_mdio_mii_read/write - ag71xx: set proper mask for the addr in ag71xx_mdio_mii_read/write - Kconfig: remove MDIO_BITBANG - ag71xx: ./scripts/checkpatch.pl it. 2019.05.19 v4: - DT: define eth and mdio clocks - ag71xx: remove module parameters - ag71xx: return proper error value on mdio_read/write - ag71xx: use proper mdio clock registration - ag71xx: add ag71xx_dma_wait_stop() for ag71xx_dma_reset() - ag71xx: remove ag71xx_speed_str() - ag71xx: use phydev->link/sped/duplex instead of ag-> variants - ag71xx: use WARN() instead of BUG() - ag71xx: drop big part of ag71xx_phy_link_adjust() - ag71xx: drop most of ag71xx_do_ioctl() - ag71xx: register eth clock - ag71xx: remove AG71XX_ETH0_NO_MDIO quirk. 2019.04.22 v3: - ag71xx: use phy_modes() instead of ag71xx_get_phy_if_mode_name() - ag71xx: remove .ndo_poll_controller support - ag71xx: unregister_netdev before disconnecting phy. 2019.04.18 v2: - ag71xx: add list of openwrt authors - ag71xx: remove redundant PHY_POLL assignment - ag71xx: use phy_attached_info instead of netif_info - ag71xx: remove redundant netif_carrier_off() on .stop. - DT: use "ethernet" instead of "eth" This patch series provide ethernet support for many Atheros/QCA MIPS based SoCs. I reworked ag71xx driver which was previously maintained within OpenWRT repository. So far, following changes was made to make upstreaming easier: - everything what can be some how used in user space was removed. Most of it was debug functionality. - most of deficetree bindings was removed. Not every thing made sense and most of it is SoC specific, so it is possible to detect it by compatible. - mac and mdio parts are merged in to one driver. It makes easier to maintaine SoC specific quirks. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 9b3c520 + d51b6ce commit 18e8817

File tree

6 files changed

+1987
-1
lines changed

6 files changed

+1987
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Required properties:
2+
- compatible: Should be "qca,<soc>-eth". Currently support compatibles are:
3+
qca,ar7100-eth - Atheros AR7100
4+
qca,ar7240-eth - Atheros AR7240
5+
qca,ar7241-eth - Atheros AR7241
6+
qca,ar7242-eth - Atheros AR7242
7+
qca,ar9130-eth - Atheros AR9130
8+
qca,ar9330-eth - Atheros AR9330
9+
qca,ar9340-eth - Atheros AR9340
10+
qca,qca9530-eth - Qualcomm Atheros QCA9530
11+
qca,qca9550-eth - Qualcomm Atheros QCA9550
12+
qca,qca9560-eth - Qualcomm Atheros QCA9560
13+
14+
- reg : Address and length of the register set for the device
15+
- interrupts : Should contain eth interrupt
16+
- phy-mode : See ethernet.txt file in the same directory
17+
- clocks: the clock used by the core
18+
- clock-names: the names of the clock listed in the clocks property. These are
19+
"eth" and "mdio".
20+
- resets: Should contain phandles to the reset signals
21+
- reset-names: Should contain the names of reset signal listed in the resets
22+
property. These are "mac" and "mdio"
23+
24+
Optional properties:
25+
- phy-handle : phandle to the PHY device connected to this device.
26+
- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
27+
Use instead of phy-handle.
28+
29+
Optional subnodes:
30+
- mdio : specifies the mdio bus, used as a container for phy nodes
31+
according to phy.txt in the same directory
32+
33+
Example:
34+
35+
ethernet@1a000000 {
36+
compatible = "qca,ar9330-eth";
37+
reg = <0x1a000000 0x200>;
38+
interrupts = <5>;
39+
resets = <&rst 13>, <&rst 23>;
40+
reset-names = "mac", "mdio";
41+
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_MDIO>;
42+
clock-names = "eth", "mdio";
43+
44+
phy-mode = "gmii";
45+
};

arch/mips/boot/dts/qca/ar9331.dtsi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,32 @@
116116
};
117117
};
118118

119+
eth0: ethernet@19000000 {
120+
compatible = "qca,ar9330-eth";
121+
reg = <0x19000000 0x200>;
122+
interrupts = <4>;
123+
124+
resets = <&rst 9>, <&rst 22>;
125+
reset-names = "mac", "mdio";
126+
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>;
127+
clock-names = "eth", "mdio";
128+
129+
status = "disabled";
130+
};
131+
132+
eth1: ethernet@1a000000 {
133+
compatible = "qca,ar9330-eth";
134+
reg = <0x1a000000 0x200>;
135+
interrupts = <5>;
136+
137+
resets = <&rst 13>, <&rst 23>;
138+
reset-names = "mac", "mdio";
139+
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>;
140+
clock-names = "eth", "mdio";
141+
142+
status = "disabled";
143+
};
144+
119145
usb: usb@1b000100 {
120146
compatible = "chipidea,usb2";
121147
reg = <0x1b000000 0x200>;

arch/mips/boot/dts/qca/ar9331_dpt_module.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,11 @@
7676
reg = <0>;
7777
};
7878
};
79+
80+
&eth0 {
81+
status = "okay";
82+
};
83+
84+
&eth1 {
85+
status = "okay";
86+
};

drivers/net/ethernet/atheros/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
config NET_VENDOR_ATHEROS
77
bool "Atheros devices"
88
default y
9-
depends on PCI
9+
depends on (PCI || ATH79)
1010
---help---
1111
If you have a network (Ethernet) card belonging to this class, say Y.
1212

@@ -17,6 +17,14 @@ config NET_VENDOR_ATHEROS
1717

1818
if NET_VENDOR_ATHEROS
1919

20+
config AG71XX
21+
tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
22+
depends on ATH79
23+
select PHYLIB
24+
help
25+
If you wish to compile a kernel for AR7XXX/91XXX and enable
26+
ethernet support, then you should always answer Y to this.
27+
2028
config ATL2
2129
tristate "Atheros L2 Fast Ethernet support"
2230
depends on PCI

drivers/net/ethernet/atheros/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Makefile for the Atheros network device drivers.
44
#
55

6+
obj-$(CONFIG_AG71XX) += ag71xx.o
67
obj-$(CONFIG_ATL1) += atlx/
78
obj-$(CONFIG_ATL2) += atlx/
89
obj-$(CONFIG_ATL1E) += atl1e/

0 commit comments

Comments
 (0)