* [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C
@ 2025-11-10 22:33 Daniel Golle
2025-11-10 22:35 ` [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support Daniel Golle
2025-11-11 16:33 ` [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C kernel test robot
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Golle @ 2025-11-10 22:33 UTC (permalink / raw)
To: Xu Liang, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel
From: Chad Monroe <chad@monroe.io>
MXL86211C is a smaller and more efficient version of the GPY211C.
Add the PHY ID and phy_driver instance to the mxl-gpy driver.
Signed-off-by: Chad Monroe <chad@monroe.io>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/phy/mxl-gpy.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 0c8dc16ee7bde..3320a42ef43cf 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -30,6 +30,7 @@
#define PHY_ID_GPY241B 0x67C9DE40
#define PHY_ID_GPY241BM 0x67C9DE80
#define PHY_ID_GPY245B 0x67C9DEC0
+#define PHY_ID_MXL86211C 0xC1335400
#define PHY_CTL1 0x13
#define PHY_CTL1_MDICD BIT(3)
@@ -1268,6 +1269,29 @@ static struct phy_driver gpy_drivers[] = {
.get_wol = gpy_get_wol,
.set_loopback = gpy_loopback,
},
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_MXL86211C),
+ .name = "Maxlinear Ethernet MXL86211C",
+ .get_features = genphy_c45_pma_read_abilities,
+ .config_init = gpy_config_init,
+ .probe = gpy_probe,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .config_aneg = gpy_config_aneg,
+ .aneg_done = genphy_c45_aneg_done,
+ .read_status = gpy_read_status,
+ .config_intr = gpy_config_intr,
+ .handle_interrupt = gpy_handle_interrupt,
+ .set_wol = gpy_set_wol,
+ .get_wol = gpy_get_wol,
+ .set_loopback = gpy_loopback,
+ .led_brightness_set = gpy_led_brightness_set,
+ .led_hw_is_supported = gpy_led_hw_is_supported,
+ .led_hw_control_get = gpy_led_hw_control_get,
+ .led_hw_control_set = gpy_led_hw_control_set,
+ .led_polarity_set = gpy_led_polarity_set,
+ .link_change_notify = gpy_link_change_notify,
+ },
};
module_phy_driver(gpy_drivers);
--
2.51.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
2025-11-10 22:33 [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C Daniel Golle
@ 2025-11-10 22:35 ` Daniel Golle
2025-11-11 1:32 ` Andrew Lunn
2025-11-11 16:33 ` [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C kernel test robot
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Golle @ 2025-11-10 22:35 UTC (permalink / raw)
To: Xu Liang, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel
Add PHY driver support for Maxlinear 86252 and 86282 switches.
The PHYs built-into those switches are just like any other GPY 2.5G PHYs
with the exception of the temperature sensor data being encoded in a
different way.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/phy/mxl-gpy.c | 70 +++++++++++++++++++++++++++++++++++++--
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 3320a42ef43cf..d14520f66a1d5 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -18,6 +18,7 @@
/* PHY ID */
#define PHY_ID_GPYx15B_MASK 0xFFFFFFFC
#define PHY_ID_GPY21xB_MASK 0xFFFFFFF9
+#define PHY_ID_MXL862XX_MASK 0xFFFFFF00
#define PHY_ID_GPY2xx 0x67C9DC00
#define PHY_ID_GPY115B 0x67C9DF00
#define PHY_ID_GPY115C 0x67C9DF10
@@ -31,6 +32,7 @@
#define PHY_ID_GPY241BM 0x67C9DE80
#define PHY_ID_GPY245B 0x67C9DEC0
#define PHY_ID_MXL86211C 0xC1335400
+#define PHY_ID_MXL862XX 0xC1335500
#define PHY_CTL1 0x13
#define PHY_CTL1_MDICD BIT(3)
@@ -200,6 +202,29 @@ static int gpy_hwmon_read(struct device *dev,
return 0;
}
+static int mxl862xx_hwmon_read(struct device *dev,
+ enum hwmon_sensor_types type,
+ u32 attr, int channel, long *value)
+{
+ struct phy_device *phydev = dev_get_drvdata(dev);
+ long tmp;
+ int ret;
+
+ ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_TEMP_STA);
+ if (ret < 0)
+ return ret;
+ if (!ret)
+ return -ENODATA;
+
+ tmp = (s16)ret;
+ tmp *= 78125;
+ tmp /= 10000;
+
+ *value = tmp;
+
+ return 0;
+}
+
static umode_t gpy_hwmon_is_visible(const void *data,
enum hwmon_sensor_types type,
u32 attr, int channel)
@@ -217,19 +242,34 @@ static const struct hwmon_ops gpy_hwmon_hwmon_ops = {
.read = gpy_hwmon_read,
};
+static const struct hwmon_ops mxl862xx_hwmon_hwmon_ops = {
+ .is_visible = gpy_hwmon_is_visible,
+ .read = mxl862xx_hwmon_read,
+};
+
static const struct hwmon_chip_info gpy_hwmon_chip_info = {
.ops = &gpy_hwmon_hwmon_ops,
.info = gpy_hwmon_info,
};
+static const struct hwmon_chip_info mxl862xx_hwmon_chip_info = {
+ .ops = &mxl862xx_hwmon_hwmon_ops,
+ .info = gpy_hwmon_info,
+};
+
static int gpy_hwmon_register(struct phy_device *phydev)
{
struct device *dev = &phydev->mdio.dev;
+ const struct hwmon_chip_info *info;
struct device *hwmon_dev;
+ if ((phydev->phy_id & PHY_ID_MXL862XX_MASK) == PHY_ID_MXL862XX)
+ info = &mxl862xx_hwmon_chip_info;
+ else
+ info = &gpy_hwmon_chip_info;
+
hwmon_dev = devm_hwmon_device_register_with_info(dev, NULL, phydev,
- &gpy_hwmon_chip_info,
- NULL);
+ info, NULL);
return PTR_ERR_OR_ZERO(hwmon_dev);
}
@@ -541,7 +581,7 @@ static int gpy_update_interface(struct phy_device *phydev)
/* Interface mode is fixed for USXGMII and integrated PHY */
if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
- return -EINVAL;
+ return 0;
/* Automatically switch SERDES interface between SGMII and 2500-BaseX
* according to speed. Disable ANEG in 2500-BaseX mode.
@@ -1292,6 +1332,29 @@ static struct phy_driver gpy_drivers[] = {
.led_polarity_set = gpy_led_polarity_set,
.link_change_notify = gpy_link_change_notify,
},
+ {
+ .phy_id = PHY_ID_MXL862XX,
+ .phy_id_mask = PHY_ID_MXL862XX_MASK,
+ .name = "MaxLinear Ethernet MxL862XX",
+ .get_features = genphy_c45_pma_read_abilities,
+ .config_init = gpy_config_init,
+ .probe = gpy_probe,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .config_aneg = gpy_config_aneg,
+ .aneg_done = genphy_c45_aneg_done,
+ .read_status = gpy_read_status,
+ .config_intr = gpy_config_intr,
+ .handle_interrupt = gpy_handle_interrupt,
+ .set_wol = gpy_set_wol,
+ .get_wol = gpy_get_wol,
+ .set_loopback = gpy_loopback,
+ .led_brightness_set = gpy_led_brightness_set,
+ .led_hw_is_supported = gpy_led_hw_is_supported,
+ .led_hw_control_get = gpy_led_hw_control_get,
+ .led_hw_control_set = gpy_led_hw_control_set,
+ .led_polarity_set = gpy_led_polarity_set,
+ },
};
module_phy_driver(gpy_drivers);
@@ -1308,6 +1371,7 @@ static const struct mdio_device_id __maybe_unused gpy_tbl[] = {
{PHY_ID_MATCH_MODEL(PHY_ID_GPY241B)},
{PHY_ID_MATCH_MODEL(PHY_ID_GPY241BM)},
{PHY_ID_MATCH_MODEL(PHY_ID_GPY245B)},
+ {PHY_ID_MXL862XX, PHY_ID_MXL862XX_MASK},
{ }
};
MODULE_DEVICE_TABLE(mdio, gpy_tbl);
--
2.51.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
2025-11-10 22:35 ` [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support Daniel Golle
@ 2025-11-11 1:32 ` Andrew Lunn
2025-11-18 2:43 ` Daniel Golle
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2025-11-11 1:32 UTC (permalink / raw)
To: Daniel Golle
Cc: Xu Liang, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
On Mon, Nov 10, 2025 at 10:35:00PM +0000, Daniel Golle wrote:
> Add PHY driver support for Maxlinear 86252 and 86282 switches.
> The PHYs built-into those switches are just like any other GPY 2.5G PHYs
> with the exception of the temperature sensor data being encoded in a
> different way.
Is there a temperature sensor per PHY, or just one for the whole
package?
Marvell did something similar for there SoHo switches. The temperature
sensor is mapped to each of internal PHYs register space, but in fact
there is a single sensor, not one per PHY.
> @@ -541,7 +581,7 @@ static int gpy_update_interface(struct phy_device *phydev)
> /* Interface mode is fixed for USXGMII and integrated PHY */
> if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
> phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
> - return -EINVAL;
> + return 0;
This change is not obvious. There is no mention of it in the commit
message. Why has something which was an error become not an error?
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C
2025-11-10 22:33 [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C Daniel Golle
2025-11-10 22:35 ` [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support Daniel Golle
@ 2025-11-11 16:33 ` kernel test robot
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-11-11 16:33 UTC (permalink / raw)
To: Daniel Golle, Xu Liang, Andrew Lunn, Heiner Kallweit,
Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, linux-kernel
Cc: llvm, oe-kbuild-all, netdev
Hi Daniel,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/net-phy-mxl-gpy-add-MxL862xx-support/20251111-064014
base: net-next/main
patch link: https://lore.kernel.org/r/92e7bdac9a581276219b5c985ab3814d65e0a7b5.1762813829.git.daniel%40makrotopia.org
patch subject: [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C
config: x86_64-buildonly-randconfig-002-20251111 (https://download.01.org/0day-ci/archive/20251112/202511120056.YRAPru3f-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251112/202511120056.YRAPru3f-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511120056.YRAPru3f-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/phy/mxl-gpy.c:1293:25: error: use of undeclared identifier 'gpy_link_change_notify'
1293 | .link_change_notify = gpy_link_change_notify,
| ^
>> drivers/net/phy/mxl-gpy.c:1296:1: error: invalid application of 'sizeof' to an incomplete type 'struct phy_driver[]'
1296 | module_phy_driver(gpy_drivers);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/phy.h:2396:35: note: expanded from macro 'module_phy_driver'
2396 | phy_module_driver(__phy_drivers, ARRAY_SIZE(__phy_drivers))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:32: note: expanded from macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
include/linux/phy.h:2386:45: note: expanded from macro 'phy_module_driver'
2386 | return phy_drivers_register(__phy_drivers, __count, THIS_MODULE); \
| ^~~~~~~
>> drivers/net/phy/mxl-gpy.c:1296:1: error: invalid application of 'sizeof' to an incomplete type 'struct phy_driver[]'
1296 | module_phy_driver(gpy_drivers);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/phy.h:2396:35: note: expanded from macro 'module_phy_driver'
2396 | phy_module_driver(__phy_drivers, ARRAY_SIZE(__phy_drivers))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/array_size.h:11:32: note: expanded from macro 'ARRAY_SIZE'
11 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
include/linux/phy.h:2391:40: note: expanded from macro 'phy_module_driver'
2391 | phy_drivers_unregister(__phy_drivers, __count); \
| ^~~~~~~
3 errors generated.
vim +/gpy_link_change_notify +1293 drivers/net/phy/mxl-gpy.c
1017
1018 static struct phy_driver gpy_drivers[] = {
1019 {
1020 PHY_ID_MATCH_MODEL(PHY_ID_GPY2xx),
1021 .name = "Maxlinear Ethernet GPY2xx",
1022 .get_features = genphy_c45_pma_read_abilities,
1023 .config_init = gpy_config_init,
1024 .probe = gpy_probe,
1025 .suspend = genphy_suspend,
1026 .resume = genphy_resume,
1027 .config_aneg = gpy_config_aneg,
1028 .aneg_done = genphy_c45_aneg_done,
1029 .read_status = gpy_read_status,
1030 .config_intr = gpy_config_intr,
1031 .handle_interrupt = gpy_handle_interrupt,
1032 .set_wol = gpy_set_wol,
1033 .get_wol = gpy_get_wol,
1034 .set_loopback = gpy_loopback,
1035 .led_brightness_set = gpy_led_brightness_set,
1036 .led_hw_is_supported = gpy_led_hw_is_supported,
1037 .led_hw_control_get = gpy_led_hw_control_get,
1038 .led_hw_control_set = gpy_led_hw_control_set,
1039 .led_polarity_set = gpy_led_polarity_set,
1040 },
1041 {
1042 .phy_id = PHY_ID_GPY115B,
1043 .phy_id_mask = PHY_ID_GPYx15B_MASK,
1044 .name = "Maxlinear Ethernet GPY115B",
1045 .get_features = genphy_c45_pma_read_abilities,
1046 .config_init = gpy_config_init,
1047 .probe = gpy_probe,
1048 .suspend = genphy_suspend,
1049 .resume = genphy_resume,
1050 .config_aneg = gpy_config_aneg,
1051 .aneg_done = genphy_c45_aneg_done,
1052 .read_status = gpy_read_status,
1053 .config_intr = gpy_config_intr,
1054 .handle_interrupt = gpy_handle_interrupt,
1055 .set_wol = gpy_set_wol,
1056 .get_wol = gpy_get_wol,
1057 .set_loopback = gpy115_loopback,
1058 .led_brightness_set = gpy_led_brightness_set,
1059 .led_hw_is_supported = gpy_led_hw_is_supported,
1060 .led_hw_control_get = gpy_led_hw_control_get,
1061 .led_hw_control_set = gpy_led_hw_control_set,
1062 .led_polarity_set = gpy_led_polarity_set,
1063 },
1064 {
1065 PHY_ID_MATCH_MODEL(PHY_ID_GPY115C),
1066 .name = "Maxlinear Ethernet GPY115C",
1067 .get_features = genphy_c45_pma_read_abilities,
1068 .config_init = gpy_config_init,
1069 .probe = gpy_probe,
1070 .suspend = genphy_suspend,
1071 .resume = genphy_resume,
1072 .config_aneg = gpy_config_aneg,
1073 .aneg_done = genphy_c45_aneg_done,
1074 .read_status = gpy_read_status,
1075 .config_intr = gpy_config_intr,
1076 .handle_interrupt = gpy_handle_interrupt,
1077 .set_wol = gpy_set_wol,
1078 .get_wol = gpy_get_wol,
1079 .set_loopback = gpy115_loopback,
1080 .led_brightness_set = gpy_led_brightness_set,
1081 .led_hw_is_supported = gpy_led_hw_is_supported,
1082 .led_hw_control_get = gpy_led_hw_control_get,
1083 .led_hw_control_set = gpy_led_hw_control_set,
1084 .led_polarity_set = gpy_led_polarity_set,
1085 },
1086 {
1087 .phy_id = PHY_ID_GPY211B,
1088 .phy_id_mask = PHY_ID_GPY21xB_MASK,
1089 .name = "Maxlinear Ethernet GPY211B",
1090 .get_features = genphy_c45_pma_read_abilities,
1091 .config_init = gpy21x_config_init,
1092 .probe = gpy_probe,
1093 .suspend = genphy_suspend,
1094 .resume = genphy_resume,
1095 .config_aneg = gpy_config_aneg,
1096 .aneg_done = genphy_c45_aneg_done,
1097 .read_status = gpy_read_status,
1098 .config_intr = gpy_config_intr,
1099 .handle_interrupt = gpy_handle_interrupt,
1100 .set_wol = gpy_set_wol,
1101 .get_wol = gpy_get_wol,
1102 .set_loopback = gpy_loopback,
1103 .led_brightness_set = gpy_led_brightness_set,
1104 .led_hw_is_supported = gpy_led_hw_is_supported,
1105 .led_hw_control_get = gpy_led_hw_control_get,
1106 .led_hw_control_set = gpy_led_hw_control_set,
1107 .led_polarity_set = gpy_led_polarity_set,
1108 },
1109 {
1110 PHY_ID_MATCH_MODEL(PHY_ID_GPY211C),
1111 .name = "Maxlinear Ethernet GPY211C",
1112 .get_features = genphy_c45_pma_read_abilities,
1113 .config_init = gpy21x_config_init,
1114 .probe = gpy_probe,
1115 .suspend = genphy_suspend,
1116 .resume = genphy_resume,
1117 .config_aneg = gpy_config_aneg,
1118 .aneg_done = genphy_c45_aneg_done,
1119 .read_status = gpy_read_status,
1120 .config_intr = gpy_config_intr,
1121 .handle_interrupt = gpy_handle_interrupt,
1122 .set_wol = gpy_set_wol,
1123 .get_wol = gpy_get_wol,
1124 .set_loopback = gpy_loopback,
1125 .led_brightness_set = gpy_led_brightness_set,
1126 .led_hw_is_supported = gpy_led_hw_is_supported,
1127 .led_hw_control_get = gpy_led_hw_control_get,
1128 .led_hw_control_set = gpy_led_hw_control_set,
1129 .led_polarity_set = gpy_led_polarity_set,
1130 },
1131 {
1132 .phy_id = PHY_ID_GPY212B,
1133 .phy_id_mask = PHY_ID_GPY21xB_MASK,
1134 .name = "Maxlinear Ethernet GPY212B",
1135 .get_features = genphy_c45_pma_read_abilities,
1136 .config_init = gpy21x_config_init,
1137 .probe = gpy_probe,
1138 .suspend = genphy_suspend,
1139 .resume = genphy_resume,
1140 .config_aneg = gpy_config_aneg,
1141 .aneg_done = genphy_c45_aneg_done,
1142 .read_status = gpy_read_status,
1143 .config_intr = gpy_config_intr,
1144 .handle_interrupt = gpy_handle_interrupt,
1145 .set_wol = gpy_set_wol,
1146 .get_wol = gpy_get_wol,
1147 .set_loopback = gpy_loopback,
1148 .led_brightness_set = gpy_led_brightness_set,
1149 .led_hw_is_supported = gpy_led_hw_is_supported,
1150 .led_hw_control_get = gpy_led_hw_control_get,
1151 .led_hw_control_set = gpy_led_hw_control_set,
1152 .led_polarity_set = gpy_led_polarity_set,
1153 },
1154 {
1155 PHY_ID_MATCH_MODEL(PHY_ID_GPY212C),
1156 .name = "Maxlinear Ethernet GPY212C",
1157 .get_features = genphy_c45_pma_read_abilities,
1158 .config_init = gpy21x_config_init,
1159 .probe = gpy_probe,
1160 .suspend = genphy_suspend,
1161 .resume = genphy_resume,
1162 .config_aneg = gpy_config_aneg,
1163 .aneg_done = genphy_c45_aneg_done,
1164 .read_status = gpy_read_status,
1165 .config_intr = gpy_config_intr,
1166 .handle_interrupt = gpy_handle_interrupt,
1167 .set_wol = gpy_set_wol,
1168 .get_wol = gpy_get_wol,
1169 .set_loopback = gpy_loopback,
1170 .led_brightness_set = gpy_led_brightness_set,
1171 .led_hw_is_supported = gpy_led_hw_is_supported,
1172 .led_hw_control_get = gpy_led_hw_control_get,
1173 .led_hw_control_set = gpy_led_hw_control_set,
1174 .led_polarity_set = gpy_led_polarity_set,
1175 },
1176 {
1177 .phy_id = PHY_ID_GPY215B,
1178 .phy_id_mask = PHY_ID_GPYx15B_MASK,
1179 .name = "Maxlinear Ethernet GPY215B",
1180 .get_features = genphy_c45_pma_read_abilities,
1181 .config_init = gpy21x_config_init,
1182 .probe = gpy_probe,
1183 .suspend = genphy_suspend,
1184 .resume = genphy_resume,
1185 .config_aneg = gpy_config_aneg,
1186 .aneg_done = genphy_c45_aneg_done,
1187 .read_status = gpy_read_status,
1188 .config_intr = gpy_config_intr,
1189 .handle_interrupt = gpy_handle_interrupt,
1190 .set_wol = gpy_set_wol,
1191 .get_wol = gpy_get_wol,
1192 .set_loopback = gpy_loopback,
1193 .led_brightness_set = gpy_led_brightness_set,
1194 .led_hw_is_supported = gpy_led_hw_is_supported,
1195 .led_hw_control_get = gpy_led_hw_control_get,
1196 .led_hw_control_set = gpy_led_hw_control_set,
1197 .led_polarity_set = gpy_led_polarity_set,
1198 },
1199 {
1200 PHY_ID_MATCH_MODEL(PHY_ID_GPY215C),
1201 .name = "Maxlinear Ethernet GPY215C",
1202 .get_features = genphy_c45_pma_read_abilities,
1203 .config_init = gpy21x_config_init,
1204 .probe = gpy_probe,
1205 .suspend = genphy_suspend,
1206 .resume = genphy_resume,
1207 .config_aneg = gpy_config_aneg,
1208 .aneg_done = genphy_c45_aneg_done,
1209 .read_status = gpy_read_status,
1210 .config_intr = gpy_config_intr,
1211 .handle_interrupt = gpy_handle_interrupt,
1212 .set_wol = gpy_set_wol,
1213 .get_wol = gpy_get_wol,
1214 .set_loopback = gpy_loopback,
1215 .led_brightness_set = gpy_led_brightness_set,
1216 .led_hw_is_supported = gpy_led_hw_is_supported,
1217 .led_hw_control_get = gpy_led_hw_control_get,
1218 .led_hw_control_set = gpy_led_hw_control_set,
1219 .led_polarity_set = gpy_led_polarity_set,
1220 },
1221 {
1222 PHY_ID_MATCH_MODEL(PHY_ID_GPY241B),
1223 .name = "Maxlinear Ethernet GPY241B",
1224 .get_features = genphy_c45_pma_read_abilities,
1225 .config_init = gpy_config_init,
1226 .probe = gpy_probe,
1227 .suspend = genphy_suspend,
1228 .resume = genphy_resume,
1229 .config_aneg = gpy_config_aneg,
1230 .aneg_done = genphy_c45_aneg_done,
1231 .read_status = gpy_read_status,
1232 .config_intr = gpy_config_intr,
1233 .handle_interrupt = gpy_handle_interrupt,
1234 .set_wol = gpy_set_wol,
1235 .get_wol = gpy_get_wol,
1236 .set_loopback = gpy_loopback,
1237 },
1238 {
1239 PHY_ID_MATCH_MODEL(PHY_ID_GPY241BM),
1240 .name = "Maxlinear Ethernet GPY241BM",
1241 .get_features = genphy_c45_pma_read_abilities,
1242 .config_init = gpy_config_init,
1243 .probe = gpy_probe,
1244 .suspend = genphy_suspend,
1245 .resume = genphy_resume,
1246 .config_aneg = gpy_config_aneg,
1247 .aneg_done = genphy_c45_aneg_done,
1248 .read_status = gpy_read_status,
1249 .config_intr = gpy_config_intr,
1250 .handle_interrupt = gpy_handle_interrupt,
1251 .set_wol = gpy_set_wol,
1252 .get_wol = gpy_get_wol,
1253 .set_loopback = gpy_loopback,
1254 },
1255 {
1256 PHY_ID_MATCH_MODEL(PHY_ID_GPY245B),
1257 .name = "Maxlinear Ethernet GPY245B",
1258 .get_features = genphy_c45_pma_read_abilities,
1259 .config_init = gpy_config_init,
1260 .probe = gpy_probe,
1261 .suspend = genphy_suspend,
1262 .resume = genphy_resume,
1263 .config_aneg = gpy_config_aneg,
1264 .aneg_done = genphy_c45_aneg_done,
1265 .read_status = gpy_read_status,
1266 .config_intr = gpy_config_intr,
1267 .handle_interrupt = gpy_handle_interrupt,
1268 .set_wol = gpy_set_wol,
1269 .get_wol = gpy_get_wol,
1270 .set_loopback = gpy_loopback,
1271 },
1272 {
1273 PHY_ID_MATCH_MODEL(PHY_ID_MXL86211C),
1274 .name = "Maxlinear Ethernet MXL86211C",
1275 .get_features = genphy_c45_pma_read_abilities,
1276 .config_init = gpy_config_init,
1277 .probe = gpy_probe,
1278 .suspend = genphy_suspend,
1279 .resume = genphy_resume,
1280 .config_aneg = gpy_config_aneg,
1281 .aneg_done = genphy_c45_aneg_done,
1282 .read_status = gpy_read_status,
1283 .config_intr = gpy_config_intr,
1284 .handle_interrupt = gpy_handle_interrupt,
1285 .set_wol = gpy_set_wol,
1286 .get_wol = gpy_get_wol,
1287 .set_loopback = gpy_loopback,
1288 .led_brightness_set = gpy_led_brightness_set,
1289 .led_hw_is_supported = gpy_led_hw_is_supported,
1290 .led_hw_control_get = gpy_led_hw_control_get,
1291 .led_hw_control_set = gpy_led_hw_control_set,
1292 .led_polarity_set = gpy_led_polarity_set,
> 1293 .link_change_notify = gpy_link_change_notify,
1294 },
1295 };
> 1296 module_phy_driver(gpy_drivers);
1297
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
2025-11-11 1:32 ` Andrew Lunn
@ 2025-11-18 2:43 ` Daniel Golle
2025-11-18 16:44 ` Andrew Lunn
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Golle @ 2025-11-18 2:43 UTC (permalink / raw)
To: Andrew Lunn
Cc: Xu Liang, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
On Tue, Nov 11, 2025 at 02:32:38AM +0100, Andrew Lunn wrote:
> On Mon, Nov 10, 2025 at 10:35:00PM +0000, Daniel Golle wrote:
> > Add PHY driver support for Maxlinear 86252 and 86282 switches.
> > The PHYs built-into those switches are just like any other GPY 2.5G PHYs
> > with the exception of the temperature sensor data being encoded in a
> > different way.
>
> Is there a temperature sensor per PHY, or just one for the whole
> package?
>
> Marvell did something similar for there SoHo switches. The temperature
> sensor is mapped to each of internal PHYs register space, but in fact
> there is a single sensor, not one per PHY.
It very much looks like it is also done in the way your are describing.
The temperature reading on all 8 PHYs is almost exactly the same, even
if eg. port 1 and 2 are connected to 2.5G link partners and doing some
traffic and all other ports are disconnected the temperature stays the
same value for all of them.
Should this hence be implemented as a single sensor of the phy package?
>
> > @@ -541,7 +581,7 @@ static int gpy_update_interface(struct phy_device *phydev)
> > /* Interface mode is fixed for USXGMII and integrated PHY */
> > if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
> > phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
> > - return -EINVAL;
> > + return 0;
>
> This change is not obvious. There is no mention of it in the commit
> message. Why has something which was an error become not an error?
The interface mode doesn't need to be updated on PHYs connected with
USXGMII and integrated PHYs, and gpy_update_interface() should just
return 0 in this case rather than -EINVAL, which has wrongly been
introduced by commit 7a495dde27ebc ("net: phy: mxl-gpy: Change
gpy_update_interface() function return type"), as this breaks support
for those PHYs. The result is that read_status() will always return
-EINVAL for those interface modes.
I'll move this change into a separate patch with an appropriate
Fixes:-tag as the before mentioned commit actually breaks things.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support
2025-11-18 2:43 ` Daniel Golle
@ 2025-11-18 16:44 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2025-11-18 16:44 UTC (permalink / raw)
To: Daniel Golle
Cc: Xu Liang, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
On Tue, Nov 18, 2025 at 02:43:55AM +0000, Daniel Golle wrote:
> On Tue, Nov 11, 2025 at 02:32:38AM +0100, Andrew Lunn wrote:
> > On Mon, Nov 10, 2025 at 10:35:00PM +0000, Daniel Golle wrote:
> > > Add PHY driver support for Maxlinear 86252 and 86282 switches.
> > > The PHYs built-into those switches are just like any other GPY 2.5G PHYs
> > > with the exception of the temperature sensor data being encoded in a
> > > different way.
> >
> > Is there a temperature sensor per PHY, or just one for the whole
> > package?
> >
> > Marvell did something similar for there SoHo switches. The temperature
> > sensor is mapped to each of internal PHYs register space, but in fact
> > there is a single sensor, not one per PHY.
>
> It very much looks like it is also done in the way your are describing.
> The temperature reading on all 8 PHYs is almost exactly the same, even
> if eg. port 1 and 2 are connected to 2.5G link partners and doing some
> traffic and all other ports are disconnected the temperature stays the
> same value for all of them.
>
> Should this hence be implemented as a single sensor of the phy package?
If you have a PHY packages, why not.
For the Marvell PHYs, so such thing existed. All we see is individual
PHYs. And the registers are the same for discrete devices. So it was
simpler to just export what is effectively the same senor multiple
times.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-18 16:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 22:33 [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C Daniel Golle
2025-11-10 22:35 ` [PATCH net-next 2/2] net: phy: mxl-gpy: add MxL862xx support Daniel Golle
2025-11-11 1:32 ` Andrew Lunn
2025-11-18 2:43 ` Daniel Golle
2025-11-18 16:44 ` Andrew Lunn
2025-11-11 16:33 ` [PATCH net-next 1/2] net: phy: mxl-gpy: add support for MXL86211C kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).