varigit/meta-variscite-fslc

WiFi disabled with custom device tree.

Closed this issue · 6 comments

I have a custom device tree that covers a board stack containing a DART-6UL and a couple of other boards. When upgrading from rocko to thud, the WIFI stopped working. Looking into it, the problem seems to be with this code in recipes-connectivity/bcm43xx-utils/bcm43xx-utils/variscite-wifi

# Exit if WIFI is disabled on DART-6UL
if grep -q MX6UL /sys/devices/soc0/soc_id && \
   ! grep -q WIFI /sys/devices/soc0/machine; then
   exit 0
fi

This seems to disable wifi unless the "model" field in the device tree contains the word "WIFI". As a workaround, I added "WIFI" at the end of our custom "model" field, but this seems like a bad way to detect if the device has WIFI or not.

Hi Aaron.
Since the i.MX6 UL/ULL/ULZ SOCs only have two SDIOs, the SD card and the WiFi share the same SDIO on the DART-6UL.
When using a DART-6UL SOM with a WiFi device you can still choose to either use the WiFi or the SD card, by choosing the appropriate device tree.
In that case the only difference is the used device tree, so the script has to check which device tree was used.

Regards,
Eran

In my case, the SoM is connected to another board with some I2C devices, LEDs, and switches attached to gpios, so I'm not using the given device trees. I had my own device tree that didn't have the word WIFI in the model field, so WiFi stopped working.

I understand, and I agree that it's not ideal to count on the machine model string, but I've explained why we had to do it.
Anyway, everything is available as open-source and you can adjust whatever you need for your specific case.
We'll add an explanation about this to variwiki.com soon.

Thanks for the feedback.

Was this ever added to wiki? I just ran into the same issue. Really odd way to detect it. Would be nice if the device tree files themself contained this as a comment somewhere.

Yes, it was added to the wiki following the above discussion. You can see it here:
https://variwiki.com/index.php?title=DART-6UL/VAR-SOM-MX7_Wireless_LAN#Note_on_DART-6UL_WiFi_initialization

Yes, it was added to the wiki following the above discussion. You can see it here:
https://variwiki.com/index.php?title=DART-6UL/VAR-SOM-MX7_Wireless_LAN#Note_on_DART-6UL_WiFi_initialization

Ah there it was. For some reason I had missed it.