aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorINAGAKI Hiroshi <musashino.open@gmail.com>2020-03-30 15:47:44 +0900
committerChuanhong Guo <gch981213@gmail.com>2020-06-11 21:50:01 +0800
commit8f3b176e8654f19f8b545ceaad08423a1214b667 (patch)
treec14803206004d40fdf11be2f4492c23cba14bda2 /target/linux/generic/files
parent941ec28b355ea690b5682d2bf8175aa513379997 (diff)
downloadupstream-8f3b176e8654f19f8b545ceaad08423a1214b667.tar.gz
upstream-8f3b176e8654f19f8b545ceaad08423a1214b667.tar.bz2
upstream-8f3b176e8654f19f8b545ceaad08423a1214b667.zip
kernel: rtl8367b: fix external interface modes
The interface mode number of RGMII_33V is 7 on RTL8367, but it's 9 on RTL8367B. the external interface modes for RTL8367 are follows: - 0, Disabled - 1, RGMII - 2, MII_MAC - 3, MII_PHY - 4, TMII_MAC - 5, TMII_PHY - 6, GMII - 7, RGMII_33V the external interface modes for RTL8367B are follows: - 0, Disabled - 1, RGMII - 2, MII_MAC - 3, MII_PHY - 4, TMII_MAC - 5, TMII_PHY - 6, GMII - 7, RMII_MAC - 8, RMII_PHY - 9, RGMII_33V But the driver in U-Boot of RT-N56U GPL tar blocks using RGMII_33V (9) mode and it seems to be unsupported on RTL8367B, so drop it from switch-case in rtl8367b_extif_set_mode. ref (RTL8367): - TL-WR2453ND v1 ref (RTL8367B): - ASUS RT-N56U - TP-Link Archer C2 v1 Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/rtl8367b.c1
-rw-r--r--target/linux/generic/files/include/linux/rtl8367.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8367b.c b/target/linux/generic/files/drivers/net/phy/rtl8367b.c
index 1b1d5001a3..3599791a51 100644
--- a/target/linux/generic/files/drivers/net/phy/rtl8367b.c
+++ b/target/linux/generic/files/drivers/net/phy/rtl8367b.c
@@ -781,7 +781,6 @@ static int rtl8367b_extif_set_mode(struct rtl8366_smi *smi, int id,
/* set port mode */
switch (mode) {
case RTL8367_EXTIF_MODE_RGMII:
- case RTL8367_EXTIF_MODE_RGMII_33V:
REG_RMW(smi, RTL8367B_CHIP_DEBUG0_REG,
RTL8367B_DEBUG0_SEL33(id),
RTL8367B_DEBUG0_SEL33(id));
diff --git a/target/linux/generic/files/include/linux/rtl8367.h b/target/linux/generic/files/include/linux/rtl8367.h
index 855de6a5cc..14150393e2 100644
--- a/target/linux/generic/files/include/linux/rtl8367.h
+++ b/target/linux/generic/files/include/linux/rtl8367.h
@@ -39,6 +39,9 @@ enum rtl8367_extif_mode {
RTL8367_EXTIF_MODE_TMII_PHY,
RTL8367_EXTIF_MODE_GMII,
RTL8367_EXTIF_MODE_RGMII_33V,
+ RTL8367B_EXTIF_MODE_RMII_MAC = 7,
+ RTL8367B_EXTIF_MODE_RMII_PHY,
+ RTL8367B_EXTIF_MODE_RGMII_33V,
};
struct rtl8367_extif_config {