fflash version 21020800
Tool for loading a firmware image from one of the partitions
of the onboard flash memory of an FLX-712 into the card's FPGA,
issueing commands to the host system I2C bus to achieve this.
A subsequent hotplug procedure or machine reboot is required.

Usage: fflash [-h|V] [-q] -f<flashnr>
              [[-L|I] [-U|P -d<devslot>] [-S] [-b<busnr>] [-r<chan>] [-R<raddr>]
              [-s<saddr>] [-u<uaddr>] [-T<sec>]]
  -h          : Show this help text.
  -V          : Show version.
  -q          : Be quiet (only errors will be displayed).
  -f <flashnr>: Flash memory segment partition [0..3] selection (no default).
  -I          : Generate an INIT_B pulse on the FLX-card (to reset flash devices).
  -L          : Load firmware from the given flash partition into the card.

The following options are relevant in conjunction with the -L and/or -I option:
  -b <busnr>  : I2C bus number (default=0).
  -r <chan>   : Riser card I2C-switch channel number (default=0)
                (Select I2C-switch address using option -R).
  -R <raddr>  : Riser card I2C-switch I2C address (default 0x70).
  -s <saddr>  : I2C-switch I2C address (hex, default=0x77, expected range: 0x70-0x77).
                NB: 0x70 already taken by the riser card I2C-switch!
  -u <uaddr>  : Embedded microcontroller I2C address
                (hex, default=0x67, expected range: 0x60-0x67).
  -U          : Use USB I2C-dongle instead of system SMBus
                (requires scripts i2cset.py and i2cget.py installed in /opt/flx).
  -P          : Use 'ipmitool' to access system SMBus.
                !NB: use -d option to select 'device slot': 1 or 2.
  -T <sec>    : Set 'Prog-done' timeout [s] (default: 7)
  -d <devslot>: Device slot (1 or 2), only in combination with -P.
  -S          : Precede calls to i2cget/set or ipmitool with 'sudo'.
                (default: 'sudo' not used; applies to options -L|I|P|U).
Examples:
---------
Load flash memory image partition #2 into the card:
  fflash -f2 -L

Load flash memory image partition #2 into the card, using I2C-bus #1,
riser card I2C-switch channel #0, FLX-card I2C-switch address 0x75 and
FLX-card microcontroller I2C-address 0x65:
  fflash -f2 -L -b1 -r0 -s75 -u65

How to determine the I2C-switch and uC I2C addresses
(options -s and -u respectively):

Note 1: there is an I2C-bus number (option -b) to select as well,
  which is assumed to have the value '1' (following '-y') in the examples below.
Note 2: in the standard FELIX server there is an additional I2C-switch
  on the socalled riser card; its channel is selected using option -r;
  its I2C address (default 0x70) can be selected using option -R;
  it means that the 2 FLX-cards in such a server may have identical
  '-s' and '-u' addresses, i.e. most likely their defaults
  while the riser card setting is: 'top' position = -r 0, 'bottom' = -r 1.

'sudo i2cdetect -y 1' should show you an address in the range 0x70-0x77,
let's say 0x77; this is then the address to use in option -s;
subsequently run 'sudo i2cset -y 1 0x77 1' to set the I2C-switch
causing an additional address in the range 0x60-0x67 to appear
in the output of 'sudo i2cdetect -y 1', so run that command again;
this is the address to use in option -u.

On the FLX-712 dipswitch J14 configures the '-s' and '-u' addresses:
  switch 1-3 to set 3 LSBs of '-s', i.e. 0x70-0x77
  switch 4-6 to set 3 LSBs of '-u', i.e. 0x60-0x67
