Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[Patch] make cpsw work on another eval board



Hi all,

I'm trying to get NetBSD running on CKB-3352(*).

(*) http://www.computex.co.jp/products/ckb/ckb_3352.htm

The board is based on TI AM3352 so that I can boot
NetBSD with -m evbarm kernel=BEAGLEBONE configuration.
However, cpsw doesn't work because the board has
a different PHY (MICREL KSZ9021RNI) from BeagleBone
(Black)'s (SMSC LAN8710A); cpsw needs to set RGMII mode.
Another issue is that the uboot of the board doesn't
support networking features, so cpsw and PHY are not
initialized as the kernel expects; cpsw needs to do
some additional initializations and PHY needs to
adjust clock timing for cpsw.

I wrote two patches to make cpsw work on the board.
The patches can be found at
https://gist.github.com/ozaki-r/9182826 .

The first patch is for if_cpsw.c:
- Enable MDIO before mii_attach
  - Otherwise, "no PHY found!" happened
  - The code is ported from FreeBSD current
- Set defautl ALE table entries
  - Without this fix, packets aren't correctly forwarded
  - The code is ported from FreeBSD current
- Set Giga mode on MII and Sliver ports
  - This is needed for MICREL PHY
  - The driver checks if its PHY has 1000baseT

The second patch is for micphy.c:
- Add a new PHY driver for MICREL KSZ9021RNI
  - The driver includes a clock fixup for cpsw,
    which is applied if the device is attached to cpsw

I confirmed that cpsw with the first patch works on
BeagleBone Black as before.

Thanks,
  ozaki-r



Home | Main Index | Thread Index | Old Index