Bringing up WiFi interface on Wandboard Quad

This forum is for supported devices using an ARMv7 Freescale SoC.

Re: Bringing up WiFi interface on Wandboard Quad

Postby PLyttle » Fri Aug 15, 2014 11:28 am

If you want to be rude you'll have to try harder, What do you mean???? :?

Can you elaborate on what you think I fixed?

The output of rfkill line 1
"0: wifi-rfkill: Wireless LAN" should not be there.
It shows my current fix is not installed.

Your kernel reads 3.10.17, mainline is 3.15.8, the release candidate is 3.16.0
The Arch mainline package is linux-armv7, the rc package is linux-armv7-rc

Looks like you are running linux-wandboard, which is what I am shooting for anyway
You could try applying this patch and see is it works.

$this->bbcode_second_pass_code('', 'diff -rupN a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi 2014-07-11 21:53:12.000000000 +0200
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi 2014-08-07 12:39:12.820209143 +0200
@@ -106,11 +106,13 @@

/* Rev C1 gpio definitions */
bluetooth-on-revc1 = <&gpio5 21 0>;
- bluetooth-wake-revc1 = <&gpio5 30 0>;
+ bluetooth-wake-revc1 = <&gpio1 30 0>;
bluetooth-host-wake-revc1 = <&gpio5 20 0>;

wifi-ref-on-revc1 = <&gpio5 31 0>;
- wifi-rst-n-revc1 = <&gpio6 0 0>;
+ wifi-rst-n-revc1 = <&gpio1 26 0>;
+ wifi-reg-on-revc1 = <&gpio5 30 0>;
+ wifi-wake-revc1 = <&gpio6 0 0>;

/* Rev B/C probe gpio */
wand-rev-gpio = <&gpio2 28 0>;
diff -rupN a/arch/arm/mach-imx/devices/wand-rfkill.c b/arch/arm/mach-imx/devices/wand-rfkill.c
--- a/arch/arm/mach-imx/devices/wand-rfkill.c 2014-07-11 21:53:12.000000000 +0200
+++ b/arch/arm/mach-imx/devices/wand-rfkill.c 2014-08-13 08:29:20.742890988 +0200
@@ -55,84 +55,6 @@ static const struct rfkill_ops wand_rfki
.set_block = wand_rfkill_set_block,
};

-static int wand_rfkill_wifi_probe(struct device *dev,
- struct device_node *np,
- struct wand_rfkill_data *rfkill,
- int wand_rev)
-{
- int ret;
- int wl_ref_on, wl_rst_n, wl_reg_on, wl_wake, wl_host_wake;
-
- if(wand_rev){
- wl_ref_on = of_get_named_gpio(np, "wifi-ref-on-revc1", 0);
- wl_rst_n = of_get_named_gpio(np, "wifi-rst-n-revc1", 0);
- }
- else {
- wl_ref_on = of_get_named_gpio(np, "wifi-ref-on", 0);
- wl_rst_n = of_get_named_gpio(np, "wifi-rst-n", 0);
- }
-
- wl_reg_on = of_get_named_gpio(np, "wifi-reg-on", 0);
- wl_wake = of_get_named_gpio(np, "wifi-wake", 0);
- wl_host_wake = of_get_named_gpio(np, "wifi-host-wake", 0);
-
- if (!gpio_is_valid(wl_rst_n) || !gpio_is_valid(wl_ref_on) ||
- !gpio_is_valid(wl_reg_on) || !gpio_is_valid(wl_wake) ||
- !gpio_is_valid(wl_host_wake)) {
-
- dev_err(dev, "incorrect wifi gpios (%d %d %d %d %d)\n",
- wl_rst_n, wl_ref_on, wl_reg_on, wl_wake, wl_host_wake);
- return -EINVAL;
- }
-
- dev_info(dev, "initialize wifi chip\n");
-
- gpio_request(wl_rst_n, "wl_rst_n");
- gpio_direction_output(wl_rst_n, 0);
- msleep(11);
- gpio_set_value(wl_rst_n, 1);
-
- gpio_request(wl_ref_on, "wl_ref_on");
- gpio_direction_output(wl_ref_on, 1);
-
- gpio_request(wl_reg_on, "wl_reg_on");
- gpio_direction_output(wl_reg_on, 1);
-
- gpio_request(wl_wake, "wl_wake");
- gpio_direction_output(wl_wake, 1);
-
- gpio_request(wl_host_wake, "wl_host_wake");
- gpio_direction_input(wl_host_wake);
-
- rfkill->shutdown_name = "wifi_shutdown";
- rfkill->shutdown_gpio = wl_wake;
-
- rfkill->rfkill_dev = rfkill_alloc("wifi-rfkill", dev, RFKILL_TYPE_WLAN,
- &wand_rfkill_ops, rfkill);
- if (!rfkill->rfkill_dev) {
- ret = -ENOMEM;
- goto wifi_fail_free_gpio;
- }
-
- ret = rfkill_register(rfkill->rfkill_dev);
- if (ret < 0)
- goto wifi_fail_unregister;
-
- dev_info(dev, "wifi-rfkill registered.\n");
-
- return 0;
-
-wifi_fail_unregister:
- rfkill_destroy(rfkill->rfkill_dev);
-wifi_fail_free_gpio:
- if (gpio_is_valid(wl_rst_n)) gpio_free(wl_rst_n);
- if (gpio_is_valid(wl_ref_on)) gpio_free(wl_ref_on);
- if (gpio_is_valid(wl_reg_on)) gpio_free(wl_reg_on);
- if (gpio_is_valid(wl_wake)) gpio_free(wl_wake);
- if (gpio_is_valid(wl_host_wake)) gpio_free(wl_host_wake);
-
- return ret;
-}

static int wand_rfkill_bt_probe(struct device *dev,
struct device_node *np,
@@ -249,32 +171,12 @@ static int wand_rfkill_probe(struct plat
else
dev_info(&pdev->dev,"wandboard is rev B0\n");

- /* setup WiFi */
- ret = wand_rfkill_wifi_probe(&pdev->dev, pdev->dev.of_node, &rfkill[0], wand_rev);
- if (ret < 0)
- goto fail_free_rfkill;
-
/* setup bluetooth */
ret = wand_rfkill_bt_probe(&pdev->dev, pdev->dev.of_node, &rfkill[1], wand_rev);
- if (ret < 0)
- goto fail_unregister_wifi;

platform_set_drvdata(pdev, rfkill);

return 0;
-
-fail_unregister_wifi:
- if (rfkill[1].rfkill_dev) {
- rfkill_unregister(rfkill[1].rfkill_dev);
- rfkill_destroy(rfkill[1].rfkill_dev);
- }
-
- /* TODO free gpio */
-
-fail_free_rfkill:
- kfree(rfkill);
-
- return ret;
}

static int wand_rfkill_remove(struct platform_device *pdev)
@@ -286,13 +188,6 @@ static int wand_rfkill_remove(struct pla
if (!rfkill)
return 0;

- /* WiFi */
- if (gpio_is_valid(rfkill[0].shutdown_gpio))
- gpio_free(rfkill[0].shutdown_gpio);
-
- rfkill_unregister(rfkill[0].rfkill_dev);
- rfkill_destroy(rfkill[0].rfkill_dev);
-
/* Bt */
if (gpio_is_valid(rfkill[1].shutdown_gpio))
gpio_free(rfkill[1].shutdown_gpio);
')
this is the same patch I referred to before

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Fri Aug 15, 2014 4:21 pm

I followed the instructions on http://archlinuxarm.org/platforms/armv7 ... /wandboard

pacman -Sy uboot-wandboard-quad
pacman -Syu linux-armv7
reboot

thats how i got linux-armv7, I very clearly remember doing this last night. Even when I tried a reinstall, pacman alerted me that linux-arm7 was already installed.
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Fri Aug 15, 2014 5:17 pm

Something strange, i installed the RC version and also had an SD card attached externally with another Arch system on it. The RC version booted into the external filesystem. Is this a bug or a feature?
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

Re: Bringing up WiFi interface on Wandboard Quad

Postby PLyttle » Fri Aug 15, 2014 5:21 pm

maybe something went wrong...
try $this->bbcode_second_pass_code('', 'pacman -Qe | grep linux- ')
this shows the installed package

uname is telling me you are running 3.10.17 (which is linux-wandboard)
There is nothing wrong with that version.
(except perhaps a wifi problem, but I'm not too sure about that anymore, at least for rev B1)

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Fri Aug 15, 2014 5:34 pm

Alright, I'll do a clean install and try again....this is winding me up.
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

Re: Bringing up WiFi interface on Wandboard Quad

Postby PLyttle » Fri Aug 15, 2014 6:17 pm

Happened to me too.

Sometimes you just hit the wrong key (in this case probably RETURN, instead of Y)
Paying attention wears thin after installing for the umpteenth time...

Nice of you to go to this length, That was not my intention.

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Fri Aug 15, 2014 7:33 pm

I'm doing it for myself and for others, don't want to waste an expensive computer just for a small thing. Will reinstall the system and let you know.
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Sun Aug 17, 2014 8:27 pm

[root@alarm ~]# uname -a
Linux alarm 3.16.0-rc7-7-ARCH #1 SMP PREEMPT Mon Jul 28 19:14:02 MDT 2014 armv7l GNU/Linux

i have a wifi device in USB which is the only one showing up. Have enabeld brcm43xx

[root@alarm ~]# systemctl status brcm43xx
● brcm43xx.service - Broadcom 43xx bluetooth HCI
Loaded: loaded (/usr/lib/systemd/system/brcm43xx.service; enabled)
Active: inactive (dead)

[root@alarm ~]# dmesg | grep brcm
[root@alarm ~]#

So this particular release is not being picked up yet.
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

Re: Bringing up WiFi interface on Wandboard Quad

Postby PLyttle » Mon Aug 18, 2014 6:49 am

Thanks, this means that rev B1/ bcm4329 needs the current rfkill setup.

Will act accordingly.
It will take some time, sometimes a new version seems stable, only to fail after some 8 hours. I wish I knew what triggered these failures.

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: Bringing up WiFi interface on Wandboard Quad

Postby Alarmed » Sat Aug 23, 2014 12:38 pm

I have a wandboard, raspberry pi, and a laptop running ubuntu. If you can give me clear instructions or a script on how to get the latest trunk and build kernel for the wandboard, I can do a few checks while you're busy.
Alarmed
 
Posts: 54
Joined: Sun Jul 27, 2014 2:07 pm

PreviousNext

Return to Freescale

Who is online

Users browsing this forum: No registered users and 10 guests