Skip to content

Commit 4bd7b51

Browse files
Sergei Shtylyovdavem330
authored andcommitted
micrel: add support for KSZ8041RNLI
Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not match the documented ID of 0x0022151x (where 'x' is the revision). We have to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same as KSZ8041 one, differing only in the 'phy_id' and 'name' fields. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d0977e2 commit 4bd7b51

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

drivers/net/phy/micrel.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,21 @@ static struct phy_driver ksphy_driver[] = {
335335
.suspend = genphy_suspend,
336336
.resume = genphy_resume,
337337
.driver = { .owner = THIS_MODULE,},
338+
}, {
339+
.phy_id = PHY_ID_KSZ8041RNLI,
340+
.phy_id_mask = 0x00fffff0,
341+
.name = "Micrel KSZ8041RNLI",
342+
.features = PHY_BASIC_FEATURES |
343+
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
344+
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
345+
.config_init = kszphy_config_init,
346+
.config_aneg = genphy_config_aneg,
347+
.read_status = genphy_read_status,
348+
.ack_interrupt = kszphy_ack_interrupt,
349+
.config_intr = kszphy_config_intr,
350+
.suspend = genphy_suspend,
351+
.resume = genphy_resume,
352+
.driver = { .owner = THIS_MODULE,},
338353
}, {
339354
.phy_id = PHY_ID_KSZ8051,
340355
.phy_id_mask = 0x00fffff0,

include/linux/micrel_phy.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#define PHY_ID_KSZ8021 0x00221555
2323
#define PHY_ID_KSZ8031 0x00221556
2424
#define PHY_ID_KSZ8041 0x00221510
25+
/* undocumented */
26+
#define PHY_ID_KSZ8041RNLI 0x00221537
2527
#define PHY_ID_KSZ8051 0x00221550
2628
/* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */
2729
#define PHY_ID_KSZ8001 0x0022161A

0 commit comments

Comments
 (0)