Skip to content

rockchip64: Helios64: fix Type-C PD negotiation#9254

Closed
iav wants to merge 1 commit intoarmbian:mainfrom
iav:main
Closed

rockchip64: Helios64: fix Type-C PD negotiation#9254
iav wants to merge 1 commit intoarmbian:mainfrom
iav:main

Conversation

@iav
Copy link
Contributor

@iav iav commented Jan 15, 2026

Remove usb-role-switch property from fusb302 node and replace with extcon property. The usb-role-switch property breaks PD negotiation and DP alt mode on kernel 6.18+.

Fix based on PR #9245 (Pinebook Pro) by amazingfate.

Apply Helios64: fix Type-C PHY registration #9158 to 6.19.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Build image for Helios64 with kernel 6.18, check hardware status
  • Build image for Helios64 with kernel 6.19-rc5, check hardware status

Summary by CodeRabbit

  • New Features

    • Enhanced USB-C connector support and Type-C configuration
    • Improved LED indicator system and GPIO controls
    • Updated power management and regulator topology
    • Extended I2C and USB host connectivity
  • Chores

    • Board hardware configuration updates for kernel versions 6.18 and 6.19

✏️ Tip: You can customize this high-level summary in your review settings.

Remove usb-role-switch property from fusb302 node and replace with
extcon property. The usb-role-switch property breaks PD negotiation
and DP alt mode on kernel 6.18+.

Fix based on PR armbian#9245 (Pinebook Pro) by amazingfate.

Apply Helios64: fix Type-C PHY registration armbian#9158 to 6.19.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

Updates device tree patches for Rockchip64 kernel versions 6.18 and 6.19 to add comprehensive USB Type-C support and USB-C extcon bridge configuration to the Kobol Helios64 board, including USB-C connectors, power regulators, I2C topology, GPIO controls, and PMIC interactions.

Changes

Cohort / File(s) Summary
Helios64 Board Device Tree (6.18)
patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
Replaces usb-role-switch property with extcon = <&typec_extcon_bridge> and adds extensive USB-C connector configuration block under fusb0 typec-portc node, including PD/PDOS definitions and altmodes.
Helios64 Board Device Tree (6.19)
patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
Comprehensive device tree overhaul introducing USB Type-C extcon bridge, expanded I2C topology (i2c4, i2c7, i2c8), new regulator blocks (vdd_center, vdd_gpu, vcc5v0_typec, vcc5v0_hdd, vcc12v_hdd), multiple LED nodes (network, sata, system), PMIC interactions, pinctrl mappings, USB hub configuration, and updated extcon references across multiple PHY nodes (tcphy0, tcphy1, u2phy0, u2phy1).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • amazingfate
  • rpardini
  • JohnTheCoolingFan
  • igorpecovnik
  • paolosabatino
  • TheSnowfield
  • prahal
  • Tonymac32

Poem

🐰 With whiskers twitching and ears held high,
A Helios shines bright in the Rockchip sky,
Type-C connectors now properly bound,
Extcon bridges and regulators abound,
The board device tree, now complete and true! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'rockchip64: Helios64: fix Type-C PD negotiation' directly addresses the main objective of the pull request—fixing Type-C Power Delivery negotiation by modifying device tree configurations for the Helios64 board.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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



📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bc871ca and 4c176cc.

📒 Files selected for processing (2)
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: iav
Repo: armbian/build PR: 9158
File: patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch:598-600
Timestamp: 2026-01-03T07:27:45.955Z
Learning: In Rockchip vendor kernel branches (e.g., rockchip64-6.18), the FUSB302 device tree binding accepts usb-role-switch as a phandle reference to a USB role switch provider (e.g., typec_extcon_bridge), not just as a boolean flag as in mainline kernel bindings. The vendor implementation allows usb-role-switch = <&typec_extcon_bridge>; to work correctly.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>
Learnt from: tabrisnet
Repo: armbian/build PR: 8661
File: lib/functions/compilation/armbian-kernel.sh:194-199
Timestamp: 2025-09-25T18:37:00.330Z
Learning: In PR armbian/build#8661, line 235 of lib/functions/compilation/armbian-kernel.sh already contains the corrected comment "BPF link support for netfilter hooks" for NETFILTER_BPF_LINK, not the misleading "BPF_SYSCALL" comment that was flagged during review.
Learnt from: tabrisnet
Repo: armbian/build PR: 8661
File: lib/functions/compilation/armbian-kernel.sh:194-199
Timestamp: 2025-09-25T18:37:00.330Z
Learning: In PR armbian/build#8661, line 235 of lib/functions/compilation/armbian-kernel.sh already contains the corrected comment "BPF link support for netfilter hooks" for NETFILTER_BPF_LINK, not the misleading "BPF_SYSCALL" comment that was flagged during review.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).
📚 Learning: 2025-12-17T05:09:02.306Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-17T05:09:02.306Z
Learning: In the Armbian build system, kernel patches (e.g., in patch/kernel/archive/sunxi-6.18/patches.armbian/) contain device tree overlays and other code that have existed for years and are maintained/ported across kernel versions. When reviewing PRs that modify these patch files, focus on the actual changes being made (e.g., Makefile fixes, new additions) rather than reviewing the entire existing content within the patch as if it were new code. The patch file contents are existing, stable code unless explicitly modified in the PR diff.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2025-11-08T06:39:24.527Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8886
File: patch/kernel/rk35xx-vendor-6.1/dt/rk3528-nanopi-rev01.dts:9-9
Timestamp: 2025-11-08T06:39:24.527Z
Learning: In Armbian's Rockchip vendor kernel branches (rk35xx-vendor), device tree files may not require the same headers as mainline Linux. For example, input key definitions like KEY_BACK and KEY_VOLUMEUP may be handled differently in BSP kernels and don't necessarily need explicit includes like <dt-bindings/input/input.h> that would be required in mainline kernel device trees.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2025-12-19T13:56:45.124Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-12-19T13:56:45.124Z
Learning: When reviewing kernel or u-boot version bump PRs in the Armbian build system, check if patches existed in previous kernel version directories (e.g., sunxi-6.12, sunxi-6.13) before describing them as new features. If a patch and the majority of its contents existed previously with no major functionality changes, focus the review on the actual changes: the version bump itself and patch compatibility adjustments. Don't describe existing patches being ported/maintained across versions as new features or drivers—this is misleading. The patches are existing code being re-aligned to work with the new upstream version.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2025-11-20T18:20:11.985Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8968
File: patch/u-boot/u-boot-sunxi/arm64-dts-sun50i-h6-orangepi.dtsi-Rollback-r_rsb-to-r_i2c.patch:36-36
Timestamp: 2025-11-20T18:20:11.985Z
Learning: The rewrite-patches tool (REWRITE_PATCHES=yes) in the Armbian build system can inadvertently introduce semantic changes when the u-boot/kernel git base revision differs from expected state. The tool applies patches, commits them, and re-exports them using git format-patch, which can cause the re-exported patch to reflect the base revision's state rather than preserving the original patch intent. This is particularly problematic for device tree changes like interrupt specifications. The tool currently lacks validation mechanisms to detect such semantic drift, and affected patches must be manually corrected after rewriting.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2025-12-17T15:46:22.709Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9096
File: patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-overlays.patch:4-5
Timestamp: 2025-12-17T15:46:22.709Z
Learning: In Armbian kernel patches, when patches are renamed or reorganized, the old Subject line may be intentionally preserved in the patch header (as a second Subject line) for archival/historical purposes to document the previous patch name. This is an Armbian-specific practice for tracking patch evolution and should not be flagged as an error when the maintainer has intentionally included it for documentation.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2026-01-03T07:27:45.955Z
Learnt from: iav
Repo: armbian/build PR: 9158
File: patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch:598-600
Timestamp: 2026-01-03T07:27:45.955Z
Learning: In Rockchip vendor kernel branches (e.g., rockchip64-6.18), the FUSB302 device tree binding accepts usb-role-switch as a phandle reference to a USB role switch provider (e.g., typec_extcon_bridge), not just as a boolean flag as in mainline kernel bindings. The vendor implementation allows usb-role-switch = <&typec_extcon_bridge>; to work correctly.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
📚 Learning: 2025-12-21T10:28:48.455Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9086
File: patch/kernel/archive/uefi-arm64-6.19/net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch.disabled:625-633
Timestamp: 2025-12-21T10:28:48.455Z
Learning: The patch "net-stmicro-stmmac-Phytium-onboard-ethernet-drivers-and-ACPI-glue-for-6.x.patch" in patch/kernel/archive/uefi-arm64-6.19/ is known to break compilation on kernel 6.19 and is therefore disabled (has .disabled extension).

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
📚 Learning: 2025-12-23T04:44:34.317Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 9067
File: patch/kernel/archive/rockchip64-6.19/dt/rk3399-orangepi-4-lts.dts:869-875
Timestamp: 2025-12-23T04:44:34.317Z
Learning: When reviewing device tree changes, validate node properties against the official kernel device tree binding documentation (*.yaml files) rather than relying solely on historical patterns in existing DTS files. Copy-paste errors can persist across versions, and bindings define the authoritative set of valid properties for each device node type.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
📚 Learning: 2026-01-03T20:46:29.189Z
Learnt from: rpardini
Repo: armbian/build PR: 9159
File: patch/u-boot/u-boot-genio/0026-dts-configs-add-Grinn-GenioSBC-510.patch:161-161
Timestamp: 2026-01-03T20:46:29.189Z
Learning: For the Armbian genio family (config/sources/families/genio.conf and patch/u-boot/u-boot-genio/), when reviewing PRs that include vendor U-Boot patches from Collabora, avoid flagging potential issues in board configurations that are out of scope for the PR's primary focus (e.g., don't flag Genio 510/700 board issues when the PR is focused on radxa-nio-12l/Genio 1200). The maintainer prioritizes keeping vendor patches close to upstream for easier re-copying and maintenance, even if secondary board configs have potential mismatches.
<!-- </add_learning>

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2026-01-10T04:28:58.758Z
Learnt from: kasimling
Repo: armbian/build PR: 9177
File: patch/kernel/archive/rockchip64-6.18/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch:37-41
Timestamp: 2026-01-10T04:28:58.758Z
Learning: When reviewing Linux kernel device-tree bindings involving thermal cooling devices, THERMAL_NO_LIMIT can be used for both min_state (lower) and max_state (upper). If used as lower/min_state, the framework converts it to 0; if used as upper/max_state, it converts to the cooling device's max_state. Verify patch entries like: cooling-device = <&fan THERMAL_NO_LIMIT 1> are valid and correctly reflect the intended bounds. Ensure consistent interpretation of NO_LIMIT in both min and max contexts and that the resulting values align with the device's actual limits.

Applied to files:

  • patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch
  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2026-01-03T07:27:40.951Z
Learnt from: iav
Repo: armbian/build PR: 9158
File: patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch:598-600
Timestamp: 2026-01-03T07:27:40.951Z
Learning: In vendor Rockchip kernel patches (e.g., rockchip64-6.18), verify that the FUSB302 device tree binding uses a phandle reference for usb-role-switch (e.g., usb-role-switch = <&typec_extcon_bridge>;), not a bare boolean flag as in mainline. Ensure patches reflect the vendor implementation that supports phandles to a USB role switch provider, and adjust bindings accordingly to avoid regressions in USB role switching.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
📚 Learning: 2025-11-15T14:33:30.654Z
Learnt from: SuperKali
Repo: armbian/build PR: 8936
File: patch/kernel/archive/rockchip64-6.18/dt/rk3576-nanopi-r76s.dts:800-802
Timestamp: 2025-11-15T14:33:30.654Z
Learning: In RK3576 device tree files (like rk3576-nanopi-r76s.dts), the serial0 alias is already defined in the upstream kernel's rk3576.dtsi base file, so board-specific DTS files do not need to redeclare it when enabling &uart0 for serial console.

Applied to files:

  • patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch
🔇 Additional comments (4)
patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch (3)

333-366: Verify the typec‑extcon bridge is bound to the USB‑C port

With typec_extcon_bridge added and cdn_dp consuming its extcon, please confirm the 6.19 binding for linux,typec-extcon-bridge and ensure it is linked to the FUSB302 connector (some bindings require a typec-port/graph endpoint) so the bridge receives Type‑C state changes.


591-618: Confirm FUSB302 extcon wiring and PD descriptors in 6.19

This switch to extcon plus the PDO/altmode descriptors should match the rockchip64‑6.19 FUSB302 binding and Helios64 power limits. Please verify the binding accepts extcon (vs the prior usb-role-switch phandle) and that the source-pdos/sink-pdos/op-sink-microwatt values are consistent. Based on learnings, please confirm the vendor binding expectations for FUSB302.


858-945: Validate extcon consumers and extcon,ignore-usb behavior

tcphy0, u2phy0, and usbdrd_dwc3_0 now consume typec_extcon_bridge, and extcon,ignore-usb is set on u2phy0. Please verify these properties are supported in 6.19 bindings and that the intended role/alt‑mode flow still works with USB role events being ignored.

patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch (1)

591-600: Confirm 6.18 FUSB302 uses extcon instead of vendor usb-role-switch

Please verify the rockchip64‑6.18 FUSB302 binding/driver accepts extcon = <&typec_extcon_bridge>; and that PD negotiation remains stable after removing the usb-role-switch phandle. Based on learnings, please confirm the vendor binding expectations for FUSB302.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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/small PR with less then 50 lines 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 15, 2026
@iav iav deleted the branch armbian:main January 15, 2026 21:04
@iav iav closed this Jan 15, 2026
@iav iav deleted the main branch January 15, 2026 21:04
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.

1 participant