mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
492a61eee2
Some clones (XiFan R36Max2 family) wire the internal USB WiFi module to the same OTG data lines as the physical USB port through a hardware mux gpio: WiFi and the port are mutually exclusive, and users report that on the stock OS disabling WiFi brings the port back. Port ROCKNIX's 0026 USB2 PHY patch, which reads switch-gpios from the otg-port node and exposes usb_switch_gpio / usb_switch_ext in sysfs (boot default: internal WiFi). ROCKNIX itself never toggles the mux from userspace, so the physical port stays dead there; wire it to our WiFi toggle instead: wifictl enable routes the mux to the internal module, wifictl disable flips it to the external port and powers its vbus. The sysfs writes are no-ops on boards without the mux, and the patch is inert unless the generated overlay (USBMUX hardware variant on the site) adds switch-gpios to the PHY. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>