Libertas driver

From ArmadeusWiki
Revision as of 12:59, 1 December 2010 by JeremieS (Talk | contribs) (Wi2Wi chipset)

Jump to: navigation, search

The libertas driver is a collection of modules providing support for Marvell Technology Group's Libertas chipsets. On this page we will only detail the setup of the driver for the SDIO interface modules compatible with 88w8686 chipset, used for example on the APF27's wireless extension board.

The Linux drivers are available since 2.6.24 kernel, thanks to the community effort to rewrite Marvell's proprietary drivers.

Installation

Libertas drivers are already installed on your rootfs (if you built it with an APF27 as target). If not, it's explained here. The drivers require 2 proprietary firmware to be downloaded to the chipset before use.

Firmware (manual install)

These firmware can be manually downloaded and installed:
  • get them from David's Woodhouse linux-firmware git repository:
$ cd somewhere_with_free_space/
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git linux-firmware_git
  • copy them (version v8) to you TFTP directory (here /tftpboot/):
$ cp linux-firmware_git/libertas/sd8686_v8.bin /tftpboot/
$ cp linux-firmware_git/libertas/sd8686_v8_helper.bin /tftpboot/
  • install them on your target (here 192.168.1.2 is my Host IP address):
# mkdir -p /lib/firmware/
# cd /lib/firmware/
# tftp -g -r sd8686_v8.bin -l sd8686.bin 192.168.1.2
# tftp -g -r sd8686_v8_helper.bin -l sd8686_helper.bin 192.168.1.2
# ls -al /lib/firmware/
drwxr-xr-x    2 root     root            0 Jan  1 01:01 .
drwxr-xr-x    4 root     root            0 Dec 30  2009 ..
-rw-r--r--    1 root     root       122800 Jan  1 01:00 sd8686.bin
-rw-r--r--    1 root     root         2464 Jan  1 01:01 sd8686_helper.bin
Note Note: You can also try official firmwares got at Marvell website (see Links above)


Firmware (automatic install)

$ make menuconfig
Package Selection for the target  --->
    Hardware handling / blockdevices and filesystem maintenance  --->
        [*]   linux-firmware  --->
              ...
                    *** WiFi chipsets ***
              [*]   Marvell's 88W8686 (Libertas)
              [*]     SDIO
                        Firmware version (v9)  --->
              [ ]     GSPI
$ make

reflash your rootfs

Usage

  • Load driver:
# modprobe libertas_sdio
lib80211: common routines for IEEE802.11 drivers
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
libertas_sdio mmc1:0001:1: firmware: requesting sd8686_helper.bin
libertas_sdio mmc1:0001:1: firmware: requesting sd8686.bin
libertas: 00:19:88:11:2d:b8, fw 0.70.8p0, cap 0x00000000
eth1 (libertas_sdio): not using net_device_ops yet
libertas: eth1: Marvell WLAN 802.11 adapter

If it's not working, you can activate debug like this to report your problem:

# modprobe libertas libertas_debug=0xffffffff
# modprobe libertas_sdio
  • Bring up the corresponding network interface:
# ifconfig eth1 up
ADDRCONF(NETDEV_UP): eth1: link is not ready

Wi2Wi chipset

Drivers setup

You have to install Libertas SDIO and MMC drivers to make Wi2Wi chipset work:

$ make linux26-menuconfig
Device drivers  --->
    [*] Network device support  --->
            Wireless LAN  --->
                [*] Wireless LAN (IEEE 802.11)
                <M>   Marvell 8xxx Libertas WLAN driver support
                < >     Marvell Livertas 8388 USB 802.11b/g cards
                <M>     Marvell Libertas 8385 and 8686 SDIO 802.11b/g cards
    <M> MMC/SD/SDIO card support  --->
              *** MMC/SD/SDIO Card Drivers ***
        <M>   MMC block device driver

Initializing the connection

Before creating the Wifi connection, you must load the Libertas SDIO and the MMC modules:

modprobe mxcmmc
sleep 1
modprobe libertas_sdio

Disconnect from the Wifi

Using the Wi2Wi chipset, you have to unload the MMC driver along with the Libertas SDIO to disconnect from the Wifi:

modprobe -r mxcmmc
modprobe -r libertas_sdio

Reset Wi2Wi

To reset the chipset, you have to reset the Wi2Wi GPIO:

source /usr/bin/gpio_helpers.sh

gpio_mode PE11 1
gpio_set_value PE11 0
gpio_set_value PE11 1

Going further

Links