aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mt7530.h
diff options
context:
space:
mode:
authorRené van Dorst <opensource@vdorst.com>2019-06-20 14:21:55 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-22 16:58:24 -0700
commit7ef6f6f8d237fa6724108b57d9706cb5069688e4 (patch)
treeafc69d89c4c42d77dc56f347cb5f591cc4ce6380 /drivers/net/dsa/mt7530.h
parentnet: ethernet: mediatek: Add MT7621 TRGMII mode support (diff)
downloadlinux-dev-7ef6f6f8d237fa6724108b57d9706cb5069688e4.tar.xz
linux-dev-7ef6f6f8d237fa6724108b57d9706cb5069688e4.zip
net: dsa: mt7530: Add MT7621 TRGMII mode support
This patch add support TRGMII mode for MT7621 internal MT7530 switch. MT7621 TRGMII has only one fix speed mode of 1200MBit. Also adding support for mt7530 25MHz and 40MHz crystal clocksource. Values are based on Banana Pi R2 bsp [1]. Don't change MT7623 registers on a MT7621 device. [1] https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/master/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L769 Signed-off-by: René van Dorst <opensource@vdorst.com> Tested-by: Frank Wunderlich <frank-w@public-files.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mt7530.h')
-rw-r--r--drivers/net/dsa/mt7530.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index 4331429969fa..bfac90f48102 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -244,6 +244,10 @@ enum mt7530_vlan_port_attr {
/* Register for hw trap status */
#define MT7530_HWTRAP 0x7800
+#define HWTRAP_XTAL_MASK (BIT(10) | BIT(9))
+#define HWTRAP_XTAL_25MHZ (BIT(10) | BIT(9))
+#define HWTRAP_XTAL_40MHZ (BIT(10))
+#define HWTRAP_XTAL_20MHZ (BIT(9))
/* Register for hw trap modification */
#define MT7530_MHWTRAP 0x7804