9 #ifndef HPM_RTL8211_REGS_H
10 #define HPM_RTL8211_REGS_H
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
RTL8211_REG_Type
Definition: hpm_rtl8211_regs.h:12
@ RTL8211_PHYID2
Definition: hpm_rtl8211_regs.h:16
@ RTL8211_BMCR
Definition: hpm_rtl8211_regs.h:13
@ RTL8211_PHYID1
Definition: hpm_rtl8211_regs.h:15
@ RTL8211_BMSR
Definition: hpm_rtl8211_regs.h:14
@ RTL8211_PHYSR
Definition: hpm_rtl8211_regs.h:17