nanopi-r76s: fix slow WiFi by enabling SDIO SDR104#9929
Conversation
A UHS SDIO card can report S18A=1 even on a fixed-1.8V rail, so the core ran CMD11 and stalled the dw_mmc voltage switch, capping the bus at HS 50MHz. Guard the switch on signal_voltage, mirroring mmc_sd_init_card. Added for current, edge and bleedingedge. Signed-off-by: SuperKali <hello@superkali.me>
Gives the RTL8822CS a clean 50MHz high-speed fallback if SDR104 tuning fails, instead of dropping to 25MHz legacy. With the mmc CMD11 fix the WiFi now links at SDR104 200MHz, ~210 Mbit/s down versus 51 before. Signed-off-by: SuperKali <hello@superkali.me>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR adds SD high-speed support to the RK3576 NanoPI R76S device-tree configuration and prevents redundant 1.8V voltage switching during SDIO initialization. Both changes are applied consistently across kernel versions 6.18, 7.0, and 7.1. ChangesSDIO Capabilities and Voltage-Switch Fixes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
The R76S WiFi (RTL8822CS on M.2 SDIO) never came up in UHS. The card runs on a fixed-1.8V rail yet still sets S18A=1, so the core sent CMD11. There is no real voltage transition to make, the dw_mmc clock update times out, and the bus drops to high speed.
The fix skips that switch when the host already signals 1.8V, matching the guard in mmc_sd_init_card(). It lands in current, edge and bleedingedge. cap-sd-highspeed on the node keeps a 50MHz path if SDR104 tuning ever fails.
How Has This Been Tested?
Built edge (7.0.11), flashed on an R76S, iperf3 over WiFi to the gateway.
high speed SDIO cardat 50MHz, ~51 down / ~23 up Mbit/sUHS-I speed SDR104 SDIO cardat 198MHz, ~210 down / ~52 up Mbit/sChecklist:
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes