Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tbblgm119
lede
提交
6922fd81
L
lede
项目概览
tbblgm119
/
lede
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
lede
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6922fd81
编写于
7月 03, 2020
作者:
C
coolsnowwolf
提交者:
GitHub
7月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4933 from AmadeusGhost/amend
ipq40xx-5.4 fix
上级
2c8ea337
0b296d75
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
89 addition
and
69 deletion
+89
-69
target/linux/ipq40xx/base-files/etc/board.d/01_leds
target/linux/ipq40xx/base-files/etc/board.d/01_leds
+6
-1
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/base-files/etc/board.d/02_network
+6
-3
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
...pq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
+9
-63
target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch
...pq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch
+34
-1
target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch
...ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch
+34
-1
未找到文件。
target/linux/ipq40xx/base-files/etc/board.d/01_leds
浏览文件 @
6922fd81
...
...
@@ -22,7 +22,7 @@ asus,rt-acrh17)
ucidef_set_led_default
"status"
"STATUS"
"
${
boardname
}
:blue:status"
"1"
ucidef_set_led_wlan
"wlan2g"
"WLAN2G"
"
${
boardname
}
:blue:wlan2g"
"phy1tpt"
ucidef_set_led_wlan
"wlan5g"
"WLAN5G"
"
${
boardname
}
:blue:wlan5g"
"phy0tpt"
ucidef_set_led_
switch
"wan"
"WAN(blue)"
"
${
boardname
}
:blue:wan"
"switch0"
"0x20
"
ucidef_set_led_
netdev
"wan"
"WAN"
"
${
boardname
}
:blue:wan"
"eth1
"
ucidef_set_led_switch
"lan1"
"LAN1"
"
${
boardname
}
:blue:lan1"
"switch0"
"0x02"
ucidef_set_led_switch
"lan2"
"LAN2"
"
${
boardname
}
:blue:lan2"
"switch0"
"0x04"
ucidef_set_led_switch
"lan3"
"LAN3"
"
${
boardname
}
:blue:lan3"
"switch0"
"0x08"
...
...
@@ -63,6 +63,11 @@ netgear,ex6150v2)
ucidef_set_led_wlan
"wlan2g"
"WLAN2G"
"ex61x0v2:green:router"
"phy0tpt"
ucidef_set_led_wlan
"wlan5g"
"WLAN5G"
"ex61x0v2:green:client"
"phy1tpt"
;;
p2w,r619ac
|
\
p2w,r619ac-128m
)
ucidef_set_led_wlan
"wlan2g"
"WLAN2G"
"r619ac:blue:wlan2g"
"phy0tpt"
ucidef_set_led_wlan
"wlan5g"
"WLAN5G"
"r619ac:blue:wlan5g"
"phy1tpt"
;;
qxwlan,e2600ac-c1
|
\
qxwlan,e2600ac-c2
)
ucidef_set_led_wlan
"wlan2g"
"WLAN0"
"e2600ac:green:wlan0"
"phy0tpt"
...
...
target/linux/ipq40xx/base-files/etc/board.d/02_network
浏览文件 @
6922fd81
...
...
@@ -117,9 +117,7 @@ ipq40xx_setup_macs()
label_mac
=
$(
mtd_get_mac_binary
"ART"
0x1006
)
;;
asus,rt-acrh17|
\
asus,rt-ac58u|
\
p2w,r619ac-128m|
\
p2w,r619ac
)
asus,rt-ac58u
)
CI_UBIPART
=
UBI_DEV
wan_mac
=
$(
mtd_get_mac_binary_ubi Factory 0x1006
)
lan_mac
=
$(
mtd_get_mac_binary_ubi Factory 0x5006
)
...
...
@@ -153,6 +151,11 @@ ipq40xx_setup_macs()
wan_mac
=
$(
mtd_get_mac_ascii devinfo hw_mac_addr
)
lan_mac
=
$(
macaddr_add
"
$wan_mac
"
1
)
;;
p2w,r619ac|
\
p2w,r619ac-128m
)
wan_mac
=
$(
cat
/sys/class/net/eth0/address
)
lan_mac
=
$(
macaddr_add
"
$wan_mac
"
1
)
;;
esac
[
-n
"
$lan_mac
"
]
&&
ucidef_set_interface_macaddr
"lan"
$lan_mac
...
...
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
浏览文件 @
6922fd81
...
...
@@ -16,6 +16,10 @@
led
-
upgrade
=
&
led_sys
;
};
chosen
{
bootargs
-
append
=
" ubi.block=0,1 root=/dev/ubiblock0_1"
;
};
soc
{
rng
@
22000
{
status
=
"okay"
;
...
...
@@ -110,7 +114,7 @@
led_spi
{
compatible
=
"spi-gpio"
;
#
address
-
cells
=
<
1
>;
ranges
;
#
size
-
cells
=
<
0
>
;
sck
-
gpios
=
<&
tlmm
40
GPIO_ACTIVE_HIGH
>;
mosi
-
gpios
=
<&
tlmm
36
GPIO_ACTIVE_HIGH
>;
...
...
@@ -129,7 +133,7 @@
leds
{
compatible
=
"gpio-leds"
;
usb
{
led_usb
:
usb
{
label
=
"cm520-79f:blue:usb"
;
gpios
=
<&
tlmm
10
GPIO_ACTIVE_HIGH
>;
linux
,
default
-
trigger
=
"usbport"
;
...
...
@@ -216,66 +220,8 @@
#
size
-
cells
=
<
1
>;
partition
@
0
{
label
=
"SBL1"
;
reg
=
<
0x0
0x100000
>;
read
-
only
;
};
partition
@
100000
{
label
=
"MIBIB"
;
reg
=
<
0x100000
0x100000
>;
read
-
only
;
};
partition
@
200000
{
label
=
"BOOTCONFIG"
;
reg
=
<
0x200000
0x100000
>;
};
partition
@
300000
{
label
=
"QSEE"
;
reg
=
<
0x300000
0x100000
>;
read
-
only
;
};
partition
@
400000
{
label
=
"QSEE_1"
;
reg
=
<
0x400000
0x100000
>;
read
-
only
;
};
partition
@
500000
{
label
=
"CDT"
;
reg
=
<
0x500000
0x80000
>;
read
-
only
;
};
partition
@
580000
{
label
=
"CDT_1"
;
reg
=
<
0x580000
0x80000
>;
read
-
only
;
};
partition
@
600000
{
label
=
"BOOTCONFIG1"
;
reg
=
<
0x600000
0x80000
>;
};
partition
@
680000
{
label
=
"APPSBLENV"
;
reg
=
<
0x680000
0x80000
>;
};
partition
@
700000
{
label
=
"APPSBL"
;
reg
=
<
0x700000
0x200000
>;
read
-
only
;
};
partition
@
900000
{
label
=
"APPSBL_1"
;
reg
=
<
0x900000
0x200000
>;
read
-
only
;
label
=
"Bootloader"
;
reg
=
<
0x0
0xb00000
>;
};
art
:
partition
@
b00000
{
...
...
@@ -285,7 +231,7 @@
};
partition
@
b80000
{
label
=
"
ubi
"
;
label
=
"
rootfs
"
;
reg
=
<
0xb80000
0x7480000
>;
};
};
...
...
target/linux/ipq40xx/patches-4.19/705-net-add-qualcomm-ar40xx-phy.patch
浏览文件 @
6922fd81
...
...
@@ -26,7 +26,7 @@
obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
--- /dev/null
+++ b/drivers/net/phy/ar40xx.c
@@ -0,0 +1,2
090
@@
@@ -0,0 +1,2
122
@@
+/*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
...
...
@@ -799,6 +799,37 @@
+ return 0;
+}
+
+static int
+ar40xx_sw_get_port_stats(struct switch_dev *dev, int port,
+ struct switch_port_stats *stats)
+{
+ struct ar40xx_priv *priv = swdev_to_ar40xx(dev);
+ u32 num_mibs = ARRAY_SIZE(ar40xx_mibs);
+ u64 *mib_stats;
+ int ret = 0;
+ static int last_port = AR40XX_NUM_PORTS - 1;
+
+ mutex_lock(&priv->mib_lock);
+
+ /* Avoid unnecessary capture */
+ if (last_port >= port) {
+ ret = ar40xx_mib_capture(priv);
+ if (ret)
+ goto unlock;
+ }
+ last_port = port;
+
+ ar40xx_mib_fetch_port_stat(priv, port, false);
+
+ mib_stats = &priv->mib_stats[port * num_mibs];
+ /* 15: TXBYTE, 31: RXGOODBYTE */
+ stats->tx_bytes = mib_stats[15];
+ stats->rx_bytes = mib_stats[31];
+unlock:
+ mutex_unlock(&priv->mib_lock);
+ return ret;
+}
+
+static const struct switch_attr ar40xx_sw_attr_globals[] = {
+ {
+ .type = SWITCH_TYPE_INT,
...
...
@@ -1177,6 +1208,7 @@
+ /* disable phy internal loopback */
+ mdiobus_write(bus, 0x1f, 0x10, 0x6860);
+ mdiobus_write(bus, 0x1f, 0x0, 0x9040);
+ ar40xx_phy_mmd_write(priv, 0x1f, 7, 0x8076, 0x0670); /* 1000_LED_n */
+
+ for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) {
+ /* disable mac loop back */
...
...
@@ -1788,6 +1820,7 @@
+ .apply_config = ar40xx_sw_hw_apply,
+ .reset_switch = ar40xx_sw_reset_switch,
+ .get_port_link = ar40xx_sw_get_port_link,
+ .get_port_stats = ar40xx_sw_get_port_stats,
+};
+
+/* Start of phy driver support */
...
...
target/linux/ipq40xx/patches-5.4/705-net-add-qualcomm-ar40xx-phy.patch
浏览文件 @
6922fd81
...
...
@@ -26,7 +26,7 @@
obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
--- /dev/null
+++ b/drivers/net/phy/ar40xx.c
@@ -0,0 +1,2
090
@@
@@ -0,0 +1,2
123
@@
+/*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
...
...
@@ -799,6 +799,37 @@
+ return 0;
+}
+
+static int
+ar40xx_sw_get_port_stats(struct switch_dev *dev, int port,
+ struct switch_port_stats *stats)
+{
+ struct ar40xx_priv *priv = swdev_to_ar40xx(dev);
+ u32 num_mibs = ARRAY_SIZE(ar40xx_mibs);
+ u64 *mib_stats;
+ int ret = 0;
+ static int last_port = AR40XX_NUM_PORTS - 1;
+
+ mutex_lock(&priv->mib_lock);
+
+ /* Avoid unnecessary capture */
+ if (last_port >= port) {
+ ret = ar40xx_mib_capture(priv);
+ if (ret)
+ goto unlock;
+ }
+ last_port = port;
+
+ ar40xx_mib_fetch_port_stat(priv, port, false);
+
+ mib_stats = &priv->mib_stats[port * num_mibs];
+ /* 15: TXBYTE, 31: RXGOODBYTE */
+ stats->tx_bytes = mib_stats[15];
+ stats->rx_bytes = mib_stats[31];
+unlock:
+ mutex_unlock(&priv->mib_lock);
+ return ret;
+}
+
+static const struct switch_attr ar40xx_sw_attr_globals[] = {
+ {
+ .type = SWITCH_TYPE_INT,
...
...
@@ -1177,6 +1208,7 @@
+ /* disable phy internal loopback */
+ mdiobus_write(bus, 0x1f, 0x10, 0x6860);
+ mdiobus_write(bus, 0x1f, 0x0, 0x9040);
+ ar40xx_phy_mmd_write(priv, 0x1f, 7, 0x8076, 0x0670); /* 1000_LED_n */
+
+ for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) {
+ /* disable mac loop back */
...
...
@@ -1788,6 +1820,7 @@
+ .apply_config = ar40xx_sw_hw_apply,
+ .reset_switch = ar40xx_sw_reset_switch,
+ .get_port_link = ar40xx_sw_get_port_link,
+ .get_port_stats = ar40xx_sw_get_port_stats,
+};
+
+/* Start of phy driver support */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录