Skip to content

Conversation

@EvilOlaf
Copy link
Member

@EvilOlaf EvilOlaf commented Dec 20, 2025

Description

fwiw. At least something to start of when adding patches for more recent Allwinner SoCs. Perhaps this is useful. Maybe not.

How Has This Been Tested?

  • build sunxi64
  • boot. nope. no hw

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 SPDIF audio output support for Allwinner A523.
    • Added I2S audio controller support for Allwinner A523 (four controllers).
    • Added DMA controller support for Allwinner A523.
    • Added Ethernet (GMAC200) support for Allwinner A523, A527, and T527 boards.
    • Enabled second Ethernet port on multiple Allwinner development boards.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Walkthrough

This patch series adds hardware support for Allwinner A523/T527 SoCs to the sunxi 6.18 kernel by introducing device tree bindings for audio (I2S, SPDIF), DMA controllers, and Ethernet, along with driver modifications for SPDIF TX clock configuration and board-level device tree enablement for two A527 boards.

Changes

Cohort / File(s) Change Summary
ASoC Audio Bindings
Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml, Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
Extended I2S and SPDIF device tree bindings to support A523 with new compatible entries and clock/DMA configurations. SPDIF binding now supports variable clock counts (2–3 items) and conditional clock naming based on device compatibility.
SPDIF Driver Implementation
sound/soc/sunxi/sun4i-spdif.c
Added per-quirks TX clock name field and A523 quirks instance with customizable clock naming ("tx" for A523 vs. default "spdif"). Updated probe logic to use quirks-provided clock name for devm_clk_get.
A523 Device Tree Core Support
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
Added DMA controller nodes (main and MCU), GMAC200 Ethernet controller with MDIO/PHY config, SPDIF device node, four I2S controller nodes (i2s0–i2s3), and I2S/SPDIF pinmux definitions with wired peripheral DMA mappings.
A527 Board Ethernet Enablement
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts, arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts, arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
Enabled second Ethernet port (GMAC1) on three boards by adding gmac1 and mdio1 nodes with PHY configurations, aliases, and reset/delay timings. Renamed existing PHY labels for clarity (ext_rgmii_phy → ext_rgmii0_phy).
DMA Binding Updates
Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
Extended DMA binding to include A523-specific compatibles (allwinner,sun55i-a523-dma, allwinner,sun55i-a523-mcu-dma) while maintaining fallback to A100.
Patch Series Configuration
patch/kernel/archive/sunxi-6.18/series.conf
Formatting adjustments to patch list entries (tab and plus-sign indentation).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring extra attention during review:

  • SPDIF binding conditional logic (allwinner,sun4i-a10-spdif.yaml): Verify if/then/else structure correctly applies clock configurations based on A523 compatibility matching.
  • Clock and interrupt mappings in A523 DTS: Confirm address spaces (0x3002000, 0x7121000, 0x4510000, 0x7116000, etc.), clock indices, and GIC IRQ types match hardware specifications.
  • DMA wiring in A523 DTS: Validate all UART and I2C dma-names ("tx"/"rx" ordering) and dma-cells mappings against DMA controller capabilities.
  • Board-specific PHY resets and aliases: On A527 boards, ensure PHY label renames (ext_rgmii_phy → ext_rgmii0_phy) are consistent across all references and new ext_rgmii1_phy nodes have correct GPIO pin numbers and reset timing.
  • GMAC1 Ethernet controller configuration: Verify MDIO bus numbering (mdio1) and phy-handle references align with hardware design.

Possibly related PRs

Suggested reviewers

  • PanderMusubi
  • igorpecovnik
  • Tonymac32
  • chraac
  • krachlatte

Poem

🐰 Hop, skip, and a bound—the A523 is found!
New clocks and new nodes dance all around,
SPDIF sings, I2S chimes, DMA flows with time,
Ethernet gallops, patches align in rhyme! 🎵✨

Pre-merge checks and finishing touches

✅ 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 clearly and specifically describes the main change: backporting A523/T527-related patches from Linux 6.19-rc1 for sunxi support, which aligns with the changeset of 15 patches adding device tree bindings, driver support, and hardware configuration for these Allwinner SoCs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 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 69e8482 and e6cc4de.

📒 Files selected for processing (14)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-spdif-Add-compa.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-sun4i-spdif-Support-SPDIF-output-on-A523-family.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-DMA-controller-device-n.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-GMAC200-ethernet-contro.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-node-for-SPDIF-b.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch (1 hunks)
  • patch/kernel/archive/sunxi-6.18/series.conf (3 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
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: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.
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.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub API (https://api.github.com/repos/armbian/build/pulls/{pr_number}/files) to get the complete picture of what files are being added or modified, especially for U-Boot patches that will be applied during the build process.
Learnt from: EvilOlaf
Repo: armbian/build PR: 8428
File: config/boards/lckfb-taishanpi.csc:5-9
Timestamp: 2025-07-25T03:51:50.830Z
Learning: When reviewing PRs in the Armbian build system, U-Boot defconfig files and patches may be added as part of the PR changes but might not be visible in the current repository clone state during review. It's important to check the actual PR file changes directly via GitHub or the PR API to get the complete picture of what files are being added or modified.
Learnt from: rpardini
Repo: armbian/build PR: 8879
File: config/sources/families/uefi-x86.conf:0-0
Timestamp: 2025-11-06T15:36:04.682Z
Learning: As of PR #8879, the uefi-x86 family in the Armbian build system now includes kernel patches for the first time. The current and edge branches for uefi-x86 are specifically configured for Apple T2-based x86 machines, including T2-specific patches from the linux-t2 project and custom kernel configuration options for Apple hardware drivers.
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.
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.
Learnt from: leggewie
Repo: armbian/build PR: 0
File: :0-0
Timestamp: 2025-08-29T18:44:47.732Z
Learning: When creating GitHub issues for code improvements in the Armbian build project, include the relevant patches/diffs in the issue description or open a PR directly instead of just describing the changes. This makes it more efficient for the assignee to handle the improvements.
📚 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/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-node-for-SPDIF-b.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-DMA-controller-device-n.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-GMAC200-ethernet-contro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-spdif-Add-compa.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/series.conf
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-sun4i-spdif-Support-SPDIF-output-on-A523-family.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/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-DMA-controller-device-n.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-spdif-Add-compa.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/series.conf
📚 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/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-DMA-controller-device-n.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/series.conf
📚 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/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-12-13T11:45:02.422Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:17-25
Timestamp: 2025-12-13T11:45:02.422Z
Learning: In the SpacemiT U-Boot patches for Armbian (patch/u-boot/legacy/u-boot-spacemit-k1/), the environment variable `devnum` is set to the device name string (e.g., "mmc", "nvme") rather than a numeric index, and `distro_bootpart` holds the partition number. This implementation aligns with mainline U-Boot conventions for the SpacemiT platform and has been verified to work correctly by the maintainer.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch
  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-node-for-SPDIF-b.patch
📚 Learning: 2025-05-29T01:56:01.604Z
Learnt from: djurny
Repo: armbian/build PR: 8235
File: packages/bsp/mvebu/helios4/helios4-wol.service:0-0
Timestamp: 2025-05-29T01:56:01.604Z
Learning: For ARM-based devices like Helios4 that use DeviceTree, the expected systemd network interface naming scheme is "end[0-9]+" (DeviceTree alias index), making the regex "^(eth|en[do])[0-9]+" appropriate as it covers traditional "eth", PCI on-board "eno", and DeviceTree "end" interfaces without unnecessary "enp" (PCI slot) support.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch
📚 Learning: 2025-03-31T22:20:41.849Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:73-75
Timestamp: 2025-03-31T22:20:41.849Z
Learning: When porting patches between U-Boot versions (like from 2025.01 to 2025.04), rpardini prefers to maintain patches as-is rather than introducing refactoring changes, even when potential improvements are identified. This approach prioritizes consistency and reduces the risk of introducing new issues.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch
  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-08-02T14:59:28.145Z
Learnt from: amazingfate
Repo: armbian/build PR: 8453
File: lib/functions/compilation/patch/drivers_network.sh:213-216
Timestamp: 2025-08-02T14:59:28.145Z
Learning: The wireless driver patches wireless-rtl8812au-Fix-6.16.patch, wireless-rtl8811cu-Fix-6.16.patch, and wireless-rtl88x2bu-Fix-6.16.patch in the Armbian build system are backward compatible and can be applied unconditionally without version checks, even though they're named for 6.16+ fixes.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-09-11T06:06:52.328Z
Learnt from: SuperKali
Repo: armbian/build PR: 8608
File: lib/functions/compilation/patch/drivers_network.sh:361-363
Timestamp: 2025-09-11T06:06:52.328Z
Learning: For the RTW88 SDIO RF path detection fix patch (004-rtw88-sdio-rf-path-detection-fix.patch), SuperKali prefers using exact version matching (eq 6.1 || eq 6.16) rather than range checks, as the patch has only been tested on those specific kernel versions and may be mainstreamed soon.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-03-31T22:20:48.475Z
Learnt from: rpardini
Repo: armbian/build PR: 8044
File: patch/u-boot/v2025.04/cmd-fileenv-read-string-from-file-into-env.patch:76-86
Timestamp: 2025-03-31T22:20:48.475Z
Learning: For the Armbian build project, maintaining consistency with existing patches across U-Boot versions (such as between 2025.01 and 2025.04) is prioritized over refactoring individual patches for code improvements.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-07-23T07:30:52.265Z
Learnt from: EvilOlaf
Repo: armbian/build PR: 8417
File: config/boards/orangepi5pro.csc:57-58
Timestamp: 2025-07-23T07:30:52.265Z
Learning: In the Armbian build system, BOOTPATCHDIR can contain board-specific subdirectories (e.g., board_orangepi5pro) for applying patches to specific boards only. The framework automatically checks if such board-specific subdirectories exist for the board being built and applies those patches accordingly.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-09-14T11:37:35.089Z
Learnt from: amazingfate
Repo: armbian/build PR: 8619
File: config/sources/families/rockchip.conf:65-72
Timestamp: 2025-09-14T11:37:35.089Z
Learning: In the Armbian build system, patch directories referenced in BOOTPATCHDIR and KERNELPATCHDIR configurations can be non-existent without causing build failures. Empty patch directories are also ignored by git, so missing patch directories should not be flagged as errors during code review.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
📚 Learning: 2025-12-13T11:39:08.046Z
Learnt from: pyavitz
Repo: armbian/build PR: 9058
File: patch/u-boot/legacy/u-boot-spacemit-k1/003-SpacemiT-K1X-Fixups.patch:28-67
Timestamp: 2025-12-13T11:39:08.046Z
Learning: In the Armbian build system for SpacemiT U-Boot patches (patch/u-boot/legacy/u-boot-spacemit-k1/), alignment with mainline U-Boot behavior is prioritized. For example, in boot mode handling, leaving devnum unchanged in the default case (when devtype is cleared) follows mainline conventions rather than explicitly clearing it to handle edge cases.

Applied to files:

  • patch/kernel/archive/sunxi-6.18/series.conf
🔇 Additional comments (18)
patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-SPDIF-TX-pin-on-PB-and-.patch (1)

36-48: LGTM - Clean SPDIF pinmux definitions.

The pinmux nodes for SPDIF TX on PB8 and PI10 are well-structured with proper /omit-if-no-ref/ directives to prune unused pins. The upstream patch metadata is complete with proper attribution.

patch/kernel/archive/sunxi-6.18/series.conf (1)

374-394: LGTM - Backport patches are properly organized.

The patch ordering is logical: DT bindings first, followed by driver changes, then DT nodes, and finally board-specific enablement patches. The section header clearly identifies these as 6.19-rc1 backports.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-I2S2-pins-on-PI-pin-gro.patch (1)

27-33: LGTM - I2S2 pinmux node is properly defined.

The pinmux node for I2S2 on PI pin group follows the same pattern as other audio pins in the dtsi with proper /omit-if-no-ref/ and bias-disable settings.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-i2s-Add-compati.patch (1)

30-34: LGTM - DT binding extension is correct.

The enum pattern correctly allows allwinner,sun55i-a523-i2s to fall back to allwinner,sun50i-r329-i2s, maintaining driver compatibility. This aligns with the I2S device node patches in the series.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-node-for-SPDIF-b.patch (1)

26-39: LGTM - SPDIF device node is well-formed.

The SPDIF node correctly uses the MCU DMA controller with separate tx/rx clocks. The shared DMA channel (2) for both directions is typical for bidirectional audio peripherals with a single DRQ endpoint.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-device-nodes-for-I2S-co.patch (1)

28-82: LGTM - I2S controller nodes are consistently defined.

All four I2S controller nodes follow a consistent pattern with sequential register bases, IRQs, and distinct DMA channels (3-6). The dual compatible with sun50i-r329-i2s fallback ensures driver compatibility.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-dt-bindings-dma-allwinner-sun50i-a64-dma-Add-compati.patch (1)

30-35: LGTM - DMA bindings correctly extended.

The enum pattern properly adds both A523 DMA controllers (system and MCU) with the sun50i-a100-dma fallback, consistent with the device node patches in this series.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-DMA-controller-device-n.patch (3)

150-161: LGTM - Main DMA controller node is well-defined.

The primary DMA controller with 16 channels and 54 request lines correctly uses the sun50i-a100-dma fallback for driver reuse. The bus and mbus clock configuration follows the established pattern for Allwinner DMA controllers.


179-190: LGTM - MCU DMA controller properly configured.

The MCU domain DMA controller with 15 request lines (vs 54 for main DMA) appropriately reflects the reduced peripheral set in the MCU domain. This will serve the I2S and SPDIF nodes added in companion patches.


20-91: DMA wiring for UARTs and I2C looks correct.

The DMA channel assignments are logically grouped (UARTs 14-21, I2C 43-49) and the dma-names ordering follows driver conventions (UARTs: tx/rx, I2C: rx/tx).

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a523-Add-GMAC200-ethernet-contro.patch (1)

1-93: Clean upstream backport with proper DT structure.

This patch correctly adds GMAC200 support following established STMMAC/DWMAC conventions. The node is appropriately disabled by default in the SoC-level dtsi, and board-specific dts files (like the OrangePi 4A and Avaota A1 patches in this PR) enable it as needed. The pin assignments, clock references, and AXI/MTL configurations align with vendor BSP patterns.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-sun4i-spdif-Support-SPDIF-output-on-A523-family.patch (1)

1-89: Well-structured driver update with backward compatibility.

The patch cleanly extends the sun4i-spdif driver to support the A523's separate TX/RX clock naming convention. The implementation properly:

  • Defaults to "spdif" for existing SoCs
  • Uses quirks->tx_clk_name only when explicitly set
  • Updates error messages to reflect the actual clock name being requested

This maintains full backward compatibility while enabling A523 support.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-orangepi-4a-Enable-Ethernet.patch (1)

1-69: Properly configured single-Ethernet enablement.

The patch correctly enables the GMAC200 (gmac1) for the OrangePi 4A with:

  • Appropriate PHY reset timing for the Motorcomm YT8531 (10ms assert, 150ms deassert)
  • Correct interrupt polarity (active-low)
  • Proper RGMII-ID configuration with internal delays

The ethernet0 = &gmac1 alias is correct since this board only exposes the second controller (GMAC200), making it the primary/first Ethernet interface from the user's perspective.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-t527-avaota-a1-enable-second-Eth.patch (1)

1-88: Clean dual-Ethernet configuration with consistent naming.

The patch properly enables the second Ethernet port while maintaining consistency:

  • Label rename from ext_rgmii_phy to ext_rgmii0_phy aligns with the dual-controller naming scheme
  • Separate MDIO buses (mdio0/mdio1) correctly handle both PHYs at address 1
  • Aliases (ethernet0 → gmac0, ethernet1 → gmac1) provide predictable interface naming

The different delay property names (allwinner,tx-delay-ps for gmac0 vs tx-internal-delay-ps for gmac1) are correct—gmac0 uses the syscon-based Allwinner delay mechanism while gmac1 uses STMMAC's internal delay feature.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-ASoC-dt-bindings-allwinner-sun4i-a10-spdif-Add-compa.patch (1)

1-103: Well-structured DT binding schema extension.

The patch correctly extends the SPDIF bindings to support A523's separate TX/RX clocks:

  • The minItems: 2, maxItems: 3 change accommodates both legacy (2 clocks) and A523 (3 clocks) configurations
  • The conditional if/else block properly constrains clock names: apb/tx/rx for A523, apb/spdif for others
  • Adding sun55i-a523-spdif to the reset requirement list is correct

The schema maintains backward compatibility while adding the new variant.

patch/kernel/archive/sunxi-6.18/patches.backports/0001-arm64-dts-allwinner-a527-cubie-a5e-Enable-second-Eth.patch (3)

1-24: LGTM! Clean upstream backport.

The patch header shows proper upstream attribution from Chen-Yu Tsai with review tags from Allwinner and networking subsystem maintainers. This is a clean backport from Linux 6.19-rc1 for A527/T527 support.


93-94: Good: Regulator ramp delay aligns with PHY reset timing.

The 150ms ramp delay correctly matches the reset-deassert-us = <150000> timing specified for the PHY (line 82), ensuring the regulator stabilizes before the PHY comes out of reset.


45-46: The inconsistent delay property names between gmac0 and gmac1 are intentional, not an oversight.

gmac0 uses vendor-specific properties (allwinner,tx-delay-ps and allwinner,rx-delay-ps) because it is an older MAC controller, while gmac1 (GMAC200) uses the generic standard properties (tx-internal-delay-ps and rx-internal-delay-ps) supported by newer kernel versions. This patch has been reviewed and merged upstream by networking maintainers, confirming the hardware controllers require different property conventions. Both Ethernet ports will initialize correctly given this was validated during upstream review.


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 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 Dec 20, 2025
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/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

1 participant