Skip to content

Fixed yy3568 the NVMe SSD detection issue#9832

Open
Arthur97172 wants to merge 2 commits into
armbian:mainfrom
Arthur97172:main
Open

Fixed yy3568 the NVMe SSD detection issue#9832
Arthur97172 wants to merge 2 commits into
armbian:mainfrom
Arthur97172:main

Conversation

@Arthur97172
Copy link
Copy Markdown

@Arthur97172 Arthur97172 commented May 15, 2026

Description

Fixed NVMe SSD detection issue on Youyeetoo YY3568.

Problem

  • PCIe PHY lock failed (rockchip_p3phy_rk3568_init: lock failed)
  • M.2 NVMe SSD not detected (Phy link never came up)

Root Cause

Missing / incorrect configuration for:

  • SSD 3.3V power enable (GPIO3_C3)
  • PCIe Clock generator enable (GPIO3_A7, active low)
  • REFCLK (100MHz) to PCIe3 PHY
  • Wrong regulator polarity and missing startup delay

Solution

  • Added correct pcie30_pwr and pcie_oe pinctrl
  • Added proper regulators (vcc3v3_pcie + pcie_oe_regulator with active-low)
  • Updated &combphy1, &pcie30phy and &pcie3x2 with correct clocks, phy-supply and reset polarity
  • Added startup-delay-us for power stability

This makes the M.2 NVMe SSD work reliably on YY3568.

GitHub issue reference: None (new fix)

Documentation summary for feature / change

  • Short description: Fixed NVMe SSD support on Youyeetoo YY3568
  • Summary: YY3568 now correctly detects and uses M.2 NVMe SSDs (PCIe 3.0).

How Has This Been Tested?

  • Test A: Booted Armbian 6.18.28 on YY3568 with various NVMe SSDs (Samsung 970 EVO, WD SN770, etc.)
  • Test B: Verified lspci shows NVMe device and lsblk / nvme list works
  • Test C: Cold boot + warm reboot tested multiple times (stable)

Test Configuration:

  • Board: Youyeetoo YY3568
  • Kernel: 6.18.28 (current)
  • DTB: rk3568-yy3568.dts

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Added PCIe power supply configuration and enable pin control.
    • Enabled I2S audio interface support.
  • Bug Fixes

    • Corrected regulator GPIO property naming for compatibility.
    • Updated power supply rail assignments for PCIe and PMIC audio.
    • Refined hardware pinctrl configuration for improved device interfacing.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

This PR updates RK3568 YY3568 device tree files for both kernel versions 6.12 and 6.18 with parallel changes: adding new PCIe power management regulators, rewiring PCIe supply chains, enabling I2S audio output, introducing PCIe-specific pinctrl groups, and adjusting Ethernet pinctrl formatting.

Changes

RK3568 YY3568 Device Tree Updates (6.12 and 6.18 kernels)

Layer / File(s) Summary
DT bindings and regulator GPIO properties
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts, patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
DT binding includes are extended to add LED, input, and clock header definitions. The vcc3v3_pi6c_05 regulator GPIO property is standardized from gpios to gpio form across both kernel versions.
New PCIe fixed regulators
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts, patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
Two new fixed regulator nodes are introduced for PCIe power management: vcc3v3_pcie (3.3V supply with GPIO control and startup delay) and pcie_oe_regulator (PCIe output-enable with always-on and boot-on flags).
PCIe subsystem wiring
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts, patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
COMBPHY1 phy-supply is rewired from vcc3v3_pcie30x1 to pcie_oe_regulator. PCIE3x2 pinctrl configuration is changed, vpcie3v3-supply is switched to vcc3v3_pcie, and phys reference to pcie30phy is added.
Audio DAI and PCIe pinctrl configuration
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts, patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
PMIC node rk809 gains #sound-dai-cells property. New pinctrl groups pcie30_pwr (GPIO PC3) and pcie_oe (GPIO PA7) are defined for PCIe GPIO control. I2S0 8-channel interface is enabled.
Formatting and structural adjustments
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts, patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
GMAC0 and GMAC1 pinctrl-0 phandle list formatting is updated; GPIO pin references remain unchanged. USB2PHY1 OTG section closing brace is adjusted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit bounces through device trees with glee,
PCIe regulators now flow wild and free!
Audio DAI sounds, pinctrl groups take flight,
Two kernels in sync—the wiring's just right! 🔌✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fixed yy3568 the NVMe SSD detection issue' accurately describes the main objective of the PR, which is to resolve NVMe SSD detection failures on the Youyeetoo YY3568 device through device-tree configuration changes for PCIe PHY and power regulation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@github-actions github-actions Bot added size/medium PR with more then 50 and less then 250 lines 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels May 15, 2026
SuperKali
SuperKali previously approved these changes May 15, 2026
Copy link
Copy Markdown
Member

@SuperKali SuperKali left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts (1)

587-589: ⚡ Quick win

Avoid enabling &i2s0_8ch without a board-level consumer.

This DTS already routes board audio through &i2s1_8ch, and nothing in this file binds &i2s0_8ch to a card or codec. Dropping this keeps the NVMe fix scoped and avoids pinmuxing an otherwise unused interface.

🤖 Prompt for 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.

In `@patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts` around lines 587 -
589, The patch enables &i2s0_8ch even though no board consumer or codec binds to
it; remove or disable that node instead of setting status = "okay" so you don't
enable unused pinmuxing—locate the &i2s0_8ch node in rk3568-yy3568.dts and
either delete the status = "okay" line or change it to status = "disabled",
leaving the existing &i2s1_8ch routing intact.
patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts (1)

587-589: ⚡ Quick win

Avoid enabling &i2s0_8ch without a board-level consumer.

This DTS already routes board audio through &i2s1_8ch, and nothing in this file binds &i2s0_8ch to a card or codec. Dropping this keeps the NVMe fix scoped and avoids pinmuxing an otherwise unused interface.

🤖 Prompt for 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.

In `@patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts` around lines 587 -
589, The DTS enables the &i2s0_8ch node without any board-level consumer or
codec binding; remove the status enablement to avoid exposing an unused
interface—locate the &i2s0_8ch node in rk3568-yy3568.dts and either delete the
status = "okay"; line or change it to status = "disabled"; so only the actual
board audio path (&i2s1_8ch) remains enabled.
🤖 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-6.12/dt/rk3568-yy3568.dts`:
- Around line 139-148: The pcie_oe_regulator node is attached to the wrong PHY
(&combphy1) and its enable polarity is misencoded: move the pcie_oe_regulator
node so it is under the PCIe 3.0 PHY node (&pcie30phy) that pairs with &pcie3x2,
and correct the enable polarity by adding/uncommenting enable-active-high for
the regulator; ensure the gpio line remains gpio = <&gpio3 RK_PA7
GPIO_ACTIVE_HIGH> and that the regulator node (pcie_oe_regulator) references the
&pcie30phy parent so the OE GPIO high truly enables the regulator.

In `@patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts`:
- Around line 139-148: The pcie_oe_regulator definition uses gpio = <&gpio3
RK_PA7 GPIO_ACTIVE_HIGH> but is attached to &combphy1 while the NVMe path uses
&pcie3x2 with phys = <&pcie30phy>; update the regulator node (pcie_oe_regulator)
to be referenced/placed under the correct PHY node (&pcie30phy or the pcie3x2
controller) so the OE/REFCLK GPIO (GPIO3_A7) actually controls the PCIe3.0 PHY,
and reconcile polarity by either uncommenting and using enable-active-high in
pcie_oe_regulator or changing the GPIO phandle flag to GPIO_ACTIVE_LOW so the
regulator-fixed binding's polarity matches the GPIO direction; ensure all
occurrences (the pcie_oe_regulator node and its references under &combphy1,
&pcie30phy, &pcie3x2) are updated consistently.

---

Nitpick comments:
In `@patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts`:
- Around line 587-589: The DTS enables the &i2s0_8ch node without any
board-level consumer or codec binding; remove the status enablement to avoid
exposing an unused interface—locate the &i2s0_8ch node in rk3568-yy3568.dts and
either delete the status = "okay"; line or change it to status = "disabled"; so
only the actual board audio path (&i2s1_8ch) remains enabled.

In `@patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts`:
- Around line 587-589: The patch enables &i2s0_8ch even though no board consumer
or codec binds to it; remove or disable that node instead of setting status =
"okay" so you don't enable unused pinmuxing—locate the &i2s0_8ch node in
rk3568-yy3568.dts and either delete the status = "okay" line or change it to
status = "disabled", leaving the existing &i2s1_8ch routing intact.
🪄 Autofix (Beta)

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

Run ID: e822e5a9-4b7a-4f57-8c50-398857bea02e

📥 Commits

Reviewing files that changed from the base of the PR and between 5e60c01 and b234169.

📒 Files selected for processing (2)
  • patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts
  • patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

Comment on lines +139 to +148
pcie_oe_regulator: pcie-oe-regulator {
compatible = "regulator-fixed";
regulator-name = "pcie_oe";
gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_oe>;
//enable-active-high;
regulator-always-on;
regulator-boot-on;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

1. In the Linux regulator-fixeddevice-tree binding, how is enable polarity determined whengpio = <...>is present butenable-active-high;is omitted? 2. On RK3568 in upstream DTS/bindings, which PHY node is associated with thepcie3x2host controller:combphy1orpcie30phy?

💡 Result:

In the Linux regulator-fixed device-tree binding, when the gpio property is present but the enable-active-high; property is omitted, the enable polarity defaults to active low [1]. Regarding the RK3568 SoC in upstream Linux device-tree (DTS) and bindings, the pcie3x2 host controller is associated with the pcie30phy node [2][3]. The combphy1 (or naneng-combphy) nodes are distinct and are used for other interfaces such as SATA, USB3, or PCIe 2.0, rather than the PCIe 3.0 controller [4][5][6].

Citations:


🏁 Script executed:

cat -n patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts | sed -n '139,148p; 201,203p; 292,300p'

Repository: armbian/build

Length of output: 768


Attach the REFCLK/OE regulator to the correct PCIe 3.0 PHY node and fix the enable polarity encoding.

The patch routes the NVMe slot through &pcie3x2 which pairs with &pcie30phy (lines 299), but line 202 attaches pcie_oe_regulator to &combphy1 instead. This PHY mismatch will prevent the OE regulator from controlling the PCIe 3.0 interface.

Additionally, the regulator has a polarity encoding issue: gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH> declares an electrically active-high signal, but line 145 comments out enable-active-high;, causing the regulator to default to active-low enable semantics. This inverts the signal interpretation—GPIO high would deactivate the regulator instead of activating it.

Move the pcie_oe_regulator supply to &pcie30phy and either uncomment enable-active-high; or verify that the board schematic actually requires active-low enable.

🤖 Prompt for 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.

In `@patch/kernel/archive/rockchip64-6.12/dt/rk3568-yy3568.dts` around lines 139 -
148, The pcie_oe_regulator node is attached to the wrong PHY (&combphy1) and its
enable polarity is misencoded: move the pcie_oe_regulator node so it is under
the PCIe 3.0 PHY node (&pcie30phy) that pairs with &pcie3x2, and correct the
enable polarity by adding/uncommenting enable-active-high for the regulator;
ensure the gpio line remains gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH> and that
the regulator node (pcie_oe_regulator) references the &pcie30phy parent so the
OE GPIO high truly enables the regulator.

Comment on lines +139 to +148
pcie_oe_regulator: pcie-oe-regulator {
compatible = "regulator-fixed";
regulator-name = "pcie_oe";
gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_oe>;
//enable-active-high;
regulator-always-on;
regulator-boot-on;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

1. In the Linux regulator-fixeddevice-tree binding, how is enable polarity determined whengpio = <...>is present butenable-active-high;is omitted? 2. On RK3568 in upstream DTS/bindings, which PHY node is associated with thepcie3x2host controller:combphy1orpcie30phy?

💡 Result:

  1. In the Linux regulator-fixed device-tree binding, when the gpio property is present but enable-active-high; is omitted, the enable polarity defaults to active low [1]. Historically, this behavior is explicitly documented in the kernel's device-tree bindings for fixed regulators [1]. While modern Linux kernel implementations have transitioned to using GPIO descriptors (gpiod) which can handle polarity flags directly within the GPIO phandle specifier, the enable-active-high property remains the standard mechanism for defining this polarity in the regulator-fixed binding [2][1]. 2. On the RK3568 SoC, the pcie3x2 host controller is associated with the pcie30phy node in upstream Linux device-tree bindings [3]. The RK3568 utilizes a dedicated PCIe 3.0 PHY (often referred to as the SNPS PCIe3 PHY) for its PCIe 3.0 controllers, which is distinct from the "combphy" (Naneng combo PHY) nodes used for PCIe 2.0, SATA, and USB 3.0 interfaces [3][4].

Citations:


🏁 Script executed:

# First, verify the file exists and examine the relevant sections
cd patch/kernel/archive/rockchip64-6.18/dt/ 2>/dev/null && ls -la rk3568-yy3568.dts || echo "File not found, searching for it..."
find . -name "rk3568-yy3568.dts" -type f 2>/dev/null | head -5

Repository: armbian/build

Length of output: 145


🏁 Script executed:

# Examine the file sections mentioned in the review comment
echo "=== Lines 139-148 (pcie_oe_regulator definition) ==="
sed -n '139,148p' ./rk3568-yy3568.dts

echo ""
echo "=== Lines 201-203 (combphy1 phy-supply usage) ==="
sed -n '201,203p' ./rk3568-yy3568.dts

echo ""
echo "=== Lines 292-300 (pcie3x2 + pcie30phy routing) ==="
sed -n '292,300p' ./rk3568-yy3568.dts

Repository: armbian/build

Length of output: 421


🏁 Script executed:

# Read the file sections using the correct path
echo "=== Lines 139-148 (pcie_oe_regulator definition) ==="
sed -n '139,148p' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

echo ""
echo "=== Lines 201-203 (combphy1 phy-supply usage) ==="
sed -n '201,203p' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

echo ""
echo "=== Lines 292-300 (pcie3x2 + pcie30phy routing) ==="
sed -n '292,300p' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

echo ""
echo "=== Full context around combphy1 (lines 195-210) ==="
sed -n '195,210p' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

echo ""
echo "=== Full context around pcie3x2 (lines 286-305) ==="
sed -n '286,305p' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

Repository: armbian/build

Length of output: 1430


Verify that the REFCLK/OE regulator is attached to the correct PCIe PHY node and has matching GPIO polarity.

Line 202 attaches pcie_oe_regulator to &combphy1, while Lines 299 shows the NVMe path in this patch routes through &pcie3x2 with phys = <&pcie30phy>. On RK3568, pcie3x2 uses the dedicated pcie30phy (PCIe 3.0 PHY), not combphy1 (which handles PCIe 2.0, SATA, and USB 3.0). If GPIO3_A7 gates the PCIe 3.0 REFCLK, the regulator must be attached to &pcie30phy, not &combphy1.

Additionally, Line 145 has enable-active-high; commented out, which means the regulator defaults to active-low polarity per the regulator-fixed binding. However, Line 143 specifies GPIO_ACTIVE_HIGH in the GPIO phandle. These polarities conflict and must be reconciled before merging.

Also applies to: 201-203, 286-290, 292-299

🤖 Prompt for 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.

In `@patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts` around lines 139 -
148, The pcie_oe_regulator definition uses gpio = <&gpio3 RK_PA7
GPIO_ACTIVE_HIGH> but is attached to &combphy1 while the NVMe path uses &pcie3x2
with phys = <&pcie30phy>; update the regulator node (pcie_oe_regulator) to be
referenced/placed under the correct PHY node (&pcie30phy or the pcie3x2
controller) so the OE/REFCLK GPIO (GPIO3_A7) actually controls the PCIe3.0 PHY,
and reconcile polarity by either uncommenting and using enable-active-high in
pcie_oe_regulator or changing the GPIO phandle flag to GPIO_ACTIVE_LOW so the
regulator-fixed binding's polarity matches the GPIO direction; ensure all
occurrences (the pcie_oe_regulator node and its references under &combphy1,
&pcie30phy, &pcie3x2) are updated consistently.

Copy link
Copy Markdown
Member

@EvilOlaf EvilOlaf left a comment

Choose a reason for hiding this comment

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

missing rockchip64-7.0 and 7.1
rockchip64-6.12 is no longer in use

@github-actions github-actions Bot removed the Needs review Seeking for review label May 15, 2026
@SuperKali SuperKali dismissed their stale review May 15, 2026 19:04

As Werner said, missing parts

@igorpecovnik
Copy link
Copy Markdown
Member

If this is fixed within a week, it can go into upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

4 participants