* [PATCH net-next v1 0/3] add support for phy chip and firmware
@ 2026-09-16 8:14 javen
2026-09-16 8:14 ` [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG javen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: javen @ 2026-09-16 8:14 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
freddy_gu, nb, maxime.chevallier
Cc: netdev, linux-kernel, daniel, vladimir.oltean, Javen Xu
From: Javen Xu <javen_xu@realsil.com.cn>
This series patch add support forRTL8261CE_CG and RTL8261D_VM, and add
firmware support for RTL8261D.
Javen Xu (3):
net: phy: realtek: add support for RTL8261CE_CG
net: phy: realtek: add firmware for RTL8261D
net: phy: realtek: add support for RTL8261D_VM
drivers/net/phy/realtek/realtek_main.c | 39 +++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG
2026-09-16 8:14 [PATCH net-next v1 0/3] add support for phy chip and firmware javen
@ 2026-09-16 8:14 ` javen
2026-09-16 12:31 ` Andrew Lunn
2026-09-16 8:14 ` [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D javen
2026-09-16 8:14 ` [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM javen
2 siblings, 1 reply; 7+ messages in thread
From: javen @ 2026-09-16 8:14 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
freddy_gu, nb, maxime.chevallier
Cc: netdev, linux-kernel, daniel, vladimir.oltean, Javen Xu
From: Javen Xu <javen_xu@realsil.com.cn>
Add support for RTL8261CE_CG, its phy id is 0x001cc899. RTL8261CE_CG
share the same sub_phy_id and firmware with RTL8261C_CG.
Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
drivers/net/phy/realtek/realtek_main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 97b0b67b9900..d0d09e8e8f5c 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -257,6 +257,7 @@
#define RTL_8251B 0x001cc862
#define RTL_8261C 0x001cc890
#define RTL_8261C_CG 0x001cc898
+#define RTL_8261CE_CG 0x001cc899
#define RTL8261C_CE_MODEL 0x00
#define RTL8261D_MODEL 0x81
@@ -3363,6 +3364,19 @@ static struct phy_driver realtek_drvs[] = {
.soft_reset = genphy_c45_pma_soft_reset,
.suspend = genphy_c45_pma_suspend,
.resume = genphy_c45_pma_resume,
+ }, {
+ PHY_ID_MATCH_EXACT(RTL_8261CE_CG),
+ .name = "Realtek RTL8261CE 10Gbps PHY",
+ .probe = rtl8261x_probe,
+ .config_init = rtl8261x_config_init,
+ .get_features = rtl8261x_get_features,
+ .config_aneg = rtl8261x_config_aneg,
+ .read_status = rtl8261x_read_status,
+ .config_intr = rtl8261x_config_intr,
+ .handle_interrupt = rtl8261x_handle_interrupt,
+ .soft_reset = genphy_c45_pma_soft_reset,
+ .suspend = genphy_c45_pma_suspend,
+ .resume = genphy_c45_pma_resume,
},
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D
2026-09-16 8:14 [PATCH net-next v1 0/3] add support for phy chip and firmware javen
2026-09-16 8:14 ` [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG javen
@ 2026-09-16 8:14 ` javen
2026-09-16 12:32 ` Andrew Lunn
2026-09-16 8:14 ` [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM javen
2 siblings, 1 reply; 7+ messages in thread
From: javen @ 2026-09-16 8:14 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
freddy_gu, nb, maxime.chevallier
Cc: netdev, linux-kernel, daniel, vladimir.oltean, Javen Xu
From: Javen Xu <javen_xu@realsil.com.cn>
Add support for RTL8261D to load firmware.
Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
drivers/net/phy/realtek/realtek_main.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index d0d09e8e8f5c..27051e2c7b5f 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -286,11 +286,15 @@
#define FW_MAIN_MAGIC 0x52544C38
#define FW_SUB_MAGIC_8261C 0x32363143
+#define FW_SUB_MAGIC_8261D 0x32363144
#define RTL8261X_POLL_TIMEOUT_MS 100
#define RTL8261X_MAX_MMD_DEV 31
#define RTL8261C_CE_FW_NAME "rtl_nic/rtl8261c.bin"
+#define RTL8261D_FW_NAME "rtl_nic/rtl8261d.bin"
+
MODULE_FIRMWARE(RTL8261C_CE_FW_NAME);
+MODULE_FIRMWARE(RTL8261D_FW_NAME);
enum rtl8261x_fw_op {
OP_WRITE = 0x00, /* Write */
@@ -341,6 +345,7 @@ struct rtl821x_priv {
};
struct rtl8261x_priv {
const char *fw_name;
+ u32 fw_sub_magic;
bool fw_loaded;
};
@@ -411,10 +416,13 @@ static int rtl8261x_probe(struct phy_device *phydev)
switch (sub_phy_id) {
case RTL8261C_CE_MODEL:
priv->fw_name = RTL8261C_CE_FW_NAME;
+ priv->fw_sub_magic = FW_SUB_MAGIC_8261C;
phydev_info(phydev, "RTL8261C detected (sub_id 0x%02x)\n", sub_phy_id);
break;
case RTL8261D_MODEL:
+ priv->fw_name = RTL8261D_FW_NAME;
+ priv->fw_sub_magic = FW_SUB_MAGIC_8261D;
phydev_info(phydev, "RTL8261D detected (sub_id 0x%02x)\n", sub_phy_id);
break;
@@ -473,6 +481,7 @@ static int rtl8261x_read_status(struct phy_device *phydev)
static int rtl8261x_verify_firmware(struct phy_device *phydev, const struct firmware *fw)
{
+ struct rtl8261x_priv *priv = phydev->priv;
const struct rtl8261x_fw_header *hdr;
u32 main_magic, sub_magic;
u32 calc_crc, file_crc;
@@ -493,7 +502,7 @@ static int rtl8261x_verify_firmware(struct phy_device *phydev, const struct firm
}
sub_magic = le32_to_cpu(hdr->sub_magic);
- if (sub_magic != FW_SUB_MAGIC_8261C) {
+ if (sub_magic != priv->fw_sub_magic) {
phydev_err(phydev, "Invalid sub magic: 0x%08x\n", sub_magic);
return -EINVAL;
}
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM
2026-09-16 8:14 [PATCH net-next v1 0/3] add support for phy chip and firmware javen
2026-09-16 8:14 ` [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG javen
2026-09-16 8:14 ` [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D javen
@ 2026-09-16 8:14 ` javen
2026-09-16 12:33 ` Andrew Lunn
2 siblings, 1 reply; 7+ messages in thread
From: javen @ 2026-09-16 8:14 UTC (permalink / raw)
To: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
freddy_gu, nb, maxime.chevallier
Cc: netdev, linux-kernel, daniel, vladimir.oltean, Javen Xu
From: Javen Xu <javen_xu@realsil.com.cn>
Add support for RTL8261D_VM, its phy id is 0x001cc89a.
Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
drivers/net/phy/realtek/realtek_main.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index 27051e2c7b5f..67199ef56c1a 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -258,6 +258,7 @@
#define RTL_8261C 0x001cc890
#define RTL_8261C_CG 0x001cc898
#define RTL_8261CE_CG 0x001cc899
+#define RTL_8261D_VM 0x001cc89a
#define RTL8261C_CE_MODEL 0x00
#define RTL8261D_MODEL 0x81
@@ -3386,6 +3387,19 @@ static struct phy_driver realtek_drvs[] = {
.soft_reset = genphy_c45_pma_soft_reset,
.suspend = genphy_c45_pma_suspend,
.resume = genphy_c45_pma_resume,
+ }, {
+ PHY_ID_MATCH_EXACT(RTL_8261D_VM),
+ .name = "Realtek RTL8261D_VM 10Gbps PHY",
+ .probe = rtl8261x_probe,
+ .config_init = rtl8261x_config_init,
+ .get_features = rtl8261x_get_features,
+ .config_aneg = rtl8261x_config_aneg,
+ .read_status = rtl8261x_read_status,
+ .config_intr = rtl8261x_config_intr,
+ .handle_interrupt = rtl8261x_handle_interrupt,
+ .soft_reset = genphy_c45_pma_soft_reset,
+ .suspend = genphy_c45_pma_suspend,
+ .resume = genphy_c45_pma_resume,
},
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG
2026-09-16 8:14 ` [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG javen
@ 2026-09-16 12:31 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2026-09-16 12:31 UTC (permalink / raw)
To: javen
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, freddy_gu, nb,
maxime.chevallier, netdev, linux-kernel, daniel, vladimir.oltean
On Wed, Sep 16, 2026 at 04:14:42PM +0800, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
>
> Add support for RTL8261CE_CG, its phy id is 0x001cc899. RTL8261CE_CG
> share the same sub_phy_id and firmware with RTL8261C_CG.
>
> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D
2026-09-16 8:14 ` [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D javen
@ 2026-09-16 12:32 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2026-09-16 12:32 UTC (permalink / raw)
To: javen
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, freddy_gu, nb,
maxime.chevallier, netdev, linux-kernel, daniel, vladimir.oltean
On Wed, Sep 16, 2026 at 04:14:43PM +0800, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
>
> Add support for RTL8261D to load firmware.
>
> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM
2026-09-16 8:14 ` [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM javen
@ 2026-09-16 12:33 ` Andrew Lunn
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2026-09-16 12:33 UTC (permalink / raw)
To: javen
Cc: hkallweit1, linux, davem, edumazet, kuba, pabeni, freddy_gu, nb,
maxime.chevallier, netdev, linux-kernel, daniel, vladimir.oltean
On Wed, Sep 16, 2026 at 04:14:44PM +0800, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
>
> Add support for RTL8261D_VM, its phy id is 0x001cc89a.
>
> Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-16 12:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 8:14 [PATCH net-next v1 0/3] add support for phy chip and firmware javen
2026-09-16 8:14 ` [PATCH net-next v1 1/3] net: phy: realtek: add support for RTL8261CE_CG javen
2026-09-16 12:31 ` Andrew Lunn
2026-09-16 8:14 ` [PATCH net-next v1 2/3] net: phy: realtek: add firmware for RTL8261D javen
2026-09-16 12:32 ` Andrew Lunn
2026-09-16 8:14 ` [PATCH net-next v1 3/3] net: phy: realtek: add support for RTL8261D_VM javen
2026-09-16 12:33 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®