bcm-v4

[Specification

N PHY RF Control Intc Override (u8 field, u16 value, u8 core)

(PHY Rev 7+ added)

  1. If PHY Revision >= 3

    1. Loop 2 times with i as index
      1. If core is 1 and i is 1
        1. Continue
      2. Else if core is 2 and i is 0
        1. Continue
      3. If PHY Revision < 7

        1. If i is 0
          1. Set bit 0x400 in PHY Register 0x91
        2. Otherwise
          1. Set bit 0x400 in PHY Register 0x92
      4. If field is zero
        1. If i is zero
          1. Write 0 to PHY Register 0x91
        2. Otherwise
          1. Write 0 to PHY Register 0x92
        3. Call N PHY Force RF Sequence with 2 as argument

      5. Else if field is 1
        1. If PHY Revision >= 7

          1. If i is 0
            1. MaskSet PHY Register 0x91 with mask 0xFF3F and set with value << 6

            2. Set bit 0x0400 in PHY Register 0x91
          2. Otherwise
            1. MaskSet PHY Register 0x92 with mask 0xFF3F and set with value << 6

            2. Set bit 0x0400 in PHY Register 0x92
          3. Mask PHY Register 0x2FF with mask 0x3FFF
          4. Set bit 0x2000 in PHY Register 0x2FF
          5. Set bit 0x0001 in PHY Register 0x2FF
        2. Otherwise
          1. If i is zero
            1. MaskSet PHY Register 0x91 with mask 0xFC3F and set with value << 6

            2. MaskSet PHY Register 0xE7 with mask 0xFFFE and set with 1

            3. MaskSet PHY Register 0x78 with mask 0xFFFE and set with 1

            4. Spin Wait for bit 1 set in PHY Register 0x78, wait a maximum of 10,000 usec with a test every 100 usec
            5. MaskSet PHY Register 0xE7 with mask 0xFFFE and set with 0

          2. Otherwise
            1. MaskSet PHY Register 0x92 with mask 0xFC3F and set with value << 6

            2. MaskSet PHY Register 0xEC with mask 0xFFFE and set with 1

            3. MaskSet PHY Register 0x78 with mask 0xFFFD and set with 2

            4. Spin Wait for bit 2 set in PHY Register 0x78, wait a maximum of 10,000 usec with a test every 100 usec
            5. MaskSet PHY Register 0xEC with mask 0xFFFE and set with 0

      6. Else if field is 2
        1. If PHY Revision >= 7

          1. Set tmp to 0x30
        2. Otherwise
          1. If the band is 5G
            1. Set tmp to 0x0020
          2. Otherwise
            1. Set tmp to 0x0010
        3. If the band is 5G
          1. Set val to value << 5

        4. Otherwise
          1. Set val to value << 4

        5. If i is 0
          1. MaskSet PHY Register 0x91 with mask ~tmp and set with val

          2. If PHY Revision >= 7

            1. Set bit 0x1000 in PHY Register 0x91
        6. Otherwise
          1. MaskSet PHY Register 0x92 with mask ~tmp and set with val

          2. If PHY Revision >= 7

            1. Set bit 0x1000 in PHY Register 0x91
      7. Else if field is 3
        1. If PHY Revision >= 7

          1. If the band is 5G
            1. Set tmp to 0x0001
            2. Set tmp2 to 0x0004
            3. Set val to value
          2. Otherwise
            1. Set tmp to 0x0004
            2. Set tmp2 to 1
            3. Set val to value << 2

          3. If i is 0
            1. MaskSet PHY Register 0x91 with mask ~tmp and set with val

            2. Clear bits tmp2 in PHY Register 0x91
          4. Otherwise
            1. MaskSet PHY Register 0x92 with mask ~tmp and set with val

            2. Clear bits tmp2 in PHY Register 0x92
        2. Otherwise
          1. If the band is 5G
            1. Set tmp to 0x0001
            2. Set val to value
          2. Otherwise
            1. Set tmp to 0x0004
            2. Set val to value << 2

          3. If i is 0
            1. MaskSet PHY Register 0x91 with mask ~tmp and set with val

          4. Otherwise
            1. MaskSet PHY Register 0x92 with mask ~tmp and set with val

      8. Else if field is 4
        1. If PHY Revision >= 7

          1. If the band is 5G
            1. Set tmp to 0x0002
            2. Set tmp2 to 0x0008
            3. Set val to value << 1

          2. Otherwise
            1. Set tmp to 0x0008
            2. Set tmp2 to 2
            3. Set val to value << 3

          3. If i is 0
            1. MaskSet PHY Register 0x91 with mask ~tmp and set with val

            2. Clear bits tmp2 in PHY Register 0x91
          4. Otherwise
            1. MaskSet PHY Register 0x92 with mask ~tmp and set with val

            2. Clear bits tmp2 in PHY Register 0x92
        2. Otherwise
          1. If the band is 5G
            1. Set tmp to 0x0002
            2. Set val to value << 1

          2. Otherwise
            1. Set tmp to 0x0008
            2. Set val to value << 3

          3. If i is 0
            1. MaskSet PHY Register 0x91 with mask ~tmp and set with val

          4. Otherwise
            1. MaskSet PHY Register 0x92 with mask ~tmp and set with val


Exported/Archived from the wiki to HTML on 2016-10-27