Modify

Opened 9 years ago

Closed 7 years ago

Last modified 4 years ago

#4274 closed defect (fixed)

B43 driver takes over GPIO ports

Reported by: presslab@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: Cc:

Description

On my WRT54G v2, the B43 driver takes over GPIO 0-3. This disables the IO pins needed for the MMC mod and also disables the DMZ LED. On the WRT54G v2, only the GPIO 0 should be used for WLAN status.

Similar problem here:
http://forum.openwrt.org/viewtopic.php?id=17359

I have attached my workaround, not sure if this is the best solution. The GPIOs used would depend on the router model.

Attachments (1)

main.c.diff (410 bytes) - added by presslab@… 9 years ago.
B43 driver diff for GPIOs

Download all attachments as: .zip

Change History (13)

Changed 9 years ago by presslab@…

B43 driver diff for GPIOs

comment:1 Changed 9 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

This patch has been applied upstream.

comment:2 follow-up: Changed 8 years ago by nx5

  • Resolution fixed deleted
  • Status changed from closed to reopened

I have a wrt54gv2 and having 0xF (see diff) instead of 0x1, I can't use mmc because b43 takes over the gpio lines. I have changed it to 0x1 and now everything works at the same time. I'm using backfire 10.03.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 8 years ago by anonymous

Replying to nx5:

I have a wrt54gv2 and having 0xF (see diff) instead of 0x1, I can't use mmc because b43 takes over the gpio lines. I have changed it to 0x1 and now everything works at the same time. I'm using backfire 10.03.

Hi nx5, im new to openwrt. I can experience this problem. how can i change the main.c ?? where do i find it, or how do i patch? Any help appreciated thanks in adive

comment:4 Changed 7 years ago by anonymous

Sent a patch to the openwrt-devel mailinglist for comment on the 15th of Aug 2010.
Still waiting for comments.

In the mean time if your interested.

This patch exposes the GPIO mask as a module option. This
makes it possible to limit the GPIO lines used by the b43 module.
Useful for those using the GPIO lines for other things like mmc over GPIO.

It is helpful to those not able / interested in recompiling OpenWRT themselves.
The default action is the same as before, that is 0xf gpiomask.

I have sucessfully tested it on my Linksys WRT54 GL with the mmc over GPIO hardware
mod.

The actual added file (a patch) is also available here should this e-mail become
corrupt ...

http://www.simong.net/openwrt/patches/800-b43-gpio-mask-module-option.patch

Download it and place it here in the backfire tree ...

cp 800-b43-gpio-mask-module-option.patch backfire/package/mac80211/patches/

A compiled Kernel module with this patch is available here ...

http://www.simong.net/openwrt/bin/brcm47xx/packages/kmod-b43_2.6.32.10+2010-07-06-1_brcm47xx.ipk

HOWTO:


The gpiomask is 0xf if the kernel module option is not specified.
To change the gpiomask ...

vi /etc/modules.d/30-b43

Change the line "b43" to "b43 gpiomask=0x1" or something else.
Reload the b43 kernel module or reboot.

You should see a similar message in the kernel logs (dmesg) to this ...

Broadcom 43xx driver loaded [ Features: PL, GPIO LED Mask: 0x1 Patch,Firmware-ID:
FW13 ]

Showing the GPIO LED Mask, in this case 0x1

comment:5 Changed 7 years ago by h3ndrik

Sorry, I applied the b43-gpio-mask-module-option patch but the SD-Card still won't work.
System is a Linksys WRT54GL with Backfire SVN Rev.22873

In dmesg:

[...]
Broadcom 43xx driver loaded [ Features: PL, GPIO LED Mask: 0x0001, Firmware-ID: FW13 ]
[...]
gpio-mmc: Failed to request mmc_spi module.
mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
gpio-mmc: MMC-Card "default" attached to GPIO pins di=2, do=4, clk=3, cs=7
mmc_spi spi32766.0: can't change chip-select polarity
mmc0: error -145 whilst initialising SD card

comment:6 Changed 7 years ago by openwrt@…

Have you set the gpiomask ?

ie. echo 0x9c > /proc/diag/gpiomask
before loading the mmc module ?

comment:7 in reply to: ↑ 3 Changed 7 years ago by anonymous

Replying to anonymous:

Replying to nx5:

I have a wrt54gv2 and having 0xF (see diff) instead of 0x1, I can't use mmc because b43 takes over the gpio lines. I have changed it to 0x1 and now everything works at the same time. I'm using backfire 10.03.

Hi nx5, im new to openwrt. I can experience this problem. how can i change the main.c ?? where do i find it, or how do i patch? Any help appreciated thanks in adive

Did you get the answer to your question? I would also like to know where the main.c file is located.

Thanks in advance

comment:8 follow-up: Changed 7 years ago by openwrt@…

Hi , The patch mentioned in comment #4 above was applied in September 2010 to the trunk. It should now also be in the Backfire branch.
So no more code changes should be needed. If you are interested in the changes then look at the patch.

Try the setting mentioned in comment #6

Let us know how you get on.

comment:9 in reply to: ↑ 8 Changed 7 years ago by anonymous

Replying to openwrt@…:

Hi , The patch mentioned in comment #4 above was applied in September 2010 to the trunk. It should now also be in the Backfire branch.
So no more code changes should be needed. If you are interested in the changes then look at the patch.

Try the setting mentioned in comment #6

Let us know how you get on.

Hi,
Thanks for the reply, I tried the following:
1) 30-b43 content changed to "b43 gpiomask=0x1"
2) Reboot
3) dmesg shows "GPIO LED Mask: 0x0001" but mmcblk0p1 does not show up until I click on "Save & Apply" on "MMC/SD driver configuration" webpage
4) mount /dev/mmcblk0p1 /mnt/mmc
5) I can browse through the mmc via ssh without any issues
6) Created a symbolic link (/www/flot -> /mnt/mmc/flot)
7) Can browse 192.168.1.1/flot from my laptop connected via ethernet port but with 6 to 10 sec delay
8) The wifi crashes once I try to access 192.168.1.1/flot over wifi
9) Once this happens, I can not reconnect to the wifi without power cycling the router

comment:10 Changed 7 years ago by anonymous

Have you set the gpiomask ?

ie. echo 0x9c > /proc/diag/gpiomask before loading the mmc module ?

comment:11 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:12 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.