Repository navigation
anyka: EV200: SD card on the gwell camera (GPIO 34, SPI pad function) - #47
Merged
Merged
Conversation
On a gwell AK3918EV200 camera the SD card never answered in U-Boot
("Card did not respond to voltage select! : -110"; every response all
zeros with RESPEND set, i.e. CMD held low), while Linux read it. Setting
the registers Linux leaves (devmem) in U-Boot one by one, the card
answers only with both of these:
- GPIO 34 low, its pad a GPIO. GPIO 34 is wifi_en in the EV200 reference
board's device tree, on the pad that is otherwise SD DAT1, and Linux
drives it low. The boot ROM leaves that pad's field (0x080000DC 11:10)
at 11. The SD driver now muxes the pad to GPIO and drives it low.
- SPI0's pads 35/36 at function 2 (0x080000DC 13:12 = 10), as the EV200
device tree's spiflash_pins and Linux set them, not the 11 of the gwell
vendor U-Boot's 0x3003. ak_sflash now writes 0x2003 there on the EV200.
On the camera: the card is found at boot with no manual writes, flash
reads stay stable and the kernel boots from flash, reset works. Under
qemu-hisilicon (no pin model): SD and flash still work on ak3918ev200,
and all six images build.
PR Summary by Qodoanyka: Restore SD card responses on the gwell AK3918EV200
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SD card on a gwell AK3918EV200 camera never answered in U-Boot (
Card did not respond to voltage select! : -110). Every response came back all zeros with RESPEND set, i.e. CMD held low, while Linux on the same board read the card.I set the registers Linux leaves (from
devmem) in U-Boot one at a time on the camera. The card answers only with both of these:wifi_enin the EV200 reference board's DT, on the pad that is otherwise SD DAT1. The boot ROM leaves that pad's field (0x080000DC11:10) at11. The SD driver now muxes the pad to GPIO and drives it low (EV200 only).0xDC13:12 =10), as the EV200 DT'sspiflash_pinsand Linux set them, instead of the gwell vendor U-Boot's0x3003(11).ak_sflashnow writes0x2003on EV200.Tested on the camera: the card is found at boot with no manual writes, flash reads are stable, the kernel boots from flash, and
resetworks. In qemu-hisilicon (no pin model): SD and flash still work on ak3918ev200, and all six images build.GPIO 34 comes from the reference design. An EV200 board that uses GPIO 34 for something else would need a different value.