Repository navigation
[bsp][spacemit/k1] first version - #11132
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
There was a problem hiding this comment.
Pull request overview
This PR introduces the first version of a new Board Support Package (BSP) for the Spacemit K1 platform to RT-Thread. The changes add comprehensive driver support across multiple hardware subsystems including SPI, GPIO, power management, reset control, and various peripheral devices.
Changes:
- New BSP infrastructure for Spacemit K1 platform
- Driver implementations for SPI/QSPI, GPIO, thermal, serial, RTC, reset controller, regulators, PWM, power management, pinctrl, mailbox, and input devices
- Multi-Function Device (MFD) support for Spacemit PMIC
- SoC-specific support including remote processor, TCM memory, and SoC information
Reviewed changes
Copilot reviewed 96 out of 162 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| bsp/spacemit/dm/thermal/* | Thermal management driver for K1X |
| bsp/spacemit/dm/spi/* | SPI and QSPI controller drivers |
| bsp/spacemit/dm/soc/* | SoC info, IPI, TCM, and remote processor support |
| bsp/spacemit/dm/serial/* | PXA UART driver with DMA support |
| bsp/spacemit/dm/rtc/* | Spacemit PMIC RTC driver |
| bsp/spacemit/dm/reset/* | K1X reset controller driver |
| bsp/spacemit/dm/regulator/* | PMIC power regulator driver |
| bsp/spacemit/dm/pwm/* | PXA PWM driver |
| bsp/spacemit/dm/power/* | Reboot mode handler |
| bsp/spacemit/dm/pmdomain/* | Power domain controller |
| bsp/spacemit/dm/pinctrl/* | PMIC pinctrl driver |
| bsp/spacemit/dm/pin/* | K1X GPIO driver |
| bsp/spacemit/dm/mfd/* | Spacemit PMIC MFD driver |
| bsp/spacemit/dm/mailbox/* | K1X mailbox driver |
| bsp/spacemit/dm/input/* | PMIC power key input driver |
| bsp/spacemit/dm/include/* | TCM memory allocation header |
06926c3 to
7be2a4c
Compare
61214e8 to
cc5f733
Compare
|
@Rbb666 SPACEMIT K1 已在新版本 RISC-V 上验证通过 |
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate driver defects affect memory safety, interrupt initialization, voltage programming, PWM behavior, and error handling.
13 open issues
Preserve signed PMIC read errors on RV64 · New Propagate DDR parent-switch failures · New Preserve PWM duty cycle while disabled · New Correct the secondary-channel bit test · New Handle partial PWM updates safely · New Release only valid clock handles · New Release only valid reset handles · New Handle PWM registration failures · New Validate device-tree CPU indices · New Clear freed heap pointers · New Report the configured 3.3 V ADC reference · New Update PWM enabled state only on success · New Preserve PWM configuration errors during restoration · New
Review effort: Balanced
Signed-off-by: GuEe-GUI <2991707448@qq.com>
Signed-off-by: GuEe-GUI <2991707448@qq.com>
Signed-off-by: GuEe-GUI <2991707448@qq.com>
rt_hw_atomic_compare_exchange_strong() reused the expected-value register for the store-conditional status. When sc failed, the retry compared against the failure status instead of the original expected value, violating strong compare-exchange semantics. This could make completion wakeup treat an uncompleted state as a waiting thread pointer and call rt_thread_resume(NULL). Keep the expected value separate from the sc status and use early-clobber constraints to prevent outputs from overlapping inputs still needed by the assembly. Validation: - Built the SpacemiT K1 BSP with the RISC-V64 musl GCC toolchain. - Verified the generated CAS instructions by disassembly. Signed-off-by: GuEe-GUI <2991707448@qq.com>
📌 Code Review Assignment🏷️ Tag: workflowReviewers: @Rbb666 @kurisaW @supperthomas Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-10-19 18:09 CST)
📝 Review Instructions
|
|
@Rbb666 Copilot 相关审核建议已处理,CI已添加 |


拉取/合并请求描述:(PR description)
[
Part of https://github.com//pull/10320
New BSP for
spacemit/k1]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up