Skip to content

sunxi: refactor full patchset#9219

Merged
EvilOlaf merged 16 commits intoarmbian:mainfrom
EvilOlaf:sunxi-patches
Jan 11, 2026
Merged

sunxi: refactor full patchset#9219
EvilOlaf merged 16 commits intoarmbian:mainfrom
EvilOlaf:sunxi-patches

Conversation

@EvilOlaf
Copy link
Copy Markdown
Member

@EvilOlaf EvilOlaf commented Jan 10, 2026

Alright that's a huge one.

  • separate independent patches (meaning order of application doesn't matter)
  • start grouping
    • independent patches targeting the same file/s by logic (re-)naming
    • add numeric grouping prefix to those depending on each other
      • the plan is to solve dependencies as much as possible to have independent patches left only, not sure if possible.
  • perhaps in the end we can even abandon series.conf

This is WIP and far from being done and only here to collect feedback from what's there already.

  • build sunxi
  • build sunxi64

Summary by CodeRabbit

  • New Features

    • Added Ethernet (EMAC1) support for H616, H618, and X96-Mate devices
    • Added WiFi support for Orange Pi Zero2/Zero3 and Pine H64
    • Added USB3 support for Pine H64
    • Added audio codec support across multiple boards
    • Added SPI device support for Pine64
  • Bug Fixes

    • Fixed USB OTG mode handling for Orange Pi Zero H2+
    • Fixed Ethernet pin configurations for Banana Pi M4
    • Improved thermal management for H6 devices
  • Improvements

    • Enhanced audio routing and I2S pin configurations
    • Updated UART and pinctrl definitions for improved device support

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

This PR updates Armbian's sunxi kernel (6.18) patches with extensive device tree modifications for multiple SoC families. Changes include adding EMAC1 Ethernet support with RMII configuration, enabling audio codecs, USB3, HDMI/display outputs, SPI/I2S/UART pin definitions, power regulators, and thermal zone improvements across sun4i, sun7i, sun8i, and sun50i platforms, alongside a complete patch series reorganization.

Changes

Cohort / File(s) Summary
EMAC1/MDIO Ethernet Support
patch/kernel/archive/sunxi-6.18/patches.armbian/0301-arm64-dts-sun50i-h616-add-emac1-rmii-pins.patch
Introduces EMAC1 node with RMII configuration (pinctrl, phy-mode, phy-handle, delays) and mdio1 with ethernet-phy@1; adds ethernet0 alias routing
H616 Codec & EMAC Updates
patch/kernel/archive/sunxi-6.18/patches.armbian/0302-arm64-dts-sun50i-h618-orangepi-zero2w-add-emac-sound.patch, patch/.../0701-arm64-dts-sun50i-h616-orangepi-zero-enable-sound.patch, patch/.../0702-arm64-dts-sun50i-h616-add-digital-audio-node.patch
Adds codec/audio nodes with EMAC1 under mdio0; adjusts hunk contexts for sound subsystem
H6 Audio Codec Support
patch/kernel/archive/sunxi-6.18/patches.armbian/0401-arm64-dts-sun50i-h6-add-ac200-ephy.patch, patch/.../0402-arm64-dts-sun50i-h6-add-ac200-codec.patch, patch/.../0403-arm64-dts-sun50i-h6-enable-ac200-codec.patch
Adds AC200 codec (ephy/analog) device tree nodes with hunk context adjustments; enables codec in pine-h64
BigTreeTech CB1 Board Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/0602-arm64-dts-sun50i-h616-bigtreetech-cb1-fix-ws2812-rgb-value.patch, patch/.../0603-arm64-dts-sun50i-h616-bigtreetech-cb1-enable-emac1.patch, patch/.../0604-arm64-dts-sun50i-h616-bigtreetech-cb1-enable-hdmi.patch
Fixes ws2812 LED configuration and enables EMAC1/HDMI peripherals with minor context shifts
H6 UART & Pin Control
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h6-Add-r_uart-uart2-3-pins.patch
Adds r_uart node, gic interrupt-controller, and comprehensive UART2/3 pin definitions (uart2/3_pins, rts_cts_pins) with /omit-if-no-ref/ markers
H6 Thermal Improvements
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h6.dtsi-improve-thermals.patch
Restructures cpu-thermal zone: updates polling delays (0→250/1000ms), replaces trip definitions with granular levels (warm/hot/crit), and adds specific cooling-device mappings
H6 SPI Pin Control
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h6.dtsi-add-pinctrl-pins-for-spi.patch
Adds pinctrl-names and pinctrl-0 properties to spi0/spi1 nodes for pin multiplexing
H6 OrangePi & Pine-H64 Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h6-orangepi-3-delete-node-spi0.patch, patch/.../arm64-dts-sun50i-h6-pine-h64-add-wifi-rtl8723cs.patch, patch/.../arm64-dts-sun50i-h6-pine-h64-enable-usb3.patch, patch/.../arm64-dts-sun50i-h6-fix-emmc-compatible.patch
Deletes SPI0 node on OrangePi 3; adds RTL8723CS WiFi with power sequencing on pine-h64; enables USB3 (analog/dwc3); context adjustments
H616 Board-Specific Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-x96-mate-enable-emac1.patch, patch/.../arm64-dts-sun50i-h616-bananapi-m4-zero-add-pinctrl.patch, patch/.../arm64-dts-sun50i-h616-bananapi-m4-berry-fix-rgmii-pins.patch, patch/.../arm64-dts-sun50i-h616-increase-bl31-reserved-memory.patch, patch/.../arm64-dts-sun50i-h616-orangepi-zero2-zero3-add-wifi.patch, patch/.../arm64-dts-sun50i-h616-orangepi-zero2-enable-expansion-board-usb.patch, patch/.../arm64-dts-sun50i-h616-orangepi-zero2-fix-led-functions.patch
Enables EMAC1/MDIO for x96-mate; adds WiFi status markers; minor pin/hunk context adjustments across boards
H616 Generic Node/Property Additions
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-i2c-uart-pinctrl.patch, patch/.../arm64-dts-sun50i-h616-add-pwm-nodes.patch, patch/.../arm64-dts-sun50i-h616-add-vpu-node.patch, patch/.../arm64-dts-sun50i-h6-h616-add-sunxi-info-nodes.patch
Adds pinctrl configurations for I2C/UART; expands watchdog/mmc2_pins nodes; adjusts crypto/syscon address ranges; adds r_rsb addressing properties
A64 & H5 Device Tree Updates
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-a64-pinephone-fix-mailbox.patch, patch/.../arm64-dts-sun50i-a64-pine64-add-spi0.patch, patch/.../arm64-dts-sun50i-a64-olinuxino-add-regulator-audio-mmc.patch, patch/.../arm64-dts-sun50i-h5-nanopi-neo2-add-regulator-led-trigger.patch, patch/.../arm64-dts-sun50i-h5-orangepi-prime-add-regulator.patch
Updates metadata/descriptions for pinephone; adds SPI0 with flash partitions for pine64; adds regulators/audio for olinuxino and nanopi variants
ARM (32-bit) Device Tree Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/arm-dts-sun4i-a10-cubieboard-green-LED-mmc0-default-trigger.patch, patch/.../arm-dts-sun7i-a20-cubietruck-green-LED-mmc0-default-trigger.patch, patch/.../arm-dts-sun7i-a20-cubietruck-disable-oob-irq-brcm-wifi.patch, patch/.../arm-dts-sun7i-a20-bananapro-add-AXP209-regulators.patch, patch/.../arm-dts-sun7i-a20-bananapro-add-hdmi-connector-de.patch, patch/.../arm-dts-sun8i-h2-plus-orangepi-zero-fix-usb_otg-dr_mode.patch, patch/.../arm-dts-sun8i-h3-nanopi-duo2-enable-emac.patch, patch/.../arm-dts-sunxi-h3-h5.dtsi-add-i2s0-i2s1-pins.patch, patch/.../arm-dts-sun8i-r40-bananapi-m2-ultra-add-codec-analog.patch
Adds LED triggers (mmc0); adds AXP209 regulator support; adds HDMI/display/AHCI nodes for bananapi variants; fixes USB OTG mode; adds I2S0/1 and codec-analog pins; various hunk adjustments
Driver Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/drv-nvmem-sunxi-add-h616-support.patch, patch/.../drv-spidev-add-armbian-spi-dev-compatible.patch
Updates NVMEM hunk headers for H616; adds "spi-dev" to spidev device IDs
Auxiliary Patches
patch/kernel/archive/sunxi-6.18/patches.armbian/arm-dts-sunxi-h3-h5.dtsi-add-i2s0-i2s1-pins.patch, patch/.../arm-dts-sunxi-h3-h5.dtsi-add-i2s0-i2s1-pins.patch, patch/.../arm64-dts-axp209-axp22x-axp81x-axp803-add-led-charger.patch
Adds I2S pin definitions; updates AXP power management LED charger hunk context
Series Configuration
patch/kernel/archive/sunxi-6.18/series.conf
Complete rewrite of patch series list: removes old patch entries and introduces 138+ new numbered patches (0001–0702 range) with new device-tree, audio, EMAC, and DRM categories

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • AGM1968
  • JohnTheCoolingFan
  • PanderMusubi
  • TheSnowfield
  • Tonymac32
  • chraac
  • janprunk
  • krachlatte
  • pyavitz
  • schwar3kat
  • sgjava
  • teknoid
  • igorpecovnik

🐰 Whiskers twitching with delight,
Device trees bloom in morning light,
EMAC hops, audio sings so true,
H616 and kin get patches new,
Sunxi dreams in silicon take flight! 🌾✨

🚥 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 directly reflects the main objective of the pull request: a comprehensive refactor of the sunxi patchset to reorganize, group, and separate patches for improved maintainability.
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.


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 10, 2026
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines and removed size/small PR with less then 50 lines labels Jan 10, 2026
@EvilOlaf
Copy link
Copy Markdown
Member Author

okay, now we know the majority of patches don't depend on others which is good. Those who actually have dependencies have been "chained" together by numeric prefix.

I think that's a good base as it is for going further with stuff like abandoning series.conf or trying to unchain dependencies once and for all.

@EvilOlaf EvilOlaf marked this pull request as ready for review January 10, 2026 18:54
@EvilOlaf EvilOlaf changed the title WIP: sunxi: refactor full patchset sunxi: refactor full patchset Jan 10, 2026
@EvilOlaf
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 10, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 0

Caution

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

⚠️ Outside diff range comments (5)
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-i2c-uart-pinctrl.patch (1)

109-112: UART function properties contain copy-paste errors.

Lines 109-112, 115-118, 121-124, and 127-130 reference incorrect function properties. The pinctrl nodes for uart3, uart4 all incorrectly specify function = "uart2" instead of matching their respective UART interfaces.

🐛 Proposed fix for UART function property corrections
-			/omit-if-no-ref/
-			uart3_pi_pins: uart3-pi-pins {
-				pins = "PI9", "PI10";
-				function = "uart2";
-			};
-
-			/omit-if-no-ref/
-			uart3_pi_rts_cts_pins: uart3-pi-rts-cts-pins {
-				pins = "PI11", "PI12";
-				function = "uart2";
-			};
-
-			/omit-if-no-ref/
-			uart4_pi_pins: uart4-pi-pins {
-				pins = "PI13", "PI14";
-				function = "uart2";
-			};
-
-			/omit-if-no-ref/
-			uart4_pi_rts_cts_pins: uart4-pi-rts-cts-pins {
-				pins = "PI15", "PI16";
-				function = "uart2";
+			/omit-if-no-ref/
+			uart3_pi_pins: uart3-pi-pins {
+				pins = "PI9", "PI10";
+				function = "uart3";
+			};
+
+			/omit-if-no-ref/
+			uart3_pi_rts_cts_pins: uart3-pi-rts-cts-pins {
+				pins = "PI11", "PI12";
+				function = "uart3";
+			};
+
+			/omit-if-no-ref/
+			uart4_pi_pins: uart4-pi-pins {
+				pins = "PI13", "PI14";
+				function = "uart4";
+			};
+
+			/omit-if-no-ref/
+			uart4_pi_rts_cts_pins: uart4-pi-rts-cts-pins {
+				pins = "PI15", "PI16";
+				function = "uart4";
 			};

Also applies to: 115-118, 121-124, 127-130

patch/kernel/archive/sunxi-6.18/patches.armbian/drv-spidev-add-armbian-spi-dev-compatible.patch (1)

40-40: Device Tree reference in ACPI-specific function is misleading.

Line 40 adds a dev_info message mentioning "DT" (Device Tree) inside spidev_acpi_check(), which is specifically for ACPI-based device probing. ACPI and Device Tree are mutually exclusive firmware interfaces used on different platforms. This message could confuse users on ACPI systems since the DT guidance doesn't apply there.

Suggested fix

Either remove the line or adjust it to be ACPI-specific:

-	dev_info(dev, "Use a compatible alias string like spi-dev in DT\n");

Or if guidance is needed for ACPI context:

-	dev_info(dev, "Use a compatible alias string like spi-dev in DT\n");
+	dev_info(dev, "Use proper ACPI device identifiers in production\n");
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h5-orangepi-prime-add-regulator.patch (1)

14-18: Remove the unnecessary pinctrl include.

The added #include <dt-bindings/pinctrl/sun4i-a10.h> is unused in this patch. The changes only involve regulator definitions and CPU supply references, which do not require pinctrl constants. This appears to be a copy-paste artifact that persists across kernel versions.

patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-add-pwm-nodes.patch (2)

123-126: Inconsistent /omit-if-no-ref/ usage on pwm5_pin.

The pwm5_pin node (lines 123-126) lacks the /omit-if-no-ref/ directive, while all other PWM pin configurations (pwm0-pwm4 with their various pin alternatives) consistently include it. This inconsistency means pwm5_pin will always be included in the compiled device tree even when unused.

Please verify if this is intentional or if pwm5_pin should follow the same pattern as the other PWM pins.

🔧 Proposed fix to add /omit-if-no-ref/
+			/omit-if-no-ref/
 			pwm5_pin: pwm5-pin {
 				pins = "PA12";
 				function = "pwm5";
 			};

32-54: Add /omit-if-no-ref/ to pwm5_pin for consistency with other PWM pin configurations.

The pwm5_pin node (lines 123-126) is missing the /omit-if-no-ref/ directive that appears on all other PWM pin configurations (pwm0_pin, pwm1_pg_pin, pwm1_ph_pin, etc.). This should be added for consistency:

Diff
-			pwm5_pin: pwm5-pin {
+			/omit-if-no-ref/
+			pwm5_pin: pwm5-pin {
 				pins = "PA12";
 				function = "pwm5";
 			};
🧹 Nitpick comments (1)
patch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun50i-h616-x96-mate-enable-emac1.patch (1)

49-49: Extra blank line before &hdmi node.

There's an extra blank line here. While not a functional issue, removing it would improve consistency with standard device tree formatting.

♻️ Optional cleanup
 };
 
-
 &hdmi {

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Jan 11, 2026
@github-actions
Copy link
Copy Markdown
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 11, 2026
@EvilOlaf EvilOlaf merged commit d79582d into armbian:main Jan 11, 2026
13 checks passed
@EvilOlaf EvilOlaf deleted the sunxi-patches branch January 11, 2026 19:31
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.

2 participants