
SMI bitband uboot code:


* smi-bitbang.c

 GPIO based Micrel Switch SMI bitbang driver. The SMI is the Micrel Switch
 non-standar MIIM interface interface that provides access to all Switch
 configuration registers through the data line (SDA_MDIO) and 
 the clock line (SCL_MDC).

 Since KSZ8873/KSZ8863/KSZ8893, KSZ8895/KSZ8863, and KSZ8993 all have different
 SMI frame format. In order for the same SMI bitbang driver to support the
 different SMI frame format, the SMI bitbang driver first read device phy id
 by using standard MIMM MDIO/MDC frame format through GPIO bitbang, then 
 according to the read back phy id to determine the two different catalogue of 
 SMI frame format to bitband the SMI bits.

 The same driver supports KSZ8873/KSZ8863/KSZ8893, and KSZ8895/KSZ8863
 but not support KSZ8993 since KSZ8993 has same phy id as KSZ8873, but different
 SMI frame format.

 The driver has verified on Micrel KSZ9692 SOC control board with GPIO5/GPIO6 
 as MDC/MDIO to perform bitbang. The verified MDC clock frequency for this driver under 
 of the KSZ9692 SOC is about 9.9KHz to 230KHz

        DUT                     KSZ9692
    +-----------+
    |           |
    | SDA_MDIO  +--+------+ (TX/RX) GPIO6  (Output/Input)
    |           |    
    |           |            
    |           |
    | SDA_MDC   +---------+ (CLK) GPIO5 (Output)
    +-----------+


* smi-bitbang.bin

  After build smi-bitbang.c into u-boot (call smi-bitbang.bin), 
  to perform SMI read\write, from uboot prompt:

  boot> smi read <reg>           -> read 1 byte from register <reg>.
  boot> smi write <reg> <value>  -> write 1 byte <value> to register <reg>.
  boot> smitest    -> SMI selftest (read chip id, and write/read) for 256 times.



* How to build smi-bitbang.c into u-boot code for KSZ9692 SOC control board:

   From "uboot-1.1.4\trunk\include\configs\ks8692.h"

  (1). #define "KS8692_CONTROL_BOARD" ==> u-boot for KSZ9692 SOC control board.

  (2). #define "CONFIG_SMI" ==> builder include smi-bitbang.c driver.

