4.6.3 Configuration Protection
Once the device has been configured, writes to register bit fields by the host controller are typically no longer necessary. However, should the host controller encounter a fault, it is possible that incorrect firmware execution may result in errant writes to critical registers resulting in misconfiguration that could interfere with system-wide communication among other nodes on the bus. For this reason, the LAN8650/1 includes a feature to prevent writes to critical registers once configuration by the host controller is complete.
The Write Enable (WREN) bit in the Configuration Protection Control (CFGPRTCTL) register enables and disables (blocks) writes to all integrated PHY registers in MMS2 (PHY PCS Registers), MMS3 (PHY PMA/PMD Registers), and MMS4 (PHY Vendor Specific Registers) as well as non-PHY registers identified in Table 4-6. Following reset, the Write Enable bit is set indicating that configuration protection is inactive and writing to all register bit fields is enabled. Once the host controller has configured the device , it may write a ‘0’ to the Write Enable bit to activate configuration protection and disable writing to all PHY configuration register bit fields preventing changes to the configuration. When register configuration protection is active, All integrated PHY and non-PHY registers not listed in the table below may be written.
By default, the Configuration Protection Control register is locked and the Write Enable bit cannot be modified. Changing the Write Enable bit requires the Configuration Protection Control register to be unlocked. Unlocking the Configuration Protection Control register requires writing two unique key values in sequence to the Configuration Protection Control register. The host controller must first write a value of 53464352h to the Configuration Protection Control register. Once written, the Key #1 Accepted (KEY1) status bit will be set. The host controller must then write a value of 434F4E46h to the Configuration Protection Control register resulting in the Key #2 Accepted (KEY2) status bit being set. If any value other than 434F4E46h is written after the first key value has been accepted, the LOCKED state is re-entered, the Key #1 Accepted status bit will be cleared and the unlocking process must be restarted. Additionally, writing to any register other than the Configuration Protection Control will also result in the register being locked again with the Key #1 Accepted status bit cleared. When both key values have been written in the correct sequence and accepted as indicated by both the KEY1 Accepted and KEY2 Accepted status bits being set, the Configuration Protection Control register is unlocked and the host controller may then write and modify the Write Enable bit, enabling or disabling writes to all register bit fields. When the Configuration Protection Control register is unlocked, a write to any other register will cause the Configuration Protection Control register to immediately become locked again. See Figure 4-11.
| MMS | Address | Mnemonic | Name |
|---|---|---|---|
| MMS 0 | OPEN Alliance Standard Registers | ||
| 0x0003 | OA_RESET | OPEN Alliance Configuration 0 | |
| 0x0004 | OA_CONFIG0 | OPEN Alliance Configuration 0 | |
| 0x0008 | OA_STATUS0 | OPEN Alliance Status 0 | |
| 0x0009 | OA_STATUS1 | OPEN Alliance Status 1 | |
| 0x000C | OA_IMASK0 | OPEN Alliance Interrupt Mask 0 | |
| 0x000D | OA_IMASK1 | OPEN Alliance Interrupt Mask 1 | |
| MMS 1 | MAC Registers | ||
| 0x0000 | MAC_NCR | Network Control Register | |
| 0x0001 | MAC_NCFGR | Network Configuration Register | |
| 0x0020 | MAC_HRB | Hash Register Bottom | |
| 0x0021 | MAC_HRT | Hash Register Top | |
| 0x0022 | MAC_SAB1 | Specific Address 1 Bottom | |
| 0x0023 | MAC_SAT1 | Specific Address 1 Top | |
| 0x0024 | MAC_SAB2 | Specific Address 2 Bottom | |
| 0x0025 | MAC_SAT2 | Specific Address 2 Top | |
| 0x0026 | MAC_SAB3 | Specific Address 3 Bottom | |
| 0x0027 | MAC_SAT3 | Specific Address 3 Top | |
| 0x0028 | MAC_SAB4 | Specific Address 4 Bottom | |
| 0x0029 | MAC_SAT4 | Specific Address 4 Top | |
| 0x002A | MAC_TIDM1 | MAC Type ID Match 1 | |
| 0x002B | MAC_TIDM2 | MAC Type ID Match 2 | |
| 0x002C | MAC_TIDM3 | MAC Type ID Match 3 | |
| 0x002D | MAC_TIDM4 | MAC Type ID Match 4 | |
| 0x0032 | SAMB1 | Specific Address Match 1 Bottom | |
| 0x0033 | SAMT1 | Specific Address Match 1 Top | |
| 0x006F | TIUSBN | Timer Increment Sub-Nanoseconds | |
| 0x0070 | TSH | Timestamp Seconds High | |
| 0x0074 | TSL | Timestamp Seconds Low | |
| 0x0075 | TN | Timestamp Nanoseconds | |
| 0x0076 | TA | TSU Timer Adjust | |
| 0x0077 | TI | TSU Timer Increment | |
| 0x0200 | BMGR_CTL | Buffer Manager Control | |
| MMS 10 | Miscellaneous Registers | ||
| 0x0081 | QTXCFG | Queue Transmit Configuration | |
| 0x0082 | QRXCFG | Queue Receive Configuration | |
| 0x0088 | PADCTRL | Pad Control | |
| 0x0089 | CLKOCTL | Clock Output Control | |
| 0x0096 | BUSPCS | Bus Parity Control/Status | |
| 0x008C | MISC | Miscellaneous | |
| 0x0100 | ECCCTRL | SRAM Error Correction Code Control | |
| 0x0101 | ECCSTS | SRAM Error Correction Code Status | |
| 0x0102 | ECCFLTCTRL | SRAM Error Correction Code Fault Injection Control | |
| 0x0200 | EC0CTRL | Event Capture 0 Control | |
| 0x0201 | EC1CTRL | Event Capture 1 Control | |
| 0x0202 | EC2CTRL | Event Capture 2 Control | |
| 0x0203 | EC3CTRL | Event Capture 3 Control | |
| 0x0220 | PACTL | Phase Adjuster Control | |
| 0x0221 | EG0STNS | Event 0 Start Time Nanoseconds | |
| 0x0222 | EG0STSECL | Event 0 Start Time Seconds Low | |
| 0x0223 | EG0STSECH | Event 0 Start Time Seconds High | |
| 0x0224 | EG0PW | Event 0 Pulse Width | |
| 0x0225 | EG0IT | Event 0 Idle Time | |
| 0x0226 | EG0CTL | Event 0 Control | |
| 0x0227 | EG1STNS | Event 1 Start Time Nanoseconds | |
| 0x0228 | EG1STSECL | Event 1 Start Time Seconds Low | |
| 0x0229 | EG1STSECH | Event 1 Start Time Seconds High | |
| 0x022A | EG1PW | Event 1 Pulse Width | |
| 0x022B | EG1IT | Event 1 Idle Time | |
| 0x022C | EG1CTL | Event 1 Control | |
| 0x022D | EG2STNS | Event 2 Start Time Nanoseconds | |
| 0x022E | EG2STSECL | Event 2 Start Time Seconds Low | |
| 0x022F | EG2STSECH | Event 2 Start Time Seconds High | |
| 0x0230 | EG2PW | Event 2 Pulse Width | |
| 0x0231 | EG2IT | Event 2 Idle Time | |
| 0x0232 | EG2CTL | Event 2 Control | |
| 0x0233 | EG3STNS | Event 3 Start Time Nanoseconds | |
| 0x0234 | EG3STSECL | Event 3 Start Time Seconds Low | |
| 0x0235 | EG3STSECH | Event 3 Start Time Seconds High | |
| 0x0236 | EG3PW | Event 3 Pulse Width | |
| 0x0237 | EG3IT | Event 3 Idle Time | |
| 0x0238 | EG3CTL | Event 3 Control | |
| 0x0239 | PPSCTL | One Pulse-per- Second Control | |
| 0x023A | SEVINTEN | Synchronization Event Interrupt Enable | |
| 0x023B | SEVINTDIS | Synchronization Event Interrupt Disable | |
| 0x023D | SEVSTS | Synchronization Event Status | |
