mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-28 02:27:18 +01:00
mediatek: fix 2.5G PHY LED polarity for MT7987
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
The patch that adds MT7987 support to the mtk-2p5ge
driver does the following:
case MTK_2P5GPHY_ID_MT7987:
phy_clear_bits_mmd MTK_PHY_LED_ON_POLARITY
case MTK_2P5GPHY_ID_MT7988:
phy_set_bits_mmd.. MTK_PHY_LED_ON_POLARITY
phy_set_bits_mmd... MTK_PHY_LED_ON_POLARITY | xxx
This clearly resulted in the LED polarity of the 2.5G PHY
on the MT7987 being reversed. Remove redundant MMD operations
to fix the 2.5G PHY LED error on Bananapi BPi-R4 Lite.
Fixes: d62fc50f ("mediatek: import patches from SDK to support MT7987 Ethernet")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
This commit is contained in:
parent
0827720e04
commit
b5195cd473
1 changed files with 13 additions and 3 deletions
|
|
@ -344,7 +344,7 @@
|
|||
{
|
||||
struct mtk_i2p5ge_phy_priv *priv = phydev->priv;
|
||||
void __iomem *mcu_csr_base, *pmb_addr;
|
||||
@@ -135,7 +449,20 @@ static int mt798x_2p5ge_phy_config_init(
|
||||
@@ -135,15 +449,27 @@ static int mt798x_2p5ge_phy_config_init(
|
||||
if (phydev->interface != PHY_INTERFACE_MODE_INTERNAL)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
@ -366,7 +366,17 @@
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -293,6 +620,7 @@ static int mt798x_2p5ge_phy_probe(struct
|
||||
/* Setup LED */
|
||||
phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MTK_PHY_LED0_ON_CTRL,
|
||||
- MTK_PHY_LED_ON_POLARITY | MTK_PHY_LED_ON_LINK10 |
|
||||
- MTK_PHY_LED_ON_LINK100 | MTK_PHY_LED_ON_LINK1000 |
|
||||
- MTK_PHY_LED_ON_LINK2500);
|
||||
+ MTK_PHY_LED_ON_LINK10 | MTK_PHY_LED_ON_LINK100 |
|
||||
+ MTK_PHY_LED_ON_LINK1000 | MTK_PHY_LED_ON_LINK2500);
|
||||
phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MTK_PHY_LED1_ON_CTRL,
|
||||
MTK_PHY_LED_ON_FDX | MTK_PHY_LED_ON_HDX);
|
||||
|
||||
@@ -293,6 +619,7 @@ static int mt798x_2p5ge_phy_probe(struct
|
||||
return -ENOMEM;
|
||||
|
||||
switch (phydev->drv->phy_id) {
|
||||
|
|
@ -374,7 +384,7 @@
|
|||
case MTK_2P5GPHY_ID_MT7988:
|
||||
/* The original hardware only sets MDIO_DEVS_PMAPMD */
|
||||
phydev->c45_ids.mmds_present |= MDIO_DEVS_PCS |
|
||||
@@ -312,6 +640,20 @@ static int mt798x_2p5ge_phy_probe(struct
|
||||
@@ -312,6 +639,20 @@ static int mt798x_2p5ge_phy_probe(struct
|
||||
|
||||
static struct phy_driver mtk_2p5gephy_driver[] = {
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue