Skip to content

增加全志 V861 SPIF 控制器与 NOR bitbang 探测 - #12093

Open
cms19859230182-lang wants to merge 8 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/avaota-f2-spif
Open

cms19859230182-lang wants to merge 8 commits into
RT-Thread:masterfrom
cms19859230182-lang:bsp/avaota-f2-spif

Conversation

@cms19859230182-lang

Copy link
Copy Markdown
Contributor

Summary

  • 为 Avaota F2 / V861(sun252iw1)增加 SPIF0 控制器最小驱动:时钟/引脚、DMA 描述符、JEDEC RDID、Fast Read(0x0B,dummy 按时钟周期计)
  • 增加 PC0–PC5 GPIO bitbang NOR 探测路径,便于对照验证
  • 板测:PY25Q128 RDID 85 20 18;SPIF 4K@50MHz FAST 与 bitbang 读出一致(dummy=8)

依赖/叠放在既有 V861 C907 系列之上(含 #12077–#12081 栈)。

Test plan

  • FEL 加载 C907:nor-bb OK + spif0 OK + 4K@50M FAST OK
  • SMP-OK 仍通过
  • CI riscv-none / format(若有)按仓库惯例跟进

cms19859230182-lang and others added 7 commits November 23, 2026 16:05
新增 bsp/allwinner/avaota-f2(UART/msh 最小 BSP),并在 bsp/README.md 登记。
按 review 删除 ACCEPTANCE.md,编译说明改为推荐 Env 2.x / sdk。

board.dtb 不再假设树里已有:board/SConscript 调用 board/gen_board_dtb.py 在构建时生成,
builtin_fdt.o 显式依赖该产物,源变化会重新生成。生成需要 python3 + fdt 模块,
README 写明了这一步;board/board.dtb 作为构建产物加入 .gitignore。
新增 avaota-f2-e907,并更新 C907 侧 DRAM ping 应答样例以便异构演示。
按 review 删除 ACCEPTANCE.md,编译说明改为推荐 Env 2.x / sdk。

board.dtb 不再入库:board/SConscript 调用 gen_board_dtb.py 在构建时生成,
builtin_fdt.o 显式依赖该产物,设备树源变化会重新生成。生成需要 python3 + fdt
模块,README 已注明;board/board.dtb 加入 .gitignore。
ACK 在 echo 的 len/payload/seq 全部写完之后才发布(doorbell 与 DRAM fallback
两条 recv 路径,C907/E907 同源);MSGBOX 硬复位只在启动对端之前做一次
(E907 用 once 标志,C907 只确保时钟与解复位、不再脉冲复位),
wait/kick/send/recv/openamp_*_start 都不再复位两侧邮箱,避免清掉已发出的 token。

C907/E907 的 drv_openamp.c 按仓库 clang-format 排好(OFF_* 宏行尾注释单空格),过 CI format check。
- 增加 C907 双核 SMP(board_smp/cpuport_smp,CLINT MSIP IPI,RT_CPUS_NR=2)。
- 同步 C907/E907:board.dts + dtc 生成 board.dtb(删 gen_board_dtb.py)、
  uart0 走 PLIC INT_RX、trap 分发 M 外部中断、rtconfig.h 由 Kconfig/.config 生成。
- driver 用 RTT_ROOT 定位 libfdt,scons --dist 项目也能编。
- CI:riscv-none leg 加入 allwinner/avaota-f2 与 avaota-f2-e907,并安装 dtc。
- 未上板验证;本机只做干净构建(含 --dist 项目)。
- clang-format 22.1.8:对齐 board/plic.c、board/plic.h 的宏定义与注释(无语义改动)。

Co-Authored-By: DeepSeek Flash 1017
Co-Authored-By: Gemini 3.8 Flash
跨核发布 hart 号改用 rt_completion,带超时等待后再读结果;
并带上 MMC CMD8/SDSC 与 C907 PLIC/栈修复。
PowerShell 重定向误写成 UTF-16,导致无法编译;改回 UTF-8。
@github-actions

Copy link
Copy Markdown

👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread!

为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。
To ensure your code complies with RT-Thread's coding style, please run the code formatting workflow by following the steps below (If the formatting of CI fails to run).


🛠 操作步骤 | Steps

  1. 前往 Actions 页面 | Go to the Actions page
    点击进入工作流 → | Click to open workflow →

  2. 点击 Run workflow | Click Run workflow

  • Use workflow from 保持默认分支(通常为 master)
    Keep the default branch (usually master) in Use workflow from
  • 在 branch 输入框填写 PR 分支 bsp/avaota-f2-spif
    Enter PR branch bsp/avaota-f2-spif in the branch field
  • 设置需排除的文件/目录(目录请以"/"结尾)
    Set files/directories to exclude (directories should end with "/")
  1. 等待工作流完成 | Wait for the workflow to complete
    格式化后的代码将作为独立提交推送至你的分支。
    The formatting changes will be pushed to your branch as a separate commit.

完成后,提交将自动更新至 bsp/avaota-f2-spif 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the bsp/avaota-f2-spif branch automatically, and the related Pull Request will be updated.

如有问题欢迎联系我们,再次感谢您的贡献!💐
If you have any questions, feel free to reach out. Thanks again for your contribution!

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

📌 Code Review Assignment

🏷️ Tag: workflow

Reviewers: @Rbb666 @kurisaW @supperthomas

Changed Files (Click to expand)
  • .github/ALL_BSP_COMPILE.json
  • .github/workflows/bsp_buildings.yml

📊 Current Review Status (Last Updated: 2026-12-01 13:17 CST)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@github-actions github-actions Bot added BSP action github action yml imporve labels Nov 28, 2026
{
sum += g_spif_blk[i];
}
if (g_spif_blk[0] != g_spif_rx[0] || g_spif_blk[1] != g_spif_rx[1] ||

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里仅比较两次 SPIF 读取的前 4 字节。后面的 4092 字节有错,测试也会打印 4K FAST OK。请用 bitbang 或已知数据核对整块后再报通过。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我将用最直白,最不绕弯子,最恳切的话告诉您

这个真的是我的 bug 我完全没想到这个问题,,,

板测:PY25Q128 RDID;SPIF DMA Fast Read @50MHz(dummy=8 时钟)。
4K FAST 验收改为与 bitbang READ 整块(4096B)比对,不再只比前 4 字节。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action github action yml imporve BSP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants