53e7b86af427c7480be6b16a003c9e183c4f3cc8
[openwrt/staging/mkresin.git] /
1 From 40da06da15c1718b02072687bbfb2d08f5eb9399 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
3 Date: Fri, 27 Aug 2021 11:27:52 +0200
4 Subject: [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Rename HS-SGMMI to
5 2500Base-X
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Comphy phy mode 0x3 is incorrectly named. It is not SGMII but rather
11 2500Base-X mode which runs at 3.125 Gbps speed.
12
13 Rename macro names and comments to 2500Base-X.
14
15 Signed-off-by: Pali Rohár <pali@kernel.org>
16 Fixes: 9695375a3f4a ("phy: add A3700 COMPHY support")
17 Signed-off-by: David S. Miller <davem@davemloft.net>
18 ---
19 drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 10 +++++-----
20 1 file changed, 5 insertions(+), 5 deletions(-)
21
22 diff --git a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
23 index 810f25a47632..cc534a5c4b3b 100644
24 --- a/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
25 +++ b/drivers/phy/marvell/phy-mvebu-a3700-comphy.c
26 @@ -29,7 +29,7 @@
27
28 #define COMPHY_FW_MODE_SATA 0x1
29 #define COMPHY_FW_MODE_SGMII 0x2
30 -#define COMPHY_FW_MODE_HS_SGMII 0x3
31 +#define COMPHY_FW_MODE_2500BASEX 0x3
32 #define COMPHY_FW_MODE_USB3H 0x4
33 #define COMPHY_FW_MODE_USB3D 0x5
34 #define COMPHY_FW_MODE_PCIE 0x6
35 @@ -40,7 +40,7 @@
36
37 #define COMPHY_FW_SPEED_1_25G 0 /* SGMII 1G */
38 #define COMPHY_FW_SPEED_2_5G 1
39 -#define COMPHY_FW_SPEED_3_125G 2 /* SGMII 2.5G */
40 +#define COMPHY_FW_SPEED_3_125G 2 /* 2500BASE-X */
41 #define COMPHY_FW_SPEED_5G 3
42 #define COMPHY_FW_SPEED_5_15625G 4 /* XFI 5G */
43 #define COMPHY_FW_SPEED_6G 5
44 @@ -84,14 +84,14 @@ static const struct mvebu_a3700_comphy_conf mvebu_a3700_comphy_modes[] = {
45 MVEBU_A3700_COMPHY_CONF_ETH(0, PHY_INTERFACE_MODE_SGMII, 1,
46 COMPHY_FW_MODE_SGMII),
47 MVEBU_A3700_COMPHY_CONF_ETH(0, PHY_INTERFACE_MODE_2500BASEX, 1,
48 - COMPHY_FW_MODE_HS_SGMII),
49 + COMPHY_FW_MODE_2500BASEX),
50 /* lane 1 */
51 MVEBU_A3700_COMPHY_CONF_GEN(1, PHY_MODE_PCIE, 0,
52 COMPHY_FW_MODE_PCIE),
53 MVEBU_A3700_COMPHY_CONF_ETH(1, PHY_INTERFACE_MODE_SGMII, 0,
54 COMPHY_FW_MODE_SGMII),
55 MVEBU_A3700_COMPHY_CONF_ETH(1, PHY_INTERFACE_MODE_2500BASEX, 0,
56 - COMPHY_FW_MODE_HS_SGMII),
57 + COMPHY_FW_MODE_2500BASEX),
58 /* lane 2 */
59 MVEBU_A3700_COMPHY_CONF_GEN(2, PHY_MODE_SATA, 0,
60 COMPHY_FW_MODE_SATA),
61 @@ -205,7 +205,7 @@ static int mvebu_a3700_comphy_power_on(struct phy *phy)
62 COMPHY_FW_SPEED_1_25G);
63 break;
64 case PHY_INTERFACE_MODE_2500BASEX:
65 - dev_dbg(lane->dev, "set lane %d to HS SGMII mode\n",
66 + dev_dbg(lane->dev, "set lane %d to 2500BASEX mode\n",
67 lane->id);
68 fw_param = COMPHY_FW_NET(fw_mode, lane->port,
69 COMPHY_FW_SPEED_3_125G);
70 --
71 2.34.1
72