Skip to content

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Jan 20, 2026

Description

push version
rewrite meson64, rockchip64, both uefi arm64 and x86

How Has This Been Tested?

  • build rockchip64, meson64, uefi-arm64, uefi-x86

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 DisplayPort alt-mode support for USB-C connectivity
    • Enabled automatic thermal fan control for RK3588 devices
    • Introduced USB 3.0 Type-A port support for select platforms
    • Added cryptographic hardware acceleration for RK3588
  • Bug Fixes

    • Improved stability on Helios64 boards
    • Fixed PCIe configuration and USB hub routing
    • Enhanced GPU switching on Apple hardware
  • Updates

    • Kernel updated to version 6.19-rc6
    • Expanded device tree support across multiple ARM platforms

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

This PR updates the mainline kernel branch selection to v6.19-rc6 and applies multiple kernel patches across Meson, Rockchip (RK3399/RK3588), HiKey960, and x86 UEFI platforms, including PCIe MPS optimization, Type-C/DP alt-mode support, device tree expansions, USB enhancements, cryptographic acceleration, and staging driver integration.

Changes

Cohort / File(s) Summary
Kernel version configuration
config/sources/mainline-kernel.conf.sh
Updated upstream release candidate tag from v6.19-rc5 to v6.19-rc6 for KERNEL_MAJOR_MINOR=6.19
Meson PCIe optimization
patch/kernel/archive/meson64-6.19/x-PATCH-v7-2-2-PCI-dwc-Remove-redundant-MPS-configuration.patch
Removed static helper function meson_set_max_payload() and its invocation to eliminate redundant manual MPS configuration; now relies on PCI core handling
Rockchip Helios64 device tree
patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch, patch/kernel/archive/rockchip64-6.19/board-helios64-dts-fix-stability-issues.patch, patch/kernel/archive/rockchip64-6.19/board-helios64-remove-pcie-ep-gpios.patch
Major expansion of Helios64 board DT with new peripherals (ADC keys, fans, LEDs, USB-C), regulators, GPIO mappings; added PMIC max-buck-steps-per-change tuning; removed PCIe ep-gpios property
Rockchip Pinebook Pro Type-C/DP
patch/kernel/archive/rockchip64-6.19/board-pbp-add-dp-alt-mode.patch
Introduced Type-C extcon bridge infrastructure with DisplayPort alt-mode support, adding typec_extcon_bridge and cdn_dp nodes with mode/orientation switching and altmode declarations
Rockchip RK3399 PCIe and USB-C driver enhancements
patch/kernel/archive/rockchip64-6.19/rk3399-rp64-pcie-Reimplement-rockchip-PCIe-bus-scan-delay.patch, patch/kernel/archive/rockchip64-6.19/rk3399-usbc-phy-rockchip-naneng-Add-fallback-for-old-DTs.patch, patch/kernel/archive/rockchip64-6.19/rk3399-usbc-usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPT.patch
Added configurable PCIe bus scan delay via module parameter and device tree property; introduced DWC3 DISCONNECTED device state with usb3-phy-reset-quirk for proper USB3 PHY reset sequencing; enhanced DP alt-mode pin assignment logic respecting receptacle vs. plug semantics
Rockchip RK3588 thermal and USB
patch/kernel/archive/rockchip64-6.19/rk3588-1212-arm64-dts-Automatic-fan-speed-and-USB-3.0-Type-A-por.patch
Renamed &pcie2x1l1 to &package_thermal with fan trip definitions and cooling maps; added &pcie2x1l2 and &usb_host2_xhci nodes for PCIe and USB host configuration
Rockchip cryptographic acceleration
patch/kernel/archive/rockchip64-6.19/rk35xx-montjoie-crypto-v2-rk35xx.patch
Introduced new RK2 cryptographic driver for RK3568/RK3588 with support for AES and SHA/MD5 algorithms via AHASH/SKCIPHER interfaces; added crypto device tree binding and updated Rockchip reset handling to SCMI-based control
HiKey960 USB hub
patch/kernel/archive/uefi-arm64-6.19/board-hikey960-usb.patch
Added USB hub regulator and hub node with port configuration; rewired USB endpoint mappings to route through the new hub infrastructure
x86 UEFI Apple staging driver and gmux
patch/kernel/archive/uefi-x86-6.19/1002-Put-apple-bce-in-drivers-staging.patch, patch/kernel/archive/uefi-x86-6.19/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch
Moved Apple BCE driver to staging with Kconfig/Makefile integration; extended Apple gmux driver with force_igd module parameter for iGPU switching at probe; exported vga_set_default_device symbol; added early probe defer check in amdgpu driver

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

This PR spans multiple platforms and subsystems with heterogeneous changes: device tree expansions, driver code modifications with complex state handling (DWC3 DISCONNECTED state, DP alt-mode pin logic), new cryptographic driver integration, and staging driver scaffolding. Each area requires specialized knowledge, and the mix of configuration, kernel patches, and multi-level changes (Kconfig, Makefile, C code, device tree bindings) demands careful review across distinct domains.

Possibly related PRs

Suggested reviewers

  • joekhoobyar
  • brentr
  • prahal
  • rpardini
  • igorpecovnik

Poem

🐰 From kernel configs to device trees so fine,
RC versions hop and extcon paths align,
PCIe delays, crypto speeds start to gleam,
Type-C alt-modes flowing in our dream,
Helios and Pinebooks dancing in six-nineteen's scheme!

🚥 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 'mainline: bump to 6.19-rc6' directly and clearly summarizes the primary change: updating the mainline kernel version from 6.19-rc5 to 6.19-rc6.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@EvilOlaf
Copy link
Member Author

loong64 needs to be checked

@github-actions github-actions bot added 02 Milestone: First quarter release size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Jan 20, 2026
Copy link
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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (10)
patch/kernel/archive/rockchip64-6.19/rk3399-usbc-usb-typec-altmodes-displayport-Respect-DP_CAP_RECEPT.patch (1)

91-96: Typo in comment: "compatiple" → "compatible".

Line 91 has a typo in the comment.

Proposed fix
-	/* Make sure we have compatiple pin configurations */
+	/* Make sure we have compatible pin configurations */
patch/kernel/archive/uefi-x86-6.19/2009-apple-gmux-allow-switching-to-igpu-at-probe.patch (3)

80-82: Typo in MODULE_PARM_DESC: force_idg should be force_igd.

The module parameter is named force_igd (line 80) but the description uses force_idg. This will cause confusion for users looking up parameter documentation.

Proposed fix
-MODULE_PARM_DESC(force_idg, "Switch gpu to igd on module load. Make sure that you have apple-set-os set up and the iGPU is in `lspci -s 00:02.0`. (default: false) (bool)");
+MODULE_PARM_DESC(force_igd, "Switch gpu to igd on module load. Make sure that you have apple-set-os set up and the iGPU is in `lspci -s 00:02.0`. (default: false) (bool)");

99-101: Typo in pr_err message: force_idg should be force_igd.

Same typo as the MODULE_PARM_DESC — the error message references the wrong parameter name.

Proposed fix
-			pr_err("force_idg is true, but couldn't find iGPU at 00:02.0! Is apple-set-os working?");
+			pr_err("force_igd is true, but couldn't find iGPU at 00:02.0! Is apple-set-os working?");

91-102: Add missing pci_dev_put() and fix typo in module parameter description.

pci_get_domain_bus_and_slot() increments the reference count on the returned pci_dev. Since vga_set_default_device() takes its own reference via pci_dev_get(), the caller must release its reference with pci_dev_put(pdev) after the call. Currently the reference is leaked.

Additionally, the module parameter description contains a typo: "force_idg" should be "force_igd".

Proposed fix
 	if (force_igd) {
 		struct pci_dev *pdev;
 
 		pdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(2, 0));
 		if (pdev) {
 			pr_info("Switching to IGD");
 			gmux_switchto(VGA_SWITCHEROO_IGD);
 			vga_set_default_device(pdev);
+			pci_dev_put(pdev);
 		} else {
-			pr_err("force_idg is true, but couldn't find iGPU at 00:02.0! Is apple-set-os working?");
+			pr_err("force_igd is true, but couldn't find iGPU at 00:02.0! Is apple-set-os working?");
 		}
 	}

Also fix the MODULE_PARM_DESC: "force_idg""force_igd"

patch/kernel/archive/uefi-x86-6.19/1002-Put-apple-bce-in-drivers-staging.patch (1)

45-63: Trailing apostrophe in Kconfig help text.

Line 63 ends with apple-bce.' — the trailing apostrophe appears to be a typo and will show up in kernel configuration help.

Proposed fix
-	  If "M" is selected, the module will be called apple-bce.'
+	  If "M" is selected, the module will be called apple-bce.
patch/kernel/archive/rockchip64-6.19/rk3399-usbc-phy-rockchip-naneng-Add-fallback-for-old-DTs.patch (1)

187-218: Fix host-mode regression when usb3_phy_reset_quirk is false.
The new else path unconditionally sets mode = DEVICE, which overrides a detected HOST state and regresses OTG switching on non‑quirk boards. Preserve HOST when EXTCON_USB_HOST is asserted.

🐛 Proposed fix
-	u32 mode = DWC3_GCTL_PRTCAP_DEVICE_DISCONNECTED;
-	int ret;
+	u32 mode = DWC3_GCTL_PRTCAP_DEVICE_DISCONNECTED;
+	int ret;
+	bool host = false;

 	if (dwc->edev) {
 		ret = extcon_get_state(dwc->edev, EXTCON_USB_HOST);
-		if (ret > 0)
-			mode = DWC3_GCTL_PRTCAP_HOST;
+		if (ret > 0)
+			host = true;

 		if (dwc->usb3_phy_reset_quirk) {
 			/*
 			 * With this quirk enabled, we want to pass 0
 			 * to dwc3_set_mode to signal no USB connection
 			 * state.
 			 */
 			ret = extcon_get_state(dwc->edev, EXTCON_USB);
-			if (ret > 0)
-				mode = DWC3_GCTL_PRTCAP_DEVICE;
+			if (host)
+				mode = DWC3_GCTL_PRTCAP_HOST;
+			else if (ret > 0)
+				mode = DWC3_GCTL_PRTCAP_DEVICE;
 		} else {
-			mode = DWC3_GCTL_PRTCAP_DEVICE;
+			mode = host ? DWC3_GCTL_PRTCAP_HOST :
+				      DWC3_GCTL_PRTCAP_DEVICE;
 		}

 		dwc3_set_mode(dwc, mode);
 	}
patch/kernel/archive/rockchip64-6.19/rk35xx-montjoie-crypto-v2-rk35xx.patch (4)

43-51: Align clock-names between binding and DTS nodes.

The schema expects "core","a","h" while the DTS nodes use "core","aclk","hclk" (and rk356x orders them differently), which will trip dtbs_check. Suggest making the binding and both DTS nodes consistent.

Proposed fix
diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml
@@
   clock-names:
     items:
       - const: core
-      - const: a
-      - const: h
+      - const: aclk
+      - const: hclk
diff --git a/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi b/arch/arm64/boot/dts/rockchip/rk356x-base.dtsi
@@
-        clock-names = "aclk", "hclk", "core";
+        clock-names = "core", "aclk", "hclk";

Also applies to: 115-116, 155-156


2235-2246: Initialize dma_ctrl before OR-ing flags.

dd->dma_ctrl is reused without being reset, so stale flags from a previous request can leak into the new descriptor.

Proposed fix
-        dd->dma_ctrl |= RK2_LLI_DMA_CTRL_DST_INT | RK2_LLI_DMA_CTRL_LAST;
+        dd->dma_ctrl = RK2_LLI_DMA_CTRL_DST_INT | RK2_LLI_DMA_CTRL_LAST;

1071-1087: Handle pm_runtime_resume_and_get() error in probe function.

The pm_runtime_resume_and_get(&pdev->dev) call at line 1075 lacks error handling. If runtime resume fails, the device remains suspended while the code proceeds to register crypto algorithms and add the device to rocklist. This leaves the device in an inconsistent state.

Proposed fix
 err = pm_runtime_resume_and_get(&pdev->dev);
+if (err)
+    goto err_pm;

1633-1638: Fix error handling and resource cleanup in hash path to prevent DMA mapping leak.

The code at lines 1633-1638 has a critical flaw: the error value from rk2_hash_prepare() is immediately overwritten by pm_runtime_resume_and_get(), and if the latter fails, the function returns early without calling rk2_hash_unprepare(). This causes a resource leak of DMA mappings allocated by rk2_hash_prepare().

The fix requires checking rk2_hash_prepare() for errors immediately, and ensuring that if either function fails, rk2_hash_unprepare() is called before returning. The proposed fix with the finalize: label correctly separates resource cleanup (at theend:) from request finalization (at finalize:), allowing proper unwinding on error paths.

This applies to both line ranges: 1633-1638 and 1705-1712.

🧹 Nitpick comments (2)
patch/kernel/archive/rockchip64-6.19/rk3399-usbc-phy-rockchip-naneng-Add-fallback-for-old-DTs.patch (1)

70-75: Remove the XXX and make PHY power-on state deterministic.
The loop overwrites usb3_phy_powered per-port and leaves a TODO-style comment. Please track success across all ports and drop the XXX.

♻️ Suggested cleanup
-		for (int j = 0; j < dwc->num_usb3_ports; j++) {
-			ret = phy_power_on(dwc->usb3_generic_phy[j]);
-			//XXX: bleh
-			dwc->usb3_phy_powered = ret >= 0;
-		}
+		bool powered = true;
+		for (int j = 0; j < dwc->num_usb3_ports; j++) {
+			ret = phy_power_on(dwc->usb3_generic_phy[j]);
+			if (ret < 0) {
+				powered = false;
+				break;
+			}
+		}
+		dwc->usb3_phy_powered = powered;
patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch (1)

848-854: Outstanding TODO: Implicit CD definition.

There's a TODO comment about potentially using implicit CD definition instead of explicit cd-gpios. This could simplify the configuration if the SDMMC controller supports implicit card detect via pinctrl.

Would you like me to open an issue to track investigating implicit CD support for Helios64, or help identify what kernel changes would be needed?

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Jan 20, 2026
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Jan 20, 2026
@igorpecovnik igorpecovnik merged commit 45f96e7 into armbian:main Jan 21, 2026
13 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 26, 2026
6 tasks
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, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

3 participants