arm64: dts: amlogic: enable eMMC HS200 by default#13
Conversation
|
Did you try only adding the CE intentionally doesn't place the |
|
This is what I would prefer. Bring back the option in the CE settings so users can adjust it themselves, but don't force HS400 mode as it may lead to devices not booting. Since internal installation is no longer possible as of Android 14, this option also receives less attention. For the other items, please change or split the PR as this one will not be merged. |
|
@Pro-me3us @Portisch — thanks both, got it. To Pro-me3us's question: I did try a simpler approach first — just adding mmc-hs200-1_8v to the AM6B+ DTS while keeping the mainline meson-gx-mmc driver bound. It stayed at legacy HS mode rather than negotiating HS200, which led me down the driver-swap path. I'll look into the FTC 2nd gen implementation to understand what makes the simpler path work there. To Portisch's points: understood, this PR won't be merged as is. Would you be OK with me opening two follow-ups:
|
|
1371264 to
3757596
Compare
|
Sure, I force-pushed this branch to drop the HDMI commit. That change is now in PR #14 as a standalone. For the HS400 side, I tried the simpler path first on the mainline meson-gx-mmc driver — just adding mmc-hs400-1_8v in DT, with the Adding tx_delay = <16> in the DTS on the parent &sd_emmc_c node (one line of DTS, no driver changes) fixes it — looks stable so far. Obviously needs more testing than the 20 mins I spent. Happy to open that as a separate PR as it would allow it as an option in the CE settings. |
4e69fc2 to
3b1456a
Compare
There was a problem hiding this comment.
This is not true, it uses this driver:
common_drivers/drivers/mmc/host/meson-gx-mmc.c
Line 4690 in 97f676e
In Linux config the AML driver is used:
CONFIG_AMLOGIC_MMC_MESON_GX=y
|
Sorry @Portisch, you're right, I had the driver wrong. The experiment still stands though: mmc-hs400-1_8v; in DTS as suggested by @Pro-me3us + tx_delay = <16> also in DTS + the caps2_quirks=mmc-hs400 cmdline gets HS400 stable on my AM6B+ without any driver changes. Something like that in the DTS: Should I close this PR and open a new one with just the few lines of DTS change? |
|
The 4.9 sdio driver has AML SOC specific configurations that aren't present in the meson-gx-mmc version. In the 4.9 sdio driver, the g12b revb table does use But in meson-gx-mmc common_drivers/drivers/mmc/host/meson-gx-mmc.c Lines 162 to 164 in 97f676e |
|
Thanks for the pointer @Pro-me3us . I re-tested today on myAM6B+ to be sure. The default-to-16 at meson-gx-mmc.c:163-164 doesn't actually fire on this binding: With tx_delay = <16>; in DTS: tx_delay = 16 (raw: 0x10100002) So the delay line makes a difference. Not a no-op. When I ran without the delay setting earlier this week-end the boot CRCs progressed into the write failure and corrupted the eMMC. I had to re-flash the amlogic image to recover. So, two runs, same outcome. |
|
@Pro-me3us @Portisch , I think I tracked it down. meson-gx-mmc does default tx_delay to 16. The reason that default never takes effect is that So to replace all my driver code, it should come down to a simple 2-file change:
Should I recreate this PR as a single commit with that? |
|
Yeah you're right, I hadn't noticed the final .dtb included with the CE-NO image has the It would be safer to follow your previous suggestion and only apply the |
This comment was marked as off-topic.
This comment was marked as off-topic.
1 similar comment
|
I tested the changes on G12B, Minix U22-XJ, installed CE on eMMC. Default DTB: Speed test: With changes: Speed test: |
|
Thanks @Pro-me3us @Portisch , I finally understood the settings comment. I didn't have to touch the settings add-on. There's already an "eMMC Speed Mode" entry in there. With that node in place, the eMMC Speed Mode option shows up under Settings → Hardware, and flipping it to hs400 brings the eMMC up in HS400 after a reboot. Default stays at plain HS. Stability looks solid here on my box with zero CRC errors Happy to send a PR for this to CoreELEC. I'll wait for your feedbacks first. |
|
Please test with this update. https://test.coreelec.org/Portisch/temp/CoreELEC-Amlogic-no.aarch64-22.0-Piers_nightly_20260529.tar |
|
Tested nightly 20260529.tar on the AM6B+
To enable HS200 properly, I add to update the xml file to this: |
|
The HS200 may should be added as default, not by dtb.xml. So you can fixup your PR to add default the hs200 property in common coreelec dtsi. The hs400 is covered than by a dtb-xml change. |
|
@Portisch to confirm, you mean to update this PR with 1 single commit and 1 file changed: arch/arm64/boot/dts/amlogic/g12b_s922x_ugoos_am6b_2g.dts with this single edit: or do you mean the global mesong12b.dtsi / coreelec_g12b_common.dtsi shared by all similar boards? or the global amlogic/coreelec_common.dtsi? |
|
I think this is the best place: It's at least G12B and SM1 what miss this setting. |
coreelec_common.dtsi strips mmc-hs400-1_8v from the eMMC node for compatibility, but nothing enables HS200 either. On boards whose eMMC does not advertise HS200 on its own (at least G12B and SM1) the eMMC therefore tops out at plain high-speed (~50 MB/s) instead of HS200 (~150 MB/s). mmc-hs200-1_8v is a capability flag, not a forced mode: the kernel still gates it on the card's EXT_CSD, so an eMMC that cannot do HS200 simply stays at high-speed. Enable it next to the existing HS400 removal so capable eMMCs negotiate HS200 by default. Signed-off-by: allolive <160342668+allolive@users.noreply.github.com>
3757596 to
46cc2a7
Compare
coreelec_common.dtsi does not enables HS200 on boards whose eMMC (at least G12B and SM1).
The eMMC therefore tops out at plain high-speed (~50 MB/s) instead of HS200 (~150 MB/s).
Enable HS200 next to the existing HS400 removal so capable eMMCs negotiate HS200 by default.