mt7530 driver + neccesary patches (including dtc-lexer patch)
This commit is contained in:
parent
c72f182d66
commit
1132ab2b4b
5 changed files with 1832 additions and 8611 deletions
File diff suppressed because it is too large
Load diff
1737
experimental/mt7530.c
Normal file
1737
experimental/mt7530.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1170,11 +1170,13 @@ CONFIG_NET_PTP_CLASSIFY=y
|
|||
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NETFILTER_ADVANCED=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
|
||||
#
|
||||
# Core Netfilter Configuration
|
||||
#
|
||||
CONFIG_NETFILTER_INGRESS=y
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y
|
||||
CONFIG_NETFILTER_FAMILY_ARP=y
|
||||
# CONFIG_NETFILTER_NETLINK_ACCT is not set
|
||||
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
|
||||
|
@ -1288,6 +1290,7 @@ CONFIG_NETFILTER_XT_MATCH_HL=y
|
|||
# CONFIG_NETFILTER_XT_MATCH_OSF is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
|
||||
|
@ -1342,6 +1345,7 @@ CONFIG_IP_NF_ARP_MANGLE=y
|
|||
# end of IP: Netfilter Configuration
|
||||
|
||||
CONFIG_NF_CONNTRACK_BRIDGE=y
|
||||
# CONFIG_BRIDGE_NF_EBTABLES is not set
|
||||
# CONFIG_BPFILTER is not set
|
||||
# CONFIG_IP_DCCP is not set
|
||||
# CONFIG_IP_SCTP is not set
|
||||
|
@ -1349,24 +1353,32 @@ CONFIG_NF_CONNTRACK_BRIDGE=y
|
|||
# CONFIG_TIPC is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_L2TP is not set
|
||||
# CONFIG_BRIDGE is not set
|
||||
CONFIG_STP=y
|
||||
CONFIG_GARP=y
|
||||
CONFIG_MRP=y
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
# CONFIG_BRIDGE_VLAN_FILTERING is not set
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_NET_DSA=m
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=m
|
||||
CONFIG_NET_DSA_TAG_BRCM=m
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=m
|
||||
# CONFIG_NET_DSA_TAG_GSWIP is not set
|
||||
# CONFIG_NET_DSA_TAG_DSA is not set
|
||||
# CONFIG_NET_DSA_TAG_EDSA is not set
|
||||
# CONFIG_NET_DSA_TAG_MTK is not set
|
||||
CONFIG_NET_DSA_TAG_MTK=y
|
||||
# CONFIG_NET_DSA_TAG_KSZ is not set
|
||||
# CONFIG_NET_DSA_TAG_OCELOT is not set
|
||||
# CONFIG_NET_DSA_TAG_QCA is not set
|
||||
# CONFIG_NET_DSA_TAG_LAN9303 is not set
|
||||
# CONFIG_NET_DSA_TAG_SJA1105 is not set
|
||||
# CONFIG_NET_DSA_TAG_TRAILER is not set
|
||||
# CONFIG_VLAN_8021Q is not set
|
||||
CONFIG_VLAN_8021Q=y
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
# CONFIG_DECNET is not set
|
||||
CONFIG_LLC=y
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
|
@ -2337,7 +2349,7 @@ CONFIG_B53_SERDES=m
|
|||
CONFIG_NET_DSA_BCM_SF2=m
|
||||
# CONFIG_NET_DSA_LOOP is not set
|
||||
# CONFIG_NET_DSA_LANTIQ_GSWIP is not set
|
||||
# CONFIG_NET_DSA_MT7530 is not set
|
||||
CONFIG_NET_DSA_MT7530=y
|
||||
# CONFIG_NET_DSA_MV88E6060 is not set
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ9477 is not set
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ8795 is not set
|
||||
|
@ -2353,6 +2365,7 @@ CONFIG_NET_DSA_BCM_SF2=m
|
|||
# end of Distributed Switch Architecture drivers
|
||||
|
||||
CONFIG_ETHERNET=y
|
||||
CONFIG_MDIO=y
|
||||
CONFIG_NET_VENDOR_3COM=y
|
||||
# CONFIG_TYPHOON is not set
|
||||
CONFIG_NET_VENDOR_ADAPTEC=y
|
||||
|
@ -2379,7 +2392,7 @@ CONFIG_NET_VENDOR_ATHEROS=y
|
|||
# CONFIG_ATL1 is not set
|
||||
# CONFIG_ATL1E is not set
|
||||
# CONFIG_ATL1C is not set
|
||||
# CONFIG_ALX is not set
|
||||
CONFIG_ALX=y
|
||||
CONFIG_NET_VENDOR_AURORA=y
|
||||
# CONFIG_AURORA_NB8800 is not set
|
||||
CONFIG_NET_VENDOR_BROADCOM=y
|
||||
|
@ -2531,6 +2544,7 @@ CONFIG_NET_VENDOR_RENESAS=y
|
|||
CONFIG_SH_ETH=y
|
||||
# CONFIG_RAVB is not set
|
||||
CONFIG_NET_VENDOR_ROCKER=y
|
||||
# CONFIG_ROCKER is not set
|
||||
CONFIG_NET_VENDOR_SAMSUNG=y
|
||||
# CONFIG_SXGBE_ETH is not set
|
||||
CONFIG_NET_VENDOR_SEEQ=y
|
||||
|
|
13
kernel/patches/dtc-lexer.patch
Normal file
13
kernel/patches/dtc-lexer.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
|
||||
index 5c6c3fd557d7..3f942ce7f26d 100644
|
||||
--- a/scripts/dtc/dtc-lexer.l
|
||||
+++ b/scripts/dtc/dtc-lexer.l
|
||||
@@ -23,7 +23,7 @@ LINECOMMENT "//".*\n
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
extern bool treesource_error;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
62
kernel/patches/mt7530c.patch
Normal file
62
kernel/patches/mt7530c.patch
Normal file
|
@ -0,0 +1,62 @@
|
|||
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
|
||||
index ed1ec10ec62b..bebc65b1a22c 100644
|
||||
--- a/drivers/net/dsa/mt7530.c
|
||||
+++ b/drivers/net/dsa/mt7530.c
|
||||
@@ -1258,7 +1258,7 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
priv->ethernet = syscon_node_to_regmap(dn);
|
||||
if (IS_ERR(priv->ethernet))
|
||||
return PTR_ERR(priv->ethernet);
|
||||
-
|
||||
+ /*
|
||||
regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
|
||||
ret = regulator_enable(priv->core_pwr);
|
||||
if (ret < 0) {
|
||||
@@ -1274,6 +1274,7 @@ mt7530_setup(struct dsa_switch *ds)
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
+ */
|
||||
}
|
||||
|
||||
/* Reset whole chip through gpio pin or memory-mapped registers for
|
||||
@@ -1662,16 +1663,19 @@ mt7530_probe(struct mdio_device *mdiodev)
|
||||
*/
|
||||
priv->id = (unsigned int)(unsigned long)
|
||||
of_device_get_match_data(&mdiodev->dev);
|
||||
-
|
||||
+ /*
|
||||
if (priv->id == ID_MT7530) {
|
||||
priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core");
|
||||
- if (IS_ERR(priv->core_pwr))
|
||||
+ if (IS_ERR(priv->core_pwr)){
|
||||
return PTR_ERR(priv->core_pwr);
|
||||
+ }
|
||||
|
||||
priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io");
|
||||
- if (IS_ERR(priv->io_pwr))
|
||||
+ if (IS_ERR(priv->io_pwr)){
|
||||
return PTR_ERR(priv->io_pwr);
|
||||
+ }
|
||||
}
|
||||
+ */
|
||||
|
||||
/* Not MCM that indicates switch works as the remote standalone
|
||||
* integrated circuit so the GPIO pin would be used to complete
|
||||
@@ -1702,7 +1706,7 @@ mt7530_remove(struct mdio_device *mdiodev)
|
||||
{
|
||||
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
|
||||
int ret = 0;
|
||||
-
|
||||
+ /*
|
||||
ret = regulator_disable(priv->core_pwr);
|
||||
if (ret < 0)
|
||||
dev_err(priv->dev,
|
||||
@@ -1712,7 +1716,7 @@ mt7530_remove(struct mdio_device *mdiodev)
|
||||
if (ret < 0)
|
||||
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
|
||||
ret);
|
||||
-
|
||||
+ */
|
||||
dsa_unregister_switch(priv->ds);
|
||||
mutex_destroy(&priv->reg_mutex);
|
||||
}
|
Loading…
Reference in a new issue