rockchip64: scope the rk3576 HS400 DLL calibration to rk3576 only - #10375
Conversation
📝 WalkthroughWalkthroughThe two Rockchip kernel patch variants add RK3576-specific HS400 DLL calibration. The driver reads and scales the DLL lock value, applies it to clock tap selection, and preserves existing behavior on other revision-1 SoCs. ChangesRK3576 HS400 DLL calibration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SDHCI_DWCMShc
participant DLL_STATUS0
participant DLL_Clock_Registers
SDHCI_DWCMShc->>DLL_STATUS0: Read and scale DLL lock value
DLL_STATUS0-->>SDHCI_DWCMShc: Return lock value
SDHCI_DWCMShc->>DLL_Clock_Registers: Program calibrated RXCLK, TXCLK, CMDOUT, and STRBIN taps
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@patch/kernel/archive/rockchip64-7.1/rk3576-0013-mmc-sdhci-dwcmshc-rk3576-dll-tap-calibration.patch`:
- Around line 90-95: Limit the calibrated DLL programming in
dwcmshc_rk3568_set_clock() to MMC_TIMING_MMC_HS400 in all four sites: 7.1 lines
90-95 and 137-150, and 7.2 lines 90-95 and 137-150. Require both
needs_hs400_dll_calibration and HS400 timing before updating RXCLK, TXCLK, or
STRBIN, preserving existing settings for HS200.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3973c1a6-d47c-4d1d-ad7d-00711075097e
📒 Files selected for processing (2)
patch/kernel/archive/rockchip64-7.1/rk3576-0013-mmc-sdhci-dwcmshc-rk3576-dll-tap-calibration.patchpatch/kernel/archive/rockchip64-7.2/rk3576-0013-mmc-sdhci-dwcmshc-rk3576-dll-tap-calibration.patch
|
✅ This PR has been reviewed and approved — all set for merge! |
|
There is new rabbit's concern to check. |
|
Yes, has to be addressed or dismissed |
…rk3576 revision == 1 is shared by every non-rk356x dwcmshc SoC (rk3576, rk3588, ...), so the rk3576 HS400 DLL calibration also fed the rk3576 tap values, DLL_TAP_VALUE_SEL and BOTH_CLK_EDGE into rk3588's HS400 path, changing its eMMC timing. Gate it on a dedicated needs_hs400_dll_calibration flag set only for rk3576, and only in HS400 timing (matching the CMDOUT path) so the RXCLK/TXCLK/STRBIN calibration no longer touches HS200. rk3588 and the other revision-1 SoCs keep their original 90-degree CMDOUT taps and STRBIN default untouched. Signed-off-by: crackerjacques <jack@supremeoverlordjabs.co>
|
Good catch — addressed in the amended commit. The RXCLK/TXCLK/STRBIN calibration is now gated on |
2364b3f to
20a6cd4
Compare
|
✅ This PR has been reviewed and approved — all set for merge! |
What
The rk3576 HS400 DLL tap calibration added for the Anbernic RG Vita Pro
(
rk3576-0013-mmc-sdhci-dwcmshc-rk3576-dll-tap-calibration.patch) was gated onrockchip_pdata->revision == 1. Revision 1 is shared by every non-rk356x dwcmshcSoC — rk3576 and rk3588 (the driver's own comment says as much). As written it
also fed the rk3576 tap values,
DLL_TAP_VALUE_SELandBOTH_CLK_EDGEintork3588's HS400 path, changing its eMMC timing.
Fix
Gate the calibration on a dedicated
needs_hs400_dll_calibrationflag instruct rockchip_pltfm_data, set only forsdhci_dwcmshc_rk3576_pdata. rk3588 andthe other revision-1 SoCs keep their original 90-degree CMDOUT taps and STRBIN
default untouched; only rk3576 gets the calibrated taps and the measured DLL lock
value feedback.
Reported by CodeRabbit on #10321.
Testing
Built rockchip64
edge(7.1) andbleedingedge(7.2-rc6). rk3576 HS400 behaviouris unchanged (still calibrated, no more
Timeout waiting for hardware interruptonthe RG Vita Pro); the rk3588 path is restored to its pre-patch register values.
Summary by CodeRabbit