1 /* 2 * Copyright (c) 2021-2024 HPMicro 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 9 #ifndef HPM_RTL8211_REGS_H 10 #define HPM_RTL8211_REGS_H 11 12 typedef enum { 13 RTL8211_BMCR = 0, /* 0x0: Basic Mode Control Register */ 14 RTL8211_BMSR = 1, /* 0x1: Basic Mode Status Register */ 15 RTL8211_PHYID1 = 2, /* 0x2: PHY Identifier Register 1 */ 16 RTL8211_PHYID2 = 3, /* 0x3: PHY Identifier Register 2 */ 17 RTL8211_PHYSR = 17, /* 0x11: PHY Specific Status Register */ 18 } RTL8211_REG_Type; 19 20 21 /* Bitfield definition for register: BMCR */ 22 /* 23 * RESET (RW/SC) 24 * 25 * Reset. 26 * 1: PHY reset 27 * 0: Normal operation 28 * Register 0 (BMCR) and register 1 (BMSR) will return to default 29 * values after a software reset (set Bit15 to 1). 30 * This action may change the internal PHY state and the state of the 31 * physical link associated with the PHY. 32 */ 33 #define RTL8211_BMCR_RESET_MASK (0x8000U) 34 #define RTL8211_BMCR_RESET_SHIFT (15U) 35 #define RTL8211_BMCR_RESET_SET(x) (((uint16_t)(x) << RTL8211_BMCR_RESET_SHIFT) & RTL8211_BMCR_RESET_MASK) 36 #define RTL8211_BMCR_RESET_GET(x) (((uint16_t)(x) & RTL8211_BMCR_RESET_MASK) >> RTL8211_BMCR_RESET_SHIFT) 37 38 /* 39 * LOOPBACK (RW) 40 * 41 * Loopback Mode. 42 * 1: Enable PCS loopback mode 43 * 0: Disable PCS loopback mode 44 */ 45 #define RTL8211_BMCR_LOOPBACK_MASK (0x4000U) 46 #define RTL8211_BMCR_LOOPBACK_SHIFT (14U) 47 #define RTL8211_BMCR_LOOPBACK_SET(x) (((uint16_t)(x) << RTL8211_BMCR_LOOPBACK_SHIFT) & RTL8211_BMCR_LOOPBACK_MASK) 48 #define RTL8211_BMCR_LOOPBACK_GET(x) (((uint16_t)(x) & RTL8211_BMCR_LOOPBACK_MASK) >> RTL8211_BMCR_LOOPBACK_SHIFT) 49 50 /* 51 * SPEED0 (RW) 52 * 53 * Speed Select (Bits 6, 13): 54 * When auto-negotiation is disabled writing to this bit allows the port 55 * speed to be selected. 56 * 11 = Reserved 57 * 10 = Reserved 58 * 1 = 100 Mbps 59 * 0 = 10 Mbps 60 */ 61 #define RTL8211_BMCR_SPEED0_MASK (0x2000U) 62 #define RTL8211_BMCR_SPEED0_SHIFT (13U) 63 #define RTL8211_BMCR_SPEED0_SET(x) (((uint16_t)(x) << RTL8211_BMCR_SPEED0_SHIFT) & RTL8211_BMCR_SPEED0_MASK) 64 #define RTL8211_BMCR_SPEED0_GET(x) (((uint16_t)(x) & RTL8211_BMCR_SPEED0_MASK) >> RTL8211_BMCR_SPEED0_SHIFT) 65 66 /* 67 * ANE (RW) 68 * 69 * Auto-Negotiation Enable. 70 * 1: Enable Auto-Negotiation 71 * 0: Disable Auto-Negotiation 72 */ 73 #define RTL8211_BMCR_ANE_MASK (0x1000U) 74 #define RTL8211_BMCR_ANE_SHIFT (12U) 75 #define RTL8211_BMCR_ANE_SET(x) (((uint16_t)(x) << RTL8211_BMCR_ANE_SHIFT) & RTL8211_BMCR_ANE_MASK) 76 #define RTL8211_BMCR_ANE_GET(x) (((uint16_t)(x) & RTL8211_BMCR_ANE_MASK) >> RTL8211_BMCR_ANE_SHIFT) 77 78 /* 79 * PWD (RW) 80 * 81 * Power Down. 82 * 1: Power down (only Management Interface and logic are active; link 83 * is down) 84 * 0: Normal operation 85 */ 86 #define RTL8211_BMCR_PWD_MASK (0x800U) 87 #define RTL8211_BMCR_PWD_SHIFT (11U) 88 #define RTL8211_BMCR_PWD_SET(x) (((uint16_t)(x) << RTL8211_BMCR_PWD_SHIFT) & RTL8211_BMCR_PWD_MASK) 89 #define RTL8211_BMCR_PWD_GET(x) (((uint16_t)(x) & RTL8211_BMCR_PWD_MASK) >> RTL8211_BMCR_PWD_SHIFT) 90 91 /* 92 * ISOLATE (RW) 93 * 94 * Isolate. 95 * 1: RGMII/GMII interface is isolated; the serial management interface 96 * (MDC, MDIO) is still active. When this bit is asserted, the 97 * RTL8211E-VB(VL)/RTL8211EG-VB ignores TXD[7:0], and TXCLT 98 * inputs, and presents a high impedance on TXC, RXC, RXCLT, 99 * RXD[7:0]. 100 * 0: Normal operation 101 */ 102 #define RTL8211_BMCR_ISOLATE_MASK (0x400U) 103 #define RTL8211_BMCR_ISOLATE_SHIFT (10U) 104 #define RTL8211_BMCR_ISOLATE_SET(x) (((uint16_t)(x) << RTL8211_BMCR_ISOLATE_SHIFT) & RTL8211_BMCR_ISOLATE_MASK) 105 #define RTL8211_BMCR_ISOLATE_GET(x) (((uint16_t)(x) & RTL8211_BMCR_ISOLATE_MASK) >> RTL8211_BMCR_ISOLATE_SHIFT) 106 107 /* 108 * RESTART_AN (RW/SC) 109 * 110 * Restart Auto-Negotiation. 111 * 1: Restart Auto-Negotiation 112 * 0: Normal operation 113 */ 114 #define RTL8211_BMCR_RESTART_AN_MASK (0x200U) 115 #define RTL8211_BMCR_RESTART_AN_SHIFT (9U) 116 #define RTL8211_BMCR_RESTART_AN_SET(x) (((uint16_t)(x) << RTL8211_BMCR_RESTART_AN_SHIFT) & RTL8211_BMCR_RESTART_AN_MASK) 117 #define RTL8211_BMCR_RESTART_AN_GET(x) (((uint16_t)(x) & RTL8211_BMCR_RESTART_AN_MASK) >> RTL8211_BMCR_RESTART_AN_SHIFT) 118 119 /* 120 * DUPLEX (RW) 121 * 122 * Duplex Mode. 123 * 1: Full Duplex operation 124 * 0: Half Duplex operation 125 * This bit is valid only in force mode, i.e., NWay is disabled. 126 */ 127 #define RTL8211_BMCR_DUPLEX_MASK (0x100U) 128 #define RTL8211_BMCR_DUPLEX_SHIFT (8U) 129 #define RTL8211_BMCR_DUPLEX_SET(x) (((uint16_t)(x) << RTL8211_BMCR_DUPLEX_SHIFT) & RTL8211_BMCR_DUPLEX_MASK) 130 #define RTL8211_BMCR_DUPLEX_GET(x) (((uint16_t)(x) & RTL8211_BMCR_DUPLEX_MASK) >> RTL8211_BMCR_DUPLEX_SHIFT) 131 132 /* 133 * COLLISION_TEST (RW) 134 * 135 * Collision Test. 136 * 1: Collision test enabled 137 * 0: Normal operation 138 */ 139 #define RTL8211_BMCR_COLLISION_TEST_MASK (0x80U) 140 #define RTL8211_BMCR_COLLISION_TEST_SHIFT (7U) 141 #define RTL8211_BMCR_COLLISION_TEST_SET(x) (((uint16_t)(x) << RTL8211_BMCR_COLLISION_TEST_SHIFT) & RTL8211_BMCR_COLLISION_TEST_MASK) 142 #define RTL8211_BMCR_COLLISION_TEST_GET(x) (((uint16_t)(x) & RTL8211_BMCR_COLLISION_TEST_MASK) >> RTL8211_BMCR_COLLISION_TEST_SHIFT) 143 144 /* 145 * SPEED1 (RW) 146 * 147 * Speed Select Bit 1. 148 * Refer to bit 13. 149 */ 150 #define RTL8211_BMCR_SPEED1_MASK (0x40U) 151 #define RTL8211_BMCR_SPEED1_SHIFT (6U) 152 #define RTL8211_BMCR_SPEED1_SET(x) (((uint16_t)(x) << RTL8211_BMCR_SPEED1_SHIFT) & RTL8211_BMCR_SPEED1_MASK) 153 #define RTL8211_BMCR_SPEED1_GET(x) (((uint16_t)(x) & RTL8211_BMCR_SPEED1_MASK) >> RTL8211_BMCR_SPEED1_SHIFT) 154 155 /* Bitfield definition for register: BMSR */ 156 /* 157 * 100BASE_T4 (RO) 158 * 159 * 100Base-T4 Capability. 160 * The RTL8211E-VB(VL)/RTL8211EG-VB does not support 161 * 100Base-T4 mode. This bit should always be 0. 162 */ 163 #define RTL8211_BMSR_100BASE_T4_MASK (0x8000U) 164 #define RTL8211_BMSR_100BASE_T4_SHIFT (15U) 165 #define RTL8211_BMSR_100BASE_T4_GET(x) (((uint16_t)(x) & RTL8211_BMSR_100BASE_T4_MASK) >> RTL8211_BMSR_100BASE_T4_SHIFT) 166 167 /* 168 * 100BASE_TX_FULL (RO) 169 * 170 * 100Base-TX Full Duplex Capability. 171 * 1: Device is able to perform 100Base-TX in full duplex mode 172 * 0: Device is not able to perform 100Base-TX in full duplex mode 173 */ 174 #define RTL8211_BMSR_100BASE_TX_FULL_MASK (0x4000U) 175 #define RTL8211_BMSR_100BASE_TX_FULL_SHIFT (14U) 176 #define RTL8211_BMSR_100BASE_TX_FULL_GET(x) (((uint16_t)(x) & RTL8211_BMSR_100BASE_TX_FULL_MASK) >> RTL8211_BMSR_100BASE_TX_FULL_SHIFT) 177 178 /* 179 * 100BASE_TX_HALF (RO) 180 * 181 * 100Base-TX Half Duplex Capability. 182 * 1: Device is able to perform 100Base-TX in half duplex mode 183 * 0: Device is not able to perform 100Base-TX in half duplex mode 184 */ 185 #define RTL8211_BMSR_100BASE_TX_HALF_MASK (0x2000U) 186 #define RTL8211_BMSR_100BASE_TX_HALF_SHIFT (13U) 187 #define RTL8211_BMSR_100BASE_TX_HALF_GET(x) (((uint16_t)(x) & RTL8211_BMSR_100BASE_TX_HALF_MASK) >> RTL8211_BMSR_100BASE_TX_HALF_SHIFT) 188 189 /* 190 * 10BASE_T_FULL (RO) 191 * 192 * 10Base-T Full Duplex Capability. 193 * 1: Device is able to perform 10Base-T in full duplex mode. 194 * 0: Device is not able to perform 10Base-T in full duplex mode. 195 */ 196 #define RTL8211_BMSR_10BASE_T_FULL_MASK (0x1000U) 197 #define RTL8211_BMSR_10BASE_T_FULL_SHIFT (12U) 198 #define RTL8211_BMSR_10BASE_T_FULL_GET(x) (((uint16_t)(x) & RTL8211_BMSR_10BASE_T_FULL_MASK) >> RTL8211_BMSR_10BASE_T_FULL_SHIFT) 199 200 /* 201 * 10BASE_T_HALF (RO) 202 * 203 * 10Base-T Half Duplex Capability. 204 * 1: Device is able to perform 10Base-T in half duplex mode 205 * 0: Device is not able to perform 10Base-T in half duplex mode 206 */ 207 #define RTL8211_BMSR_10BASE_T_HALF_MASK (0x800U) 208 #define RTL8211_BMSR_10BASE_T_HALF_SHIFT (11U) 209 #define RTL8211_BMSR_10BASE_T_HALF_GET(x) (((uint16_t)(x) & RTL8211_BMSR_10BASE_T_HALF_MASK) >> RTL8211_BMSR_10BASE_T_HALF_SHIFT) 210 211 /* 212 * 10BASE_T2_FULL (RO) 213 * 214 * 10Base-T2 Full Duplex Capability. 215 * The RTL8211E-VB(VL)/RTL8211EG-VB does not support 216 * 10Base-T2 mode and this bit should always be 0. 217 */ 218 #define RTL8211_BMSR_10BASE_T2_FULL_MASK (0x400U) 219 #define RTL8211_BMSR_10BASE_T2_FULL_SHIFT (10U) 220 #define RTL8211_BMSR_10BASE_T2_FULL_GET(x) (((uint16_t)(x) & RTL8211_BMSR_10BASE_T2_FULL_MASK) >> RTL8211_BMSR_10BASE_T2_FULL_SHIFT) 221 222 /* 223 * 10BASE_T2_HALF (RO) 224 * 225 * 10Base-T2 Half Duplex Capability. 226 * The RTL8211E-VB(VL)/RTL8211EG-VB does not support 227 * 10Base-T2 mode. This bit should always be 0. 228 */ 229 #define RTL8211_BMSR_10BASE_T2_HALF_MASK (0x200U) 230 #define RTL8211_BMSR_10BASE_T2_HALF_SHIFT (9U) 231 #define RTL8211_BMSR_10BASE_T2_HALF_GET(x) (((uint16_t)(x) & RTL8211_BMSR_10BASE_T2_HALF_MASK) >> RTL8211_BMSR_10BASE_T2_HALF_SHIFT) 232 233 /* 234 * 1000BASE_T_EXTENDED_STATUS (RO) 235 * 236 * 1000Base-T Extended Status Register. 237 * 1: Device supports Extended Status Register 0x0F (15) 238 * 0: Device does not support Extended Status Register 0x0F 239 * This register is read-only and is always set to 1. 240 */ 241 #define RTL8211_BMSR_1000BASE_T_EXTENDED_STATUS_MASK (0x100U) 242 #define RTL8211_BMSR_1000BASE_T_EXTENDED_STATUS_SHIFT (8U) 243 #define RTL8211_BMSR_1000BASE_T_EXTENDED_STATUS_GET(x) (((uint16_t)(x) & RTL8211_BMSR_1000BASE_T_EXTENDED_STATUS_MASK) >> RTL8211_BMSR_1000BASE_T_EXTENDED_STATUS_SHIFT) 244 245 /* 246 * PREAMBLE_SUPPRESSION (RO) 247 * 248 * Preamble Suppression Capability (Permanently On). 249 * The RTL8211E-VB(VL)/RTL8211EG-VB always accepts 250 * transactions with preamble suppressed. 251 */ 252 #define RTL8211_BMSR_PREAMBLE_SUPPRESSION_MASK (0x40U) 253 #define RTL8211_BMSR_PREAMBLE_SUPPRESSION_SHIFT (6U) 254 #define RTL8211_BMSR_PREAMBLE_SUPPRESSION_GET(x) (((uint16_t)(x) & RTL8211_BMSR_PREAMBLE_SUPPRESSION_MASK) >> RTL8211_BMSR_PREAMBLE_SUPPRESSION_SHIFT) 255 256 /* 257 * AUTO_NEGOTIATION_COMPLETE (RO) 258 * 259 * Auto-Negotiation Complete. 260 * 1: Auto-Negotiation process complete, and contents of registers 261 * 5, 6, 8, and 10 are valid 262 * 0: Auto-Negotiation process not complete 263 */ 264 #define RTL8211_BMSR_AUTO_NEGOTIATION_COMPLETE_MASK (0x20U) 265 #define RTL8211_BMSR_AUTO_NEGOTIATION_COMPLETE_SHIFT (5U) 266 #define RTL8211_BMSR_AUTO_NEGOTIATION_COMPLETE_GET(x) (((uint16_t)(x) & RTL8211_BMSR_AUTO_NEGOTIATION_COMPLETE_MASK) >> RTL8211_BMSR_AUTO_NEGOTIATION_COMPLETE_SHIFT) 267 268 /* 269 * REMOTE_FAULT (RC) 270 * 271 * Remote Fault. 272 * 1: Remote fault condition detected (cleared on read or by reset). 273 * Indication or notification of remote fault from Link Partner 274 * 0: No remote fault condition detected 275 */ 276 #define RTL8211_BMSR_REMOTE_FAULT_MASK (0x10U) 277 #define RTL8211_BMSR_REMOTE_FAULT_SHIFT (4U) 278 #define RTL8211_BMSR_REMOTE_FAULT_GET(x) (((uint16_t)(x) & RTL8211_BMSR_REMOTE_FAULT_MASK) >> RTL8211_BMSR_REMOTE_FAULT_SHIFT) 279 280 /* 281 * AUTO_NEGOTIATION_ABILITY (RO) 282 * 283 * Auto Configured Link. 284 * 1: Device is able to perform Auto-Negotiation 285 * 0: Device is not able to perform Auto-Negotiation 286 */ 287 #define RTL8211_BMSR_AUTO_NEGOTIATION_ABILITY_MASK (0x8U) 288 #define RTL8211_BMSR_AUTO_NEGOTIATION_ABILITY_SHIFT (3U) 289 #define RTL8211_BMSR_AUTO_NEGOTIATION_ABILITY_GET(x) (((uint16_t)(x) & RTL8211_BMSR_AUTO_NEGOTIATION_ABILITY_MASK) >> RTL8211_BMSR_AUTO_NEGOTIATION_ABILITY_SHIFT) 290 291 /* 292 * LINK_STATUS (RO) 293 * 294 * Link Status. 295 * 1: Linked 296 * 0: Not Linked 297 * This register indicates whether the link was lost since the last read. 298 * For the current link status, either read this register twice or read 299 * register bit 17.10 Link Real Time. 300 */ 301 #define RTL8211_BMSR_LINK_STATUS_MASK (0x4U) 302 #define RTL8211_BMSR_LINK_STATUS_SHIFT (2U) 303 #define RTL8211_BMSR_LINK_STATUS_GET(x) (((uint16_t)(x) & RTL8211_BMSR_LINK_STATUS_MASK) >> RTL8211_BMSR_LINK_STATUS_SHIFT) 304 305 /* 306 * JABBER_DETECT (RC) 307 * 308 * Jabber Detect. 309 * 1: Jabber condition detected 310 * 0: No Jabber occurred 311 */ 312 #define RTL8211_BMSR_JABBER_DETECT_MASK (0x2U) 313 #define RTL8211_BMSR_JABBER_DETECT_SHIFT (1U) 314 #define RTL8211_BMSR_JABBER_DETECT_GET(x) (((uint16_t)(x) & RTL8211_BMSR_JABBER_DETECT_MASK) >> RTL8211_BMSR_JABBER_DETECT_SHIFT) 315 316 /* 317 * EXTENDED_CAPABILITY (RO) 318 * 319 * 1: Extended register capabilities, always 1 320 */ 321 #define RTL8211_BMSR_EXTENDED_CAPABILITY_MASK (0x1U) 322 #define RTL8211_BMSR_EXTENDED_CAPABILITY_SHIFT (0U) 323 #define RTL8211_BMSR_EXTENDED_CAPABILITY_GET(x) (((uint16_t)(x) & RTL8211_BMSR_EXTENDED_CAPABILITY_MASK) >> RTL8211_BMSR_EXTENDED_CAPABILITY_SHIFT) 324 325 /* Bitfield definition for register: PHYID1 */ 326 /* 327 * OUI_MSB (RO) 328 * 329 * Organizationally Unique Identifier Bit 3:18. 330 * Always 0000000000011100. 331 */ 332 #define RTL8211_PHYID1_OUI_MSB_MASK (0xFFFFU) 333 #define RTL8211_PHYID1_OUI_MSB_SHIFT (0U) 334 #define RTL8211_PHYID1_OUI_MSB_GET(x) (((uint16_t)(x) & RTL8211_PHYID1_OUI_MSB_MASK) >> RTL8211_PHYID1_OUI_MSB_SHIFT) 335 336 /* Bitfield definition for register: PHYID2 */ 337 /* 338 * OUI_LSB (RO) 339 * 340 * Organizationally Unique Identifier Bit 19:24. 341 * Always 110010. 342 */ 343 #define RTL8211_PHYID2_OUI_LSB_MASK (0xFC00U) 344 #define RTL8211_PHYID2_OUI_LSB_SHIFT (10U) 345 #define RTL8211_PHYID2_OUI_LSB_GET(x) (((uint16_t)(x) & RTL8211_PHYID2_OUI_LSB_MASK) >> RTL8211_PHYID2_OUI_LSB_SHIFT) 346 347 /* 348 * MODEL_NUMBER (RO) 349 * 350 * Manufacture’s Model Number 351 */ 352 #define RTL8211_PHYID2_MODEL_NUMBER_MASK (0x3F0U) 353 #define RTL8211_PHYID2_MODEL_NUMBER_SHIFT (4U) 354 #define RTL8211_PHYID2_MODEL_NUMBER_GET(x) (((uint16_t)(x) & RTL8211_PHYID2_MODEL_NUMBER_MASK) >> RTL8211_PHYID2_MODEL_NUMBER_SHIFT) 355 356 /* 357 * REVISION_NUMBER (RO) 358 * 359 * Revision Number 360 */ 361 #define RTL8211_PHYID2_REVISION_NUMBER_MASK (0xFU) 362 #define RTL8211_PHYID2_REVISION_NUMBER_SHIFT (0U) 363 #define RTL8211_PHYID2_REVISION_NUMBER_GET(x) (((uint16_t)(x) & RTL8211_PHYID2_REVISION_NUMBER_MASK) >> RTL8211_PHYID2_REVISION_NUMBER_SHIFT) 364 365 /* Bitfield definition for register: PHYSR */ 366 /* 367 * SPEED (RO) 368 * 369 * Link Speed. 370 * 11: Reserved 10: 1000Mbps 371 * 01: 100Mbps 00: 10Mbps 372 */ 373 #define RTL8211_PHYSR_SPEED_MASK (0xC000U) 374 #define RTL8211_PHYSR_SPEED_SHIFT (14U) 375 #define RTL8211_PHYSR_SPEED_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_SPEED_MASK) >> RTL8211_PHYSR_SPEED_SHIFT) 376 377 /* 378 * DUPLEX (RO) 379 * 380 * Full/Half Duplex Mode. 381 * 1: Full duplex 0: Half duplex 382 */ 383 #define RTL8211_PHYSR_DUPLEX_MASK (0x2000U) 384 #define RTL8211_PHYSR_DUPLEX_SHIFT (13U) 385 #define RTL8211_PHYSR_DUPLEX_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_DUPLEX_MASK) >> RTL8211_PHYSR_DUPLEX_SHIFT) 386 387 /* 388 * PAGE_RECEIVED (RC) 389 * 390 * New Page Received. 391 * 1: Page received 0: Page not received 392 */ 393 #define RTL8211_PHYSR_PAGE_RECEIVED_MASK (0x1000U) 394 #define RTL8211_PHYSR_PAGE_RECEIVED_SHIFT (12U) 395 #define RTL8211_PHYSR_PAGE_RECEIVED_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_PAGE_RECEIVED_MASK) >> RTL8211_PHYSR_PAGE_RECEIVED_SHIFT) 396 397 /* 398 * SPEED_AND_DUPLEX_RESOLVED (RO) 399 * 400 * Speed and Duplex Mode Resolved. 401 * 1: Resolved 0: Not resolved 402 */ 403 #define RTL8211_PHYSR_SPEED_AND_DUPLEX_RESOLVED_MASK (0x800U) 404 #define RTL8211_PHYSR_SPEED_AND_DUPLEX_RESOLVED_SHIFT (11U) 405 #define RTL8211_PHYSR_SPEED_AND_DUPLEX_RESOLVED_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_SPEED_AND_DUPLEX_RESOLVED_MASK) >> RTL8211_PHYSR_SPEED_AND_DUPLEX_RESOLVED_SHIFT) 406 407 /* 408 * LINK_REAL_TIME (RO) 409 * 410 * Real Time Link Status. 411 * 1: Link OK 0: Link not OK 412 */ 413 #define RTL8211_PHYSR_LINK_REAL_TIME_MASK (0x400U) 414 #define RTL8211_PHYSR_LINK_REAL_TIME_SHIFT (10U) 415 #define RTL8211_PHYSR_LINK_REAL_TIME_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_LINK_REAL_TIME_MASK) >> RTL8211_PHYSR_LINK_REAL_TIME_SHIFT) 416 417 /* 418 * MDI_CROSSOVER_STATUS (RO) 419 * 420 * MDI/MDI Crossover Status. 421 * 1: MDI Crossover 0: MDI 422 */ 423 #define RTL8211_PHYSR_MDI_CROSSOVER_STATUS_MASK (0x40U) 424 #define RTL8211_PHYSR_MDI_CROSSOVER_STATUS_SHIFT (6U) 425 #define RTL8211_PHYSR_MDI_CROSSOVER_STATUS_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_MDI_CROSSOVER_STATUS_MASK) >> RTL8211_PHYSR_MDI_CROSSOVER_STATUS_SHIFT) 426 427 /* 428 * PRE_LINKOK (RO) 429 * 430 * Reflects Local Receiver is OK. 431 * 0: Receiver is not OK 432 * 1: Receiver is OK 433 */ 434 #define RTL8211_PHYSR_PRE_LINKOK_MASK (0x2U) 435 #define RTL8211_PHYSR_PRE_LINKOK_SHIFT (1U) 436 #define RTL8211_PHYSR_PRE_LINKOK_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_PRE_LINKOK_MASK) >> RTL8211_PHYSR_PRE_LINKOK_SHIFT) 437 438 /* 439 * JABBER_REAL_TIME (RO) 440 * 441 * Real Time Jabber Indication. 442 * 1: Jabber Indication 0: No jabber Indication 443 */ 444 #define RTL8211_PHYSR_JABBER_REAL_TIME_MASK (0x1U) 445 #define RTL8211_PHYSR_JABBER_REAL_TIME_SHIFT (0U) 446 #define RTL8211_PHYSR_JABBER_REAL_TIME_GET(x) (((uint16_t)(x) & RTL8211_PHYSR_JABBER_REAL_TIME_MASK) >> RTL8211_PHYSR_JABBER_REAL_TIME_SHIFT) 447 448 449 450 451 #endif /* HPM_RTL8211_REGS_H */ 452