Skip to content

arm64: dts: exynos: google: zuma: add sleep pinctrl state to UFS node - #316

Open
mikethi wants to merge 1 commit into
derekross:omamobilefrom
mikethi:omamobile
Open

mikethi wants to merge 1 commit into
derekross:omamobilefrom
mikethi:omamobile

Conversation

@mikethi

@mikethi mikethi commented Nov 27, 2026 •

Copy link
Copy Markdown

Husky Adds a "sleep" pinctrl state (pinctrl-1) to the ufs_0 (ufs@13200000) device tree node in arch/arm64/boot/dts/exynos/google/zuma.dtsi, updating pinctrl-names to "default", "sleep" for zuma / zuma-husky UFS power management.

DTS Change (arch/arm64/boot/dts/exynos/google/zuma.dtsi):

    Updates pinctrl-names on ufs_0 (ufs@13200000) from "default" to "default", "sleep".

    Adds pinctrl-1 = <&ufs_rst_n &ufs_refclk_out>; to provide the sleep pin state on the UFS controller node.

Driver & Pin Context:

    Aligns with exynos_ufs_suspend() and exynos_ufs_resume() in drivers/ufs/host/ufs-exynos.c, which invoke pinctrl_pm_select_sleep_state() and pinctrl_pm_select_default_state() when the UFS link is inactive.

    References ufs_rst_n and ufs_refclk_out defined in zuma-pinctrl.dtsi (GS101_PIN_PDN_PREV power-down behavior), consistent with the UFS sleep pinctrl pattern in PR #224 (73016ba94ac8).

Testing & Verification

Audited against HEAD (00860bdedea4) and PR #224 (73016ba94ac8), confirming drivers/ufs/host/ufs-exynos.c is unchanged and zuma-husky.dts enables &ufs_0 and &ufs_0_phy.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking at this. You're right that zuma's UFS node needs a "sleep" state for the resume fix from #224 to do anything on the Pixel 8 Pro and 8a: pinctrl_select_state() skips a state that's already selected, which is exactly why zumapro got one in 8aaf93ea142f. I built it here: it changes only zuma-husky and zuma-akita (both gain the second pin state on the UFS node), everything else, the Pixel 7 Pro and the 9a included, is byte-identical, and there are no new device-tree warnings.

Three things before it can merge:

  1. The commit needs your own name as its author and your Signed-off-by: (CONTRIBUTING §6.2, the kernel's DCO). It's currently from Builder <builder@herenow.localdomain> with no sign-off, which our check refuses. If an AI assistant helped, add an Assisted-by: line as well.
  2. It needs a commit message saying why: the resume path from 825c54b76a08 re-selects the default state when the link is down, that's a no-op without a second state, zumapro has one since 8aaf93ea142f, and this gives zuma the same. Please name the two boards it changes, and say whether you've seen the pad loss on a zuma phone (link startup failed or Host init failed after a wake) or it's for parity.
  3. A run on a zuma phone, since this touches the UFS path of the 8 Pro and the 8a: one boot of a kernel with this commit, a few systemctl suspend cycles and a while idle, then dmesg | grep -E 'link startup failed|Host init failed|I/O error|ufshcd_err_handler' empty, and gph5's pins read back as their UFS function from that pin controller's pins file in debugfs (that one controller only). Which phone did you mean to test it on?

A small one: the file's history capitalises after the last prefix, so "zuma: Add a sleep pin state to the UFS node" would match. No rebase is needed; it applies cleanly to today's omamobile. I'll approve the CI run so the device-tree schema check runs too.

The UFS resume path from commit 825c54b re-selects the "default"
pinctrl state when the link is down, which is a no-op in
pinctrl_select_state() without a second state. zumapro gained a "sleep"
pin state in commit 8aaf93e; add the corresponding state for zuma.

This affects zuma-husky and zuma-akita. Submitted for parity with zumapro
(no wake-time UFS link startup or host init failures reproduced yet).

Signed-off-by: Mike Tatts <mtattersdale@gmail.com>
Assisted-by: ChatGPT

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @mikethi. The commit is in good shape now: your name and sign-off, a message that says why and names both boards, and the subject capitalised. The code is the same as before, and I rebuilt it merged onto today's omamobile: only the Pixel 8 Pro's and 8a's device trees change, by the second pin state on the UFS node, and every other board, the Pixel 7 Pro and the 9a included, is byte-identical.

Two things left:

  1. Our check now stops on checkpatch, and that's partly my fault: I wrote the two commit ids bare in my last comment. Checkpatch wants a commit named with its subject, so please write them as commit 825c54b76a08 ("scsi: ufs: exynos: re-apply the UFS pin state when resuming with the link down") and commit 8aaf93ea142f ("arm64: dts: exynos: google: zumapro: give the UFS node a sleep pin state"). That clears both errors.
  2. The boot on a zuma phone I asked for last time is still needed before it merges, since this changes the UFS path of the 8 Pro and the 8a at every suspend. One boot of a kernel with this commit, a few systemctl suspend cycles and some idle time, then dmesg | grep -E 'link startup failed|Host init failed|I/O error|ufshcd_err_handler' empty, and the gph5 UFS pins read back as their UFS function from that pin controller's pins file in debugfs (that one controller only). Your description starts with "Husky": is a Pixel 8 Pro the phone you'll test it on?

I'll approve the CI run so the device-tree schema check runs as well.

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.

2 participants