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.

Figure 4-11. Configuration Protection Control Register Lock/Unlock State Diagram
Table 4-6. Protectable non-PHY registers
MMSAddressMnemonicName
MMS 0OPEN Alliance Standard Registers
0x0003OA_RESETOPEN Alliance Configuration 0
0x0004OA_CONFIG0OPEN Alliance Configuration 0
0x0008OA_STATUS0OPEN Alliance Status 0
0x0009OA_STATUS1OPEN Alliance Status 1
0x000COA_IMASK0OPEN Alliance Interrupt Mask 0
0x000DOA_IMASK1OPEN Alliance Interrupt Mask 1
MMS 1MAC Registers
0x0000MAC_NCRNetwork Control Register
0x0001MAC_NCFGRNetwork Configuration Register
0x0020MAC_HRBHash Register Bottom
0x0021MAC_HRTHash Register Top
0x0022MAC_SAB1Specific Address 1 Bottom
0x0023MAC_SAT1Specific Address 1 Top
0x0024MAC_SAB2Specific Address 2 Bottom
0x0025MAC_SAT2Specific Address 2 Top
0x0026MAC_SAB3Specific Address 3 Bottom
0x0027MAC_SAT3Specific Address 3 Top
0x0028MAC_SAB4Specific Address 4 Bottom
0x0029MAC_SAT4Specific Address 4 Top
0x002AMAC_TIDM1MAC Type ID Match 1
0x002BMAC_TIDM2MAC Type ID Match 2
0x002CMAC_TIDM3MAC Type ID Match 3
0x002DMAC_TIDM4MAC Type ID Match 4
0x0032SAMB1Specific Address Match 1 Bottom
0x0033SAMT1Specific Address Match 1 Top
0x006FTIUSBNTimer Increment Sub-Nanoseconds
0x0070TSHTimestamp Seconds High
0x0074TSLTimestamp Seconds Low
0x0075TNTimestamp Nanoseconds
0x0076TA TSU Timer Adjust
0x0077TITSU Timer Increment
0x0200BMGR_CTLBuffer Manager Control
MMS 10Miscellaneous Registers
0x0081QTXCFGQueue Transmit Configuration
0x0082QRXCFGQueue Receive Configuration
0x0088PADCTRLPad Control
0x0089CLKOCTLClock Output Control
0x0096BUSPCSBus Parity Control/Status
0x008CMISCMiscellaneous
0x0100ECCCTRLSRAM Error Correction Code Control
0x0101ECCSTSSRAM Error Correction Code Status
0x0102ECCFLTCTRLSRAM Error Correction Code Fault Injection Control
0x0200EC0CTRLEvent Capture 0 Control
0x0201EC1CTRLEvent Capture 1 Control
0x0202EC2CTRLEvent Capture 2 Control
0x0203EC3CTRLEvent Capture 3 Control
0x0220PACTLPhase Adjuster Control
0x0221EG0STNSEvent 0 Start Time Nanoseconds
0x0222EG0STSECLEvent 0 Start Time Seconds Low
0x0223EG0STSECHEvent 0 Start Time Seconds High
0x0224EG0PWEvent 0 Pulse Width
0x0225EG0ITEvent 0 Idle Time
0x0226EG0CTLEvent 0 Control
0x0227EG1STNSEvent 1 Start Time Nanoseconds
0x0228EG1STSECLEvent 1 Start Time Seconds Low
0x0229EG1STSECHEvent 1 Start Time Seconds High
0x022AEG1PWEvent 1 Pulse Width
0x022BEG1ITEvent 1 Idle Time
0x022CEG1CTLEvent 1 Control
0x022DEG2STNSEvent 2 Start Time Nanoseconds
0x022EEG2STSECLEvent 2 Start Time Seconds Low
0x022FEG2STSECHEvent 2 Start Time Seconds High
0x0230EG2PWEvent 2 Pulse Width
0x0231EG2ITEvent 2 Idle Time
0x0232EG2CTLEvent 2 Control
0x0233EG3STNSEvent 3 Start Time Nanoseconds
0x0234EG3STSECLEvent 3 Start Time Seconds Low
0x0235EG3STSECHEvent 3 Start Time Seconds High
0x0236EG3PWEvent 3 Pulse Width
0x0237EG3ITEvent 3 Idle Time
0x0238EG3CTLEvent 3 Control
0x0239PPSCTLOne Pulse-per- Second Control
0x023ASEVINTENSynchronization Event Interrupt Enable
0x023BSEVINTDISSynchronization Event Interrupt Disable
0x023DSEVSTSSynchronization Event Status