Libertas SDIO 88w8686 with iPhone

David Wang mirrorspeak at gmail.com
Tue Apr 6 00:39:23 EDT 2010


Here's a snippet of my code (I stuck it near the beginning of
lbs_setup_firmware); I've only tested the 2G settings. These settings
appear not to change between different versions of the iPhone OS
kernel.

        // 2G config
        lbs_set_mac_reg(priv, 0xA5AC, 0xC8);
        lbs_set_mac_reg(priv, 0xA5B0, 0xC8 << 2);
        lbs_set_mac_reg(priv, 0xA5A8, 0xAF << 3);
        lbs_set_mac_reg(priv, 0xA5B4, 0xAF << 4);
        lbs_set_mac_reg(priv, 0xA5A4, 0xAF << 4);
        lbs_set_mac_reg(priv, 0xA58C, 0x40214);
        lbs_set_mac_reg(priv, 0xA5A0, 0x524D);
        lbs_set_mac_reg(priv, 0xA5F0, 0xA2271814);

        // 3G config
/*      lbs_set_mac_reg(priv, 0xA58C, 0x40212);
        lbs_set_mac_reg(priv, 0xA5A0, 0x524D);
        lbs_set_mac_reg(priv, 0xA5F0, 0xA2271814);
        lbs_set_bbp_reg(priv, 0xE9, 0xB1);
        lbs_set_bbp_reg(priv, 0xEF, 0xC);
        lbs_set_rf_reg(priv, 0x32, 0x5D);
        lbs_set_rf_reg(priv, 0x6B, 0xAE);*/

        // iPod touch config
/*      lbs_set_mac_reg(priv, 0xA58C, 0x40212);
        lbs_set_mac_reg(priv, 0xA5A0, 0xD24D);
        lbs_set_mac_reg(priv, 0xA5F0, 0xA027181C);*/

There is another section of the code in iPhone OS that retrieves and
prints out of some of those same MAC registers under the heading of
bluetooth coexistence registers, so they probably are for that
purpose. Keep in mind the generation of iPod touch referred to in the
code does not have bluetooth capability. Further down in the setup,
but still pretty early on, this occurs:

        lbs_get_mac_reg(priv, 0x2048, &macv);
        lbs_set_mac_reg(priv, 0x2048, macv | 0x80);

A debug string of "BT pull-down enabled" is associated with this
event. I think whether this section of code is done depends on the
type of device but I have not yet bothered to investigate this
further.

If anyone has seen anything similar and could shed some light on what
they mean, that would be great.

David

On Mon, Apr 5, 2010 at 8:53 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Mon, 2010-04-05 at 17:55 -0700, David Wang wrote:
>> Thanks for the reply, Cyril. It turned out that my problem was
>> actually a bug in my code to set the MAC and BBP registers. Once I
>> properly duplicated the settings the iPhone OS uses for the MAC, BBP,
>> and RF registers, the tx signal strength became normal. It looks like
>> the Libertas driver works perfectly for the iPhone. :)
>
> Out of curiosity, what settings *does* the iPhone send for MAC and BBP?
>
> Dan
>
>> Thanks everyone for their work on this driver!
>>
>> David
>>
>> _______________________________________________
>> libertas-dev mailing list
>> libertas-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/libertas-dev
>
>
>



More information about the libertas-dev mailing list