Site Tools


projects:homelab:sfp_gpon_onu:eeprom_editing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
projects:homelab:sfp_gpon_onu:eeprom_editing [2026/03/21 17:11] – [EEPROM Bits (XG-PON / XGS-PON)] Extra spaces Andrew Yongprojects:homelab:sfp_gpon_onu:eeprom_editing [2026/03/21 17:21] (current) – clarification on 1000BASE-X linux limitation Andrew Yong
Line 52: Line 52:
  
 ^  Address  ^  Field  ^  Old Value  ^  New Value  ^  Reason  ^ ^  Address  ^  Field  ^  Old Value  ^  New Value  ^  Reason  ^
-|  ''0x06''  |  Ethernet Compliance  |  ''0x02''  |  ''0x00''  |  Disable 1000BASE-LX so Linux prefers 2500BASE-X  |+|  ''0x06''  |  Ethernet Compliance  |  ''0x02''  |  ''0x00''  |  Clear 1000BASE-LX to avoid advertising conflicting speeds alongside 2500BASE-X  |
 |  ''0x0A''  |  Extended Compliance  |  ''0x00''  |  ''0x05''  |  Declare 2500BASE-X support  | |  ''0x0A''  |  Extended Compliance  |  ''0x00''  |  ''0x05''  |  Declare 2500BASE-X support  |
 |  ''0x0C''  |  Nominal Bit Rate  |  ''0x0D''  |  ''0x1F''  |  Set to 3100MBd (correct value for 2500BASE-X)  | |  ''0x0C''  |  Nominal Bit Rate  |  ''0x0D''  |  ''0x1F''  |  Set to 3100MBd (correct value for 2500BASE-X)  |
Line 64: Line 64:
 Notes: Notes:
  
-  * Due to Linux kernel limitations, only a single speed can be advertised via EEPROM for XG-PON/XGS-PON. Multi-speed combinations (e.g. 2.5/5Gbps, 5/10Gbps, 2.5/5/10Gbps) are not achievable through EEPROM editing alone+  * Due to Linux kernel limitations, only a single speed can be advertised via EEPROM for XG-PON/XGS-PON. Multi-rate combinations (e.g. 2.5/5Gbps, 5/10Gbps, 2.5/5/10Gbps) are not achievable through EEPROM editing alone((Linux's SFP bus driver derives supported speeds solely from EEPROM compliance codes, which only allows a single speed to be declared via the compliance code bytes. Multi-rate support requires either a kernel quirk (hardcoded per vendor/part number in ''sfp.c''), a PHY-emulating module that negotiates speeds independently, or a NIC driver that bypasses the generic SFP bus logic entirely.))
   * You do not have to update the 0x5F checksum (CC_EXT) unless you edit addresses ''0x40''–''0x5E'', which are out of scope of this guide; but in case you need it, this command will update CC_EXT:\\ ''%%i2cset -y $BUS 0x50 0x5f $(i2cdump -y -r 64-94 $BUS 0x50 b | awk 'NR>1 {for(i=2;i<=NF;i++) if($i~/^[0-9a-f]{2}$/) {cmd="printf \"%d\" 0x"$i; cmd|getline d; close(cmd); sum+=d}} END {printf "0x%02x", sum % 256}')%%''   * You do not have to update the 0x5F checksum (CC_EXT) unless you edit addresses ''0x40''–''0x5E'', which are out of scope of this guide; but in case you need it, this command will update CC_EXT:\\ ''%%i2cset -y $BUS 0x50 0x5f $(i2cdump -y -r 64-94 $BUS 0x50 b | awk 'NR>1 {for(i=2;i<=NF;i++) if($i~/^[0-9a-f]{2}$/) {cmd="printf \"%d\" 0x"$i; cmd|getline d; close(cmd); sum+=d}} END {printf "0x%02x", sum % 256}')%%''
  
Line 79: Line 79:
 Notes: Notes:
  
-  * Set ''0x06'' to ''0x00'' (disable 1000BASE-LX) for all configurations above except 1000BASE-X, then set ''0x0A'' and ''0x0C'' according to the desired speed+  * Set ''0x06'' to ''0x00'' (clear 1000BASE-LX) for all configurations above except 1000BASE-X, to avoid advertising conflicting speeds alongside the selected rate
  
 === Copper Rates (PHY Emulation Required) === === Copper Rates (PHY Emulation Required) ===
projects/homelab/sfp_gpon_onu/eeprom_editing.txt · Last modified: by Andrew Yong