OrangePi5Pro: Comprehensive HW Support: YT6801 PCIe-Eth, Codec ES8388 Audio, eFUSE & U-Boot v2025.10#9600
Conversation
This commit adds a suite of 4 patches for U-Boot v2025.10 to enable
full support for the Xunlong Orange Pi 5 Pro SBC.
The Orange Pi 5 Pro introduces several significant hardware departures
from the base Orange Pi 5, necessitating specific driver and DTS
adjustments:
1. Networking (Motorcomm YT6801):
- The Pro variant replaces the SoC's built-in GMAC1 NIC with a
PCIe-attached Motorcomm YT6801 controller.
- Introduce a new glue driver (dwc_eth_qos_motorcomm) to bridge
the core DWC EQoS IP to the PCIe bus.
- Core EQoS driver is modified to support the YT6801's unique
32-byte descriptor size and Descriptor Skip Length requirements.
- Auto-generation of MAC addresses from CPU ID is disabled to
preserve the hardware's native eFuse MAC.
2. Audio and I/O:
- Audio routing is moved from I2S1 to I2S2 (M1 mux) with the
ES8388 codec on I2C3.
- LEDs are remapped from GPIO to PWM control (PWM3/PWM15).
- Headphone amplifier enable is remapped to GPIO4_PB5.
3. Thermal and Power:
- PWM Fan control is implemented with a specific 20ms (50Hz)
period. This is CRITICAL because the hardware's RC filter gate
logic causes MOSFET overheating if standard 25kHz PWM is used.
4. Wireless:
- Full support for the AP6256 module via SDIO and UART9.
Patch Summary:
- [0001] Board support (DTS, defconfig, doc). DTS based on initial
submission by Dennis Gilmore.
- [0002] Motorcomm YT6801 PCIe glue driver and PHY support.
- [0003] Core EQoS driver extension for descriptor/DSL overrides.
- [0004] Rockchip board MAC setup bypass for Pro hardware.
Signed-off-by: c127dev <contact@c127.dev>
…rnel
This commit enables full support for the Orange Pi 5 Pro on the current
Linux kernel (rockchip64-6.18). It includes a comprehensive device tree,
board configuration updates, and a series of patches for the PCIe Motorcomm
YT6801 Ethernet controller.
Key additions and modifications:
1. Device Tree Updates (rk3588s-orangepi-5-pro.dts):
- Added support for DisplayPort 1.4 to HDMI 2.0 (DP0/VP2).
- Configured USB3 Type-A ports (with USB2 OTG PHY) and explicitly set the
USB-C port to power-delivery only (no FUSB302/data/alt-mode).
- Configured combphy2_psu for NVMe M.2 slot support by disabling
conflicting USB3 modes.
- Re-mapped fan to PWM2 and LEDs to PWM3/PWM15.
- Added full AP6256 Wi-Fi/Bluetooth support (SDIO and UART9).
2. Motorcomm YT6801 Ethernet Support (Patches 1-5):
- Added generic suspend/resume helper for PCI-based controllers.
- Backported glue driver for Motorcomm YT6801 and YT8531S PHY support.
- Included fixes for eFUSE MAC address read failures.
- Resolved specific stmmac/motorcomm driver compilation errors and
panics on kernel 6.18.
3. Board Configuration (orangepi5pro.csc):
- Refactored U-Boot configuration selection logic, segregating mainline
and vendor branches correctly.
- Configured the Armbian build system to automatically enable the newly
added Motorcomm PHY, STMMAC_ETH, and STMMAC_PLATFORM kernel configs
for the "current" and "edge" branches.
Signed-off-by: c127dev <contact@c127.dev>
This commit enables full support for the Orange Pi 5 Pro on the edge
Linux kernel (rockchip64-7.0). It synchronizes the device tree additions
with the current kernel and includes the necessary eFUSE MAC address fix for
the Motorcomm Ethernet controller.
Key additions and modifications:
1. Device Tree Updates (rk3588s-orangepi-5-pro.dts):
- Added support for DisplayPort 1.4 to HDMI 2.0 (DP0/VP2).
- Configured USB3 Type-A ports (with USB2 OTG PHY) and explicitly set the
USB-C port to power-delivery only (no FUSB302/data/alt-mode).
- Configured combphy2_psu for NVMe M.2 slot support by disabling
conflicting USB3 modes.
- Re-mapped fan to PWM2 and LEDs to PWM3/PWM15.
- Added full AP6256 Wi-Fi/Bluetooth support (SDIO and UART9).
2. Motorcomm YT6801 Ethernet Support (Patches):
- Included fix for Motorcomm YT6801 eFUSE MAC address read failures
on the 7.0 kernel.
Signed-off-by: c127dev <contact@c127.dev>
This commit introduces a patch for the rockchip64 kernel (current 6.18 and edge 7.0 branches) to fix audio routing issues affecting the ES8328 codec. The patch modifies the ASoC es8328 driver to explicitly allow sharing the LRCK (Left/Right Clock) between the microphone and playback interfaces. This is required for hardware designs where capture and playback must share the same clock line. Signed-off-by: c127dev <contact@c127.dev>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Orange Pi 5 Pro support and board-specific adjustments: new U‑Boot v2025.10 board and drivers, removal of v2025.07 patchset, Motorcomm YT6801 glue driver and PHY updates, STMMAC PCI helpers, eFUSE MAC-read fixes, ES8328 LRCK probe option, extensive RK3588S device-tree rewrites, and build-hook/config tweaks. Changes
Sequence Diagram(s)sequenceDiagram
participant Boot as U-Boot/Kernel<br/>Boot
participant PCI as PCI Bus
participant Driver as Motorcomm<br/>Glue Driver
participant HW as YT6801<br/>Controller
participant eFUSE as eFUSE<br/>Controller
participant STMMAC as STMMAC<br/>Core Driver
Boot->>PCI: enumerate PCI devices
PCI->>Driver: probe()
Driver->>Driver: map BAR0, enable mem & bus mastering
Driver->>HW: motorcomm_reset()
HW-->>Driver: reset deasserted
Driver->>Driver: usleep_range(15000,20000)
Driver->>Driver: motorcomm_init()
Driver->>eFUSE: motorcomm_efuse_read_mac()
eFUSE->>eFUSE: readl_poll_timeout_atomic()
eFUSE-->>Driver: MAC bytes (or zero)
alt valid eFUSE MAC
Driver->>Driver: use eFUSE MAC
else
Driver->>Driver: generate random MAC
end
Driver->>HW: configure DMA/AXI/core, disable OOB WOL
Driver->>Driver: setup interrupts (MSI-X/MSI)
Driver->>STMMAC: stmmac_dvr_probe()
STMMAC-->>Boot: network available
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 6
🧹 Nitpick comments (3)
patch/u-boot/v2025.10/board_orangepi5pro/0001-rockchip-rk3588-Add-support-for-the-OrangePI-5-Pro.patch (1)
736-736: Trailing whitespace after closing brace.Line 736 has a trailing space after
};which should be removed for cleaner patches.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@patch/u-boot/v2025.10/board_orangepi5pro/0001-rockchip-rk3588-Add-support-for-the-OrangePI-5-Pro.patch` at line 736, Remove the trailing whitespace after the closing token "};" in the patch (the extra space following the closing brace on the line containing "};") so the line ends exactly with "};" with no trailing spaces; update the patch hunk that contains the "};" closure accordingly to eliminate the trailing space.patch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dts (1)
527-527: Trailing whitespace at end of file.Line 527 has a trailing space after
};.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@patch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dts` at line 527, The file ends with a stray trailing space after the closing token "};" which should be removed; open the file containing the device-tree node ending with "};" and delete the trailing whitespace character after that token (ensure the line ends exactly with "};" and optionally end the file with a single newline), then save the file so the trailing space is gone.patch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dts (1)
527-527: Trailing whitespace at end of file.Line 527 has a trailing space after
};.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@patch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dts` at line 527, The file ends with a trailing space after the final token "};" on the last line; remove the trailing whitespace so the line ends exactly with "};" (no extra spaces or tabs). Locate the final closing token in the file (the line containing "};") and trim the line-ending whitespace, then save and re-check with your editor or a linting/pre-commit hook to ensure no trailing spaces remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/orangepi5pro.csc`:
- Around line 86-95: Delete the redundant board-specific kernel config function
custom_kernel_config__orangepi5pro_motorcomm_phy() entirely; remove the function
definition (including the BRANCH check, display_alert call, and opts_y
additions) so the board no longer overrides kernel config, relying instead on
the family-level CONFIG_MOTORCOMM_PHY settings defined in
linux-rockchip-rk3588-edge.config and linux-rockchip-rk3588-current.config.
In `@patch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dts`:
- Around line 433-435: There are duplicate &u2phy0_otg node entries and a typo
in the second one: replace/remove the duplicate node so only a single
&u2phy0_otg node remains and correct the property name from the misspelled
"pspi5hy-supply" to "phy-supply" (ensure the node uses phy-supply =
<&vcc5v0_otg> like the first instance); search for all occurrences of
&u2phy0_otg (including the other occurrence similar to the one at ~461-464) and
remove the duplicate/incorrect block or merge it into the existing proper node.
In
`@patch/kernel/archive/rockchip64-6.18/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch`:
- Around line 33-36: The regmap_update_bits call in the
device_property_read_bool(dev, "everest,mic-lrck-same") block ignores its return
value; change the code to capture its return (e.g., int ret =
regmap_update_bits(regmap, ES8328_DACCONTROL21, ES8328_DACCONTROL21_LD2MO,
ES8328_DACCONTROL21_LD2MO);) and if ret < 0 return or propagate that error from
the probe path (return ret) so failures writing ES8328_DACCONTROL21 are not
ignored; ensure you reference regmap, ES8328_DACCONTROL21 and
ES8328_DACCONTROL21_LD2MO when locating the change.
In `@patch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dts`:
- Around line 433-435: The &u2phy0_otg node is duplicated and the second
occurrence uses a typo'd property name `pspi5hy-supply`; remove the duplicate
occurrence or correct it so there is only one &u2phy0_otg node with the proper
`phy-supply = <&vcc5v0_otg>;` property (replace `pspi5hy-supply` with
`phy-supply` if you prefer to keep that block, otherwise delete the redundant
block).
In
`@patch/kernel/archive/rockchip64-7.0/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch`:
- Around line 33-36: The regmap_update_bits() call that sets
ES8328_DACCONTROL21_LD2MO when device_property_read_bool(dev,
"everest,mic-lrck-same") is true must have its return value checked and
propagated instead of being ignored; update the probe/init function containing
the device_property_read_bool and regmap_update_bits calls to capture the int
ret = regmap_update_bits(regmap, ES8328_DACCONTROL21, ES8328_DACCONTROL21_LD2MO,
ES8328_DACCONTROL21_LD2MO); and if ret < 0 return ret (or appropriate error) so
failures are not silently ignored.
In
`@patch/u-boot/v2025.10/board_orangepi5pro/0002-net-dwc_eth_qos-Add-support-for-Motorcomm-YT6801.patch`:
- Around line 53-68: The Kconfig text says DWC_ETH_QOS_MOTORCOMM and
DWC_ETH_QOS_INTEL cannot be enabled together but does not enforce this; add
mutual-exclusion constraints so the Motorcomm option explicitly depends on
!DWC_ETH_QOS_INTEL and the Intel option depends on !DWC_ETH_QOS_MOTORCOMM (or
use "select" / "depends on" appropriately) to prevent both being selected
simultaneously; this will avoid driver conflicts at runtime (e.g. duplicate
implementations like eqos_get_driver_data()) by ensuring only one of
DWC_ETH_QOS_MOTORCOMM or DWC_ETH_QOS_INTEL can be configured.
---
Nitpick comments:
In `@patch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dts`:
- Line 527: The file ends with a stray trailing space after the closing token
"};" which should be removed; open the file containing the device-tree node
ending with "};" and delete the trailing whitespace character after that token
(ensure the line ends exactly with "};" and optionally end the file with a
single newline), then save the file so the trailing space is gone.
In `@patch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dts`:
- Line 527: The file ends with a trailing space after the final token "};" on
the last line; remove the trailing whitespace so the line ends exactly with "};"
(no extra spaces or tabs). Locate the final closing token in the file (the line
containing "};") and trim the line-ending whitespace, then save and re-check
with your editor or a linting/pre-commit hook to ensure no trailing spaces
remain.
In
`@patch/u-boot/v2025.10/board_orangepi5pro/0001-rockchip-rk3588-Add-support-for-the-OrangePI-5-Pro.patch`:
- Line 736: Remove the trailing whitespace after the closing token "};" in the
patch (the extra space following the closing brace on the line containing "};")
so the line ends exactly with "};" with no trailing spaces; update the patch
hunk that contains the "};" closure accordingly to eliminate the trailing space.
🪄 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: e37e7c20-6c27-49ad-9886-5ff7058d9997
📒 Files selected for processing (16)
config/boards/orangepi5pro.cscpatch/kernel/archive/rockchip64-6.18/board-orangepi5pro-net-phy-motorcomm-Support-YT8531S-PHY-in-YT6801-Ethe.patchpatch/kernel/archive/rockchip64-6.18/board-orangepi5pro-net-stmmac-Add-generic-suspend-resume-helper-for-PCI.patchpatch/kernel/archive/rockchip64-6.18/board-orangepi5pro-net-stmmac-Add-glue-driver-for-Motorcomm-YT6801-ethe.patchpatch/kernel/archive/rockchip64-6.18/board-orangepi5pro-net-stmmac-dwmac-motorcomm-Fix-compilation-errors-an.patchpatch/kernel/archive/rockchip64-6.18/board-orangepi5pro-net-stmmac-dwmac-motorcomm-fix-eFUSE-MAC-Address-Rea.patchpatch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dtspatch/kernel/archive/rockchip64-6.18/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patchpatch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dtspatch/kernel/archive/rockchip64-7.0/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patchpatch/kernel/archive/rockchip64-7.0/net-stmmac-dwmac-motorcomm-fix-eFUSE-MAC-Address-Rea.patchpatch/u-boot/v2025.07/board_orangepi5pro/0001-add-orangepi5-pro-support.patchpatch/u-boot/v2025.10/board_orangepi5pro/0001-rockchip-rk3588-Add-support-for-the-OrangePI-5-Pro.patchpatch/u-boot/v2025.10/board_orangepi5pro/0002-net-dwc_eth_qos-Add-support-for-Motorcomm-YT6801.patchpatch/u-boot/v2025.10/board_orangepi5pro/0003-net-dwc_eth_qos-Allow-overriding-descriptor-size-and.patchpatch/u-boot/v2025.10/board_orangepi5pro/0004-rockchip-board-Skip-MAC-address-setup-for-Orange-Pi-.patch
💤 Files with no reviewable changes (1)
- patch/u-boot/v2025.07/board_orangepi5pro/0001-add-orangepi5-pro-support.patch
patch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dts
Outdated
Show resolved
Hide resolved
...l/archive/rockchip64-6.18/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch
Outdated
Show resolved
Hide resolved
patch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dts
Outdated
Show resolved
Hide resolved
...el/archive/rockchip64-7.0/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch
Outdated
Show resolved
Hide resolved
...boot/v2025.10/board_orangepi5pro/0002-net-dwc_eth_qos-Add-support-for-Motorcomm-YT6801.patch
Outdated
Show resolved
Hide resolved
…ints and DTS typos) Signed-off-by: c127dev <contact@c127.dev>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/boards/orangepi5pro.csc`:
- Around line 86-92: Remove the board-specific function
custom_kernel_config__orangepi5pro_motorcomm_dwmac_driver (and any references to
display_alert or opts_y += DWMAC_MOTORCOMM) from the orangepi5pro board file and
instead add the DWMAC_MOTORCOMM kernel option to the family-level kernel config
entries for the rockchip-rk3588 family by inserting DWMAC_MOTORCOMM into
config/kernel/linux-rockchip-rk3588-current.config and
config/kernel/linux-rockchip-rk3588-edge.config so the option is applied at
LINUXFAMILY/BOARDFAMILY scope rather than per-board.
🪄 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: b3ee2d3b-fbb2-47be-94e8-0f084d6aaebc
📒 Files selected for processing (7)
config/boards/orangepi5pro.cscpatch/kernel/archive/rockchip64-6.18/dt/rk3588s-orangepi-5-pro.dtspatch/kernel/archive/rockchip64-6.18/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patchpatch/kernel/archive/rockchip64-7.0/dt/rk3588s-orangepi-5-pro.dtspatch/kernel/archive/rockchip64-7.0/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patchpatch/u-boot/v2025.10/board_orangepi5pro/0001-rockchip-rk3588-Add-support-for-the-OrangePI-5-Pro.patchpatch/u-boot/v2025.10/board_orangepi5pro/0002-net-dwc_eth_qos-Add-support-for-Motorcomm-YT6801.patch
✅ Files skipped from review due to trivial changes (1)
- patch/kernel/archive/rockchip64-7.0/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch
🚧 Files skipped from review as they are similar to previous changes (1)
- patch/kernel/archive/rockchip64-6.18/general-ASoC-codecs-es8328-allow-sharing-LRCK-for-microphone.patch
Signed-off-by: c127dev <contact@c127.dev>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/boards/orangepi5pro.csc (1)
17-18: Consider removing stale commented freeze override once finalized.The commented
KERNEL_UPGRADE_FREEZEline can become misleading over time; dropping it keeps board config intent clearer.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@config/boards/orangepi5pro.csc` around lines 17 - 18, Remove the stale commented configuration line for KERNEL_UPGRADE_FREEZE (the "# KERNEL_UPGRADE_FREEZE=\"vendor-rk35xx@24.8.1\"" entry) from the board config so the intent is not misleading; if you need to preserve the value for history, move it to a changelog or commit message instead of leaving it commented in the file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@config/boards/orangepi5pro.csc`:
- Around line 17-18: Remove the stale commented configuration line for
KERNEL_UPGRADE_FREEZE (the "# KERNEL_UPGRADE_FREEZE=\"vendor-rk35xx@24.8.1\""
entry) from the board config so the intent is not misleading; if you need to
preserve the value for history, move it to a changelog or commit message instead
of leaving it commented in the file.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c1e6ec24-0b9b-4824-abbe-22e1db47f73f
📒 Files selected for processing (2)
config/boards/orangepi5pro.cscconfig/kernel/linux-rockchip-rk3588-edge.config
…rs, add test targets) Signed-off-by: c127dev <contact@c127.dev>
|
I wonder if the motorcomm driver can be added as module rather than forcing it into the kernel? |
Signed-off-by: c127dev <contact@c127.dev>
Hi EvilOlaf, you are right. Initially I've set it to built-in thinking about network availability inside initramfs for recovery scenarios. However, I forgot realizing the config applies to the entire |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
This PR brings a comprehensive and stable hardware support for the Orange Pi 5 Pro SBC, bridging the gap between existing partial-support and a almost fully-functional SBC out of the box.
So, previously, the board relied on a
.debpackage installed during the first boot to enable the Motorcomm YT6801 Ethernet controller, which significantly slowed down the initial boot process. (Now 4~5s dmesg) This PR integrates the newly mainlined YT6801 driver directly into thecurrent(6.18) andedge(7.0) kernels, alongside U-Boot v2025.10, fixing several low-level hardware bugs in the process.Key Motivations and Fixes:
reset -> delay -> readsequence that guarantees the eFUSE MAC is correctly read in both U-Boot and the Linux Kernel.v2025.10.es8328ASoC driver to explicitly allow LRCK sharing and added missingMic Biasrouting to the DTS. Both onboard mic and headphone jack now work flawlessly.lore.kernel.org. (Note: v3 and v4 patches currently exhibit PCIe read issues, so v2 was heavily refactored and proven stable). Synced this DTS across U-Boot,current, andedgekernels.Documentation summary for feature / change
If documentation entry is predicted, please provide key elements for further implementation into main documentation and set label to "Needs Documentation".
.debinstallation), enabled full audio support (3.5mm Jack Output and onboard/headset Microphone) via ES8388. Enabled safe PWM Fan control, M.2 NVMe, and AP6256 Wi-Fi/BT.How Has This Been Tested?
Extensive testing was performed across multiple environments to ensure stability in both the bootloader phase and different kernel versions.
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Chores