Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helios64: restore hs400 support after enabling strobe line internal p… #7756

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

prahal
Copy link
Collaborator

@prahal prahal commented Jan 28, 2025

…ulldown

Since v5.11, Linux upstream commit 8b5c2b45b8f0 disabled the internal pull-down for the strobe line explicitly instead of leaving it in its default state (the opposite of Rockchip Kernel which force enable this intrnal pulldown by default) thus causing I/O errors in HS400 mode for various eMMC modules (the ones that did not have an external pulldown on the strobe line likely).
Discussed upstream and the choice has been made to keep this behavior as it has been there for too long and reverting might break other boards http://lists.infradead.org/pipermail/linux-rockchip/2024-April/046416.html

HS400 for helios64 was disabled in commit 5f2e23e "Disabled hs400 on Helios64 (hopefully only temporarily) (#3126)" but for 5.10.63i (ie before the above commit disabled internal pulldown). Back then I had bisected the emmc I/O issue to a double init of the emmc regulator introduced while adding deferred support to the regulator driver core, ie commit 06653ebc0ad2 "regulator: core: resolve supply for boot-on/always-on regulators" in 5.10.60. But due to the new default for the strobe line internal pulldown introduced in 5.6.11 when this double voltage regulator init issue was fixed likely by 8a866d527ac0 "regulator: core: Resolve supply name earlier to prevent double-init" in Linux 6.1.

Description

Enables internal pulldown for strobe line of the eMMC. This allows to reenable hs400 without getting I/O errors.

How Has This Been Tested?

  • [ x ] build current bookworm 6.12.11, boot from eMMC, test read, test write to the emmc with dd
  • [ x ] build edge bookworm 6.13, boot from eMMC, test read, test write to the emmc with dd

Checklist:

  • [ x ] My code follows the style guidelines of this project
  • [ x ] I have performed a self-review of my own code
  • [ x ] My changes generate no new warnings

@prahal prahal requested a review from igorpecovnik as a code owner January 28, 2025 05:08
@github-actions github-actions bot added size/small PR with less then 50 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 28, 2025
@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge 02 Milestone: First quarter release and removed Needs review Seeking for review labels Jan 28, 2025
@iav
Copy link
Contributor

iav commented Jan 29, 2025

How to understand is it work or not?
Data writes to mmcblk1, but that was before this fix too.

@prahal
Copy link
Collaborator Author

prahal commented Jan 30, 2025

How to understand is it work or not? Data writes to mmcblk1, but that was before this fix too.

@iav If you want to reproduce the breakage just restore the hs400 lines without enabling the internal pulldown for the strobe line with:

 &emmc_phy {
+	rockchip,enable-strobe-pulldown;
 	status = "okay";
 };

best to test writing to emmc from an SD booted system, else this will corrupt the emmc OS FS and only way out is to boot from SD and install a fixed dtb via chroot to the emmc.

…ulldown

Since v5.11, Linux upstream commit 8b5c2b45b8f0 disabled the internal pull-down
for the strobe line explicitly instead of leaving it in its default
state (the opposite of Rockchip Kernel which force enable this intrnal
pulldown by default) thus causing I/O errors in HS400 mode for various
eMMC modules (the ones that did not have an external pulldown on the
strobe line likely).
Discussed upstream and the choice has been made to keep this
behavior as it has been there for too long and reverting might break
other boards http://lists.infradead.org/pipermail/linux-rockchip/2024-April/046416.html

HS400 for helios64 was disabled in commit 5f2e23e
"Disabled hs400 on Helios64 (hopefully only temporarily) (armbian#3126)"
but for 5.10.63 (ie before the above commit disabled internal pulldown).
Back then I had bisected the emmc I/O issue to a double init of the emmc
regulator introduced while adding deferred support to the regulator driver
core, ie commit 06653ebc0ad2 "regulator: core: resolve supply for boot-on/always-on regulators"
in 5.10.60. But due to the new default for the strobe line internal  pulldown
introduced in 5.11, when this double voltage regulator init issue was fixed likely by
8a866d527ac0 "regulator: core: Resolve supply name earlier to prevent double-init"
in Linux 6.1.
@prahal prahal force-pushed the fix-helios64-emmc-hs400es branch from 1a3c9cc to 626f300 Compare January 30, 2025 03:15
@github-actions github-actions bot added Needs review Seeking for review and removed Ready to merge Reviewed, tested and ready for merge labels Jan 30, 2025
@prahal
Copy link
Collaborator Author

prahal commented Jan 30, 2025

I pushed a fix for the commit message (spurious characters in the affected kernel version slipped through on first version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

3 participants