Add Engicam MicroGEA-STM32MP257D-RMM board support
Subsystems (5)
v3 cover Add Engicam MicroGEA-STM32MP257D-RMM board support
This series adds support for the Engicam MicroGEA-STM32MP257D-RMM board, with its RGB and LVDS displays and the FWU A/B update.
The first patches pick the board devicetrees, merged for Linux v7.4, from devicetree-rebasing. Then come the refactors moving the STM32MP2 environment and FWU support to the SoC code, and the board support. The displays are described by the upstream overlays, which a new option applies to the U-Boot devicetree at build time. The bootph-all properties of the board have been sent to Linux [1].
Tested on the board, booting from the SD card and from the eMMC.
[1] https://lore.kernel.org/all/[email protected]/
Changes in v3:
- Add Reviewed-by tag
- Add Reviewed-by tag
- Add Reviewed-by tag
- Add Reviewed-by tag
- Select the pixel clock source only on st,stm32mp255-ltdc
- Add Reviewed-by tag
- Add Reviewed-by tag
- Add Reviewed-by tag
- Add Reviewed-by tag
- Add Reviewed-by tag
- Drop the patches applied to u-boot/main
Changes in v2:
- Add Reviewed-by tag
- Add Reviewed-by tag
- New patch
- Simplify the comments
- Apply the upstream display overlays to the U-Boot devicetree instead of describing the displays in the -u-boot.dtsi file
- Do not leave the LTDC RGB pins configured with the LVDS display
- Drop a redundant comment
Dario Binacchi (29):
dt-bindings: arm: stm32: support Engicam MicroGEA-STM32MP257D-RMM
board
arm64: dts: st: add power-domains to sdmmc1 on stm32mp231
arm64: dts: st: add power-domains to sdmmc1 on stm32mp251
arm64: dts: st: add SDMMC2 support on stm32mp25
arm64: dts: st: add CAN1 support on stm32mp25
arm64: dts: st: add i2c1 pins for stm32mp25
arm64: dts: st: add ltdc pins for stm32mp25
arm64: dts: st: add can1 pins for stm32mp25
arm64: dts: st: add pwm2/pwm4 pins for stm32mp25
arm64: dts: st: add sai1 pins for stm32mp25
arm64: dts: st: add sdmmc2 pins for stm32mp25
arm64: dts: st: add spi1 pins for stm32mp25
arm64: dts: st: add usart1 pins for stm32mp25
arm64: dts: st: support Engicam MicroGEA-STM32MP257 SoM
arm64: dts: st: support Engicam MicroGEA-STM32MP257D-RMM board
arm64: dts: st: move Engicam MicroGEA-STM32MP257D-RMM display to an
overlay
arm64: dts: st: add Engicam MicroGEA-STM32MP257D-RMM LVDS display
overlay
arm: stm32mp: stm32mp2: move boot device environment helpers to SoC
code
splash: make splash_video_logo_load() available to boards
arm: stm32mp: move FWU multi-bank support to SoC code
configs: stm32mp25: move FWU A/B boot environment to common settings
video: simple_panel: add Ampire AM-1280800W8TZQW-T00H panel
video: stm32: ltdc: select the pixel clock source on STM32MP25
boot: extension: allow longer overlay file names
dts: support applying DT overlays to the control DT with OF_UPSTREAM
board: engicam: stm32mp2: add MicroGEA-STM32MP257D-RMM board
board: engicam: stm32mp2: add splash screen
board: engicam: stm32mp2: support FWU A/B bank bootup
board: engicam: stm32mp2: enable simple framebuffer for the splash
screen
...m32mp257d-engicam-microgea-rmm-u-boot.dtsi | 38 ++ arch/arm/mach-stm32mp/Kconfig.25x | 17 + arch/arm/mach-stm32mp/Makefile | 1 + .../arm/mach-stm32mp/fwu.c | 0 arch/arm/mach-stm32mp/stm32mp2/Makefile | 1 + arch/arm/mach-stm32mp/stm32mp2/env.c | 82 +++++ board/engicam/stm32mp2/Kconfig | 12 + board/engicam/stm32mp2/MAINTAINERS | 7 + board/engicam/stm32mp2/Makefile | 7 + board/engicam/stm32mp2/microgea-stm32mp2.env | 13 + board/engicam/stm32mp2/stm32mp2.c | 340 ++++++++++++++++++ board/st/common/Makefile | 1 - board/st/stm32mp2/stm32mp2.c | 71 +--- common/splash.c | 4 +- configs/stm32mp25-microgea-rmm_defconfig | 129 +++++++ drivers/video/simple_panel.c | 19 + drivers/video/stm32/stm32_ltdc.c | 55 +++ dts/Kconfig | 10 + dts/Makefile | 2 + dts/upstream/Bindings/arm/stm32/stm32.yaml | 7 + dts/upstream/src/arm64/st/stm32mp231.dtsi | 1 + .../src/arm64/st/stm32mp25-pinctrl.dtsi | 328 +++++++++++++++++ dts/upstream/src/arm64/st/stm32mp251.dtsi | 17 + dts/upstream/src/arm64/st/stm32mp253.dtsi | 16 + .../arm64/st/stm32mp257-engicam-microgea.dtsi | 63 ++++ ...gea-rmm-overlay-am-1280800w8tzqw-t00h.dtso | 67 ++++ ...icrogea-rmm-overlay-rk050hr345-ct106a.dtso | 68 ++++ .../st/stm32mp257d-engicam-microgea-rmm.dts | 275 ++++++++++++++ include/configs/stm32mp25_common.h | 20 ++ include/configs/stm32mp25_st_common.h | 15 - include/extension_board.h | 2 +- include/splash.h | 9 + scripts/Makefile.dts | 7 + 33 files changed, 1614 insertions(+), 90 deletions(-) create mode 100644 arch/arm/dts/stm32mp257d-engicam-microgea-rmm-u-boot.dtsi rename board/st/common/stm32mp_fwu.c => arch/arm/mach-stm32mp/fwu.c (100%) create mode 100644 arch/arm/mach-stm32mp/stm32mp2/env.c create mode 100644 board/engicam/stm32mp2/Kconfig create mode 100644 board/engicam/stm32mp2/MAINTAINERS create mode 100644 board/engicam/stm32mp2/Makefile create mode 100644 board/engicam/stm32mp2/microgea-stm32mp2.env create mode 100644 board/engicam/stm32mp2/stm32mp2.c create mode 100644 configs/stm32mp25-microgea-rmm_defconfig create mode 100644 dts/upstream/src/arm64/st/stm32mp257-engicam-microgea.dtsi create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-am-1280800w8tzqw-t00h.dtso create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-rk050hr345-ct106a.dtso create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm.dts
---
base-commit: 40bafcab3bea0511eb3925da2f0fdc1df9758e3d
branch: engicam-microgea-stm32mp257-rmm
Signature · 1 line
2.43.0
PATCH v3 1/29 dt-bindings: arm: stm32: support Engicam MicroGEA-STM32MP257D-RMM board
Add devicetree bindings for Engicam MicroGEA-STM32MP257D-RMM board based on the Engicam MicroGEA-STM32MP257 SoM (System-on-Module).
The use of an enum for a single element is justified by the future addition of other boards based on the same SoM.
[ upstream commit: c673bc61ca926f664905c63f1455c7f95858a437 ]
(cherry picked from commit 6655c9d906a8aea1727ddf748c0e8ea05216d56e)
---
(no changes since v1)
dts/upstream/Bindings/arm/stm32/stm32.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
dts/upstream/Bindings/arm/stm32/stm32.yaml +7 -0
@@ -196,6 +196,13 @@ properties: - const: ultratronik,stm32mp157c-ultra-fly-sbc - const: st,stm32mp157 + - description: Engicam MicroGEA STM32MP257 SoM based Boards + items: + - enum: + - engicam,microgea-stm32mp257d-rmm + - const: engicam,microgea-stm32mp257 + - const: st,stm32mp257 + - description: ST STM32MP257 based Boards items: - enum:
Signature · 1 line
2.43.0
PATCH v3 2/29 arm64: dts: st: add power-domains to sdmmc1 on stm32mp231
In reply to Dario BinacchiThe sdmmc1 node was introduced early in the SoC bring-up before power domains were systematically mapped. Add the missing power-domains property to align it with the rest of the peripheral nodes.
[ upstream commit: d92944ee1693b20c71215c3ad1a1661f05e85108 ]
(cherry picked from commit 38e8d79eac568b36a01076a5dba1e85676eab895)
---
(no changes since v1)
dts/upstream/src/arm64/st/stm32mp231.dtsi | 1 + 1 file changed, 1 insertion(+)
dts/upstream/src/arm64/st/stm32mp231.dtsi +1 -0
@@ -727,6 +727,7 @@ cap-mmc-highspeed; max-frequency = <120000000>; access-controllers = <&rifsc 76>; + power-domains = <&cluster_pd>; status = "disabled"; };
Signature · 1 line
2.43.0
PATCH v3 3/29 arm64: dts: st: add power-domains to sdmmc1 on stm32mp251
In reply to Dario BinacchiThe sdmmc1 node was introduced early in the SoC bring-up before power domains were systematically mapped. Add the missing power-domains property to align it with the rest of the peripheral nodes.
[ upstream commit: 4f454e51290d072fef58eca653c65dc1fa8c7d70 ]
(cherry picked from commit 188b75b85a9f6dd4dc25cc4d6b7298d01ebf5efa)
---
(no changes since v1)
dts/upstream/src/arm64/st/stm32mp251.dtsi | 1 + 1 file changed, 1 insertion(+)
dts/upstream/src/arm64/st/stm32mp251.dtsi +1 -0
@@ -1664,6 +1664,7 @@ cap-mmc-highspeed; max-frequency = <120000000>; access-controllers = <&rifsc 76>; + power-domains = <&CLUSTER_PD>; status = "disabled"; };
Signature · 1 line
2.43.0
PATCH v3 4/29 arm64: dts: st: add SDMMC2 support on stm32mp25
In reply to Dario BinacchiThe SDMMC2 controller supports SD cards, eMMC memories and SDIO devices.
[ upstream commit: 513410ae43bc77b240091eecf3cdeb6eb5b6b83d ]
(cherry picked from commit e7e96ebb4e18e0041a6674b0382730dbdc845838)
---
(no changes since v1)
dts/upstream/src/arm64/st/stm32mp251.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
dts/upstream/src/arm64/st/stm32mp251.dtsi +16 -0
@@ -1668,6 +1668,22 @@ status = "disabled"; }; + sdmmc2: mmc@48230000 { + compatible = "st,stm32mp25-sdmmc2", "arm,pl18x", "arm,primecell"; + arm,primecell-periphid = <0x00353180>; + reg = <0x48230000 0x400>, <0x44230800 0x8>; + interrupts = <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&rcc CK_KER_SDMMC2>; + clock-names = "apb_pclk"; + resets = <&rcc SDMMC2_R>; + cap-sd-highspeed; + cap-mmc-highspeed; + max-frequency = <120000000>; + access-controllers = <&rifsc 77>; + power-domains = <&CLUSTER_PD>; + status = "disabled"; + }; + ethernet1: ethernet@482c0000 { compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20"; reg = <0x482c0000 0x4000>;
Signature · 1 line
2.43.0
PATCH v3 5/29 arm64: dts: st: add CAN1 support on stm32mp25
In reply to Dario BinacchiThe controller is compliant with ISO 11898-1: 2015 (CAN protocol specification version 2.0 part A, B) and CAN FD protocol specification version 1.0.
[ upstream commit: 7e62731fba26a58f975815add1e3146eaaaaa9c2 ]
(cherry picked from commit 3de3ce4cd1862224d78cc8da29550dab9feeb43f)
---
(no changes since v1)
dts/upstream/src/arm64/st/stm32mp253.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
dts/upstream/src/arm64/st/stm32mp253.dtsi +16 -0
@@ -43,6 +43,22 @@ }; &rifsc { + m_can1: can@402d0000 { + compatible = "bosch,m_can"; + reg = <0x402d0000 0x400>, <0x40310000 0xd50>; + reg-names = "m_can", "message_ram"; + interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "int0", "int1"; + clocks = <&rcc CK_BUS_FDCAN>, <&rcc CK_KER_FDCAN>; + clock-names = "hclk", "cclk"; + resets = <&rcc FDCAN_R>; + bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>; + access-controllers = <&rifsc 56>; + power-domains = <&CLUSTER_PD>; + status = "disabled"; + }; + ethernet2: ethernet@482d0000 { compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20"; reg = <0x482d0000 0x4000>;
Signature · 1 line
2.43.0
PATCH v3 6/29 arm64: dts: st: add i2c1 pins for stm32mp25
In reply to Dario BinacchiAdd the i2c1 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 650d83cab19ea1acd3c1a17583d91efcd1688a7c ]
(cherry picked from commit 7cac3c4a9f9b57c8e7d4c1430991f0df3b0883b9)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +19 -0
@@ -203,6 +203,25 @@ }; }; + /omit-if-no-ref/ + i2c1_pins_a: i2c1-0 { + pins { + pinmux = <STM32_PINMUX('G', 13, AF9)>, /* I2C1_SCL */ + <STM32_PINMUX('A', 2, AF10)>; /* I2C1_SDA */ + bias-disable; + drive-open-drain; + slew-rate = <0>; + }; + }; + + /omit-if-no-ref/ + i2c1_sleep_pins_a: i2c1-sleep-0 { + pins { + pinmux = <STM32_PINMUX('G', 13, ANALOG)>, /* I2C1_SCL */ + <STM32_PINMUX('A', 2, ANALOG)>; /* I2C1_SDA */ + }; + }; + /omit-if-no-ref/ i2c2_pins_a: i2c2-0 { pins {
Signature · 1 line
2.43.0
PATCH v3 7/29 arm64: dts: st: add ltdc pins for stm32mp25
In reply to Dario BinacchiAdd the LTDC pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 0183a9f7ba2de9fc9c1e0ee53e4cc7b049e69181 ]
(cherry picked from commit 24128ab8c8a3c29003deb325424d39d31ee08165)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +71 -0
@@ -260,6 +260,77 @@ }; }; + /omit-if-no-ref/ + ltdc_pins_a: ltdc-0 { + pins { + pinmux = <STM32_PINMUX('C', 6, AF14)>, /* LCD_CLK */ + <STM32_PINMUX('G', 2, AF13)>, /* LCD_HSYNC */ + <STM32_PINMUX('G', 1, AF13)>, /* LCD_VSYNC */ + <STM32_PINMUX('C', 5, AF14)>, /* LCD_DE */ + <STM32_PINMUX('H', 4, AF10)>, /* LCD_R0 */ + <STM32_PINMUX('F', 7, AF13)>, /* LCD_R1 */ + <STM32_PINMUX('C', 11, AF13)>, /* LCD_R2 */ + <STM32_PINMUX('A', 1, AF11)>, /* LCD_R3 */ + <STM32_PINMUX('B', 15, AF13)>, /* LCD_R4 */ + <STM32_PINMUX('G', 3, AF13)>, /* LCD_R5 */ + <STM32_PINMUX('A', 10, AF12)>, /* LCD_R6 */ + <STM32_PINMUX('G', 7, AF13)>, /* LCD_R7 */ + <STM32_PINMUX('F', 8, AF13)>, /* LCD_G0 */ + <STM32_PINMUX('H', 5, AF10)>, /* LCD_G1 */ + <STM32_PINMUX('C', 9, AF13)>, /* LCD_G2 */ + <STM32_PINMUX('C', 10, AF13)>, /* LCD_G3 */ + <STM32_PINMUX('A', 6, AF10)>, /* LCD_G4 */ + <STM32_PINMUX('G', 11, AF13)>, /* LCD_G5 */ + <STM32_PINMUX('G', 12, AF13)>, /* LCD_G6 */ + <STM32_PINMUX('A', 9, AF12)>, /* LCD_G7 */ + <STM32_PINMUX('F', 6, AF13)>, /* LCD_B0 */ + <STM32_PINMUX('A', 3, AF11)>, /* LCD_B1 */ + <STM32_PINMUX('G', 15, AF13)>, /* LCD_B2 */ + <STM32_PINMUX('I', 0, AF13)>, /* LCD_B3 */ + <STM32_PINMUX('I', 1, AF13)>, /* LCD_B4 */ + <STM32_PINMUX('A', 7, AF10)>, /* LCD_B5 */ + <STM32_PINMUX('F', 5, AF13)>, /* LCD_B6 */ + <STM32_PINMUX('I', 4, AF13)>; /* LCD_B7 */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + }; + + /omit-if-no-ref/ + ltdc_sleep_pins_a: ltdc-sleep-0 { + pins { + pinmux = <STM32_PINMUX('C', 6, ANALOG)>, /* LCD_CLK */ + <STM32_PINMUX('G', 2, ANALOG)>, /* LCD_HSYNC */ + <STM32_PINMUX('G', 1, ANALOG)>, /* LCD_VSYNC */ + <STM32_PINMUX('C', 5, ANALOG)>, /* LCD_DE */ + <STM32_PINMUX('H', 4, ANALOG)>, /* LCD_R0 */ + <STM32_PINMUX('F', 7, ANALOG)>, /* LCD_R1 */ + <STM32_PINMUX('C', 11, ANALOG)>, /* LCD_R2 */ + <STM32_PINMUX('A', 1, ANALOG)>, /* LCD_R3 */ + <STM32_PINMUX('B', 15, ANALOG)>, /* LCD_R4 */ + <STM32_PINMUX('G', 3, ANALOG)>, /* LCD_R5 */ + <STM32_PINMUX('A', 10, ANALOG)>, /* LCD_R6 */ + <STM32_PINMUX('G', 7, ANALOG)>, /* LCD_R7 */ + <STM32_PINMUX('F', 8, ANALOG)>, /* LCD_G0 */ + <STM32_PINMUX('H', 5, ANALOG)>, /* LCD_G1 */ + <STM32_PINMUX('C', 9, ANALOG)>, /* LCD_G2 */ + <STM32_PINMUX('C', 10, ANALOG)>, /* LCD_G3 */ + <STM32_PINMUX('A', 6, ANALOG)>, /* LCD_G4 */ + <STM32_PINMUX('G', 11, ANALOG)>, /* LCD_G5 */ + <STM32_PINMUX('G', 12, ANALOG)>, /* LCD_G6 */ + <STM32_PINMUX('A', 9, ANALOG)>, /* LCD_G7 */ + <STM32_PINMUX('F', 6, ANALOG)>, /* LCD_B0 */ + <STM32_PINMUX('A', 3, ANALOG)>, /* LCD_B1 */ + <STM32_PINMUX('G', 15, ANALOG)>, /* LCD_B2 */ + <STM32_PINMUX('I', 0, ANALOG)>, /* LCD_B3 */ + <STM32_PINMUX('I', 1, ANALOG)>, /* LCD_B4 */ + <STM32_PINMUX('A', 7, ANALOG)>, /* LCD_B5 */ + <STM32_PINMUX('F', 5, ANALOG)>, /* LCD_B6 */ + <STM32_PINMUX('I', 4, ANALOG)>; /* LCD_B7 */ + }; + }; + /omit-if-no-ref/ ospi_port1_clk_pins_a: ospi-port1-clk-0 { pins {
Signature · 1 line
2.43.0
PATCH v3 8/29 arm64: dts: st: add can1 pins for stm32mp25
In reply to Dario BinacchiAdd the can1 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: b9efa6d3c580feeb4af6204457ce3ebf351b2af4 ]
(cherry picked from commit e9b8701fc994a04a4dcd15598de7bbd9d81ecfe9)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +22 -0
@@ -331,6 +331,28 @@ }; }; + /omit-if-no-ref/ + m_can1_pins_a: m-can1-0 { + pins1 { + pinmux = <STM32_PINMUX('B', 9, AF7)>; /* CAN1_TX */ + slew-rate = <1>; + drive-push-pull; + bias-disable; + }; + pins2 { + pinmux = <STM32_PINMUX('B', 11, AF7)>; /* CAN1_RX */ + bias-disable; + }; + }; + + /omit-if-no-ref/ + m_can1_sleep_pins_a: m-can1-sleep-0 { + pins { + pinmux = <STM32_PINMUX('B', 9, ANALOG)>, /* CAN1_TX */ + <STM32_PINMUX('B', 11, ANALOG)>; /* CAN1_RX */ + }; + }; + /omit-if-no-ref/ ospi_port1_clk_pins_a: ospi-port1-clk-0 { pins {
Signature · 1 line
2.43.0
PATCH v3 9/29 arm64: dts: st: add pwm2/pwm4 pins for stm32mp25
In reply to Dario BinacchiAdd the pwm2 and pwm4 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 3c7876c003f01223e111444a93d5861d86d8022c ]
(cherry picked from commit 1d936c8ac7bcd3a7d8aa42ca88f8fbaaf3e63194)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +34 -0
@@ -433,6 +433,23 @@ }; }; + /omit-if-no-ref/ + pwm2_pins_a: pwm2-0 { + pins { + pinmux = <STM32_PINMUX('I', 7, AF7)>; /* TIM2_CH1 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; + + /omit-if-no-ref/ + pwm2_sleep_pins_a: pwm2-sleep-0 { + pins { + pinmux = <STM32_PINMUX('I', 7, ANALOG)>; /* TIM2_CH1 */ + }; + }; + /omit-if-no-ref/ pwm3_pins_a: pwm3-0 { pins {
@@ -450,6 +467,23 @@ }; }; + /omit-if-no-ref/ + pwm4_pins_a: pwm4-0 { + pins { + pinmux = <STM32_PINMUX('A', 12, AF7)>; /* TIM4_CH1 */ + bias-pull-down; + drive-push-pull; + slew-rate = <0>; + }; + }; + + /omit-if-no-ref/ + pwm4_sleep_pins_a: pwm4-sleep-0 { + pins { + pinmux = <STM32_PINMUX('A', 12, ANALOG)>; /* TIM4_CH1 */ + }; + }; + /omit-if-no-ref/ pwm8_pins_a: pwm8-0 { pins {
Signature · 1 line
2.43.0
PATCH v3 10/29 arm64: dts: st: add sai1 pins for stm32mp25
In reply to Dario BinacchiAdd the sai1 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: ec9e6b832ff186db9fe4a8c9e57ed120669229d7 ]
(cherry picked from commit efe29427df55d919eb9bbb319e6f4acdfd14f4bf)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +45 -0
@@ -520,6 +520,51 @@ }; }; + /omit-if-no-ref/ + sai1a_pins_a: sai1a-0 { + pins1 { + pinmux = <STM32_PINMUX('D', 9, AF3)>, /* SAI1_SD_A */ + <STM32_PINMUX('D', 8, AF3)>, /* SAI1_FS_A */ + <STM32_PINMUX('D', 10, AF3)>; /* SAI1_SCK_A */ + bias-disable; + drive-push-pull; + slew-rate = <1>; + }; + pins2 { + pinmux = <STM32_PINMUX('D', 11, AF3)>; /* SAI1_MCLK_A */ + bias-disable; + drive-push-pull; + slew-rate = <2>; + }; + }; + + /omit-if-no-ref/ + sai1a_sleep_pins_a: sai1a-sleep-0 { + pins { + pinmux = <STM32_PINMUX('D', 9, ANALOG)>, /* SAI1_SD_A */ + <STM32_PINMUX('D', 8, ANALOG)>, /* SAI1_FS_A */ + <STM32_PINMUX('D', 10, ANALOG)>, /* SAI1_SCK_A */ + <STM32_PINMUX('D', 11, ANALOG)>; /* SAI1_MCLK_A */ + }; + }; + + /omit-if-no-ref/ + sai1b_pins_a: sai1b-0 { + pins { + pinmux = <STM32_PINMUX('D', 4, AF4)>; /* SAI1_SD_B */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + }; + + /omit-if-no-ref/ + sai1b_sleep_pins_a: sai1b-sleep-0 { + pins { + pinmux = <STM32_PINMUX('D', 4, ANALOG)>; /* SAI1_SD_B */ + }; + }; + /omit-if-no-ref/ sdmmc1_b4_pins_a: sdmmc1-b4-0 { pins1 {
Signature · 1 line
2.43.0
PATCH v3 11/29 arm64: dts: st: add sdmmc2 pins for stm32mp25
In reply to Dario BinacchiAdd the sdmmc2 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 17d813da16896a7ced144acf41bf7edc419a9fe5 ]
(cherry picked from commit 9bf2959090b5831f7ac2caf05aa880768def9f32)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +80 -0
@@ -622,6 +622,86 @@ }; }; + /omit-if-no-ref/ + sdmmc2_b4_pins_a: sdmmc2-b4-0 { + pins1 { + pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */ + <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */ + <STM32_PINMUX('E', 8, AF12)>, /* SDMMC2_D2 */ + <STM32_PINMUX('E', 12, AF12)>, /* SDMMC2_D3 */ + <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */ + slew-rate = <1>; + drive-push-pull; + bias-pull-up; + }; + pins2 { + pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */ + slew-rate = <2>; + drive-push-pull; + bias-disable; + }; + }; + + /omit-if-no-ref/ + sdmmc2_b4_od_pins_a: sdmmc2-b4-od-0 { + pins1 { + pinmux = <STM32_PINMUX('E', 13, AF12)>, /* SDMMC2_D0 */ + <STM32_PINMUX('E', 11, AF12)>, /* SDMMC2_D1 */ + <STM32_PINMUX('E', 8, AF12)>, /* SDMMC2_D2 */ + <STM32_PINMUX('E', 12, AF12)>; /* SDMMC2_D3 */ + slew-rate = <1>; + drive-push-pull; + bias-pull-up; + }; + pins2 { + pinmux = <STM32_PINMUX('E', 14, AF12)>; /* SDMMC2_CK */ + slew-rate = <2>; + drive-push-pull; + bias-disable; + }; + pins3 { + pinmux = <STM32_PINMUX('E', 15, AF12)>; /* SDMMC2_CMD */ + slew-rate = <1>; + drive-open-drain; + bias-pull-up; + }; + }; + + /omit-if-no-ref/ + sdmmc2_b4_sleep_pins_a: sdmmc2-b4-sleep-0 { + pins { + pinmux = <STM32_PINMUX('E', 13, ANALOG)>, /* SDMMC2_D0 */ + <STM32_PINMUX('E', 11, ANALOG)>, /* SDMMC2_D1 */ + <STM32_PINMUX('E', 8, ANALOG)>, /* SDMMC2_D2 */ + <STM32_PINMUX('E', 12, ANALOG)>, /* SDMMC2_D3 */ + <STM32_PINMUX('E', 14, ANALOG)>, /* SDMMC2_CK */ + <STM32_PINMUX('E', 15, ANALOG)>; /* SDMMC2_CMD */ + }; + }; + + /omit-if-no-ref/ + sdmmc2_d47_pins_a: sdmmc2-d47-0 { + pins { + pinmux = <STM32_PINMUX('E', 10, AF12)>, /* SDMMC2_D4 */ + <STM32_PINMUX('E', 9, AF12)>, /* SDMMC2_D5 */ + <STM32_PINMUX('E', 6, AF12)>, /* SDMMC2_D6 */ + <STM32_PINMUX('E', 7, AF12)>; /* SDMMC2_D7 */ + slew-rate = <1>; + drive-push-pull; + bias-pull-up; + }; + }; + + /omit-if-no-ref/ + sdmmc2_d47_sleep_pins_a: sdmmc2-d47-sleep-0 { + pins { + pinmux = <STM32_PINMUX('E', 10, ANALOG)>, /* SDMMC2_D4 */ + <STM32_PINMUX('E', 9, ANALOG)>, /* SDMMC2_D5 */ + <STM32_PINMUX('E', 6, ANALOG)>, /* SDMMC2_D6 */ + <STM32_PINMUX('E', 7, ANALOG)>; /* SDMMC2_D7 */ + }; + }; + /omit-if-no-ref/ spi3_pins_a: spi3-0 { pins1 {
Signature · 1 line
2.43.0
PATCH v3 12/29 arm64: dts: st: add spi1 pins for stm32mp25
In reply to Dario BinacchiAdd the spi1 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 4759748985fe4d4c25c87edeeca4b96dfa47a280 ]
(cherry picked from commit fdfa69e2fb0f024e72ddf590f82468e63ef9bd76)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +24 -0
@@ -702,6 +702,30 @@ }; }; + /omit-if-no-ref/ + spi1_pins_a: spi1-0 { + pins1 { + pinmux = <STM32_PINMUX('G', 6, AF3)>, /* SPI1_SCK */ + <STM32_PINMUX('I', 5, AF3)>; /* SPI1_MOSI */ + drive-push-pull; + bias-disable; + slew-rate = <1>; + }; + pins2 { + pinmux = <STM32_PINMUX('F', 12, AF3)>; /* SPI1_MISO */ + bias-disable; + }; + }; + + /omit-if-no-ref/ + spi1_sleep_pins_a: spi1-sleep-0 { + pins1 { + pinmux = <STM32_PINMUX('G', 6, ANALOG)>, /* SPI1_SCK */ + <STM32_PINMUX('I', 5, ANALOG)>, /* SPI1_MOSI */ + <STM32_PINMUX('F', 12, ANALOG)>; /* SPI1_MISO */ + }; + }; + /omit-if-no-ref/ spi3_pins_a: spi3-0 { pins1 {
Signature · 1 line
2.43.0
PATCH v3 13/29 arm64: dts: st: add usart1 pins for stm32mp25
In reply to Dario BinacchiAdd the usart1 pins used on MicroGEA-STM32MP257D-RMM board.
[ upstream commit: 2bb7d85d7a644e20b7b9097a966acec8edd5c7cf ]
(cherry picked from commit 99b28029f7153bab8e870e9510470d21f6722f76)
---
(no changes since v1)
.../src/arm64/st/stm32mp25-pinctrl.dtsi | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+)
dts/upstream/src/arm64/st/stm32mp25-pinctrl.dtsi +33 -0
@@ -766,6 +766,39 @@ }; }; + /omit-if-no-ref/ + usart1_pins_b: usart1-1 { + pins1 { + pinmux = <STM32_PINMUX('B', 8, AF6)>; /* USART1_TX */ + bias-disable; + drive-push-pull; + slew-rate = <0>; + }; + pins2 { + pinmux = <STM32_PINMUX('B', 10, AF6)>; /* USART1_RX */ + bias-disable; + }; + }; + + /omit-if-no-ref/ + usart1_idle_pins_b: usart1-idle-1 { + pins1 { + pinmux = <STM32_PINMUX('B', 8, ANALOG)>; /* USART1_TX */ + }; + pins2 { + pinmux = <STM32_PINMUX('B', 10, AF6)>; /* USART1_RX */ + bias-disable; + }; + }; + + /omit-if-no-ref/ + usart1_sleep_pins_b: usart1-sleep-1 { + pins { + pinmux = <STM32_PINMUX('B', 8, ANALOG)>, /* USART1_TX */ + <STM32_PINMUX('B', 10, ANALOG)>; /* USART1_RX */ + }; + }; + /omit-if-no-ref/ usart2_pins_a: usart2-0 { pins1 {
Signature · 1 line
2.43.0
PATCH v3 14/29 arm64: dts: st: support Engicam MicroGEA-STM32MP257 SoM
In reply to Dario BinacchiSupport Engicam MicroGEA-STM32MP257 SoM with:
- 8 GB eMMC Flash
- 2 GB LPDDR4 DRAM
The SoM also provides an Ethernet MAC, but Ethernet support is not enabled at this stage due to a known silicon limitation documented in [1].
This corresponds to section 2.21.2 ("ETH1 RMII mode could have CRC errors"), where CRC errors may occur in ETH1 RMII direct mode when directly connected to I/Os.
The workaround requires use of the Ethernet switch (ETHSW), which introduces additional DT bindings and topology complexity. This is intended to be addressed in a separate patch series.
[ upstream commit: c5ce8d7bcc787c8aa4896629c14fe7b837c78ec6 ]
(cherry picked from commit 64dbd1de4f75d254211eae12b8ed6318d2e830e4)
---
(no changes since v1)
.../arm64/st/stm32mp257-engicam-microgea.dtsi | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 dts/upstream/src/arm64/st/stm32mp257-engicam-microgea.dtsi
dts/upstream/src/arm64/st/stm32mp257-engicam-microgea.dtsi new file +63 -0
@@ -0,0 +1,63 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + */ + +/dts-v1/; + +#include <dt-bindings/regulator/st,stm32mp25-regulator.h> +#include "stm32mp257.dtsi" +#include "stm32mp25-pinctrl.dtsi" +#include "stm32mp25xxai-pinctrl.dtsi" + +/ { + model = "Engicam MicroGEA STM32MP257 SoM"; + compatible = "engicam,microgea-stm32mp257", "st,stm32mp257"; + + memory@80000000 { + device_type = "memory"; + reg = <0x0 0x80000000 0x0 0x80000000>; + }; +}; + +&scmi_regu { + scmi_vddio1: regulator@0 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + scmi_vddcore: regulator@b { + reg = <VOLTD_SCMI_STPMIC2_BUCK2>; + regulator-name = "vddcore"; + }; + scmi_v1v8: regulator@e { + reg = <VOLTD_SCMI_STPMIC2_BUCK5>; + regulator-name = "v1v8"; + }; + scmi_v3v3: regulator@10 { + reg = <VOLTD_SCMI_STPMIC2_BUCK7>; + regulator-name = "v3v3"; + }; + scmi_vdd3v3_usb: regulator@14 { + reg = <VOLTD_SCMI_STPMIC2_LDO4>; + regulator-name = "vdd3v3_usb"; + }; +}; + +/* eMMC */ +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_a>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_a>; + non-removable; + no-sd; + no-sdio; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&scmi_v3v3>; + vqmmc-supply = <&scmi_vddio2>; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + status = "okay"; +};
Signature · 1 line
2.43.0
PATCH v3 15/29 arm64: dts: st: support Engicam MicroGEA-STM32MP257D-RMM board
In reply to Dario BinacchiSupport for Engicam MicroGEA-STM32MP257D-RMM board with:
- 8 GB eMMC Flash
- 2 GB LPDDR4 DRAM
- CAN
- LEDs
- LCD panel with touchscreen
- Micro SD card connector
- Audio codec
- Buzzer
[ upstream commit: bc7b07bda4e0dbb70c8cac0532691c39602390b8 ]
(cherry picked from commit 435db86022032d69ff48f5e0aae57169d700b02f)
---
(no changes since v1)
.../st/stm32mp257d-engicam-microgea-rmm.dts | 319 ++++++++++++++++++ 1 file changed, 319 insertions(+) create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm.dts
dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm.dts new file +319 -0
@@ -0,0 +1,319 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + */ + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> + +#include "stm32mp257-engicam-microgea.dtsi" + +/ { + model = "Engicam MicroGEA STM32MP257D RMM Board"; + compatible = "engicam,microgea-stm32mp257d-rmm", + "engicam,microgea-stm32mp257", "st,stm32mp257"; + + aliases { + mmc0 = &sdmmc1; + mmc1 = &sdmmc2; + serial0 = &usart2; + serial1 = &usart1; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + brightness-levels = <0 100>; + num-interpolated-steps = <100>; + default-brightness-level = <85>; + pwms = <&pwm2 0 100000 0>; + }; + + buzzer { + compatible = "pwm-beeper"; + pwms = <&pwm4 0 1000000 0>; + }; + + chosen { + stdout-path = "serial0:115200n8"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer { + compatible = "simple-framebuffer"; + clocks = <&rcc CK_BUS_LTDC>, <&rcc CK_KER_LTDC>; + lcd-supply = <®_3v3>; + status = "disabled"; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + gpios = <&gpioh 2 GPIO_ACTIVE_HIGH>; + default-state = "off"; + status = "okay"; + }; + + led-1 { + gpios = <&gpioh 6 GPIO_ACTIVE_HIGH>; + default-state = "off"; + status = "okay"; + }; + }; + + mclk: clock-mclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + + reg_1v8: regulator-1v8 { + compatible = "regulator-fixed"; + regulator-name = "1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + reg_ext_pwr: regulator-ext-pwr { + compatible = "regulator-fixed"; + regulator-name = "ext-pwr"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpiog 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + sound { + compatible = "audio-graph-card"; + label = "STM32MP25-RMM"; + widgets = "Headphone", "Headphone Jack", + "Microphone", "Microphone Jack"; + routing = "Headphone Jack", "HP_OUT", + "MIC_IN", "Microphone Jack", + "Microphone Jack", "Mic Bias"; + dais = <&sai1a_port &sai1b_port>; + status = "okay"; + }; +}; + +&arm_wdt { + timeout-sec = <32>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_pins_a>; + pinctrl-1 = <&i2c1_sleep_pins_a>; + i2c-scl-rising-time-ns = <185>; + i2c-scl-falling-time-ns = <20>; + status = "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + + touchscreen@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupt-parent = <&gpiob>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpiod 1 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <480>; + touchscreen-size-y = <854>; + }; +}; + +&i2c2 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c2_pins_a>; + pinctrl-1 = <&i2c2_sleep_pins_a>; + i2c-scl-rising-time-ns = <185>; + i2c-scl-falling-time-ns = <20>; + status = "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + + sgtl5000: codec@a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + #sound-dai-cells = <0>; + clocks = <&mclk>; + + VDDA-supply = <®_3v3>; + VDDIO-supply = <®_3v3>; + VDDD-supply = <®_1v8>; + + sgtl5000_port: port { + #address-cells = <1>; + #size-cells = <0>; + + sgtl5000_tx_endpoint: endpoint@0 { + reg = <0>; + remote-endpoint = <&sai1a_endpoint>; + frame-master = <&sgtl5000_tx_endpoint>; + bitclock-master = <&sgtl5000_tx_endpoint>; + }; + + sgtl5000_rx_endpoint: endpoint@1 { + reg = <1>; + remote-endpoint = <&sai1b_endpoint>; + frame-master = <&sgtl5000_rx_endpoint>; + bitclock-master = <&sgtl5000_rx_endpoint>; + }; + }; + }; +}; + +<dc { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_a>; + pinctrl-1 = <<dc_sleep_pins_a>; + status = "okay"; + + port { + ltdc_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; +}; + +&m_can1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can1_pins_a>; + pinctrl-1 = <&m_can1_sleep_pins_a>; + status = "okay"; +}; + +&sai1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sai1a_pins_a>, <&sai1b_pins_a>; + pinctrl-1 = <&sai1a_sleep_pins_a>, <&sai1b_sleep_pins_a>; + status = "okay"; +}; + +&sai1a { + dma-names = "tx"; + status = "okay"; + + sai1a_port: port { + sai1a_endpoint: endpoint { + remote-endpoint = <&sgtl5000_tx_endpoint>; + dai-format = "i2s"; + mclk-fs = <512>; + }; + }; +}; + +&sai1b { + dma-names = "rx"; + st,sync = <&sai1a 2>; + clocks = <&rcc CK_KER_SAI1>; + clock-names = "sai_ck"; + status = "okay"; + + sai1b_port: port { + sai1b_endpoint: endpoint { + remote-endpoint = <&sgtl5000_rx_endpoint>; + dai-format = "i2s"; + mclk-fs = <512>; + }; + }; +}; + +/* MicroSD */ +&sdmmc1 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc1_b4_pins_a>; + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; + broken-cd; + disable-wp; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&scmi_v3v3>; + vqmmc-supply = <&scmi_vddio1>; + no-1-8-v; + status = "okay"; +}; + +&spi1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi1_pins_a>; + pinctrl-1 = <&spi1_sleep_pins_a>; + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpioh 8 GPIO_ACTIVE_LOW>, <&gpioh 3 GPIO_ACTIVE_HIGH>; + status = "okay"; + + display: display@0 { + compatible = "rocktech,rk050hr345-ct106a", "ilitek,ili9806e"; + reg = <0>; + vdd-supply = <®_3v3>; + spi-max-frequency = <10000000>; + reset-gpios = <&gpiob 6 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <<dc_out>; + }; + }; + }; +}; + +&timers2 { + status = "okay"; + + pwm2: pwm { + pinctrl-0 = <&pwm2_pins_a>; + pinctrl-1 = <&pwm2_sleep_pins_a>; + pinctrl-names = "default", "sleep"; + status = "okay"; + }; +}; + +&timers4 { + status = "okay"; + + pwm4: pwm { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pwm4_pins_a>; + pinctrl-1 = <&pwm4_sleep_pins_a>; + status = "okay"; + }; +}; + +&usart1 { + pinctrl-names = "default", "idle", "sleep"; + pinctrl-0 = <&usart1_pins_b>; + pinctrl-1 = <&usart1_idle_pins_b>; + pinctrl-2 = <&usart1_sleep_pins_b>; + /delete-property/ dmas; + /delete-property/ dma-names; + status = "okay"; +}; + +&usart2 { + pinctrl-names = "default", "idle", "sleep"; + pinctrl-0 = <&usart2_pins_a>; + pinctrl-1 = <&usart2_idle_pins_a>; + pinctrl-2 = <&usart2_sleep_pins_a>; + /delete-property/ dmas; + /delete-property/ dma-names; + status = "okay"; +};
Signature · 1 line
2.43.0
PATCH v3 16/29 arm64: dts: st: move Engicam MicroGEA-STM32MP257D-RMM display to an overlay
In reply to Dario BinacchiThe board is fitted with different displays depending on the product variant. Keep in the board dts only what is common to all variants and move the RK050HR345-CT106A RGB panel and its touchscreen to an overlay.
[ upstream commit: c82d6c52a2514b0a5a7968b6fed8ff212b80e5e1 ]
(cherry picked from commit 8fbbd1cc0edb754a6653ec4af418e02887cb3bdb)
---
(no changes since v1)
...icrogea-rmm-overlay-rk050hr345-ct106a.dtso | 68 +++++++++++++++++++ .../st/stm32mp257d-engicam-microgea-rmm.dts | 46 +------------ 2 files changed, 69 insertions(+), 45 deletions(-) create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-rk050hr345-ct106a.dtso
dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-rk050hr345-ct106a.dtso new file +68 -0
@@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + * + * Rocktech RK050HR345-CT106A 5" 480x854 RGB panel with EDT FT5306 + * I2C touchscreen controller. + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +&i2c1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_pins_a>; + pinctrl-1 = <&i2c1_sleep_pins_a>; + i2c-scl-rising-time-ns = <185>; + i2c-scl-falling-time-ns = <20>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touchscreen@38 { + compatible = "edt,edt-ft5306"; + reg = <0x38>; + interrupt-parent = <&gpiob>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpiod 1 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <480>; + touchscreen-size-y = <854>; + }; +}; + +<dc { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_a>; + pinctrl-1 = <<dc_sleep_pins_a>; + status = "okay"; + + port { + ltdc_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; +}; + +&spi1 { + #address-cells = <1>; + #size-cells = <0>; + + display@0 { + compatible = "rocktech,rk050hr345-ct106a", "ilitek,ili9806e"; + reg = <0>; + vdd-supply = <®_3v3>; + spi-max-frequency = <10000000>; + reset-gpios = <&gpiob 6 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <<dc_out>; + }; + }; + }; +};
dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm.dts +1 -45
66 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 17/29 arm64: dts: st: add Engicam MicroGEA-STM32MP257D-RMM LVDS display overlay
In reply to Dario BinacchiAdd an overlay for the variant fitted with the AM-1280800W8TZQW-T00H 10.1" 1280x800 LVDS panel. Its touchscreen is connected over USB, so there is no touchscreen node.
[ upstream commit: 29ee49c0f82fffb8b0eed14b4ef3ff19ab89f455 ]
(cherry picked from commit 535f863022c1f9491a2d224023f5a6e3419ebc6f)
---
(no changes since v1)
...gea-rmm-overlay-am-1280800w8tzqw-t00h.dtso | 67 +++++++++++++++++++ .../st/stm32mp257d-engicam-microgea-rmm.dts | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-am-1280800w8tzqw-t00h.dtso
dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm-overlay-am-1280800w8tzqw-t00h.dtso new file +67 -0
@@ -0,0 +1,67 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + * + * Ampire AM-1280800W8TZQW-T00H 10.1" 1280x800 LVDS panel. Its touchscreen + * controller is connected over USB. + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/st,stm32mp25-rcc.h> + +&{/} { + panel-lvds { + compatible = "ampire,am-1280800w8tzqw-t00h"; + backlight = <&backlight>; + power-supply = <®_3v3>; + + port { + panel_in: endpoint { + remote-endpoint = <&lvds_out>; + }; + }; + }; +}; + +&framebuffer { + clocks = <&rcc CK_BUS_LTDC>, <&rcc CK_KER_LTDC>, + <&rcc CK_BUS_LVDS>, <&rcc CK_KER_LVDSPHY>; +}; + +<dc { + status = "okay"; + + port { + ltdc_out: endpoint { + remote-endpoint = <&lvds_in>; + }; + }; +}; + +&lvds { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lvds_in: endpoint { + remote-endpoint = <<dc_out>; + }; + }; + + port@1 { + reg = <1>; + + lvds_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +};
dts/upstream/src/arm64/st/stm32mp257d-engicam-microgea-rmm.dts +1 -1
@@ -43,7 +43,7 @@ #size-cells = <2>; ranges; - framebuffer { + framebuffer: framebuffer { compatible = "simple-framebuffer"; clocks = <&rcc CK_BUS_LTDC>, <&rcc CK_KER_LTDC>; lcd-supply = <®_3v3>;
Signature · 1 line
2.43.0
PATCH v3 18/29 arm: stm32mp: stm32mp2: move boot device environment helpers to SoC code
In reply to Dario BinacchiThe environment location and the MMC environment device only depend on the boot device reported by the ROM code, so they are not specific to the STMicroelectronics boards.
Move env_get_location(), mmc_get_env_dev() and the mmc_get_boot() helper to the SoC code, so that other vendor boards can use them too.
No functional change intended.
---
Changes in v3:
- Add Reviewed-by tag
arch/arm/mach-stm32mp/stm32mp2/Makefile | 1 + arch/arm/mach-stm32mp/stm32mp2/env.c | 82 +++++++++++++++++++++++++ board/st/stm32mp2/stm32mp2.c | 71 +-------------------- 3 files changed, 84 insertions(+), 70 deletions(-) create mode 100644 arch/arm/mach-stm32mp/stm32mp2/env.c
arch/arm/mach-stm32mp/stm32mp2/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-y += cpu.o obj-y += arm64-mmu.o +obj-y += env.o obj-y += rifsc.o obj-y += stm32mp2x.o obj-$(CONFIG_OF_SYSTEM_SETUP) += fdt.o
arch/arm/mach-stm32mp/stm32mp2/env.c new file +82 -0
82 lines not on this page · raw message
board/st/stm32mp2/stm32mp2.c +1 -70
87 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 19/29 splash: make splash_video_logo_load() available to boards
In reply to Dario BinacchiBoards providing their own splash_screen_prepare() to load the splash image from a board specific location have no way to fall back to the built-in logo when that image is missing.
Export splash_video_logo_load(), which copies the built-in logo to the "splashimage" address, so that they can use it as fallback.
---
(no changes since v2)
Changes in v2:
- Add Reviewed-by tag
common/splash.c | 4 +--- include/splash.h | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-)
common/splash.c +1 -3
@@ -70,7 +70,7 @@ static struct splash_location default_splash_locations[] = {#include <bmp_logo_data.h> -static int splash_video_logo_load (void ) +int splash_video_logo_load (void ) {char *splashimage;ulong bmp_load_addr;
@@ -90,8 +90,6 @@ static int splash_video_logo_load(void) return 0; } -#else -static inline int splash_video_logo_load (void ) {return -ENOSYS ; }#endif __weak int splash_screen_prepare (void )
include/splash.h +9 -0
@@ -61,6 +61,15 @@ static inline int splash_source_load(struct splash_location *locations, }#endif +#if IS_ENABLED (CONFIG_VIDEO_LOGO ) +int splash_video_logo_load (void ); +#else +static inline int splash_video_logo_load (void ) +{ +return -ENOSYS ; +} +#endif +int splash_screen_prepare (void );void splash_get_pos (int *x,int *y);int splash_display (void );
Signature · 1 line
2.43.0
PATCH v3 20/29 arm: stm32mp: move FWU multi-bank support to SoC code
In reply to Dario BinacchiThe FWU multi-bank support, i.e. the boot index read from the TAMP backup register and the selection of the partitions of the booted bank, only depends on the SoC and the TF-A, so it is not specific to the STMicroelectronics boards.
Move it from board/st/common to the SoC code, renaming it to fwu.c as the stm32mp_ prefix is redundant there, so that other vendor boards can use it too.
No functional change intended.
---
Changes in v3:
- Add Reviewed-by tag
arch/arm/mach-stm32mp/Makefile | 1 + board/st/common/stm32mp_fwu.c => arch/arm/mach-stm32mp/fwu.c | 0 board/st/common/Makefile | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename board/st/common/stm32mp_fwu.c => arch/arm/mach-stm32mp/fwu.c (100%)
arch/arm/mach-stm32mp/Makefile +1 -0
@@ -22,4 +22,5 @@ ifndef CONFIG_XPL_BUILD obj-y += cmd_stm32prog/ obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o obj-$(CONFIG_TFABOOT) += boot_params.o +obj-$(CONFIG_FWU_MULTI_BANK_UPDATE) += fwu.o endif
arch/arm/mach-stm32mp/fwu.c renamed from board/st/common/stm32mp_fwu.c +0 -0
board/st/common/Makefile +0 -1
@@ -9,7 +9,6 @@ obj-$(CONFIG_PMIC_STPMIC1) += stpmic1.o ifeq ($(CONFIG_ARCH_STM32MP),y) obj-$(CONFIG_SET_DFU_ALT_INFO) += stm32mp_dfu.o obj-$(CONFIG_$(PHASE_)DFU_VIRT) += stm32mp_dfu_virt.o -obj-$(CONFIG_FWU_MULTI_BANK_UPDATE) += stm32mp_fwu.o endif obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o
Signature · 1 line
2.43.0
PATCH v3 21/29 configs: stm32mp25: move FWU A/B boot environment to common settings
In reply to Dario BinacchiThe distro boot environment booting from the bootfs partition of the bank selected by the TF-A only depends on the FWU multi-bank support, so it is not specific to the STMicroelectronics boards.
Move it to the STM32MP25 common settings, so that other vendor boards can use it too.
No functional change intended.
---
Changes in v3:
- Add Reviewed-by tag
include/configs/stm32mp25_common.h | 20 ++++++++++++++++++++ include/configs/stm32mp25_st_common.h | 15 --------------- 2 files changed, 20 insertions(+), 15 deletions(-)
include/configs/stm32mp25_common.h +20 -0
@@ -86,6 +86,25 @@#define STM32MP_BOARD_EXTRA_ENV #endif +/* +* With FWU multi-bank update, boot from the bootfs partition of the bank +* selected by the TF-A ("boot_partuuid" set from the FWU metadata), +* falling back to the bootable partitions if it is not available. +*/ +#ifdef CONFIG_FWU_MULTI_BANK_UPDATE +#define SCAN_DEV_FOR_BOOT_PARTS \ + "setenv devplist; " \ + "env exists boot_partuuid && " \ + "part number ${devtype} ${devnum} ${boot_partuuid} devplist; " \ + "env exists devplist || " \ + "part list ${devtype} ${devnum} -bootable devplist; " + +#define STM32MP_FWU_ENV \ + "altbootcmd=${bootcmd}\0" +#else +#define STM32MP_FWU_ENV +#endif +#define STM32MP_EXTRA \ "env_check=if env info -p -d -q; then env save; fi\0" \ "boot_net_usb_start=true\0"
@@ -119,6 +138,7 @@STM32MP_BOOTCMD \ BOOTENV \ STM32MP_EXTRA \ + STM32MP_FWU_ENV \ STM32MP_BOARD_EXTRA_ENV#endif
include/configs/stm32mp25_st_common.h +0 -15
@@ -8,22 +8,7 @@#ifndef __CONFIG_STM32MP25_ST_COMMON_H__#define __CONFIG_STM32MP25_ST_COMMON_H__ -#ifdef CONFIG_FWU_MULTI_BANK_UPDATE -#define SCAN_DEV_FOR_BOOT_PARTS \ - "setenv devplist; " \ - "env exists boot_partuuid && " \ - "part number ${devtype} ${devnum} ${boot_partuuid} devplist; " \ - "env exists devplist || " \ - "part list ${devtype} ${devnum} -bootable devplist; " - -#define ST_STM32MP25_FWU_ENV \ - "altbootcmd=${bootcmd}\0" -#else -#define ST_STM32MP25_FWU_ENV -#endif -#define STM32MP_BOARD_EXTRA_ENV \ - ST_STM32MP25_FWU_ENV \ "usb_pgood_delay=2000\0" \ "console=ttySTM0\0"
Signature · 1 line
2.43.0
PATCH v3 22/29 video: simple_panel: add Ampire AM-1280800W8TZQW-T00H panel
In reply to Dario BinacchiAdd timing data for the Ampire AM-1280800W8TZQW-T00H 10.1" LVDS panel from Linux to the simple-panel driver.
---
Changes in v3:
- Add Reviewed-by tag
drivers/video/simple_panel.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/video/simple_panel.c +19 -0
@@ -208,6 +208,23 @@ static const struct panel_ops simple_panel_ops = { .get_modes = simple_panel_get_modes, }; +static const struct drm_display_mode ampire_am_1280800w8tzqw_t00h_mode = { + .clock =72400 , + .hdisplay =1280 , + .hsync_start =1280 +40 , + .hsync_end =1280 +40 +80 , + .htotal =1280 +40 +80 +40 , + .vdisplay =800 , + .vsync_start =800 +10 , + .vsync_end =800 +10 +18 , + .vtotal =800 +10 +18 +10 , +}; + +static const struct simple_panel_drv_data ampire_am_1280800w8tzqw_t00h_data = { + .modes = &ire_am_1280800w8tzqw_t00h_mode, + .num_modes =1 , +}; +static const struct mipi_dsi_panel_plat panasonic_vvx10f004b00 = { .mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_SYNC_PULSE |MIPI_DSI_CLOCK_NON_CONTINUOUS ,
@@ -240,6 +257,8 @@ static const struct simple_panel_drv_data tfc_s9700rtwv43tr_01b_data = {static const struct udevice_id simple_panel_ids[] = { { .compatible ="simple-panel" }, { .compatible ="panel-lvds" }, + { .compatible ="ampire,am-1280800w8tzqw-t00h" , + .data = (ulong)&ire_am_1280800w8tzqw_t00h_data }, { .compatible ="auo,b133xtn01" }, { .compatible ="auo,b116xw03" }, { .compatible ="auo,b133htn01" },
Signature · 1 line
2.43.0
PATCH v3 23/29 video: stm32: ltdc: select the pixel clock source on STM32MP25
In reply to Dario BinacchiOn STM32MP25 the LTDC pixel clock is selected by the SYSCFG DISPLAYCLKCR mux, referenced by the "ref" clock of the LTDC, whose reset value is the LVDS PHY clock. As nothing programs it, a panel connected directly to the LTDC gets no pixel clock.
Select the LTDC kernel clock when a panel is connected directly to the LTDC, and the LVDS PHY clock when the LTDC feeds the LVDS bridge.
---
Changes in v3:
- Select the pixel clock source only on st,stm32mp255-ltdc
drivers/video/stm32/stm32_ltdc.c | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+)
drivers/video/stm32/stm32_ltdc.c +55 -0
@@ -12,7 +12,9 @@#include <dm.h> #include <log.h> #include <panel.h> +#include <regmap.h> #include <reset.h> +#include <syscon.h> #include <video.h> #include <video_bridge.h> #include <asm/io.h>
@@ -275,6 +277,12 @@ static const u32 layer_regs_a2[] = {#define HWVER_40100 0x040100#define HWVER_40101 0x040101 +/* STM32MP25 SYSCFG pixel clock mux, described by the "ref" clock */ +#define SYSCFG_DISPLAYCLKCR 0x5000 +#define DISPLAYCLKCR_DPIVSLVDS GENMASK(1, 0) +#define DISPLAYCLKCR_LVDS 1 +#define DISPLAYCLKCR_DPI 2 +enum stm32_ltdc_pix_fmt {PF_ARGB8888 =0 ,/* ARGB [32 bits] */ PF_ABGR8888 ,/* ABGR [32 bits] */
@@ -709,6 +717,44 @@ static int stm32_ltdc_of_to_plat(struct udevice *dev)return ret; } +/* +* On STM32MP25 the LTDC pixel clock is selected in SYSCFG_DISPLAYCLKCR +* among the DSI byte lane clock, the LVDS PHY pixel clock (reset value) +* and the LTDC kernel clock, which is used with the RGB output. Select +* it according to the device connected to the LTDC. +*/ +static int stm32_ltdc_set_pixel_clock_source (struct udevice *dev) +{ +struct stm32_ltdc_plat *plat =dev_get_plat (dev); +struct ofnode_phandle_args args; +struct regmap *regmap; +int index, ret; +u32 src; + + index =dev_read_stringlist_search (dev,"clock-names" ,"ref" ); +if (index <0 ) +return 0 ; + +if (!plat->bridge) + src =DISPLAYCLKCR_DPI ; +else if (device_is_compatible (plat->bridge,"st,stm32mp25-lvds" )) + src =DISPLAYCLKCR_LVDS ; +else +return 0 ; + + ret =dev_read_phandle_with_args (dev,"clocks" ,"#clock-cells" ,0 , + index, &args); +if (ret) +return ret; + + regmap =syscon_node_to_regmap (args.node); +if (IS_ERR (regmap)) +return PTR_ERR (regmap); + +return regmap_update_bits (regmap,SYSCFG_DISPLAYCLKCR , +DISPLAYCLKCR_DPIVSLVDS , src); +} +static int stm32_ltdc_probe (struct udevice *dev) {struct video_uc_plat *uc_plat =dev_get_uclass_plat (dev);
@@ -719,6 +765,15 @@ static int stm32_ltdc_probe(struct udevice *dev)ulong rate;int ret; +if (device_is_compatible (dev,"st,stm32mp255-ltdc" )) { + ret =stm32_ltdc_set_pixel_clock_source (dev); +if (ret) { +dev_err (dev,"pixel clock source selection error %d\n" , + ret); +return ret; + } + } + ret =clk_enable (&plat->bclk);if (ret) {dev_err (dev,"bus clock enable error %d\n" , ret);
Signature · 1 line
2.43.0
PATCH v3 24/29 boot: extension: allow longer overlay file names
In reply to Dario BinacchiThe overlay file name is limited to 63 characters, which is too short for the Linux overlays named after the base devicetree, such as:
st/stm32mp257d-engicam-microgea-rmm-overlay-am-1280800w8tzqw-t00h.dtbo
Increase the buffer size to 128 bytes. The structure is never passed to the OS and all its users size the overlay field with sizeof() or strlen(), so the change is safe.
---
(no changes since v2)
Changes in v2:
- Add Reviewed-by tag
include/extension_board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/extension_board.h +1 -1
@@ -62,7 +62,7 @@ struct extension {char name[32 ];char owner[32 ];char version[32 ]; -char overlay[64 ]; +char overlay[128 ];char other[32 ]; };
Signature · 1 line
2.43.0
PATCH v3 25/29 dts: support applying DT overlays to the control DT with OF_UPSTREAM
In reply to Dario BinacchiExtend to OF_UPSTREAM the support for building the control DT by applying DT overlays to a base DT, so far available for the DTs in arch/$(ARCH)/dts only. The upstream DT overlays to apply are listed in CONFIG_OF_UPSTREAM_CONTROL_DT_OVERLAYS.
---
Changes in v3:
- Add Reviewed-by tag
Changes in v2:
- New patch
dts/Kconfig | 10 ++++++++++ dts/Makefile | 2 ++ scripts/Makefile.dts | 7 +++++++ 3 files changed, 19 insertions(+)
dts/Kconfig +10 -0
@@ -137,6 +137,16 @@ config OF_UPSTREAM_VENDOR help Select the vendor to build all devicetree files for. +config OF_UPSTREAM_CONTROL_DT_OVERLAYS + string "List of upstream device tree overlays to apply for DT control" + depends on OF_UPSTREAM + help + This option specifies a list of device tree overlays to apply at + build time to the device tree used for DT control, so that the + board can select at run-time the hardware they describe. This is + a list of device tree overlays (without the .dtbo suffix) + separated by <space>. + config OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS bool "Build local DTBOs as fallback for DTBOs missing upstream" default n
dts/Makefile +2 -0
@@ -32,6 +32,8 @@ endif ifneq ($(EXT_DTB),) DTB := $(EXT_DTB) +else ifneq ($(subst ",,$(CONFIG_OF_UPSTREAM_CONTROL_DT_OVERLAYS)),) +DTB := $(dt_dir)/$(DEVICE_TREE)-overlays.dtb else DTB := $(dt_dir)/$(DEVICE_TREE).dtb endif
scripts/Makefile.dts +7 -0
@@ -16,6 +16,13 @@ dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts)) endif +ifneq ($(subst ",,$(CONFIG_OF_UPSTREAM_CONTROL_DT_OVERLAYS)),) +control-dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE))) +$(control-dt)-overlays-dtbs := $(control-dt).dtb \ + $(patsubst %,%.dtbo,$(subst ",,$(CONFIG_OF_UPSTREAM_CONTROL_DT_OVERLAYS))) +dtb-y += $(control-dt)-overlays.dtb +endif + ifneq ($(CONFIG_SYS_DTC_PAD_BYTES),0) DTC_FLAGS += -p $(CONFIG_SYS_DTC_PAD_BYTES) endif
Signature · 1 line
2.43.0
PATCH v3 26/29 board: engicam: stm32mp2: add MicroGEA-STM32MP257D-RMM board
In reply to Dario BinacchiAdd support for the Engicam MicroGEA-STM32MP257D-RMM board, based on the Engicam MicroGEA-STM32MP257 SoM.
General features:
- STM32MP257D SoC
- 2GB of RAM
- eMMC
- microSD slot
- CAN
- Audio codec (SGTL5000)
- PWM backlight and buzzer
- 5" RGB or 10.1" LVDS display
As for the Engicam STM32MP1 SoMs, add a dedicated target for the SoM, so that the carrier boards are handled by the devicetree.
The display can't be detected, so it is selected by the "display" environment variable, which defaults to the RGB one. The board registers an extension driver reporting the matching Linux devicetree overlay, which the extlinux and EFI boot methods apply to the kernel devicetree.
---
Changes in v3:
- Add Reviewed-by tag
Changes in v2:
- Simplify the comments
...m32mp257d-engicam-microgea-rmm-u-boot.dtsi | 27 +++++ arch/arm/mach-stm32mp/Kconfig.25x | 17 +++ board/engicam/stm32mp2/Kconfig | 12 ++ board/engicam/stm32mp2/MAINTAINERS | 7 ++ board/engicam/stm32mp2/Makefile | 7 ++ board/engicam/stm32mp2/microgea-stm32mp2.env | 9 ++ board/engicam/stm32mp2/stm32mp2.c | 104 +++++++++++++++++ configs/stm32mp25-microgea-rmm_defconfig | 105 ++++++++++++++++++ 8 files changed, 288 insertions(+) create mode 100644 arch/arm/dts/stm32mp257d-engicam-microgea-rmm-u-boot.dtsi create mode 100644 board/engicam/stm32mp2/Kconfig create mode 100644 board/engicam/stm32mp2/MAINTAINERS create mode 100644 board/engicam/stm32mp2/Makefile create mode 100644 board/engicam/stm32mp2/microgea-stm32mp2.env create mode 100644 board/engicam/stm32mp2/stm32mp2.c create mode 100644 configs/stm32mp25-microgea-rmm_defconfig
arch/arm/dts/stm32mp257d-engicam-microgea-rmm-u-boot.dtsi new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + */ + +#include "stm32mp25-u-boot.dtsi" + +/ { + config { + u-boot,mmc-env-partition = "u-boot-env"; + }; +}; + +&usart2 { + bootph-all; +}; + +&usart2_pins_a { + bootph-all; + pins1 { + bootph-all; + }; + pins2 { + bootph-all; + }; +};
arch/arm/mach-stm32mp/Kconfig.25x +17 -0
@@ -13,6 +13,22 @@ config TARGET_ST_STM32MP25X managed by board/st/stm32mp2 The difference between board are managed with devicetree +config TARGET_MICROGEA_STM32MP257 + bool "Engicam MicroGEA STM32MP257 SOM" + select SUPPORT_EXTENSION_SCAN + imply BOOTSTAGE + imply CMD_BOOTSTAGE + help + MicroGEA STM32MP257 is a System-on-Module (SoM) from Engicam + based on the STM32MP257 SoC, with 2GB of RAM and eMMC. + + The carrier boards supported are managed with devicetree: + * MicroGEA STM32MP257D RMM + + The display fitted on the carrier board is described by a + devicetree overlay, selected through the "display" environment + variable and applied to the kernel devicetree at boot. + endchoice config TEXT_BASE
@@ -35,6 +51,7 @@ config DEBUG_UART_BASE endif +source "board/engicam/stm32mp2/Kconfig" source "board/st/stm32mp2/Kconfig" endif
board/engicam/stm32mp2/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_MICROGEA_STM32MP257 + +config SYS_BOARD + default "stm32mp2" + +config SYS_VENDOR + default "engicam" + +config SYS_CONFIG_NAME + default "stm32mp25_common" + +endif
board/engicam/stm32mp2/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +MicroGEA-STM32MP257D-RMM +M: Dario Binacchi <[email protected]> +M: Michael Trimarchi <[email protected]> +S: Maintained +F: arch/arm/dts/stm32mp257d-engicam-microgea-rmm* +F: board/engicam/stm32mp2/ +F: configs/stm32mp25-microgea-rmm_defconfig
board/engicam/stm32mp2/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause +# +# Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> +# Copyright (C) 2026 Engicam srl +# + +obj-y += stm32mp2.o
board/engicam/stm32mp2/microgea-stm32mp2.env new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */ +/* + * Copyright (C) 2026 Amarula Solutions, Dario Binacchi <[email protected]> + * Copyright (C) 2026 Engicam srl + */ + +/* Default display of the carrier board */ +display=rk050hr345-ct106a +extension_overlay_addr=0x90300000
board/engicam/stm32mp2/stm32mp2.c new file +104 -0
104 lines not on this page · raw message
configs/stm32mp25-microgea-rmm_defconfig new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH v3 27/29 board: engicam: stm32mp2: add splash screen
In reply to Dario BinacchiThe U-Boot devicetree includes the overlays of all the supported displays. Enable only the one selected by the "display" environment variable.
The customer splash image is loaded from its partition, falling back to the built-in logo.
---
Changes in v3:
- Add Reviewed-by tag
Changes in v2:
- Apply the upstream display overlays to the U-Boot devicetree instead of describing the displays in the -u-boot.dtsi file
- Do not leave the LTDC RGB pins configured with the LVDS display
...m32mp257d-engicam-microgea-rmm-u-boot.dtsi | 5 + board/engicam/stm32mp2/microgea-stm32mp2.env | 4 + board/engicam/stm32mp2/stm32mp2.c | 179 ++++++++++++++++++ configs/stm32mp25-microgea-rmm_defconfig | 16 ++ 4 files changed, 204 insertions(+)
arch/arm/dts/stm32mp257d-engicam-microgea-rmm-u-boot.dtsi +5 -0
@@ -12,6 +12,11 @@ }; }; +<dc { + clocks = <&rcc CK_KER_LTDC>, <&rcc CK_BUS_LTDC>, <&syscfg>, <&lvds>; + bootph-all; +}; + &usart2 { bootph-all; };
board/engicam/stm32mp2/microgea-stm32mp2.env +4 -0
@@ -7,3 +7,7 @@ /* Default display of the carrier board */ display=rk050hr345-ct106a extension_overlay_addr=0x90300000 + +splashfile=splash.bmp +splashimage=CONFIG_SYS_LOAD_ADDR +splashpos=m,m
board/engicam/stm32mp2/stm32mp2.c +179 -0
197 lines not on this page · raw message
configs/stm32mp25-microgea-rmm_defconfig +16 -0
@@ -38,6 +38,7 @@ CONFIG_CMD_PWM=y # CONFIG_CMD_LOADB is not set CONFIG_CMD_MMC=y CONFIG_CMD_MTD=y +CONFIG_CMD_BMP=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y CONFIG_CMD_RNG=y
@@ -48,6 +49,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_LIVE=y CONFIG_OF_UPSTREAM_BUILD_VENDOR=y CONFIG_OF_UPSTREAM_VENDOR="st" +CONFIG_OF_UPSTREAM_CONTROL_DT_OVERLAYS="st/stm32mp257d-engicam-microgea-rmm-overlay-rk050hr345-ct106a st/stm32mp257d-engicam-microgea-rmm-overlay-am-1280800w8tzqw-t00h" CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_SPI_FLASH=y
@@ -98,6 +100,20 @@ CONFIG_DM_SPI=y CONFIG_STM32_OSPI=y CONFIG_STM32_SPI=y # CONFIG_OPTEE_TA_AVB is not set +CONFIG_VIDEO=y +CONFIG_VIDEO_LOGO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_LCD_ILITEK_ILI9806E=y +CONFIG_VIDEO_STM32=y +CONFIG_VIDEO_STM32_LVDS=y +CONFIG_VIDEO_STM32_MAX_XRES=1280 +CONFIG_VIDEO_STM32_MAX_YRES=854 +CONFIG_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_SPLASH_SOURCE=y +CONFIG_BMP_16BPP=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y CONFIG_WDT=y CONFIG_WDT_STM32MP=y CONFIG_WDT_ARM_SMC=y
Signature · 1 line
2.43.0
PATCH v3 28/29 board: engicam: stm32mp2: support FWU A/B bank bootup
In reply to Dario BinacchiEnable the FWU multi-bank update. The FWU metadata are stored in the boot device, so point the "fwu-mdata-store" property to it at runtime.
---
Changes in v3:
- Add Reviewed-by tag
...m32mp257d-engicam-microgea-rmm-u-boot.dtsi | 6 +++ board/engicam/stm32mp2/stm32mp2.c | 40 +++++++++++++++++++ configs/stm32mp25-microgea-rmm_defconfig | 6 +++ 3 files changed, 52 insertions(+)
arch/arm/dts/stm32mp257d-engicam-microgea-rmm-u-boot.dtsi +6 -0
@@ -10,6 +10,12 @@ config { u-boot,mmc-env-partition = "u-boot-env"; }; + + /* moved to the eMMC, when booting from it, by board_fix_fdt() */ + fwu-mdata { + compatible = "u-boot,fwu-mdata-gpt"; + fwu-mdata-store = <&sdmmc1>; + }; }; <dc {
board/engicam/stm32mp2/stm32mp2.c +40 -0
@@ -12,6 +12,7 @@#include <env.h> #include <event.h> #include <extension_board.h> +#include <fdt_support.h> #include <log.h> #include <splash.h> #include <asm/arch/stm32.h>
@@ -217,6 +218,45 @@ int splash_screen_prepare(void) }#endif +#if CONFIG_IS_ENABLED (OF_BOARD_FIXUP ) +/* +* The FWU metadata are stored in the boot device, the SD card or the +* eMMC, so point the "fwu-mdata-store" property to it. The phandle is +* replaced in place, since the devicetree is already in use. +*/ +int board_fix_fdt (void *blob) +{ +u32 bootmode =get_bootmode (); +unsigned int instance = (bootmode &TAMP_BOOT_INSTANCE_MASK ) -1 ; +int node, store; +char alias[8 ]; +u32 phandle; + + node =fdt_node_offset_by_compatible (blob,-1 ,"u-boot,fwu-mdata-gpt" ); +if (node <0 ) +return 0 ; + +switch (bootmode &TAMP_BOOT_DEVICE_MASK ) { +case BOOT_FLASH_SD : +case BOOT_FLASH_EMMC : +break ; +default : +return 0 ; + } + +snprintf (alias,sizeof (alias),"mmc%u" , instance); + store =fdt_path_offset (blob, alias); +if (store <0 ) +return store; + + phandle =fdt_get_phandle (blob, store); +if (!phandle) +return -ENOENT ; + +return fdt_setprop_inplace_u32 (blob, node,"fwu-mdata-store" , phandle); +} +#endif +int board_late_init (void ) {const char *fdt_compat;
configs/stm32mp25-microgea-rmm_defconfig +6 -0
@@ -14,10 +14,13 @@ CONFIG_CMD_STM32KEY=y CONFIG_MFD_STM32_TIMERS=y CONFIG_ENV_OFFSET_REDUND=0x940000 CONFIG_TARGET_MICROGEA_STM32MP257=y +CONFIG_FWU_NUM_IMAGES_PER_BANK=3 +CONFIG_OF_BOARD_FIXUP=y CONFIG_SYS_MEMTEST_START=0x84000000 CONFIG_SYS_MEMTEST_END=0x88000000 CONFIG_API=y CONFIG_SYS_MMC_MAX_DEVICE=3 +CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_FIT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=1
@@ -25,6 +28,7 @@ CONFIG_BOOTCOMMAND="run bootcmd_stm32mp" # CONFIG_BOARD_INIT is not set CONFIG_SYS_PROMPT="STM32MP> " # CONFIG_CMD_BDI is not set +CONFIG_CMD_FWU_METADATA=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_ADTIMG=y # CONFIG_CMD_ELF is not set
@@ -119,3 +123,5 @@ CONFIG_WDT_STM32MP=y CONFIG_WDT_ARM_SMC=y # CONFIG_UBIFS_SILENCE_DEBUG_DUMP is not set CONFIG_ERRNO_STR=y +CONFIG_FWU_MULTI_BANK_UPDATE=y +CONFIG_FWU_MDATA_V2=y
Signature · 1 line
2.43.0
PATCH v3 29/29 board: engicam: stm32mp2: enable simple framebuffer for the splash screen
In reply to Dario BinacchiEnable the simple-framebuffer node of the Linux devicetree to preserve the splash screen until the Linux display driver takes over.
---
Changes in v3:
- Add Reviewed-by tag
Changes in v2:
- Drop a redundant comment
board/engicam/stm32mp2/stm32mp2.c | 17 +++++++++++++++++ configs/stm32mp25-microgea-rmm_defconfig | 2 ++ 2 files changed, 19 insertions(+)
board/engicam/stm32mp2/stm32mp2.c +17 -0
@@ -12,6 +12,7 @@#include <env.h> #include <event.h> #include <extension_board.h> +#include <fdt_simplefb.h> #include <fdt_support.h> #include <log.h> #include <splash.h>
@@ -218,6 +219,22 @@ int splash_screen_prepare(void) }#endif +#if CONFIG_IS_ENABLED (OF_BOARD_SETUP ) +int ft_board_setup (void *blob,struct bd_info *bd) +{ +int ret; + +if (IS_ENABLED (CONFIG_FDT_SIMPLEFB )) { + ret =fdt_simplefb_enable_and_mem_rsv (blob); +if (ret) +log_warning ("cannot hand over the framebuffer (%d)\n" , + ret); + } + +return 0 ; +} +#endif +#if CONFIG_IS_ENABLED (OF_BOARD_FIXUP )/* * The FWU metadata are stored in the boot device, the SD card or the
configs/stm32mp25-microgea-rmm_defconfig +2 -0
@@ -24,6 +24,8 @@ CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_FIT=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=1 +CONFIG_OF_BOARD_SETUP=y +CONFIG_FDT_SIMPLEFB=y CONFIG_BOOTCOMMAND="run bootcmd_stm32mp" # CONFIG_BOARD_INIT is not set CONFIG_SYS_PROMPT="STM32MP> "
Signature · 1 line
2.43.0