Initalization routine for a G PHY
If the PHY Revision is 1 perform a B5PHY init and then continue with the GPHY Init
Otherwise, perform a B6PHY init and then continue with the GPHY Init
If the PHY Revision is >= 2 and PHYConnected is true, perform an APHY init and then continue with the GPHY Init
If PHY Revision is >= 2
Write 0 to PHYRegister 0x814
Write 0 to PHYRegister 0x815
If PHY Revision is 2
Write 0 to PHYRegister 0x811
Write 0xC0 to PHYRegister 0x15
If PHY Revision is > 5
0x400 to PHYRegister 0x811
Write 0xC0 to PHYRegister 0x15
If PHYConnected is set
If (PHYRegister 0x400 bitwise AND 0xFF) is 3
Write 0x1816 to PHYRegister 0x4C2
Write 0x8606 to PHYRegister 0x4C3
Otherwise, if (PHYRegister 0x400 bitwise AND 0xFF) is 4 or 5
Write 0x1816 to PHYRegister 0x4C2
Write 0x8006 to PHYRegister 0x4C3
MaskSet PHYRegister 0x4CC with mask 0x00FF and set 0x1F00
If the PHY revision is >= 2 write 0x78 to PHY Register 0x47E
- If the Radio Revision is 8, then
Set bit 0x80 in PHYRegister 0x801
Set bit 0x4 in PHYRegister 0x43E
If the PHY Revision is 2 or greater and PHYConnected is set
Find the Loopback Gain
- If the Radio Revision is not 8
If the previous output of the 2050RadioCoreCalibration is -1 (or 2050RadioCoreCalibration hasn't been run yet)
Do 2050RadioCoreCalibration and save the value
- Otherwise
Write the previous value of 2050RadioCoreCalibration to RadioRegister 0x78
- If the saved TXCTL2 Attenuation value hasn't been set yet
Measure the local oscillator for G PHYs
- Otherwise
- If this is a 2050 radio with a Radio Revision of 8
Write the saved value of TXCTL1 left shifted by 4, then bitwise OR'd with the saved value of TXCTL2 to RadioRegister 0x52
- Otherwise
MaskSet RadioRegister 0x52 with mask 0xFFF0 and set with the saved value of TXCTL1
- If the PHY Revision is 6 or greater
MaskSet PHYRegister 0x36 with mask 0xF000 and set with the saved value of TXCTL2 left shifted by 12
If the BoardFlags have BFL_PACTRL set
Write 0x8075 to PHYRegister 0x2E
- Otherwise
Write 0x807F to PHYRegister 0x2E
If the PHY Revision is < 2
Write 0x101 to PHYRegister 0x2F
- Otherwise
Write 0x202 to PHYRegister 0x2F
- If this is a 2050 radio with a Radio Revision of 8
If PHYConnected is true
Adjust the LO to the saved attenuation values
Write 0x8078 to PHYRegister 0x80F
If BoardFlags BFL_RSSI isn't set
Update the "In Hardware" NRSSILookupTable with update value 0x7FFFFFFF (this may change, but I don't see where yet)
Set NRSSIThreshold for G PHYs
Otherwise, if PHYConnected is set or Phy revision is >= 2
- If there are no saved values for the first and second NRSSI values
Perform a GPHY NRSSISlopeCalculation
- Otherwise
Set NRSSIThreshold for G PHYs
- If there are no saved values for the first and second NRSSI values
- If the Radio Revision is 8
Write 0x3230 to PHYRegister 0x805
- If the chipset version is 0x4306 and the CHIPID Chip Package value is 2
Bitwise AND PHYRegister 0x429 with 0xBFFF
Bitwise AND PHYRegister 0x4C3 with 0x7FFF