Skip to content

Rockchip: youyeetoo yy3568: enable pci-e ssd#9876

Closed
hqnicolas wants to merge 1 commit into
armbian:mainfrom
hqnicolas:main
Closed

Rockchip: youyeetoo yy3568: enable pci-e ssd#9876
hqnicolas wants to merge 1 commit into
armbian:mainfrom
hqnicolas:main

Conversation

@hqnicolas
Copy link
Copy Markdown
Contributor

@hqnicolas hqnicolas commented May 22, 2026

Description

enable PCI-e SSD on Machine model: Youyeetoo YY3568

How Has This Been Tested?

6.18.32-current-rockchip64 (build@armbian)
Forum Post

https://paste.armbian.com/ekupotacut

Checklist:

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

Summary by CodeRabbit

Release Notes

  • Chores
    • Enhanced hardware support for PCIe controller configuration and power management
    • Improved Ethernet connectivity setup with RGMII PHY configuration
    • Enabled audio subsystem support

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

This PR updates device tree files for the RK3568 YY3568 board across kernel and U-Boot bootloader. Changes add PCIe controller wiring, Ethernet RGMII configuration, and PMIC power-control support while simplifying regulator suspend-state declarations in U-Boot.

Changes

Kernel Device Tree PCIe and Subsystem Configuration

Layer / File(s) Summary
Includes and Basic Regulator Property Updates
patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
DT binding headers for LEDs, input, and RK3568 clock are added. The vcc3v3_pi6c_05 regulator GPIO property is corrected from gpios to gpio. RK809 PMIC gains #sound-dai-cells = <0>;.
PCIe Regulators and Combphy1 Wiring
patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
New vcc3v3_pcie and pcie_oe_regulator fixed-regulator nodes with GPIO enable, pinctrl, startup delays, and supply references are introduced. Combphy1 phy-supply is rewired from vcc3v3_pcie30x1 to pcie_oe_regulator.
PCIe3x2 Controller and Pinctrl Configuration
patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
PCIe3x2 node updates pinctrl-0, vpcie3v3-supply, and phys linkage to pcie30phy. New pinctrl groups pcie30_pwr and pcie_oe are added under &pinctrl with pinmux and pull settings.
Audio Enable and DT Syntax Cleanup
patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
The &i2s0_8ch node is enabled with status = "okay". The &usb2phy1_otg node closing syntax is corrected.

U-Boot Device Tree Board Configuration

Layer / File(s) Summary
Board Setup and Power Supply Chain
patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts
Board headers are updated with dt-bindings/gpio. Aliases for Ethernet and SDMMC instances are defined. New vcc12v_input fixed regulator serves as root supply. The vcc5v0_sys regulator gains explicit vin-supply reference.
Root-Level Regulators and Ethernet Controller Configuration
patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts
New fixed regulators for PCIe power rails with GPIO enable and pinctrl wiring are added. Ethernet controllers &gmac0 and &gmac1 are configured with RGMII properties and enabled.
RK809 PMIC Device Model and Power Control Configuration
patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts
RK809 PMIC node expands with U-Boot device-model pre-relocation markers, system-power-controller behavior, wakeup capability, and reset configuration. RK817/RK8xx sleep and power-control GPIO elements including pwrkey and pinctrl_rk8xx with rk817_slppin_* selectors are added.
PCIe Controllers, PHY Nodes, and Subsystem Configuration
patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts
I2C transfer pinctrl, RGMII PHY device nodes with reset GPIOs and timing, PCIe controller blocks with lane/reset/power-supply bindings, and SPL pinctrl groups are added. Subsystem nodes (&pmu_io_domains, &pmucru, &pmugrf, &saradc, &sdhci, &sdmmc0, &sdmmc2, &uart2) are enabled with U-Boot DM pre-reloc markers and configuration.
Regulator Suspend-State Simplification
patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts
Suspend-state configuration within fifteen RK809 regulator definitions (vdd_gpu, vcc_ddr, vdd_npu, vdda0v9_image, vdda_0v9, vdda0v9_pmu, vccio_acodec, vccio_sd, vcc3v3_pmu, vcca_1v8, vcca1v8_pmu, vcca1v8_image, vcc_1v8, vcc_3v3, vcc3v3_sd) removes or simplifies regulator-state-mem suspend microvolt handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • igorpecovnik
  • prahal
  • rpardini
  • joekhoobyar
  • brentr
  • krachlatte
  • HeyMeco
  • TheSnowfield
  • paolosabatino
  • catalinii
  • pyavitz
  • amazingfate

Poem

🐰 The rabbit hops through device trees so tall,
PCIe lanes and Ethernet call,
Regulators dance, suspends now small,
With PMIC power, the YY3568 stands proud—
Boot and kernel, both well endowed! 🌳✨

🚥 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 'Rockchip: youyeetoo yy3568: enable pci-e ssd' directly matches the main objective of the PR, which is to enable PCIe SSD support on the YY3568 board.
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

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/large PR with 250 lines or more 05 Milestone: Second quarter release Needs review Seeking for review labels May 22, 2026
@github-actions github-actions Bot added Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels May 22, 2026
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: 4

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

587-589: 💤 Low value

Clarify the purpose of enabling I2S0.

The PR objectives focus on enabling PCIe SSD support, but this change enables the i2s0_8ch audio interface. Is this change intentional and related to the board bring-up, or is it outside the scope of this PR?

🤖 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 i2s0_8ch device node was enabled but the PR is about PCIe SSD support;
confirm whether enabling i2s0_8ch is intentional or accidental and either remove
the status = "okay"; change from the diff or add a clarifying comment and
matching commit message explaining why i2s0_8ch is required for this board
bring-up; locate the i2s0_8ch node in the DTS (symbol i2s0_8ch) and either
revert that change or add a one-line comment above it describing its purpose and
relevance to this PR.
🤖 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.18/dt/rk3568-yy3568.dts`:
- Around line 126-137: Duplicate regulator-name values cause conflicts; rename
the new regulator block vcc3v3_pcie (regulator-name) to a unique identifier
(e.g., "vcc3v3_pcie3x2") so it no longer collides with vcc3v3_pi6c_05. Update
the regulator-name property inside the vcc3v3_pcie node and keep the node label
(vcc3v3_pcie:) or change it consistently if you prefer, ensuring any references
to that regulator (gpio/pinctrl usage) remain correct.
- Around line 9-14: The DTS file includes unused dt-bindings headers; remove the
two unnecessary include lines for dt-bindings/leds/common.h and
dt-bindings/input/input.h from rk3568-yy3568.dts so only the actually used
bindings remain (keep dt-bindings/clock/rk3568-cru.h since CLK_HDMI_CEC is
referenced); update the includes block to eliminate those two headers and run a
DT compile/check to ensure no references to COLOR_/FUNCTION_/LED_* or
KEY_/BTN_/... remain.
- Line 117: The DT node for the vcc3v3_pi6c_05 fixed-regulator currently uses
the deprecated singular property "gpio" (gpio = <&gpio0 RK_PC7
GPIO_ACTIVE_HIGH>); update it to the correct plural property "gpios" to match
fixed-regulator.yaml expectations. Locate the vcc3v3_pi6c_05 regulator node and
replace the "gpio" property name with "gpios" (keeping the same phandle and
tuple <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>) so the enable GPIO is expressed as
gpios, not gpio.

In `@patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts`:
- Around line 126-144: The &gmac0 node currently sets phy-mode="rgmii" but lacks
explicit tx_delay/rx_delay which means Rockchip dwmac binding defaults will
apply; confirm whether the PHY provides internal RGMII delays or the MAC should
(compare to rk3568-hinlink-h68k.dts and the &gmac1 node), then add explicit
tx_delay and rx_delay properties to the &gmac0 device node (or change phy-mode
to the appropriate variant that indicates internal PHY delay) to match the
board-tuned values used in the kernel DT and ensure ethernet0 timing matches;
update the rk3568-yy3568.dts &gmac0 node to include the chosen tx_delay and
rx_delay properties or adjust phy-mode accordingly.

---

Nitpick comments:
In `@patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts`:
- Around line 587-589: The i2s0_8ch device node was enabled but the PR is about
PCIe SSD support; confirm whether enabling i2s0_8ch is intentional or accidental
and either remove the status = "okay"; change from the diff or add a clarifying
comment and matching commit message explaining why i2s0_8ch is required for this
board bring-up; locate the i2s0_8ch node in the DTS (symbol i2s0_8ch) and either
revert that change or add a one-line comment above it describing its purpose and
relevance to this PR.
🪄 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: 35a4dd33-3003-4196-8d6a-72c935187ef7

📥 Commits

Reviewing files that changed from the base of the PR and between 869f0df and 96750ea.

📒 Files selected for processing (2)
  • patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts
  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts

Comment on lines +9 to +14
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include <dt-bindings/clock/rk3568-cru.h>
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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify usage of LED and input constants in the device tree

# Check for LED common constants (COLOR_, FUNCTION_, etc.)
echo "=== Checking for LED common.h constants ==="
rg -n '\b(COLOR_|FUNCTION_|LED_)\w+' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

# Check for input constants (KEY_, BTN_, etc.)
echo "=== Checking for input.h constants ==="
rg -n '\b(KEY_|BTN_|SW_|REL_|ABS_)\w+' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

# Check for RK3568 clock constants
echo "=== Checking for rk3568-cru.h constants ==="
rg -n '\bCLK_\w+' patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts

Repository: armbian/build

Length of output: 228


Drop unused LED/input dt-bindings headers in rk3568-yy3568.dts (lines 9-14)
dt-bindings/leds/common.h and dt-bindings/input/input.h aren’t referenced anywhere in this DTS (no COLOR_/FUNCTION_/LED_* or KEY_/BTN_/SW_/REL_/ABS_* usage found), while dt-bindings/clock/rk3568-cru.h is used via CLK_HDMI_CEC.

🤖 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 9 -
14, The DTS file includes unused dt-bindings headers; remove the two unnecessary
include lines for dt-bindings/leds/common.h and dt-bindings/input/input.h from
rk3568-yy3568.dts so only the actually used bindings remain (keep
dt-bindings/clock/rk3568-cru.h since CLK_HDMI_CEC is referenced); update the
includes block to eliminate those two headers and run a DT compile/check to
ensure no references to COLOR_/FUNCTION_/LED_* or KEY_/BTN_/... remain.

compatible = "regulator-fixed";
enable-active-high;
gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
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

🏁 Script executed:

#!/bin/bash
# Description: Verify the correct property name in fixed-regulator binding

# Check the fixed-regulator binding documentation
fd -t f 'regulator.*\.yaml|fixed-regulator.*' --exec cat {} \; | grep -A5 -B5 "gpio:"

Repository: armbian/build

Length of output: 39


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Locate fixed-regulator binding YAMLs
echo "== fixed-regulator binding candidates =="
fd -t f -i 'fixed-regulator.*\.ya?ml' . | head -n 50

# 2) Specifically search for 'fixed-regulator' under regulator bindings
echo
echo "== regulator binding files containing 'fixed-regulator' =="
fd -t f 'regulator*.yaml' . | while read -r f; do
  if rg -n --fixed-string 'fixed-regulator' "$f" >/dev/null 2>&1; then
    echo "$f"
  fi
done | head -n 50

# 3) If we find any candidate yaml, grep for 'gpio' and 'gpios' keys within them
echo
echo "== Inspect keys in located fixed-regulator YAMLs =="
files="$(fd -t f -i 'fixed-regulator.*\.ya?ml' . | head -n 20 || true)"
if [ -z "$files" ]; then
  echo "No fixed-regulator YAML found by name pattern."
  exit 0
fi
echo "$files" | while read -r f; do
  echo "--- $f ---"
  rg -n 'gpios|gpio' "$f" | head -n 80 || true
done

Repository: armbian/build

Length of output: 258


🏁 Script executed:

#!/bin/bash
set -euo pipefail

f="patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts"
echo "== Context around line 117 in $f =="
nl -ba "$f" | sed -n '95,135p'

echo
echo "== Repo-wide search for fixed-regulator bindings/schema =="
rg -n --hidden --no-ignore-vcs "fixed-regulator" . || true

echo
echo "== Repo-wide search for fixed regulator enable gpio wording =="
rg -n --hidden --no-ignore-vcs "fixed.*regulator.*gpio|enable.*(gpio|gpios)" patch . || true

echo
echo "== Repo-wide search for 'gpios:' key in any yaml schema =="
fd -t f -e yaml -e yml . | head -n 2000 >/dev/null
rg -n --hidden --no-ignore-vcs "gpios\s*:" . --glob '*.yaml' --glob '*.yml' || true

echo
echo "== Repo-wide search for 'gpio:' key in regulator bindings yaml =="
rg -n --hidden --no-ignore-vcs "^\s*gpio\s*:" . --glob '*regulator*' --glob '*.yaml' --glob '*.yml' || true

Repository: armbian/build

Length of output: 209


🏁 Script executed:

#!/bin/bash
set -euo pipefail
f="patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts"

echo "== Context around line 117 in $f =="
awk 'NR>=110 && NR<=125 {printf "%5d\t%s\n", NR, $0}' "$f"

echo
echo "== Repo search: fixed-regulator in YAML/YML =="
rg -n --hidden --no-ignore-vcs "fixed[- ]regulator" . --glob '*.yaml' --glob '*.yml' || true

echo
echo "== Repo search: regulator fixed binding filenames =="
fd -t f --hidden --no-ignore-vcs -e yaml -e yml . | rg -n -i "fixed[-_]?regulator|regulator[/_-]?fixed" || true

echo
echo "== Repo search: enable gpios/gpio keys in YAML/YML =="
rg -n --hidden --no-ignore-vcs "enable.*(gpios|gpio)\s*:" . --glob '*.yaml' --glob '*.yml' || true

echo
echo "== Repo search: gpios: key anywhere in YAML/YML =="
rg -n --hidden --no-ignore-vcs "gpios\s*:" . --glob '*.yaml' --glob '*.yml' || true

Repository: armbian/build

Length of output: 878


🌐 Web query:

Linux kernel fixed-regulator.yaml enable GPIO property name gpio vs gpios

💡 Result:

In Linux kernel fixed-regulator device tree bindings, the GPIO property for enable control is gpios (plural). The singular gpio property is supported only for compatibility and is deprecated. Evidence: - fixed-regulator.yaml defines both gpio and gpios as properties with maxItems: 1, and the binding explicitly rejects having both at once in the fixed-regulator.yaml schema (“not: required: [ gpio, gpios ]”). [1] - kernel.org’s fixed-regulator.yaml copy shows gpio: “gpio to use for enable control” and gpios: “maxItems: 1”, and indicates the gpio/gpios distinction via binding logic. [1] - A Linux-Kernel Archive patch message states the intent: fixed regulator originally used “gpio” (singular) but standard GPIO bindings recommend “gpios” (plural); Linux was modified to handle both, and it recommends the best practice and deprecates the singular variant. [2] - The GPIO binding documentation states that GPIO properties should be named “[ -]gpios”; gpio is valid only for compatibility reasons and is deprecated for newer bindings. [3] So, for new DTs you should use: - gpios = <&gpioX >; and avoid: - gpio = <&gpioX >; (use only if you’re maintaining an older DT / need compatibility) [1][3][2]

Citations:


DT fixed-regulator enable GPIO property should use gpios, not gpio.

In patch/kernel/archive/rockchip64-6.18/dt/rk3568-yy3568.dts (line 117), the vcc3v3_pi6c_05 fixed-regulator uses gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;, but upstream fixed-regulator.yaml expects gpios (plural) for enable control; gpio (singular) is only a deprecated compatibility alias. If the change was from gpiosgpio, restore gpios.

🤖 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` at line 117, The
DT node for the vcc3v3_pi6c_05 fixed-regulator currently uses the deprecated
singular property "gpio" (gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>); update it to
the correct plural property "gpios" to match fixed-regulator.yaml expectations.
Locate the vcc3v3_pi6c_05 regulator node and replace the "gpio" property name
with "gpios" (keeping the same phandle and tuple <&gpio0 RK_PC7
GPIO_ACTIVE_HIGH>) so the enable GPIO is expressed as gpios, not gpio.

Comment on lines +126 to +137
vcc3v3_pcie: vcc3v3-pcie-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pcie30_pwr>;
startup-delay-us = <5000>;
vin-supply = <&vcc5v0_sys>;
};
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 | ⚡ Quick win

Duplicate regulator name detected.

The new vcc3v3_pcie regulator uses regulator-name = "vcc3v3_pcie" (line 128), but this name is already used by the vcc3v3_pi6c_05 regulator (line 120). Duplicate regulator names can cause conflicts in the regulator framework and make debugging difficult.

Consider renaming one of these regulators to ensure unique names. For example, the new regulator could be named "vcc3v3_pcie3x2" to reflect its use with the pcie3x2 controller.

🔧 Proposed fix to rename the new regulator
 	vcc3v3_pcie: vcc3v3-pcie-regulator {
 		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3_pcie";
+		regulator-name = "vcc3v3_pcie3x2";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
🤖 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 126 -
137, Duplicate regulator-name values cause conflicts; rename the new regulator
block vcc3v3_pcie (regulator-name) to a unique identifier (e.g.,
"vcc3v3_pcie3x2") so it no longer collides with vcc3v3_pi6c_05. Update the
regulator-name property inside the vcc3v3_pcie node and keep the node label
(vcc3v3_pcie:) or change it consistently if you prefer, ensuring any references
to that regulator (gpio/pinctrl usage) remain correct.

Comment on lines +126 to +144
&gmac0 {
u-boot,dm-pre-reloc;
phy-mode = "rgmii";
clock_in_out = "output";
snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
snps,reset-delays-us = <0 20000 100000>;
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>;
assigned-clock-rates = <0>, <125000000>;
pinctrl-names = "default";
pinctrl-0 = <&gmac0_miim
&gmac0_tx_bus2
&gmac0_rx_bus2
&gmac0_rgmii_clk
&gmac0_rgmii_bus>;
phy-handle = <&rgmii_phy0>;
status = "okay";
};
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

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Looking for inherited gmac0 timing properties in included DTS/DTSI files..."
fd -a 'rk3568(\-u-boot)?\.dtsi$|rk3568-yy3568\.dts$' . \
  | while read -r f; do
      echo
      echo "== $f =="
      rg -n -C2 '(^&gmac0\b|tx_delay|rx_delay|phy-mode)' "$f" || true
    done

Repository: armbian/build

Length of output: 2898


🏁 Script executed:

#!/bin/bash
set -euo pipefail

TARGET="patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts"

echo "== Includes in $TARGET =="
sed -n '1,220p' "$TARGET" | nl -ba | sed -n '1,140p' | sed -n '1,140p'
# specifically show include lines near top
echo
echo "== Include directives =="
rg -n '^\s*(`#include`\s+|/include/)' "$TARGET" || true

echo
echo "== Search for tx_delay/rx_delay anywhere in u-boot dt subtree =="
rg -n --hidden --no-ignore -S 'tx_delay|rx_delay' patch/u-boot/legacy/u-boot-radxa-rk35xx/dt || true

echo
echo "== Search specifically for gmac0 delay properties in any dts/dtsi =="
# Find all RK3568-related dt files under u-boot tree and search for &gmac0 with tx_delay/rx_delay nearby
fd -e dts -e dtsi rk3568 patch/u-boot/legacy/u-boot-radxa-rk35xx/dt \
  | while read -r f; do
      echo
      echo "== $f =="
      rg -n -C2 '(&gmac0\b.*\{|\btx_delay\b|\brx_delay\b|phy-mode\s*=\s*")' "$f" || true
    done

echo
echo "== Search for tx_delay/rx_delay for gmac0 in kernel archive rk3568 dt files =="
fd -e dts -e dtsi rk3568 patch/kernel/archive/rockchip64-*/dt \
  | while read -r f; do
      # Only print if gmac0 or delays appear
      if rg -n '(&gmac0\b|tx_delay|rx_delay)' "$f" >/dev/null; then
        echo
        echo "== $f =="
        rg -n -C2 '(^\s*&gmac0\b|tx_delay|rx_delay)' "$f" || true
      fi
    done

Repository: armbian/build

Length of output: 197


🏁 Script executed:

#!/bin/bash
set -euo pipefail

TARGET="patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts"

echo "== First 220 lines of $TARGET (no nl) =="
sed -n '1,220p' "$TARGET" | cat

echo
echo "== Include directives in $TARGET =="
rg -n '^\s*(`#include`\s+|/include/)' "$TARGET" || true

echo
echo "== Search tx_delay/rx_delay anywhere under u-boot DT tree =="
rg -n -S 'tx_delay|rx_delay' patch/u-boot/legacy/u-boot-radxa-rk35xx/dt || true

echo
echo "== Search for &gmac0 blocks (and nearby delay/phy-mode) within u-boot DT subtree =="
fd -e dts -e dtsi rk3568 patch/u-boot/legacy/u-boot-radxa-rk35xx/dt \
  | while read -r f; do
      if rg -n '(&gmac0\b|tx_delay|rx_delay|phy-mode\s*=\s*")' "$f" >/dev/null 2>&1; then
        echo
        echo "== $f =="
        rg -n -C2 '(^\s*&gmac0\b|tx_delay|rx_delay|phy-mode\s*=\s*")' "$f" || true
      fi
    done

echo
echo "== Search for tx_delay/rx_delay under kernel archive RK3568 DT files =="
fd -e dts -e dtsi rk3568 patch/kernel/archive/rockchip64-*/dt \
  | while read -r f; do
      if rg -n 'tx_delay|rx_delay' "$f" >/dev/null 2>&1; then
        echo
        echo "== $f =="
        rg -n -C2 '(&gmac0\b|tx_delay|rx_delay)' "$f" || true
      fi
    done

Repository: armbian/build

Length of output: 11317


🌐 Web query:

kernel device tree binding rgmii tx_delay rx_delay properties

💡 Result:

In Linux device-tree bindings for RGMII, the common delay-related properties you’ll see are the MAC-side pico-second properties: 1) Properties on the MAC/controller node - rx-internal-delay-ps: RGMII receive clock delay in pico seconds; if present, the MAC applies the RX delay [1]. - tx-internal-delay-ps: RGMII transmit clock delay in pico seconds; if present, the MAC applies the TX delay [1]. These are used with the RGMII phy-mode sub-modes where delays are expected to be handled internally by either side of the link (MAC vs PCB vs PHY). The binding documentation describes how rgmii/rgmii-id/rgmii-rxid/rgmii-txid relate to where delays come from [1]. 2) Example of a controller-specific binding using different property names Some older or vendor-specific controller bindings use tx-delay and rx-delay (in small integer steps) rather than *_internal-delay-ps. For example, the APM X-Gene ENET binding documents: - tx-delay: maps valid values 0..7 to specific picosecond delay values; default value is 4 (1611 ps) [2]. - rx-delay: maps valid values 0..7 to specific picosecond delay values; default value is 2 (899 ps) [2]. This is board/controller-specific, not the generic kernel-wide property naming. 3) Naming note: “rgmii tx_delay rx_delay properties” vs “tx-internal-delay-ps rx-internal-delay-ps” - If you are looking for the kernel’s generic, binding-documented properties: use rx-internal-delay-ps and tx-internal-delay-ps [1]. - If your DTS/SoC binding uses tx-delay and rx-delay, that’s likely a specific vendor binding where the semantics/ranges are defined in that device’s binding text (e.g., X-Gene ENET) [2]. If you share your specific Ethernet controller (compatible string) or the DTS snippet / binding file path, I can map exactly which property names and units apply to your device.

Citations:


🌐 Web query:

rockchip gmac rgmii tx_delay rx_delay device tree binding

💡 Result:

For Rockchip GMAC (dwmac) in device tree using RGMII, the binding expects the optional properties tx_delay and rx_delay on the Ethernet MAC node. 1) DT binding properties - tx_delay: “Delay value for TXD timing.” Range 0..0x7F, default 0x30 [1]. - rx_delay: “Delay value for RXD timing.” Range 0..0x7F, default 0x10 [1]. These are described in the Rockchip dwmac device-tree binding documentation (dwmac.yaml / legacy dwmac.txt). [1][2][3] 2) Example DT usage (RGMII) A typical Rockchip dwmac node sets phy-mode = "rgmii" and provides tx_delay/rx_delay values, e.g. tx_delay = <0x30>; rx_delay = <0x10>; [2]. 3) Notes about phy-mode and delay usage (why this matters) - In RGMII-id modes (rgmii-id / rgmii-txid / rgmii-rxid), the delays are typically applied by the PHY; Linux may not read/apply tx_delay/rx_delay from DT in those modes. One LKML thread describes a warning where tx_delay/rx_delay properties are missing/ignored depending on phy-mode, and explains the relationship between controller/PHY clock delays in the various rgmii-id modes. [4] - Another LKML thread notes that selecting rgmii-id on ROCK 4D led to no delays being configured in the MAC (since delays were expected to be provided elsewhere), and changing DT to configure MAC delays (via tx_delay/rx_delay) fixed link/data issues. [5] 4) Practical takeaway - If you want the Rockchip GMAC MAC to apply RGMII delays, set phy-mode to a mode where controller-side delays are used (commonly phy-mode = "rgmii") and set tx_delay and rx_delay on the MAC node per the binding defaults/ranges. [1][4][2] If you tell me your specific SoC (e.g., RK3568/RK3588/RK3576) and kernel version, I can point to the exact upstream DTS snippet/commit for that chip’s dwmac node and show what phy-mode it uses with tx_delay/rx_delay.

Citations:


Add/confirm RGMII delay tuning for &gmac0

  • patch/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts sets &gmac0 { phy-mode = "rgmii"; } but omits tx_delay/rx_delay, unlike &gmac1.
  • A search across the u-boot RK3568 DT files (including rk3568.dtsi / rk3568-u-boot.dtsi under this DTS directory) shows no tx_delay/rx_delay for &gmac0, so the Rockchip dwmac binding defaults will apply (tx_delay default 0x30, rx_delay default 0x10), not board-tuned values.
  • Kernel RK3568 reference DTS (rk3568-hinlink-h68k.dts) sets tx_delay/rx_delay for &gmac0, so u-boot likely needs equivalent delay properties unless PHY-side internal delay is intentionally providing the timing.
  • Confirm the intended delay source (PHY internal delay vs MAC delays) and add tx_delay/rx_delay to &gmac0 (or adjust phy-mode accordingly) to avoid Ethernet timing mismatch on ethernet0.
🤖 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/u-boot/legacy/u-boot-radxa-rk35xx/dt/rk3568-yy3568.dts` around lines
126 - 144, The &gmac0 node currently sets phy-mode="rgmii" but lacks explicit
tx_delay/rx_delay which means Rockchip dwmac binding defaults will apply;
confirm whether the PHY provides internal RGMII delays or the MAC should
(compare to rk3568-hinlink-h68k.dts and the &gmac1 node), then add explicit
tx_delay and rx_delay properties to the &gmac0 device node (or change phy-mode
to the appropriate variant that indicates internal PHY delay) to match the
board-tuned values used in the kernel DT and ensure ethernet0 timing matches;
update the rk3568-yy3568.dts &gmac0 node to include the chosen tx_delay and
rx_delay properties or adjust phy-mode accordingly.

@hqnicolas
Copy link
Copy Markdown
Contributor Author

This changes are already in #9832

@hqnicolas hqnicolas closed this May 22, 2026
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, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

1 participant