Open
Conversation
LZhaoM
commented
Feb 6, 2026
…ock settings from devicetree data The mmc driver has the same phase values for all meson platforms. However, some platforms (and even some boards) require different values. This patch transfers the values from the set in the code to the variables in the device-tree file. Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
…, tx, rx phase clock settings. Use phase 270 for core MMC clock on axg meson boards. Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
…tion amlogic,mmc-phase - amlogic,mmc-phases: 3-element array of clock phases for core, tx, rx clock with values: 0: CLK_PHASE_0 - 0 phase 1: CLK_PHASE_90 - 90 phase 2: CLK_PHASE_180 - 180 phase 3: CLK_PHASE_270 - 270 phase By default driver use <CLK_PHASE_180 CLK_PHASE_0 CLK_PHASE_0> value. Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in> - rpardini: in 6.4, Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt is gone and now replaced by Documentation/devicetree/bindings/mmc/amlogic,meson-gx-mmc.yaml
On the Radxa Zero with Samsung eMMC, I/O errors possibly occur when
accessing the eMMC:
```
[ 8454.110446] I/O error, dev mmcblk1, sector 64 op 0x1:(WRITE) flags 0x8800 phys_seg 62 prio class 2
```
Reproduce the issue by running the following command for a few hours:
```
while uptime; do echo -n "rock" | \
sudo /usr/sbin/cryptsetup luksFormat \
--type luks2 \
--batch-mode /dev/mmcblk1;\
done
```
Configuring the MMC clock phase to 270 phase can solve the issue. Tested
by running the above command for 7 hours and didn't see any I/O error.
This patch is based on:
https://github.com/armbian/build/blob/a50ac096bd551d91ae21dd78d5ab51859db057ee/patch/kernel/archive/meson64-6.18/board-bananapim5-001-sd-use-270-mmc-clock-phase-via-dt.patch
Co-authored-by: Jiali Chen <chenjiali@radxa.com>
Signed-off-by: Zhaoming Luo <luozhaoming@radxa.com>
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.