History

net: phy: Add 10BASE-T1L support in phy-c45

This patch is needed because the BASE-T1 uses different registers for status, control and advertisement to those already employed in the existing phy-c45 functions. Where required, genphy_c45 functions will now check whether the device supports BASE-T1 and use the specific registers instead: 45.2.7.19 BASE-T1 AN control register, 45.2.7.20 BASE-T1 AN status, 45.2.7.21 BASE-T1 AN advertisement register, 45.2.7.22 BASE-T1 AN LP Base Page ability register, 45.2.1.185 BASE-T1 PMA/PMD control register.

Alexandru Tachici committed 4 years ago

Commit 3da8ffd1 parent 1b020e45 files · +336 −5Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/mdio.h+10−0
@@ -70,6 +70,7 @@ · 69 unmodified lines
7070 #define MDIO_B10L_PMA_CTRL 2294 /* 10BASE-T1L PMA control */
7171 #define MDIO_PMA_10T1L_STAT 2295 /* 10BASE-T1L PMA status */
7272 #define MDIO_PCS_10T1L_CTRL 2278 /* 10BASE-T1L PCS control */
73+#define MDIO_PMA_PMD_BT1 18 /* BASE-T1 PMA/PMD extended ability */
7374 #define MDIO_AN_T1_CTRL 512 /* BASE-T1 AN control */
7475 #define MDIO_AN_T1_STAT 513 /* BASE-T1 AN status */
7576 #define MDIO_AN_T1_ADV_L 514 /* BASE-T1 AN advertisement register [15:0] */
@@ -78,6 +79,7 @@ · 2 unmodified lines
7879 #define MDIO_AN_T1_LP_L 517 /* BASE-T1 AN LP Base Page ability register [15:0] */
7980 #define MDIO_AN_T1_LP_M 518 /* BASE-T1 AN LP Base Page ability register [31:16] */
8081 #define MDIO_AN_T1_LP_H 519 /* BASE-T1 AN LP Base Page ability register [47:32] */
82+#define MDIO_PMA_PMD_BT1_CTRL 2100 /* BASE-T1 PMA/PMD control register */
8183
8284 /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */
8385 #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */
@@ -170,6 +172,7 @@ · 86 unmodified lines
170172 #define MDIO_PMA_CTRL2_10BT 0x000f /* 10BASE-T type */
171173 #define MDIO_PMA_CTRL2_2_5GBT 0x0030 /* 2.5GBaseT type */
172174 #define MDIO_PMA_CTRL2_5GBT 0x0031 /* 5GBaseT type */
175+#define MDIO_PMA_CTRL2_BASET1 0x003D /* BASE-T1 type */
173176 #define MDIO_PCS_CTRL2_TYPE 0x0003 /* PCS type selection */
174177 #define MDIO_PCS_CTRL2_10GBR 0x0000 /* 10GBASE-R type */
175178 #define MDIO_PCS_CTRL2_10GBX 0x0001 /* 10GBASE-X type */
@@ -223,6 +226,7 @@ · 47 unmodified lines
223226 #define MDIO_PMA_EXTABLE_1000BKX 0x0040 /* 1000BASE-KX ability */
224227 #define MDIO_PMA_EXTABLE_100BTX 0x0080 /* 100BASE-TX ability */
225228 #define MDIO_PMA_EXTABLE_10BT 0x0100 /* 10BASE-T ability */
229+#define MDIO_PMA_EXTABLE_BT1 0x0800 /* BASE-T1 ability */
226230 #define MDIO_PMA_EXTABLE_NBT 0x4000 /* 2.5/5GBASE-T ability */
227231
228232 /* PHY XGXS lane state register. */
@@ -301,6 +305,9 @@ · 72 unmodified lines
301305 #define MDIO_PCS_10T1L_CTRL_LB 0x4000 /* Enable PCS level loopback mode */
302306 #define MDIO_PCS_10T1L_CTRL_RESET 0x8000 /* PCS reset */
303307
308+/* BASE-T1 PMA/PMD extended ability register. */
309+#define MDIO_PMA_PMD_BT1_B10L_ABLE 0x0004 /* 10BASE-T1L Ability */
310+
304311 /* BASE-T1 auto-negotiation advertisement register [15:0] */
305312 #define MDIO_AN_T1_ADV_L_PAUSE_CAP ADVERTISE_PAUSE_CAP
306313 #define MDIO_AN_T1_ADV_L_PAUSE_ASYM ADVERTISE_PAUSE_ASYM
@@ -333,6 +340,9 @@ · 26 unmodified lines
333340 #define MDIO_AN_T1_LP_H_10L_TX_HI_REQ 0x1000 /* 10BASE-T1L High Level LP Transmit Request */
334341 #define MDIO_AN_T1_LP_H_10L_TX_HI 0x2000 /* 10BASE-T1L High Level LP Transmit Ability */
335342
343+/* BASE-T1 PMA/PMD control register */
344+#define MDIO_PMA_PMD_BT1_CTRL_CFG_MST 0x4000 /* MASTER-SLAVE config value */
345+
336346 /* EEE Supported/Advertisement/LP Advertisement registers.
337347 *
338348 * EEE capability Register (3.20), Advertisement (7.60) and

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t