mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-23 18:38:38 +08:00
Add Doxygen pages for RT-Thread device-model drivers: platform/OFW, DM core (bus, dm, power), clk/regulator/reset/power-domain, PCI/PIC, Phye, DMA/hwcache, block/SCSI/ATA/NVMe/UFS/SDIO, SCMI, RPMsg, mailbox, NVMem, NUMA, syscon, thermal, input/LED/IIO/graphic, and related power/charger/supply docs. Expand device-driver INDEX.md with ~90 @subpage entries so all new pages appear in the driver chapter navigation. Update existing UART/SPI/RTC/pin/framework/dtc pages: UART docs moved from serial/ to uart/ (uart + uart_dm + uart_earlycon); SPI and RTC gain DM companion pages; pin links to pin_dm; framework points at DM topics. Focus on registration/probe flow and in-tree APIs; no standalone VirtIO subsystem page (transport code still incomplete). Test plan: build Doxygen for documentation/ and verify device-driver INDEX links resolve without missing @ref/@subpage warnings. Signed-off-by: GuEe-GUI <2991707448@qq.com>
2.0 KiB
Executable File
2.0 KiB
Executable File
@page page_device_graphic_framebuffer Simple framebuffer (simple-framebuffer)
simple-framebuffer platform driver
Implementation: components/drivers/graphic/framebuffer/fb-simple.c. Registers a struct rt_graphic_device from a fixed memory window described in device tree (Linux simple-framebuffer binding style).
Device tree (typical)
framebuffer@0 {
compatible = "simple-framebuffer";
reg = <0x0 0x00800000>;
width = <1920>;
height = <1080>;
stride = <7680>;
format = "a8r8g8b8"; /* see driver format table */
clocks = <&disp_clk>; /* optional, RT_USING_CLK */
power-supplies = <&vdd>; /* optional, RT_USING_REGULATOR */
};
Probe flow
- Parse
width,height,stride,format→ internalsimplefb_format(bits per pixel, RT graphic mode). ioremap(or use physical)reg→screen_base, computescreen_size.- Optional
rt_clk_arrayprepare/enable; optional regulatorenablearray. - Fill
rt_graphic_deviceops (set_pixel,get_pixel,draw_hline, etc.) andrt_device_register.
Supported formats
Driver table maps string names (e.g. r5g6b5, a8r8g8b8, x8r8g8b8) to rt_graphic_info mode and bpp. Unknown format fails probe.
Remove
Disable clocks/regulators, unmap framebuffer memory, unregister graphic device.
Driver / BSP quick notes
| Topic | Guidance |
|---|---|
| Cache | CPU-accessible framebuffer RAM must use correct MMU cache attributes; if cacheable, maintain with rt_hw_cpu_dcache_ops — see @ref page_device_hwcache |
| Stride | Must match hardware line pitch (bytes), not always width * bpp/8 |
| Primary display | Pair with @ref page_device_graphic_dm / graphic_primary.c if multiple heads |
| No GPU | This is linear FB only—no command queue; use a SoC GPU driver if you need acceleration |
See also
- @ref page_device_graphic_dm
components/drivers/graphic/framebuffer/fb-simple.ccomponents/drivers/graphic/graphic.c