Repository navigation
Conversation
PR Summary by QodoKeep Hi3516A SD hosts at 3.3 V without UHS-I
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
Both himci nodes declared sd-uhs-sdr12/25/50/104. Every UHS-I mode signals at 1.8V, and these pads have no 1.8V rail: himci offers MMC_VDD_32_33 | MMC_VDD_33_34 only and the nodes carry no vqmmc-supply. The MMC core still sets S18R in ACMD41, a card that accepts it gets CMD11 and switches its own side to 1.8V, the host's readback fails, and with no power control to cycle the card it never recovers. That is OpenIPC/firmware#2219: on a Hi3516DV100 speed dome whose onboard storage works under the vendor firmware, mmc1 logs "cannot verify signal voltage switch" and then "error -19 whilst initialising SD card", and no block device appears. Drop the UHS modes and cap both hosts at 50MHz high-speed. Exactly 50MHz: the MMC mux parents are 25/50/75/100MHz and the clock framework picks the fastest one at or below the request, so 49.5MHz would run the card at 25MHz.
bc51902 to
6c092f7
Compare
|
Qodo finding ("SD transfers run at 25 MHz instead of 50") is right. The MMC mux parents are 25/50/75/100 MHz and the clock framework picks the fastest one at or below the request, so 49.5 MHz selected 25 MHz. The head is now |
That addresses the clock-rate concern: both MMC nodes now request exactly |
For OpenIPC/firmware#2219.
Symptom
On a Hi3516DV100 speed dome (board id
HI3516D_N81820, IMX291) whose onboard storage works under the vendor firmware, current OpenIPC probes both himci hosts, but no block device ever appears:Cause
Both nodes in
hi3516a.dtsideclaresd-uhs-sdr12/25/50/104. Every UHS-I mode signals at 1.8 V, and these pads have no 1.8 V rail: himci setsocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34, and the nodes carry novqmmc-supply. Because the caps are present, the core sets S18R in ACMD41 and sends CMD11 to any card that accepts it. The card switches its own side to 1.8 V, and the host's readback fails (cannot verify signal voltage switch). There is no power control to cycle the card back to 3.3 V, so it never recovers.Reaching the voltage switch also means the device on
mmc1answered the SD-only ACMD41. So whatever is soldered there speaks the SD protocol (SD-NAND rather than true eMMC), which is exactly the path this breaks.Change
sd-uhs-*from both nodes.max-frequencyat exactly 50 MHz high-speed. The MMC mux parents are 25/50/75/100 MHz and the clock framework picks the fastest one at or below the request, so 49.5 MHz would land on 25 MHz.non-removableis deliberately not added tommc0. Nothing in the log ties the onboard chip tommc0, andhi3516a.dtsiis shared by every av100/dv100 board, where it would turn off card detection on any board with an SD slot there.Tested
cpp+dtcbuildhi3516a-demb.dts. The decompiled DTB shows both nodes withmax-frequency = <0x2faf080>(50 MHz) and no UHS properties.cannot verify signal voltage switch/error -19lines are gone, but both controllers then logclock stuckand still nommcblkappears. The chip accepted the 1.8 V switch on earlier boots and is permanently powered, so it is probably still stuck there through warm reboots. The reporter has been asked for a full power cycle on this kernel. The rebuilt test kernel (this head, 50 MHz) is the same pre-release.