net: phy: dp83848: Add the TI TLK05/06 PHY ID
Subsystems (3)
PATCH 1/1 net: phy: dp83848: Add the TI TLK05/06 PHY ID
Add the TLK05/06 PHY ID to the DP83848 driver. The TI website indicates that the DP83822 device is a drop in replacement for the TLK05 device but the TLK device does not have WoL support. The TLK device is register compatible to the DP83848 and the DP83848 does not support WoL either. So this PHY can be associated with the DP83848 driver.
The initial TLKx PHY ID in the driver is a legacy ID and the public data sheet indicates a new PHY ID. So not to break any kernels out there both IDs will continue to be supported in this driver.
--- drivers/net/phy/dp83848.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/phy/dp83848.c +4 -0
@@ -12,6 +12,7 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 +#define TLK105_06_PHY_ID 0x2000a211/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */
@@ -85,6 +86,7 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, + { TLK105_06_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);
@@ -115,6 +117,8 @@ static struct phy_driver dp83848_driver[] = { dp83848_config_init),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ,NULL ), +DP83848_PHY_DRIVER (TLK105_06_PHY_ID ,"TI TLK105/06 10/100 Mbps PHY" , +NULL ), };module_phy_driver (dp83848_driver);
Signature · 1 line
2.25.0
Quoted 28 lines · Dan Murphy
Add the TLK05/06 PHY ID to the DP83848 driver. The TI website indicates that the DP83822 device is a drop in replacement for the TLK05 device but the TLK device does not have WoL support. The TLK device is register compatible to the DP83848 and the DP83848 does not support WoL either. So this PHY can be associated with the DP83848 driver.
The initial TLKx PHY ID in the driver is a legacy ID and the public data sheet indicates a new PHY ID. So not to break any kernels out there both IDs will continue to be supported in this driver.
Signed-off-by Dan Murphy <[email protected]>--- drivers/net/phy/dp83848.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/dp83848.c +1
-0@@ -12,6 +12,7 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 +#define TLK105_06_PHY_ID 0x2000a211/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */
drivers/net/phy/dp83848.c static struct mdio_device_id __maybe_unused dp83848_tbl[] = { · line 89
Quoted 4 lines
drivers/net/phy/dp83848.c +1
-0@@ -85,6 +86,7 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, + { TLK105_06_PHY_ID, 0xfffffff0 },
If the PHY ID masks out the lowest 4 bits here (they are just revision), wont we still always match on the base TLK10X_PHY_ID? Does this patch change anything?
Andrew
Quoted 13 lines
drivers/net/phy/dp83848.c +2
-0{ } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);@@ -115,6 +117,8 @@ static struct phy_driver dp83848_driver[] = { dp83848_config_init),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ,NULL ), +DP83848_PHY_DRIVER (TLK105_06_PHY_ID ,"TI TLK105/06 10/100 Mbps PHY" , +NULL ), };module_phy_driver (dp83848_driver);
Andrew Lunn
maintainerQuoted 36 lines · Dan Murphy
Add the TLK05/06 PHY ID to the DP83848 driver. The TI website indicates that the DP83822 device is a drop in replacement for the TLK05 device but the TLK device does not have WoL support. The TLK device is register compatible to the DP83848 and the DP83848 does not support WoL either. So this PHY can be associated with the DP83848 driver.
The initial TLKx PHY ID in the driver is a legacy ID and the public data sheet indicates a new PHY ID. So not to break any kernels out there both IDs will continue to be supported in this driver.
Signed-off-by Dan Murphy <[email protected]>--- drivers/net/phy/dp83848.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/dp83848.c +2
-0@@ -12,6 +12,7 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 +#define TLK105_06_PHY_ID 0x2000a211/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */ @@ -85,6 +86,7 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, + { TLK105_06_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);
drivers/net/phy/dp83848.c static struct phy_driver dp83848_driver[] = { · line 121
Quoted 5 lines
drivers/net/phy/dp83848.c +2
-0@@ -115,6 +117,8 @@ static struct phy_driver dp83848_driver[] = { dp83848_config_init),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ,NULL ), +DP83848_PHY_DRIVER (TLK105_06_PHY_ID ,"TI TLK105/06 10/100 Mbps PHY" , + NULL),
I'm pretty sure Andrew's comment is correct. Due to the mask, the TLK10X_PHY_ID entry will hit.
What you can do is change the order and the mask. Put TLK105_06_PHY_ID before TLK10X_PHY_ID and have an exact match, no mask.
Andrew
Andrew(s)
Quoted 36 lines · Andrew Lunn
Quoted 35 lines · Dan Murphy
Add the TLK05/06 PHY ID to the DP83848 driver. The TI website indicates that the DP83822 device is a drop in replacement for the TLK05 device but the TLK device does not have WoL support. The TLK device is register compatible to the DP83848 and the DP83848 does not support WoL either. So this PHY can be associated with the DP83848 driver.
The initial TLKx PHY ID in the driver is a legacy ID and the public data sheet indicates a new PHY ID. So not to break any kernels out there both IDs will continue to be supported in this driver.
Signed-off-by Dan Murphy <[email protected]>--- drivers/net/phy/dp83848.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/phy/dp83848.c +2
-0@@ -12,6 +12,7 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 +#define TLK105_06_PHY_ID 0x2000a211/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */ @@ -85,6 +86,7 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, + { TLK105_06_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);
Quoted 8 lines
drivers/net/phy/dp83848.c static struct phy_driver dp83848_driver[] = { · line 121
Quoted 6 lines
drivers/net/phy/dp83848.c +2
-0@@ -115,6 +117,8 @@ static struct phy_driver dp83848_driver[] = { dp83848_config_init),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ,NULL ), +DP83848_PHY_DRIVER (TLK105_06_PHY_ID ,"TI TLK105/06 10/100 Mbps PHY" , + NULL),I'm pretty sure Andrew's comment is correct. Due to the mask, the
TLK10X_PHY_IDentry will hit.
Yes Andrew D is correct.
Quoted 2 lines
What you can do is change the order and the mask. Put
TLK105_06_PHY_IDbeforeTLK10X_PHY_IDand have an exact match, no mask.
I don't think we need a patch then for this ID.
As Andrew D pointed out it will match the current ID since the lower nibble of the ID is masked off.
Dan
Quoted 2 lines
Andrew