SpacemiT: Update EDGE branch to linux-7.1#9784
Conversation
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
Signed-off-by: Patrick Yavitz <pyavitz@gmail.com>
📝 WalkthroughWalkthroughThis PR updates SpacemiT K1 SoC support from kernel 7.0 to 7.1, adding features including CPU frequency scaling, thermal sensor support, SPI and SD card controllers, USB power management refinements, and I2C atomic-mode support. It also includes bug fixes, driver reorganization, and device-tree enhancements across multiple boards. ChangesSpacemiT K1 Support Expansion (7.0 → 7.1)
Sequence Diagram(s)The changes span multiple subsystems (thermal, cpufreq, storage, USB, SPI) without a single unified control flow. Each subsystem (e.g., cpufreq→OPP, thermal sensor probe→zone registration, SDHCI→tuning) follows its own initialization and operation sequence. Since the PR consists of disparate feature additions and refactorings across different hardware modules rather than a single coherent feature flow involving 3+ components, sequence diagrams would be fragmented and not provide actionable insight. Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~75 minutes Rationale: The PR spans ~13 kernel patches plus board configs across thermal, cpufreq, SPI, SDHCI, USB, I2C, ASoC, and network drivers; introduces new subsystems (K1 thermal driver, K1 SPI driver); modifies device-tree bindings for multiple boards; includes logic-dense changes (SDHCI tuning algorithm, I2C PIO refactor, regulator supply tree restructuring); and mixes bug fixes, refactoring, and new features. While many hunks are repetitive DTS node additions or mechanical reorganizations, the heterogeneous nature of changes—spanning driver logic, bindings, DTS, and build config—demands separate reasoning for each functional area. Possibly Related PRs
Suggested Labels
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
patch/kernel/archive/spacemit-7.1/052-OrangePi-RV2-R2S-add-sdcard-and-emmc.patch (1)
80-109:⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd the OPP include for these new CPU supplies.
These
cpu-supplyphandles are only half of the K1 DVFS wiring. Unlike BPI-F3, Milk-V Jupiter, and MusePi Pro in this PR, neither the R2S nor the RV2 hunks add#include "k1-opp.dtsi", so the CPUs still won't get anyoperating-points-v2data forcpufreq-dt.Suggested follow-up
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts @@ `#include` "k1.dtsi" +#include "k1-opp.dtsi" `#include` "k1-pinctrl.dtsi" --- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts +++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts @@ `#include` "k1.dtsi" +#include "k1-opp.dtsi" `#include` "k1-pinctrl.dtsi"Also applies to: 341-370
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/spacemit-7.1/052-OrangePi-RV2-R2S-add-sdcard-and-emmc.patch` around lines 80 - 109, The patch adds cpu-supply phandles for &cpu_0 through &cpu_7 but forgets to include the OPP definitions, so cpufreq-dt has no operating-points-v2 data; add a line to include the K1 OPP file (e.g. add `#include` "k1-opp.dtsi") in the same DTSI that contains the &cpu_0..&cpu_7 cpu-supply entries so the CPUs receive operating-points-v2 for cpufreq-dt.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@patch/kernel/archive/spacemit-7.1/052-OrangePi-RV2-R2S-add-sdcard-and-emmc.patch`:
- Around line 80-109: The patch adds cpu-supply phandles for &cpu_0 through
&cpu_7 but forgets to include the OPP definitions, so cpufreq-dt has no
operating-points-v2 data; add a line to include the K1 OPP file (e.g. add
`#include` "k1-opp.dtsi") in the same DTSI that contains the &cpu_0..&cpu_7
cpu-supply entries so the CPUs receive operating-points-v2 for cpufreq-dt.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ae5c56dc-42b6-4b56-9e95-fb80eff9487e
📒 Files selected for processing (27)
config/boards/bananapif3.confconfig/boards/musepipro.confconfig/sources/families/spacemit.confpatch/kernel/archive/spacemit-7.0/003-PATCH-0-4-regulator-spacemit-p1-Fix-voltage-ranges-and-support-board-power-tree.patchpatch/kernel/archive/spacemit-7.0/004-PATCH-phy-move-spacemit-pcie-driver-to-its-subfolder.patchpatch/kernel/archive/spacemit-7.0/005-PATCH-riscv-dts-spacemit-adapt-regulator-node-name-to-preferred-form.patchpatch/kernel/archive/spacemit-7.0/007-PATCH-v3-phy-k1-usb-add-disconnect-function-support.disablepatch/kernel/archive/spacemit-7.0/009-BananaPi-BPI-F3-Add-SD-card-support.patchpatch/kernel/archive/spacemit-7.0/010-SpacemiT-MusePi-Pro-Add-SD-card-support.patchpatch/kernel/archive/spacemit-7.0/011-PATCH-clk-spacemit-ccu_mix-fix-inverted-condition-in-ccu_mix_trigger_fc.patchpatch/kernel/archive/spacemit-7.0/012-PATCH-1-1-riscv-dts-spacemit-Add-linux-pci-domain-to-PCIe-nodes-for-K1.patchpatch/kernel/archive/spacemit-7.0/013-PATCH-net-next-net-spacemit-Remove-unused-buff_addr-fields.patchpatch/kernel/archive/spacemit-7.0/014-PATCH-net-v2-1-2-net-spacemit-Fix-error-handling-in-emac_alloc_rx_desc_buffers.disablepatch/kernel/archive/spacemit-7.0/016-riscv-dts-spacemit-Add-cpu-scaling-for-K1-SoC.patchpatch/kernel/archive/spacemit-7.0/017-BananaPi-BPI-F3-Assign-the-CPU-power-supply.patchpatch/kernel/archive/spacemit-7.0/018-PATCH-v7-0-2-i2c-spacemit-introduce-pio-for-k1.patchpatch/kernel/archive/spacemit-7.1/001-PATCH-v2-0-2-cpufreq-spacemit-Add-cpufreq-support-for-K1-SoC.patchpatch/kernel/archive/spacemit-7.1/002-PATCH-v2-0-4-spacemit-k1-bananapi-f3-Fix-the-power-source-of-USB3-nodes.patchpatch/kernel/archive/spacemit-7.1/003-PATCH-v5-0-3-thermal-spacemit-Add-support-for-SpacemiT-K1-SoC-thermal-sensor.patchpatch/kernel/archive/spacemit-7.1/004-PATCH-v5-2-2-mfd-simple-mfd-i2c-add-a-reboot-cell-for-the-SpacemiT-P1-chip.patchpatch/kernel/archive/spacemit-7.1/005-PATCH-v8-0-9-riscv-spacemit-enable-SD-card-support-with-UHS-modes-for-OrangePi-RV2.patchpatch/kernel/archive/spacemit-7.1/006-PATCH-v2-riscv-mm-fix-SWIOTLB-initialization-for-systems-with-DRAM-above-4GB.patchpatch/kernel/archive/spacemit-7.1/007-PATCH-v2-ASoC-spacemit-fix-RX-DMA-params-not-set-when-TX-is-running.patchpatch/kernel/archive/spacemit-7.1/008-PATCH-v9-0-3-spi-support-the-SpacemiT-K1-SPI-controller.patchpatch/kernel/archive/spacemit-7.1/050-Update-Milk-V-Jupiter-DTS.patchpatch/kernel/archive/spacemit-7.1/051-Update-MusePi-Pro-DTS.patchpatch/kernel/archive/spacemit-7.1/052-OrangePi-RV2-R2S-add-sdcard-and-emmc.patch
💤 Files with no reviewable changes (13)
- patch/kernel/archive/spacemit-7.0/013-PATCH-net-next-net-spacemit-Remove-unused-buff_addr-fields.patch
- patch/kernel/archive/spacemit-7.0/011-PATCH-clk-spacemit-ccu_mix-fix-inverted-condition-in-ccu_mix_trigger_fc.patch
- patch/kernel/archive/spacemit-7.0/014-PATCH-net-v2-1-2-net-spacemit-Fix-error-handling-in-emac_alloc_rx_desc_buffers.disable
- patch/kernel/archive/spacemit-7.0/012-PATCH-1-1-riscv-dts-spacemit-Add-linux-pci-domain-to-PCIe-nodes-for-K1.patch
- patch/kernel/archive/spacemit-7.0/017-BananaPi-BPI-F3-Assign-the-CPU-power-supply.patch
- patch/kernel/archive/spacemit-7.0/016-riscv-dts-spacemit-Add-cpu-scaling-for-K1-SoC.patch
- patch/kernel/archive/spacemit-7.0/004-PATCH-phy-move-spacemit-pcie-driver-to-its-subfolder.patch
- patch/kernel/archive/spacemit-7.0/010-SpacemiT-MusePi-Pro-Add-SD-card-support.patch
- patch/kernel/archive/spacemit-7.0/005-PATCH-riscv-dts-spacemit-adapt-regulator-node-name-to-preferred-form.patch
- patch/kernel/archive/spacemit-7.0/009-BananaPi-BPI-F3-Add-SD-card-support.patch
- patch/kernel/archive/spacemit-7.0/018-PATCH-v7-0-2-i2c-spacemit-introduce-pio-for-k1.patch
- patch/kernel/archive/spacemit-7.0/007-PATCH-v3-phy-k1-usb-add-disconnect-function-support.disable
- patch/kernel/archive/spacemit-7.0/003-PATCH-0-4-regulator-spacemit-p1-Fix-voltage-ranges-and-support-board-power-tree.patch
|
✅ This PR has been reviewed and approved — all set for merge! |
|
Something suspicious. |
What is the HOST of the runner? |
|
x86 |
Sorry, I'm stupid. I meant the Distro :) Jammy, Noble, Resolute? |
|
|
|
I'm not really sure what that error is. I only adjusted the loglevel and added Actually that section in the conf files should probably be moved to the family file. I've run lots of tests on this and the u-boot from what I can tell is a one size fits all so far. The reason I asked about the DISTRO being used, is the build fails when using gcc-15, which is the default on Resolute. For compilation to succeed it requires |
|
At some point we have to deal with gcc15 and up, because the framework moves forward to resolute or perhaps goes the Debian route some day. From my guts feel it would make more sense to patch the source to the build against more recent compilers. |
Boot tested on BPI-F3 and MusePi Pro
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Chores