Skip to content

soc: rockchip: grf: Fix SDMMC not working on RK3588 with bus-width > 1 - #554

Merged
igorpecovnik merged 1 commit into
armbian:rk-6.1-rkr7.2from
mixtile-rockchip:rk3588-grf-jtag-switching
Sep 18, 2026
Merged

igorpecovnik merged 1 commit into
armbian:rk-6.1-rkr7.2from
mixtile-rockchip:rk3588-grf-jtag-switching

Conversation

@evtest-hash

Copy link
Copy Markdown

Backports upstream 6f6878ec6faf (v6.6); this tree predates it.

RK3588 SYS_GRF_SOC_CON6 bit 14 (force_jtag) resets to 1 and muxes SDMMC
D2/D3 to JTAG, so bus-width > 1 does not work.

This tree already carries the same "jtag switching" entry for rk3036, rk3128,
rk3228, rk3288, rk3328, rk3368 and rk3399 — RK3588 is simply missing it.

Not a verbatim copy of the upstream hunk: this tree's
rk3588_sys_grf_defaults already carries a vendor-specific
"Connect EDP hpd to IO" entry, so the patch adds one line to the existing
array instead of introducing mainline's version of it.

Tested on Mixtile Core 3588E (Ubuntu 24.04, kernel 6.1.172-rockchip-vendor):
boots normally, SYS_GRF_SOC_CON6 reads 0x000007c7 (bit 14 = 0).

Backport of upstream commit 6f6878e
("soc: rockchip: grf: Fix SDMMC not working on RK3588 with bus-width > 1",
v6.6) to the rk35xx vendor 6.1 tree, which predates it.

RK3588 SYS_GRF_SOC_CON6 bit 14 (force_jtag) resets to 1, muxing SDMMC
D2/D3 to CPU JTAG whenever SDMMC_DETECTN is inactive, which prevents
bus-width > 1 from working. Mainline clears this bit on nine Rockchip
SoCs for the same reason; see the comment on rk3036_defaults in the same
file.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6f6878ec6faf16a5f36761c93da6ea9cf09adb33
Signed-off-by: kevin.zhuang <kevin.zhuang@focalcrest.com>
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 38051196-c226-4489-bec7-a4c86935d076

📥 Commits

Reviewing files that changed from the base of the PR and between f694b5f and 3fa8f56.

📒 Files selected for processing (1)
  • drivers/soc/rockchip/grf.c

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The change defines RK3588_SYS_GRF_SOC_CON6 at offset 0x0318. It adds a "jtag switching" entry to rk3588_sys_grf_defaults. The entry writes HIWORD_UPDATE(0, 1, 14) to the new register.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3fa8f

The change correctly applies the RK3588 JTAG-switching default, with no unresolved merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the RK3588 GRF change and its purpose: fixing SDMMC operation for bus widths greater than 1.
Description check ✅ Passed The description directly explains the RK3588 JTAG mux issue, the backported fix, the preserved vendor-specific entry, and the test result.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@igorpecovnik
igorpecovnik merged commit 88a5bb1 into armbian:rk-6.1-rkr7.2 Sep 18, 2026
2 checks passed
@evtest-hash
evtest-hash deleted the rk3588-grf-jtag-switching branch September 22, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants