OpenNSL API Guide and Reference Manual
Platform Setup

Platform specific instructions

AS5712 platform

The transmit power of optical transceivers are controlled through CPLD devices that are connected to CPU over I2C bus. The following I2C utilities are used to control transmit power from the Linux shell.

To enable transmit power on ports 1-8, write data 0x00 (BITS 0-7 for Ports 1-8 respectively) to register 0x0C, present on CPLD device at address 0x61.
  i2cset -y 1 0x61 0x0c 0x00 b
Similary, for ports 9-16, 17-24, 25-32, 33-40 and 41-48
  i2cset -y 1 0x61 0x0d 0x00 b
  i2cset -y 1 0x61 0x0e 0x00 b
  i2cset -y 1 0x62 0x0c 0x00 b
  i2cset -y 1 0x62 0x0d 0x00 b
  i2cset -y 1 0x62 0x0e 0x00 b
Use 'i2cget' command to read a register. For example, to read transmit power status of ports 1-8, read register 0x0C, issue
  i2cget -y 1 0x61 0x0C b
Use 'i2cdump' to dump all registers. Example: i2cdump -y 1 0x61 b

AG7648 platform

The transmit power of optical transceivers are controlled through CPLD devices that are connected to CPU over I2C bus. The following I2C utilities are used to control transmit power from the Linux shell.

To enable transmit power on ports 1-8, write data 0x00 (BITS 0-7 for Ports 1-8 respectively) to register 0x08, present on CPLD device at address 0x33.
  i2cset -y 1 0x33 0x08 0x00 b
Similary, for ports 9-16, 17-24, 25-32, 33-40 and 41-48
  i2cset -y 1 0x33 0x09 0x00 b
  i2cset -y 1 0x33 0x0a 0x00 b
  i2cset -y 1 0x33 0x0b 0x00 b
  i2cset -y 1 0x33 0x0c 0x00 b
  i2cset -y 1 0x33 0x0d 0x00 b
Use 'i2cget' command to read a register. For example, to read transmit power status of ports 1-8, read register 0x08, issue
  i2cget -y 1 0x33 0x08 b
Use 'i2cdump' to dump all registers. Example: i2cdump -y 1 0x33 b