[PATCH RESEND 0/9] ARM: stm32: add STM32H7R7 and ART-Pi2 support
Liu Changjie <[email protected]> Sun, 26 Jul 2026 23:49:10 +0800
| Newsgroups | dev.linux.lists.mfd,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <MN0PR19MB60912FA1E75E4E55B2E27D34ACCD2@MN0PR19MB6091.namprd19.prod.outlook.com> |
Resending to repair threading after Outlook rewrote the cover Message-ID during SMTP submission. Patch contents are unchanged. Add initial mainline support for the STM32H7R7 and the Ruiside ART-Pi2 development board. The ART-Pi2 boots through first-stage firmware in the STM32 internal flash. That firmware configures the PLLs and memory interfaces before Linux executes in place from external XSPI NOR, with 32 MiB of HyperRAM used as system RAM. Reprogramming the PLLs from Linux could therefore stop the instruction stream. The RCC driver in this series intentionally reconstructs the active clock rates from the firmware-programmed RCC registers. It exposes the resulting SYSCLK, bus, timer, UART and SDMMC clocks, while Linux owns only the peripheral clock gates used by the initial device tree. It also exposes the RCC reset registers through the existing reset-simple driver. The first reset consumer is SDMMC1. The pinctrl driver covers GPIOA-H and GPIOM-P, including the AF0 trace functions described by the STM32H7RS pin-control data. The board device tree enables UART4, TIM5, twelve GPIO banks, two LEDs, the user button and the four-bit SDMMC1 interface used by the microSD socket. The socket has no card detect signal connected to the MCU, so the board uses broken-cd. ARM noMMU selects DMA_GLOBAL_POOL. The board therefore reserves a 2 MiB shared DMA pool for the SDMMC internal DMA descriptor and bounce buffer. The pool is required before the mainline mmci-pl18x driver can probe. Tested on an ART-Pi2: - booted an XIP kernel from external NOR to a static-FLAT BusyBox userspace; - detected 32 MiB of HyperRAM; - used UART4 as early and normal console; - used TIM5 as clockevent and clocksource; - registered all twelve GPIO banks, both LEDs and the gpio-key input device; - registered SDMMC1 through mmci-pl18x and detected a 59.5 GiB SDXC card; - wrote a 1 MiB random file to an ext4 partition, synced, unmounted and remounted it, and verified identical SHA-256 hashes before deleting the test file and unmounting cleanly; - exercised the SDMMC1 reset through the RCC reset controller; - built the target DTB with CHECK_DTBS=y; - passed dt-doc-validate for all four changed binding files and dt_binding_check for st,stm32-rcc.yaml; - passed checkpatch and the local upstream preflight for all nine patches. The test kernel kept the Cortex-M7 instruction and data caches disabled. DMA coherency with the data cache enabled remains to be validated separately. The only dtbs_check diagnostic is the existing lack of a schema matching "arm,cortex-m7". Signed-off-by: Liu Changjie <[email protected]> Liu Changjie (9): dt-bindings: arm: stm32: add Ruiside ART-Pi2 dt-bindings: clock: stm32: add STM32H7RS RCC clk: stm32: add STM32H7RS RCC driver dt-bindings: pinctrl: stm32: add STM32H7RS pinctrl: stm32: add STM32H7RS support ARM: stm32: add STM32H7R7 platform support ARM: dts: stm32: add STM32H7R7 SoC ARM: dts: stm32: add Ruiside ART-Pi2 board ARM: stm32: document STM32H7R7 support Documentation/arch/arm/index.rst | 1 + .../arch/arm/stm32/stm32h7r7-overview.rst | 28 + .../devicetree/bindings/arm/stm32/stm32.yaml | 3 + .../bindings/clock/st,stm32-rcc.yaml | 73 +- .../bindings/pinctrl/st,stm32-pinctrl.yaml | 7 +- .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm/Kconfig.debug | 12 + arch/arm/boot/dts/st/Makefile | 1 + arch/arm/boot/dts/st/stm32h7r7.dtsi | 255 +++ arch/arm/boot/dts/st/stm32h7r7l8-art-pi2.dts | 100 + arch/arm/boot/dts/st/stm32h7rs-pinctrl.dtsi | 63 + arch/arm/include/debug/stm32.S | 2 +- arch/arm/mach-stm32/Kconfig | 8 + arch/arm/mach-stm32/board-dt.c | 1 + drivers/clk/Kconfig | 5 + drivers/clk/Makefile | 1 + drivers/clk/clk-stm32h7rs.c | 466 +++++ drivers/pinctrl/stm32/Kconfig | 11 + drivers/pinctrl/stm32/Makefile | 1 + drivers/pinctrl/stm32/pinctrl-stm32h7rs.c | 1849 +++++++++++++++++ include/dt-bindings/clock/stm32h7rs-clks.h | 32 + include/dt-bindings/mfd/stm32h7rs-rcc.h | 11 + 22 files changed, 2916 insertions(+), 16 deletions(-) create mode 100644 Documentation/arch/arm/stm32/stm32h7r7-overview.rst create mode 100644 arch/arm/boot/dts/st/stm32h7r7.dtsi create mode 100644 arch/arm/boot/dts/st/stm32h7r7l8-art-pi2.dts create mode 100644 arch/arm/boot/dts/st/stm32h7rs-pinctrl.dtsi create mode 100644 drivers/clk/clk-stm32h7rs.c create mode 100644 drivers/pinctrl/stm32/pinctrl-stm32h7rs.c create mode 100644 include/dt-bindings/clock/stm32h7rs-clks.h create mode 100644 include/dt-bindings/mfd/stm32h7rs-rcc.h base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df -- 2.55.0