Skip to content

[bsp][allwinner] Add F101 YuzukiNeko BSP and driver support - #11877

Open
GuEe-GUI wants to merge 1 commit into
RT-Thread:masterfrom
GuEe-GUI:f101
Open

GuEe-GUI wants to merge 1 commit into
RT-Thread:masterfrom
GuEe-GUI:f101

Conversation

@GuEe-GUI

@GuEe-GUI GuEe-GUI commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

拉取/合并请求描述:(PR description)

[

  • add the F101 YuzukiNeko BSP with M-mode and S-mode configurations
  • add Sun252i F101 DM drivers for clock, reset, pinctrl, DMA, SDIO, SPI, USB, audio, thermal, RTC, PWM, ADC, NVMEM, watchdog, DVFS, G2D, and JPEG
  • add the Sunxi DE0/TCON0 display-output backend for RGB, LVDS, and MIPI-DSI
  • add ST77916 QSPI framebuffer board configuration and validation commands
  • add Sunxi MUSB glue support for CherryUSB
  • fix shared driver framework handling for power domains, DVFS, graphics, UART reset and register shift, QSPI configuration, thermal workqueues, input capture, and DM USB integration

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用clang-format 源码格式化工具确保格式符合RT-Thread代码规范 This PR has been formatted with clang-format and complies with RT-Thread code specification
  • 如果是新增bsp, 已经添加ci检查到.github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查

@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 分支 f101
    Enter PR branch f101 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.

完成后,提交将自动更新至 f101 分支,关联的 Pull Request 也会同步更新。
Once completed, commits will be pushed to the f101 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 Oct 17, 2026 •

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Seven unresolved findings include interrupt-context mutex use, use-after-free risks, build failures, and peripheral correctness issues.

5 open issues
What changed in this PR

Adds the F101 YuzukiNeko BSP with M-mode/S-mode configurations, Sunxi device-model drivers, multimedia support, and display integration.

Changes:

  • Adds board initialization, build configuration, device trees, and validation utilities.
  • Integrates peripheral, audio, graphics, USB, and DVFS support.
  • Updates shared UART, QSPI, thermal, and graphics handling.
File Changes and review notes
components/​drivers/​usb/​Kconfig Adds SoC USB configuration integration.
components/​drivers/​usb/​cherryusb/​port/​musb/​usb_glue_sunxi.c Implements MUSB delay handling.
components/​drivers/​thermal/​Kconfig Selects the system workqueue dependency.
components/​drivers/​spi/​dev_qspi_core.c Synchronizes SPI/QSPI configuration.
components/​drivers/​serial/​device/​8250/​8250-dw.c Adds reset and register-shift handling. critical, 3 votes — line 257: Unconditional reset calls break builds with reset support disabled; select the dependency or guard acquisition, deassertion, and cleanup.
components/​drivers/​graphic/​logo/​logo.c Corrects conversion argument ordering.
components/​drivers/​graphic/​graphic_simple.c Updates plane failure cleanup.
components/​drivers/​graphic/​framebuffer/​SConscript Integrates the ST77916 driver build.
components/​drivers/​graphic/​framebuffer/​Kconfig Adds ST77916 configuration.
bsp/​allwinner/​f101/​usbcrc-send.sh Adds a USB transfer utility.
bsp/​allwinner/​f101/​SConstruct Configures BSP builds and device-tree generation.
bsp/​allwinner/​f101/​SConscript Includes board code and shared drivers.
bsp/​allwinner/​f101/​rtconfig.py Configures the RISC-V toolchain.
bsp/​allwinner/​f101/​Kconfig Defines SoC and board configuration.
bsp/​allwinner/​f101/​f101-yuzukineko.Kconfig Adds boot-mode and display options.
bsp/​allwinner/​f101/​board/​usb_config.h Configures Sunxi MUSB.
bsp/​allwinner/​f101/​board/​SConscript Integrates board initialization into the build.
bsp/​allwinner/​f101/​board/​board.h Declares board initialization.
bsp/​allwinner/​f101/​board/​board.c Implements board setup and shutdown hooks.
bsp/​allwinner/​f101/​applications/​SConscript Selects application sources.
bsp/​allwinner/​f101/​applications/​main.c Adds the startup application.
bsp/​allwinner/​f101/​applications/​fb_rotate.c Adds a framebuffer rotation command.
bsp/​allwinner/​dm/​watchdog/​watchdog-sunxi.c Implements watchdog and machine-reset support.
bsp/​allwinner/​dm/​watchdog/​SConscript Integrates the watchdog build.
bsp/​allwinner/​dm/​watchdog/​Kconfig Adds watchdog configuration.
bsp/​allwinner/​dm/​usb/​usb-sunxi.c Implements MUSB platform glue. moderate, 1 vote — line 171: Failure cleanup disables/unprepares acquired clocks that were never successfully enabled, risking count underflow or shared-clock disruption; track successful enables separately.
bsp/​allwinner/​dm/​usb/​SConscript Integrates USB platform support into the build.
bsp/​allwinner/​dm/​usb/​Kconfig Defines USB dependencies.
bsp/​allwinner/​dm/​thermal/​thermal-sunxi.c Implements calibrated temperature sensing. critical, 2 votes — line 270: Failed zone unregistration leaves work and list entries referencing freed memory; propagate the error and retain resources until unregistration succeeds.
bsp/​allwinner/​dm/​thermal/​SConscript Integrates the thermal driver build.
bsp/​allwinner/​dm/​thermal/​Kconfig Adds thermal driver configuration.
bsp/​allwinner/​dm/​spi/​SConscript Integrates the SPI driver build.
bsp/​allwinner/​dm/​spi/​Kconfig Adds SPI/QSPI configuration.
bsp/​allwinner/​dm/​soc/​SConscript Selects multimedia and accelerator sources.
bsp/​allwinner/​dm/​soc/​Kconfig Defines accelerator and codec options.
bsp/​allwinner/​dm/​soc/​g2d/​g2d.h Defines graphics operation interfaces.
bsp/​allwinner/​dm/​soc/​g2d/​g2d_sunxi_regs.h Defines G2D registers.
bsp/​allwinner/​dm/​soc/​g2d/​g2d_sunxi_hw.h Defines internal G2D interfaces.
bsp/​allwinner/​dm/​soc/​g2d/​g2d_sunxi_format.c Handles pixel formats and surfaces.
bsp/​allwinner/​dm/​soc/​g2d/​g2d_sunxi_cmdlist.c Constructs register command lists.
bsp/​allwinner/​dm/​sdio/​SConscript Integrates the SDIO/MMC driver build.
bsp/​allwinner/​dm/​sdio/​Kconfig Adds MMC controller configuration.
bsp/​allwinner/​dm/​SConscript Collects shared driver directories.
bsp/​allwinner/​dm/​rtc/​SConscript Integrates the RTC driver build.
bsp/​allwinner/​dm/​rtc/​Kconfig Adds RTC and alarm configuration.
bsp/​allwinner/​dm/​reset/​SConscript Integrates reset-controller builds.
bsp/​allwinner/​dm/​reset/​reset-sunxi.c Implements reset-controller operations.
bsp/​allwinner/​dm/​reset/​reset-sun252i-f101.c Maps F101 reset lines.
bsp/​allwinner/​dm/​reset/​Kconfig Defines reset-controller configuration.
bsp/​allwinner/​dm/​pwm/​SConscript Integrates the PWM driver build.
bsp/​allwinner/​dm/​pwm/​Kconfig Adds PWM configuration.
bsp/​allwinner/​dm/​pinctrl/​SConscript Integrates pin-controller builds.
bsp/​allwinner/​dm/​pinctrl/​pinctrl-sun252i-f101.c Defines F101 pin banks and functions.
bsp/​allwinner/​dm/​pinctrl/​Kconfig Adds pin-controller configuration.
bsp/​allwinner/​dm/​nvmem/​SConscript Integrates the SID driver build.
bsp/​allwinner/​dm/​nvmem/​nvmem-sunxi-sid.c Implements read-only eFuse access.
bsp/​allwinner/​dm/​nvmem/​Kconfig Adds SID configuration.
bsp/​allwinner/​dm/​Kconfig Defines shared subsystem configuration paths.
bsp/​allwinner/​dm/​inputcapture/​SConscript Integrates the input-capture build.
bsp/​allwinner/​dm/​inputcapture/​Kconfig Adds IR receiver configuration.
bsp/​allwinner/​dm/​inputcapture/​inputcapture-sunxi-irrx.c Implements IR pulse capture.
bsp/​allwinner/​dm/​input/​touchscreen/​ts-sunxi-tpadc.c Implements resistive touch input. critical, 1 vote — lines 162 and 284: Ignoring unregister failure while the device is open frees an object still referenced by users and device lists; unregister first and propagate failure without freeing resources.
bsp/​allwinner/​dm/​input/​touchscreen/​SConscript Integrates the touchscreen driver build.
bsp/​allwinner/​dm/​input/​touchscreen/​Kconfig Adds touchscreen configuration.
bsp/​allwinner/​dm/​input/​SConscript Collects input driver subdirectories.
bsp/​allwinner/​dm/​include/​sunxi-pngd.h Defines the PNG decoder interface.
bsp/​allwinner/​dm/​include/​sunxi-jpege.h Defines the JPEG encoder interface.
bsp/​allwinner/​dm/​include/​sunxi-jpegd.h Defines JPEG decoder and buffer interfaces.
bsp/​allwinner/​dm/​include/​sunxi-g2d.h Defines the G2D device interface.
bsp/​allwinner/​dm/​include/​sunxi_reset.h Defines reset descriptors.
bsp/​allwinner/​dm/​include/​sunxi_pinctrl.h Defines pin-controller descriptors.
bsp/​allwinner/​dm/​include/​sunxi_ccu.h Defines clock descriptors.
bsp/​allwinner/​dm/​include/​dt-bindings/​reset/​sun252i-f101-ccu.h Defines F101 reset binding IDs.
bsp/​allwinner/​dm/​include/​dt-bindings/​clock/​sun252i-f101-rtc.h Defines RTC clock binding IDs.
bsp/​allwinner/​dm/​include/​dt-bindings/​clock/​sun252i-f101-cpupll.h Defines CPU PLL clock binding IDs.
bsp/​allwinner/​dm/​include/​dt-bindings/​clock/​sun252i-f101-ccu.h Defines peripheral clock binding IDs.
bsp/​allwinner/​dm/​i2c/​SConscript Integrates the TWI driver build.
bsp/​allwinner/​dm/​i2c/​Kconfig Adds TWI configuration.
bsp/​allwinner/​dm/​hwcrypto/​SConscript Integrates hardware cryptography builds.
bsp/​allwinner/​dm/​hwcrypto/​Kconfig Configures AES and RNG support.
bsp/​allwinner/​dm/​graphic/​SConscript Integrates graphics driver directories.
bsp/​allwinner/​dm/​graphic/​framebuffer/​sunxi-display-output.h Defines display-output interfaces.
bsp/​allwinner/​dm/​graphic/​framebuffer/​SConscript Selects display backend sources.
bsp/​allwinner/​dm/​graphic/​framebuffer/​Kconfig Configures DE/TCON display support.
bsp/​allwinner/​dm/​dvfs/​SConscript Collects DVFS drivers.
bsp/​allwinner/​dm/​dvfs/​cpufreq/​SConscript Integrates the CPUfreq driver build.
bsp/​allwinner/​dm/​dvfs/​cpufreq/​Kconfig Adds CPUfreq configuration.
bsp/​allwinner/​dm/​dvfs/​cpufreq/​dvfs-sun252i-f101-cpufreq.c Registers CPU frequency scaling and governor setup.
bsp/​allwinner/​dm/​dts/​sun252i-f101-yuzukineko.dts Assembles the board device tree.
bsp/​allwinner/​dm/​dts/​sun252i-f101-yuzukineko-st77916.dtsi Configures QSPI panel wiring and initialization.
bsp/​allwinner/​dm/​dts/​sun252i-f101-yuzukineko-common.dtsi Describes board resources and peripherals. moderate, 3 votes — line 129: Speaker-enable GPIO bank 8 is unsupported by the A–F pin controller, leaving the amplifier disabled; correct the GPIO or implement the required bank.
bsp/​allwinner/​dm/​dma/​SConscript Integrates the DMA driver build.
bsp/​allwinner/​dm/​dma/​Kconfig Adds DMA configuration.
bsp/​allwinner/​dm/​clock_time/​SConscript Integrates the timer driver build.
bsp/​allwinner/​dm/​clock_time/​Kconfig Adds timer configuration.
bsp/​allwinner/​dm/​clk/​SConscript Integrates F101 clock providers.
bsp/​allwinner/​dm/​clk/​Kconfig Defines clock-controller configuration.
bsp/​allwinner/​dm/​clk/​clk-sun252i-f101-rtc.c Implements the RTC clock provider.
bsp/​allwinner/​dm/​audio/​SConscript Selects audio driver sources.
bsp/​allwinner/​dm/​audio/​Kconfig Defines audio output configuration.
bsp/​allwinner/​dm/​audio/​audio-sunxi.h Defines shared audio interfaces.
bsp/​allwinner/​dm/​audio/​audio-sunxi.c Implements DMA-backed audio output. critical, 1 vote — line 268: DMA completion synchronously restarts transmission and takes a mutex in interrupt context, risking assertion or deadlock; defer restart to a worker or make the entire path ISR-safe.
bsp/​allwinner/​dm/​adc/​SConscript Integrates the GPADC driver build.
bsp/​allwinner/​dm/​adc/​Kconfig Adds GPADC configuration.
bsp/​allwinner/​dm/​adc/​adc-sunxi-gpadc.c Implements ADC configuration and channel access. moderate, 1 vote — line 136: The fixed 2 µs delay is insufficient at supported low sample rates, causing stale reads and premature channel disable; wait for conversion-ready with a bounded, rate-aware timeout.

Review effort: Balanced

Comment thread bsp/allwinner/dm/audio/audio-sunxi.c Outdated
Comment thread bsp/allwinner/dm/input/touchscreen/ts-sunxi-tpadc.c Outdated
Comment thread bsp/allwinner/dm/thermal/thermal-sunxi.c Outdated
Comment thread components/drivers/serial/device/8250/8250-dw.c
Comment thread bsp/allwinner/dm/dts/sun252i-f101-yuzukineko-common.dtsi Outdated
Add initial support for the Allwinner F101S3-based YuzukiNeko board.

- add the F101 YuzukiNeko BSP with M-mode and S-mode configurations
- add Sun252i F101 DM drivers for clock, reset, pinctrl, DMA, SDIO, SPI,
  USB, audio, thermal, RTC, PWM, ADC, NVMEM, watchdog, DVFS, G2D, and JPEG
- add the Sunxi DE0/TCON0 display-output backend for RGB, LVDS, and MIPI-DSI
- add ST77916 QSPI framebuffer board configuration and validation commands
- add Sunxi MUSB glue support for CherryUSB
- fix shared driver framework handling for power domains, DVFS, graphics,
  UART reset and register shift, QSPI configuration, thermal workqueues,
  input capture, and DM USB integration

Signed-off-by: GuEe-GUI <2991707448@qq.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants