* [PATCH v5 00/13] Enable display support for STM32MP25
@ 2025-08-22 14:34 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
` (13 more replies)
0 siblings, 14 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Krzysztof Kozlowski
This series aims to add and enable sufficient LVDS display support for
STM32MP257F-EV1 board.
LVDS is the default use case to drive a display panel on STM32MP257F-EV,
even though DSI panels will be supported in the near future.
The LTDC needs a pixel rate in sync with the bridge currently in use.
For that both DSI and LVDS bridges need to declare an internal clock and
become clock provider to the mux. The mux then selects the reference
clock for the LTDC pixel rate generation.
For now this mux is handled internally in the LTDC, while waiting for
the STM32 clock framework to merge a 'clk-mux' based on the SYSCFG.
This explains the link done in the patch [7/8] between the LVDS,
providing the reference clock for the LTDC internals.
+----------+ |\
| DSI PHY |------------->| \ +------------+
| |ck_dsi_phy | | | |
+----------+ | |--------->| LTDC |
+----------+ | |pixel_clk | |
| LVDS PHY |------------->| | +------------+
| |clk_pix_lvds | |
+----------+ | |
| |
ck_ker_ltdc ------------>| /
|/|
└- SYSCFG
Clock selection applies as follow:
- 0b00: Selects ck_dsi_phy
- 0b01: Selects clk_pix_lvds
- 0b10: Selects ck_ker_ltdc (for parallel or DSI display).
- 0b11: Reserved
The reset value of the register controlling the mux is 0b01, meaning
that the default clock assigned is the clk_pix_lvds. This causes two
things:
- In order to get basic display on the LVDS encoder, like intended,
nothing has to be done on this mux within the LTDC driver (which for now
explains the unused syscfg phandle on the LTDC node in the device-tree).
- 'pixel_clk' is dependent from 'clk_pix_lvds' because of the LTDC clock
domains. They also need to be sync to get a coherent pixel rate though
the display clock tree (which explains the LVDS phandle on the LTDC node
in the device-tree).
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
Changes in v5:
- Documentation:
- LTDC: Clamp correctly min/maxItems value (again)
- Add Yannick's trailers where relevant except in patch [01/13] which
has been modified
- Link to v4: https://lore.kernel.org/r/20250821-drm-misc-next-v4-0-7060500f8fd3@foss.st.com
Changes in v4:
- Documentation:
- LTDC: Add "st,stm32mp255-ltdc" compatible. After internal
discussion, we came to the solution that the LTDC on STM32MP255 SoC
needs its own compatible, since it does have the same amount of
clocks than on STM32MP251 SoC.
- Devicetree:
- Add "st,stm32mp255" compatible on corresponding dtsi
- Drivers:
- LTDC: Handle "st,stm32mp255" compatible
- Remove Rob's r-b from patch [01/13] since it was modified.
- Link to v3: https://lore.kernel.org/r/20250819-drm-misc-next-v3-0-04153978ebdb@foss.st.com
Changes in v3:
- Rebased on latest drm-misc-next
- Documentation:
- LTDC: Clamp correctly min/maxItems value
- LVDS: Remove second 'items' keyword
- Add Krzysztof's trailer where relevant
- Link to v2: https://lore.kernel.org/r/20250812-drm-misc-next-v2-0-132fd84463d7@foss.st.com
Changes in v2:
- Documentation:
- Add support for new compatible "st,stm32mp255-lvds"
- Change LTDC compatible for SoC compliant one
- Make clearer LTDC clock-names property
- Devicetree:
- Change compatible according to the documentation
- Change clock and clock-names order to match documentation (and avoid
warnings)
- Drivers:
- Change LTDC compatible
- Add Rob's trailer where relevant
- Link to v1: https://lore.kernel.org/r/20250725-drm-misc-next-v1-0-a59848e62cf9@foss.st.com
---
Raphael Gallais-Pou (11):
dt-bindings: display: st: add two new compatibles to LTDC device
dt-bindings: display: st,stm32-ltdc: add access-controllers property
dt-bindings: display: st: add new compatible to LVDS device
dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
dt-bindings: display: st,stm32mp25-lvds: add power-domains property
dt-bindings: arm: stm32: add required #clock-cells property
arm64: dts: st: add ltdc support on stm32mp251
arm64: dts: st: add ltdc support on stm32mp255
arm64: dts: st: add lvds support on stm32mp255
arm64: dts: st: add clock-cells to syscfg node on stm32mp251
arm64: dts: st: enable display support on stm32mp257f-ev1 board
Yannick Fertre (2):
drm/stm: ltdc: support new hardware version for STM32MP25 SoC
drm/stm: ltdc: handle lvds pixel clock
.../bindings/arm/stm32/st,stm32-syscon.yaml | 31 ++++++---
.../devicetree/bindings/display/st,stm32-ltdc.yaml | 55 ++++++++++++++-
.../bindings/display/st,stm32mp25-lvds.yaml | 13 +++-
arch/arm64/boot/dts/st/stm32mp251.dtsi | 19 ++++++
arch/arm64/boot/dts/st/stm32mp255.dtsi | 20 +++++-
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 79 ++++++++++++++++++++++
drivers/gpu/drm/stm/drv.c | 12 +++-
drivers/gpu/drm/stm/ltdc.c | 58 +++++++++++++++-
drivers/gpu/drm/stm/ltdc.h | 6 ++
9 files changed, 275 insertions(+), 18 deletions(-)
---
base-commit: c8cea4371e5eca30cda8660aabb337747dabc51d
change-id: 20250617-drm-misc-next-4af406c1c45f
Best regards,
--
Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-24 9:21 ` Krzysztof Kozlowski
2025-08-28 13:51 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
` (12 subsequent siblings)
13 siblings, 2 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
The new STMicroelectronics SoC features a display controller similar to
the one used in previous SoCs. Because there is additional registers,
and different mandatory clocks it is incompatible with existing IPs. On
STM32MP251, the device only needs two clocks while on STM32MP255 it
needs four.
Add the new names to the list of compatible string and handle each
quirks accordingly.
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
.../devicetree/bindings/display/st,stm32-ltdc.yaml | 52 +++++++++++++++++++++-
1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
index d6ea4d62a2cfae26353c9f20a326a4329fed3a2f..1233345a16307532ea08d3686d194b486f897ea9 100644
--- a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
@@ -12,7 +12,10 @@ maintainers:
properties:
compatible:
- const: st,stm32-ltdc
+ enum:
+ - st,stm32-ltdc
+ - st,stm32mp251-ltdc
+ - st,stm32mp255-ltdc
reg:
maxItems: 1
@@ -24,11 +27,16 @@ properties:
minItems: 1
clocks:
- maxItems: 1
+ minItems: 1
+ maxItems: 4
clock-names:
items:
- const: lcd
+ - const: bus
+ - const: ref
+ - const: lvds
+ minItems: 1
resets:
maxItems: 1
@@ -51,6 +59,46 @@ required:
- resets
- port
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32-ltdc
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32mp251-ltdc
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ minItems: 2
+ maxItems: 2
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32mp255-ltdc
+ then:
+ properties:
+ clocks:
+ minItems: 4
+ clock-names:
+ minItems: 4
+
additionalProperties: false
examples:
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
` (11 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
access-controllers is an optional property that allows a peripheral to
refer to one or more domain access controller(s).
This property is added when the peripheral is under the STM32 firewall
controller. It allows an accurate representation of the hardware, where
the peripheral is connected to a firewall bus. The firewall can then check
the peripheral accesses before allowing its device to probe.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
index 1233345a16307532ea08d3686d194b486f897ea9..77058a5ccf682832b923d3e0c5ce0cdf1f0b85f4 100644
--- a/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
@@ -41,6 +41,9 @@ properties:
resets:
maxItems: 1
+ access-controllers:
+ maxItems: 1
+
port:
$ref: /schemas/graph.yaml#/properties/port
description: |
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 03/13] dt-bindings: display: st: add new compatible to LVDS device
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
` (10 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Krzysztof Kozlowski
Update the compatible to accept both "st,stm32mp255-lvds" and
st,stm32mp25-lvds" respectively. Default will fall back to
"st,stm32mp25-lvds".
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
index 6736f93256b5cebb558cda5250369ec4b1b3033c..74e61d95370c299130410cdaae833514324c3e8f 100644
--- a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
@@ -31,7 +31,12 @@ description: |
properties:
compatible:
- const: st,stm32mp25-lvds
+ oneOf:
+ - items:
+ - enum:
+ - st,stm32mp255-lvds
+ - const: st,stm32mp25-lvds
+ - const: st,stm32mp25-lvds
"#clock-cells":
const: 0
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (2 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
` (9 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
access-controllers is an optional property that allows a peripheral to
refer to one or more domain access controller(s).
This property is added when the peripheral is under the STM32 firewall
controller. It allows an accurate representation of the hardware, where
the peripheral is connected to a firewall bus. The firewall can then
check the peripheral accesses before allowing its device to probe.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
index 74e61d95370c299130410cdaae833514324c3e8f..05a73bbc246a8994b6aabf7c2cd9dca773232be4 100644
--- a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
@@ -59,6 +59,9 @@ properties:
resets:
maxItems: 1
+ access-controllers:
+ maxItems: 1
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (3 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
` (8 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
STM32 LVDS peripheral may be in a power domain. Allow an optional
single 'power-domains' entry for STM32 LVDS devices.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
index 05a73bbc246a8994b6aabf7c2cd9dca773232be4..14e042156179cb2f2d906422eaff6840da3c91ea 100644
--- a/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32mp25-lvds.yaml
@@ -62,6 +62,9 @@ properties:
access-controllers:
maxItems: 1
+ power-domains:
+ maxItems: 1
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (4 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-28 15:18 ` Christophe ROULLIER
2025-08-22 14:34 ` [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
` (7 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On STM32MP25 SoC, the syscfg peripheral provides a clock to the display
subsystem through a multiplexer. Since it only provides a single clock,
the cell value is 0.
Doing so allows the clock consumers to reach the peripheral and gate the
clock accordingly.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
.../bindings/arm/stm32/st,stm32-syscon.yaml | 31 +++++++++++++++-------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
index ed97652c84922813e94b1818c07fe8714891c089..95d2319afe235fa86974d80f89c9deeae2275232 100644
--- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
+++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
@@ -36,20 +36,31 @@ properties:
clocks:
maxItems: 1
+ "#clock-cells":
+ const: 0
+
required:
- compatible
- reg
-if:
- properties:
- compatible:
- contains:
- enum:
- - st,stm32mp157-syscfg
- - st,stm32f4-gcan
-then:
- required:
- - clocks
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - st,stm32mp157-syscfg
+ - st,stm32f4-gcan
+ then:
+ required:
+ - clocks
+ - if:
+ properties:
+ compatible:
+ const: st,stm32mp25-syscfg
+ then:
+ required:
+ - "#clock-cells"
additionalProperties: false
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (5 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-28 13:52 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
` (6 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
From: Yannick Fertre <yannick.fertre@foss.st.com>
STM32MP25 SoC features a new version of the LTDC IP. Add its compatible
to the list of device to probe and implement its quirks.
This hardware supports a pad frequency of 150MHz and a peripheral bus
clock.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
drivers/gpu/drm/stm/drv.c | 12 +++++++++++-
drivers/gpu/drm/stm/ltdc.c | 38 +++++++++++++++++++++++++++++++++++---
drivers/gpu/drm/stm/ltdc.h | 5 +++++
3 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
index 8ebcaf953782d806a738d5a41ff1f428b0ccff78..ab00d1a6140cc32e71e10abc82f7956328b518e3 100644
--- a/drivers/gpu/drm/stm/drv.c
+++ b/drivers/gpu/drm/stm/drv.c
@@ -236,8 +236,18 @@ static void stm_drm_platform_shutdown(struct platform_device *pdev)
drm_atomic_helper_shutdown(platform_get_drvdata(pdev));
}
+static struct ltdc_plat_data stm_drm_plat_data = {
+ .pad_max_freq_hz = 90000000,
+};
+
+static struct ltdc_plat_data stm_drm_plat_data_mp25 = {
+ .pad_max_freq_hz = 150000000,
+};
+
static const struct of_device_id drv_dt_ids[] = {
- { .compatible = "st,stm32-ltdc"},
+ { .compatible = "st,stm32-ltdc", .data = &stm_drm_plat_data, },
+ { .compatible = "st,stm32mp251-ltdc", .data = &stm_drm_plat_data_mp25, },
+ { .compatible = "st,stm32mp255-ltdc", .data = &stm_drm_plat_data_mp25, },
{ /* end node */ },
};
MODULE_DEVICE_TABLE(of, drv_dt_ids);
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index ba315c66a04d72758b9d3cfcd842432877f66d3a..17548dd3484a0a3e1015c58c752b80f8892a0ff7 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -14,6 +14,7 @@
#include <linux/interrupt.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
@@ -51,6 +52,7 @@
#define HWVER_10300 0x010300
#define HWVER_20101 0x020101
#define HWVER_40100 0x040100
+#define HWVER_40101 0x040101
/*
* The address of some registers depends on the HW version: such registers have
@@ -1779,6 +1781,7 @@ static int ltdc_get_caps(struct drm_device *ddev)
{
struct ltdc_device *ldev = ddev->dev_private;
u32 bus_width_log2, lcr, gc2r;
+ const struct ltdc_plat_data *pdata = of_device_get_match_data(ddev->dev);
/*
* at least 1 layer must be managed & the number of layers
@@ -1794,6 +1797,8 @@ static int ltdc_get_caps(struct drm_device *ddev)
ldev->caps.bus_width = 8 << bus_width_log2;
regmap_read(ldev->regmap, LTDC_IDR, &ldev->caps.hw_version);
+ ldev->caps.pad_max_freq_hz = pdata->pad_max_freq_hz;
+
switch (ldev->caps.hw_version) {
case HWVER_10200:
case HWVER_10300:
@@ -1811,7 +1816,6 @@ static int ltdc_get_caps(struct drm_device *ddev)
* does not work on 2nd layer.
*/
ldev->caps.non_alpha_only_l1 = true;
- ldev->caps.pad_max_freq_hz = 90000000;
if (ldev->caps.hw_version == HWVER_10200)
ldev->caps.pad_max_freq_hz = 65000000;
ldev->caps.nb_irq = 2;
@@ -1842,6 +1846,7 @@ static int ltdc_get_caps(struct drm_device *ddev)
ldev->caps.fifo_threshold = false;
break;
case HWVER_40100:
+ case HWVER_40101:
ldev->caps.layer_ofs = LAY_OFS_1;
ldev->caps.layer_regs = ltdc_layer_regs_a2;
ldev->caps.pix_fmt_hw = ltdc_pix_fmt_a2;
@@ -1849,7 +1854,6 @@ static int ltdc_get_caps(struct drm_device *ddev)
ldev->caps.pix_fmt_nb = ARRAY_SIZE(ltdc_drm_fmt_a2);
ldev->caps.pix_fmt_flex = true;
ldev->caps.non_alpha_only_l1 = false;
- ldev->caps.pad_max_freq_hz = 90000000;
ldev->caps.nb_irq = 2;
ldev->caps.ycbcr_input = true;
ldev->caps.ycbcr_output = true;
@@ -1872,6 +1876,8 @@ void ltdc_suspend(struct drm_device *ddev)
DRM_DEBUG_DRIVER("\n");
clk_disable_unprepare(ldev->pixel_clk);
+ if (ldev->bus_clk)
+ clk_disable_unprepare(ldev->bus_clk);
}
int ltdc_resume(struct drm_device *ddev)
@@ -1887,7 +1893,13 @@ int ltdc_resume(struct drm_device *ddev)
return ret;
}
- return 0;
+ if (ldev->bus_clk) {
+ ret = clk_prepare_enable(ldev->bus_clk);
+ if (ret)
+ drm_err(ddev, "failed to enable bus clock (%d)\n", ret);
+ }
+
+ return ret;
}
int ltdc_load(struct drm_device *ddev)
@@ -1922,6 +1934,20 @@ int ltdc_load(struct drm_device *ddev)
return -ENODEV;
}
+ if (of_device_is_compatible(np, "st,stm32mp251-ltdc") ||
+ of_device_is_compatible(np, "st,stm32mp255-ltdc")) {
+ ldev->bus_clk = devm_clk_get(dev, "bus");
+ if (IS_ERR(ldev->bus_clk))
+ return dev_err_probe(dev, PTR_ERR(ldev->bus_clk),
+ "Unable to get bus clock\n");
+
+ ret = clk_prepare_enable(ldev->bus_clk);
+ if (ret) {
+ drm_err(ddev, "Unable to prepare bus clock\n");
+ return ret;
+ }
+ }
+
/* Get endpoints if any */
for (i = 0; i < nb_endpoints; i++) {
ret = drm_of_find_panel_or_bridge(np, 0, i, &panel, &bridge);
@@ -2034,6 +2060,9 @@ int ltdc_load(struct drm_device *ddev)
clk_disable_unprepare(ldev->pixel_clk);
+ if (ldev->bus_clk)
+ clk_disable_unprepare(ldev->bus_clk);
+
pinctrl_pm_select_sleep_state(ddev->dev);
pm_runtime_enable(ddev->dev);
@@ -2042,6 +2071,9 @@ int ltdc_load(struct drm_device *ddev)
err:
clk_disable_unprepare(ldev->pixel_clk);
+ if (ldev->bus_clk)
+ clk_disable_unprepare(ldev->bus_clk);
+
return ret;
}
diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h
index 9d488043ffdbc652deeede71c9d57d45fb89d3c6..ddfa8ae61a7ba5dc446fae647562d0ec8e6953e1 100644
--- a/drivers/gpu/drm/stm/ltdc.h
+++ b/drivers/gpu/drm/stm/ltdc.h
@@ -40,10 +40,15 @@ struct fps_info {
ktime_t last_timestamp;
};
+struct ltdc_plat_data {
+ int pad_max_freq_hz; /* max frequency supported by pad */
+};
+
struct ltdc_device {
void __iomem *regs;
struct regmap *regmap;
struct clk *pixel_clk; /* lcd pixel clock */
+ struct clk *bus_clk; /* bus clock */
struct mutex err_lock; /* protecting error_status */
struct ltdc_caps caps;
u32 irq_status;
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (6 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-28 13:53 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
` (5 subsequent siblings)
13 siblings, 1 reply; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
From: Yannick Fertre <yannick.fertre@foss.st.com>
Handle LVDS pixel clock.
The LTDC operates with multiple clock domains for register access,
requiring all clocks to be provided during read/write operations. This
imposes a dependency between the LVDS and LTDC to access correctly all
LTDC registers. And because both IPs' pixel rates must be synchronized,
the LTDC has to handle the LVDS clock.
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
drivers/gpu/drm/stm/ltdc.c | 22 +++++++++++++++++++++-
drivers/gpu/drm/stm/ltdc.h | 1 +
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 17548dd3484a0a3e1015c58c752b80f8892a0ff7..f84a9a8590f0653e422798ff61804d7c3966caef 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -837,6 +837,12 @@ ltdc_crtc_mode_valid(struct drm_crtc *crtc,
int target_max = target + CLK_TOLERANCE_HZ;
int result;
+ if (ldev->lvds_clk) {
+ result = clk_round_rate(ldev->lvds_clk, target);
+ drm_dbg_driver(crtc->dev, "lvds pixclk rate target %d, available %d\n",
+ target, result);
+ }
+
result = clk_round_rate(ldev->pixel_clk, target);
DRM_DEBUG_DRIVER("clk rate target %d, available %d\n", target, result);
@@ -1878,6 +1884,8 @@ void ltdc_suspend(struct drm_device *ddev)
clk_disable_unprepare(ldev->pixel_clk);
if (ldev->bus_clk)
clk_disable_unprepare(ldev->bus_clk);
+ if (ldev->lvds_clk)
+ clk_disable_unprepare(ldev->lvds_clk);
}
int ltdc_resume(struct drm_device *ddev)
@@ -1895,8 +1903,16 @@ int ltdc_resume(struct drm_device *ddev)
if (ldev->bus_clk) {
ret = clk_prepare_enable(ldev->bus_clk);
- if (ret)
+ if (ret) {
drm_err(ddev, "failed to enable bus clock (%d)\n", ret);
+ return ret;
+ }
+ }
+
+ if (ldev->lvds_clk) {
+ ret = clk_prepare_enable(ldev->lvds_clk);
+ if (ret)
+ drm_err(ddev, "failed to prepare lvds clock\n");
}
return ret;
@@ -1981,6 +1997,10 @@ int ltdc_load(struct drm_device *ddev)
}
}
+ ldev->lvds_clk = devm_clk_get(dev, "lvds");
+ if (IS_ERR(ldev->lvds_clk))
+ ldev->lvds_clk = NULL;
+
rstc = devm_reset_control_get_exclusive(dev, NULL);
mutex_init(&ldev->err_lock);
diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h
index ddfa8ae61a7ba5dc446fae647562d0ec8e6953e1..17b51a7ce28eee5de6d24ca943ca3b1f48695dfd 100644
--- a/drivers/gpu/drm/stm/ltdc.h
+++ b/drivers/gpu/drm/stm/ltdc.h
@@ -48,6 +48,7 @@ struct ltdc_device {
void __iomem *regs;
struct regmap *regmap;
struct clk *pixel_clk; /* lcd pixel clock */
+ struct clk *lvds_clk; /* lvds pixel clock */
struct clk *bus_clk; /* bus clock */
struct mutex err_lock; /* protecting error_status */
struct ltdc_caps caps;
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 09/13] arm64: dts: st: add ltdc support on stm32mp251
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (7 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
` (4 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
The LCD-TFT Display Controller (LTDC) handles display composition,
scaling and rotation. It provides a parallel digital RGB flow to be
used by display interfaces.
Add the LTDC node.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
arch/arm64/boot/dts/st/stm32mp251.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index 303abf915b8e489671b51a8c832041c14a42ecb8..372a99d9cc5c3730e8fbeddeb6134a3b18d938b6 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -1576,6 +1576,18 @@ dcmipp: dcmipp@48030000 {
status = "disabled";
};
+ ltdc: display-controller@48010000 {
+ compatible = "st,stm32mp251-ltdc";
+ reg = <0x48010000 0x400>;
+ interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&rcc CK_KER_LTDC>, <&rcc CK_BUS_LTDC>;
+ clock-names = "lcd", "bus";
+ resets = <&rcc LTDC_R>;
+ access-controllers = <&rifsc 80>;
+ status = "disabled";
+ };
+
combophy: phy@480c0000 {
compatible = "st,stm32mp25-combophy";
reg = <0x480c0000 0x1000>;
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 10/13] arm64: dts: st: add ltdc support on stm32mp255
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (8 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
` (3 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
Add the LTDC node for stm32mp255 SoC and handle its loopback clocks.
ck_ker_ltdc has the CLK_SET_RATE_PARENT flag. While having this flag is
semantically correct, it for now leads to an improper setting of the
clock rate. The ck_ker_ltdc parent clock is the flexgen 27, which does
not support changing rates yet. To overcome this issue, a fixed clock
can be used for the kernel clock.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
arch/arm64/boot/dts/st/stm32mp251.dtsi | 6 ++++++
arch/arm64/boot/dts/st/stm32mp255.dtsi | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index 372a99d9cc5c3730e8fbeddeb6134a3b18d938b6..b44ff221e0da968be104ff8195f9bef79c90c57a 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -52,6 +52,12 @@ clk_rcbsec: clk-rcbsec {
compatible = "fixed-clock";
clock-frequency = <64000000>;
};
+
+ clk_flexgen_27_fixed: clk-54000000 {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <54000000>;
+ };
};
firmware {
diff --git a/arch/arm64/boot/dts/st/stm32mp255.dtsi b/arch/arm64/boot/dts/st/stm32mp255.dtsi
index f689b47c5010033120146cf1954d6624c0270045..48a95af1741c42300195b753b710e714abc60d96 100644
--- a/arch/arm64/boot/dts/st/stm32mp255.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp255.dtsi
@@ -5,6 +5,12 @@
*/
#include "stm32mp253.dtsi"
+<dc {
+ compatible = "st,stm32mp255-ltdc";
+ clocks = <&clk_flexgen_27_fixed>, <&rcc CK_BUS_LTDC>, <&syscfg>, <&lvds>;
+ clock-names = "lcd", "bus", "ref", "lvds";
+};
+
&rifsc {
vdec: vdec@480d0000 {
compatible = "st,stm32mp25-vdec";
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 11/13] arm64: dts: st: add lvds support on stm32mp255
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (9 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
` (2 subsequent siblings)
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
The LVDS is used on STM32MP2 as a display interface.
Add the LVDS node.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
arch/arm64/boot/dts/st/stm32mp255.dtsi | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/st/stm32mp255.dtsi b/arch/arm64/boot/dts/st/stm32mp255.dtsi
index 48a95af1741c42300195b753b710e714abc60d96..433a0aabe72e5a449ec03fb984a8684c5d5d75a2 100644
--- a/arch/arm64/boot/dts/st/stm32mp255.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp255.dtsi
@@ -12,6 +12,18 @@ <dc {
};
&rifsc {
+ lvds: lvds@48060000 {
+ compatible = "st,stm32mp255-lvds", "st,stm32mp25-lvds";
+ #clock-cells = <0>;
+ reg = <0x48060000 0x2000>;
+ clocks = <&rcc CK_BUS_LVDS>, <&rcc CK_KER_LVDSPHY>;
+ clock-names = "pclk", "ref";
+ resets = <&rcc LVDS_R>;
+ access-controllers = <&rifsc 84>;
+ power-domains = <&CLUSTER_PD>;
+ status = "disabled";
+ };
+
vdec: vdec@480d0000 {
compatible = "st,stm32mp25-vdec";
reg = <0x480d0000 0x3c8>;
@@ -28,4 +40,4 @@ venc: venc@480e0000 {
clocks = <&rcc CK_BUS_VENC>;
access-controllers = <&rifsc 90>;
};
-};
\ No newline at end of file
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (10 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
2025-08-28 15:27 ` [PATCH v5 00/13] Enable display support for STM32MP25 Philippe CORNU
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
Make the syscfg node a clock provider so clock consumers can reach child
clocks through device-tree.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
arch/arm64/boot/dts/st/stm32mp251.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index b44ff221e0da968be104ff8195f9bef79c90c57a..24823bbfee31f15e813573ad1a0c4f67a125ce51 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -1874,6 +1874,7 @@ exti1: interrupt-controller@44220000 {
syscfg: syscon@44230000 {
compatible = "st,stm32mp25-syscfg", "syscon";
reg = <0x44230000 0x10000>;
+ #clock-cells = <0>;
};
pinctrl: pinctrl@44240000 {
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v5 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (11 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
@ 2025-08-22 14:34 ` Raphael Gallais-Pou
2025-08-28 15:27 ` [PATCH v5 00/13] Enable display support for STM32MP25 Philippe CORNU
13 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 14:34 UTC (permalink / raw)
To: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
Enable the following IPs on stm32mp257f-ev1 in order to get display:
* LTDC
* LVDS
* WSVGA LVDS panel (1024x600)
* Panel LVDS backlight as GPIO backlight
* ILI2511 i2c touchscreen
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
---
arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 79 ++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
index 836b1958ce65fb72c99d634a92af3efaf9844d76..2958ad413b0675575d84942e193a16f80197b88e 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
@@ -86,6 +86,43 @@ mm_ospi1: mm-ospi@60000000 {
no-map;
};
};
+
+ panel_lvds: display {
+ compatible = "edt,etml0700z9ndha", "panel-lvds";
+ enable-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>;
+ backlight = <&panel_lvds_backlight>;
+ power-supply = <&scmi_v3v3>;
+ status = "okay";
+
+ width-mm = <156>;
+ height-mm = <92>;
+ data-mapping = "vesa-24";
+
+ panel-timing {
+ clock-frequency = <54000000>;
+ hactive = <1024>;
+ vactive = <600>;
+ hfront-porch = <150>;
+ hback-porch = <150>;
+ hsync-len = <21>;
+ vfront-porch = <24>;
+ vback-porch = <24>;
+ vsync-len = <21>;
+ };
+
+ port {
+ lvds_panel_in: endpoint {
+ remote-endpoint = <&lvds_out0>;
+ };
+ };
+ };
+
+ panel_lvds_backlight: backlight {
+ compatible = "gpio-backlight";
+ gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>;
+ default-on;
+ status = "okay";
+ };
};
&arm_wdt {
@@ -183,6 +220,15 @@ imx335_ep: endpoint {
};
};
};
+
+ ili2511: ili2511@41 {
+ compatible = "ilitek,ili251x";
+ reg = <0x41>;
+ interrupt-parent = <&gpioi>;
+ interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&gpiog 14 GPIO_ACTIVE_LOW>;
+ status = "okay";
+ };
};
&i2c8 {
@@ -230,6 +276,39 @@ timer {
};
};
+<dc {
+ status = "okay";
+
+ port {
+ ltdc_ep0_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_ep0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ lvds_out0: endpoint {
+ remote-endpoint = <&lvds_panel_in>;
+ };
+ };
+ };
+};
+
&rtc {
status = "okay";
};
--
2.25.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
@ 2025-08-24 9:21 ` Krzysztof Kozlowski
2025-08-28 13:51 ` Philippe CORNU
1 sibling, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-24 9:21 UTC (permalink / raw)
To: Raphael Gallais-Pou
Cc: Yannick Fertre, Philippe Cornu, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier, dri-devel, devicetree, linux-stm32,
linux-arm-kernel, linux-kernel
On Fri, Aug 22, 2025 at 04:34:10PM +0200, Raphael Gallais-Pou wrote:
> The new STMicroelectronics SoC features a display controller similar to
> the one used in previous SoCs. Because there is additional registers,
> and different mandatory clocks it is incompatible with existing IPs. On
> STM32MP251, the device only needs two clocks while on STM32MP255 it
> needs four.
>
> Add the new names to the list of compatible string and handle each
> quirks accordingly.
>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> .../devicetree/bindings/display/st,stm32-ltdc.yaml | 52 +++++++++++++++++++++-
> 1 file changed, 50 insertions(+), 2 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
2025-08-24 9:21 ` Krzysztof Kozlowski
@ 2025-08-28 13:51 ` Philippe CORNU
1 sibling, 0 replies; 22+ messages in thread
From: Philippe CORNU @ 2025-08-28 13:51 UTC (permalink / raw)
To: Raphael Gallais-Pou, Yannick Fertre, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 8/22/25 16:34, Raphael Gallais-Pou wrote:
> The new STMicroelectronics SoC features a display controller similar to
> the one used in previous SoCs. Because there is additional registers,
> and different mandatory clocks it is incompatible with existing IPs. On
> STM32MP251, the device only needs two clocks while on STM32MP255 it
> needs four.
>
> Add the new names to the list of compatible string and handle each
> quirks accordingly.
>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> .../devicetree/bindings/display/st,stm32-ltdc.yaml | 52 +++++++++++++++++++++-
> 1 file changed, 50 insertions(+), 2 deletions(-)
Hi Raphael,
Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
note: you may add the v4 acked-by too on this patch.
Thanks
Philippe :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC
2025-08-22 14:34 ` [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
@ 2025-08-28 13:52 ` Philippe CORNU
0 siblings, 0 replies; 22+ messages in thread
From: Philippe CORNU @ 2025-08-28 13:52 UTC (permalink / raw)
To: Raphael Gallais-Pou, Yannick Fertre, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 8/22/25 16:34, Raphael Gallais-Pou wrote:
> From: Yannick Fertre <yannick.fertre@foss.st.com>
>
> STM32MP25 SoC features a new version of the LTDC IP. Add its compatible
> to the list of device to probe and implement its quirks.
>
> This hardware supports a pad frequency of 150MHz and a peripheral bus
> clock.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
> Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> drivers/gpu/drm/stm/drv.c | 12 +++++++++++-
> drivers/gpu/drm/stm/ltdc.c | 38 +++++++++++++++++++++++++++++++++++---
> drivers/gpu/drm/stm/ltdc.h | 5 +++++
> 3 files changed, 51 insertions(+), 4 deletions(-)
Hi Raphael,
Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
Thank you
Philippe :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock
2025-08-22 14:34 ` [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
@ 2025-08-28 13:53 ` Philippe CORNU
0 siblings, 0 replies; 22+ messages in thread
From: Philippe CORNU @ 2025-08-28 13:53 UTC (permalink / raw)
To: Raphael Gallais-Pou, Yannick Fertre, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 8/22/25 16:34, Raphael Gallais-Pou wrote:
> From: Yannick Fertre <yannick.fertre@foss.st.com>
>
> Handle LVDS pixel clock.
>
> The LTDC operates with multiple clock domains for register access,
> requiring all clocks to be provided during read/write operations. This
> imposes a dependency between the LVDS and LTDC to access correctly all
> LTDC registers. And because both IPs' pixel rates must be synchronized,
> the LTDC has to handle the LVDS clock.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
> Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> drivers/gpu/drm/stm/ltdc.c | 22 +++++++++++++++++++++-
> drivers/gpu/drm/stm/ltdc.h | 1 +
> 2 files changed, 22 insertions(+), 1 deletion(-)
Hi Raphael,
Acked-by: Philippe Cornu <philippe.cornu@foss.st.com>
Thanks a lot
Philippe :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property
2025-08-22 14:34 ` [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
@ 2025-08-28 15:18 ` Christophe ROULLIER
2025-08-28 15:28 ` Raphael Gallais-Pou
0 siblings, 1 reply; 22+ messages in thread
From: Christophe ROULLIER @ 2025-08-28 15:18 UTC (permalink / raw)
To: Raphael Gallais-Pou, Yannick Fertre, Philippe Cornu,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue, Catalin Marinas, Will Deacon
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 8/22/25 16:34, Raphael Gallais-Pou wrote:
> On STM32MP25 SoC, the syscfg peripheral provides a clock to the display
> subsystem through a multiplexer. Since it only provides a single clock,
> the cell value is 0.
>
> Doing so allows the clock consumers to reach the peripheral and gate the
> clock accordingly.
>
> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
> Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> .../bindings/arm/stm32/st,stm32-syscon.yaml | 31 +++++++++++++++-------
> 1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> index ed97652c84922813e94b1818c07fe8714891c089..95d2319afe235fa86974d80f89c9deeae2275232 100644
> --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
> @@ -36,20 +36,31 @@ properties:
> clocks:
> maxItems: 1
>
> + "#clock-cells":
> + const: 0
> +
> required:
> - compatible
> - reg
>
> -if:
> - properties:
> - compatible:
> - contains:
> - enum:
> - - st,stm32mp157-syscfg
> - - st,stm32f4-gcan
> -then:
> - required:
> - - clocks
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - st,stm32mp157-syscfg
> + - st,stm32f4-gcan
> + then:
> + required:
> + - clocks
> + - if:
> + properties:
> + compatible:
> + const: st,stm32mp25-syscfg
> + then:
> + required:
> + - "#clock-cells"
>
> additionalProperties: false
>
>
Acked-by: Christophe Roullier <christophe.roullier@foss.st.com>
You can merge it on DRM MISC.
Best Regards,
Christophe
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 00/13] Enable display support for STM32MP25
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (12 preceding siblings ...)
2025-08-22 14:34 ` [PATCH v5 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
@ 2025-08-28 15:27 ` Philippe CORNU
2025-08-29 7:10 ` Raphael Gallais-Pou
13 siblings, 1 reply; 22+ messages in thread
From: Philippe CORNU @ 2025-08-28 15:27 UTC (permalink / raw)
To: Raphael Gallais-Pou, Yannick Fertre, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Krzysztof Kozlowski
On 8/22/25 16:34, Raphael Gallais-Pou wrote:
> This series aims to add and enable sufficient LVDS display support for
> STM32MP257F-EV1 board.
>
> LVDS is the default use case to drive a display panel on STM32MP257F-EV,
> even though DSI panels will be supported in the near future.
>
> The LTDC needs a pixel rate in sync with the bridge currently in use.
> For that both DSI and LVDS bridges need to declare an internal clock and
> become clock provider to the mux. The mux then selects the reference
> clock for the LTDC pixel rate generation.
>
> For now this mux is handled internally in the LTDC, while waiting for
> the STM32 clock framework to merge a 'clk-mux' based on the SYSCFG.
> This explains the link done in the patch [7/8] between the LVDS,
> providing the reference clock for the LTDC internals.
>
> +----------+ |\
> | DSI PHY |------------->| \ +------------+
> | |ck_dsi_phy | | | |
> +----------+ | |--------->| LTDC |
> +----------+ | |pixel_clk | |
> | LVDS PHY |------------->| | +------------+
> | |clk_pix_lvds | |
> +----------+ | |
> | |
> ck_ker_ltdc ------------>| /
> |/|
> └- SYSCFG
>
> Clock selection applies as follow:
> - 0b00: Selects ck_dsi_phy
> - 0b01: Selects clk_pix_lvds
> - 0b10: Selects ck_ker_ltdc (for parallel or DSI display).
> - 0b11: Reserved
>
> The reset value of the register controlling the mux is 0b01, meaning
> that the default clock assigned is the clk_pix_lvds. This causes two
> things:
>
> - In order to get basic display on the LVDS encoder, like intended,
> nothing has to be done on this mux within the LTDC driver (which for now
> explains the unused syscfg phandle on the LTDC node in the device-tree).
>
> - 'pixel_clk' is dependent from 'clk_pix_lvds' because of the LTDC clock
> domains. They also need to be sync to get a coherent pixel rate though
> the display clock tree (which explains the LVDS phandle on the LTDC node
> in the device-tree).
>
> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> ---
> Changes in v5:
> - Documentation:
> - LTDC: Clamp correctly min/maxItems value (again)
> - Add Yannick's trailers where relevant except in patch [01/13] which
> has been modified
> - Link to v4: https://lore.kernel.org/r/20250821-drm-misc-next-v4-0-7060500f8fd3@foss.st.com
>
> Changes in v4:
> - Documentation:
> - LTDC: Add "st,stm32mp255-ltdc" compatible. After internal
> discussion, we came to the solution that the LTDC on STM32MP255 SoC
> needs its own compatible, since it does have the same amount of
> clocks than on STM32MP251 SoC.
> - Devicetree:
> - Add "st,stm32mp255" compatible on corresponding dtsi
> - Drivers:
> - LTDC: Handle "st,stm32mp255" compatible
> - Remove Rob's r-b from patch [01/13] since it was modified.
> - Link to v3: https://lore.kernel.org/r/20250819-drm-misc-next-v3-0-04153978ebdb@foss.st.com
>
> Changes in v3:
> - Rebased on latest drm-misc-next
> - Documentation:
> - LTDC: Clamp correctly min/maxItems value
> - LVDS: Remove second 'items' keyword
> - Add Krzysztof's trailer where relevant
> - Link to v2: https://lore.kernel.org/r/20250812-drm-misc-next-v2-0-132fd84463d7@foss.st.com
>
> Changes in v2:
> - Documentation:
> - Add support for new compatible "st,stm32mp255-lvds"
> - Change LTDC compatible for SoC compliant one
> - Make clearer LTDC clock-names property
> - Devicetree:
> - Change compatible according to the documentation
> - Change clock and clock-names order to match documentation (and avoid
> warnings)
> - Drivers:
> - Change LTDC compatible
> - Add Rob's trailer where relevant
> - Link to v1: https://lore.kernel.org/r/20250725-drm-misc-next-v1-0-a59848e62cf9@foss.st.com
>
> ---
> Raphael Gallais-Pou (11):
> dt-bindings: display: st: add two new compatibles to LTDC device
> dt-bindings: display: st,stm32-ltdc: add access-controllers property
> dt-bindings: display: st: add new compatible to LVDS device
> dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
> dt-bindings: display: st,stm32mp25-lvds: add power-domains property
> dt-bindings: arm: stm32: add required #clock-cells property
> arm64: dts: st: add ltdc support on stm32mp251
> arm64: dts: st: add ltdc support on stm32mp255
> arm64: dts: st: add lvds support on stm32mp255
> arm64: dts: st: add clock-cells to syscfg node on stm32mp251
> arm64: dts: st: enable display support on stm32mp257f-ev1 board
>
> Yannick Fertre (2):
> drm/stm: ltdc: support new hardware version for STM32MP25 SoC
> drm/stm: ltdc: handle lvds pixel clock
>
> .../bindings/arm/stm32/st,stm32-syscon.yaml | 31 ++++++---
> .../devicetree/bindings/display/st,stm32-ltdc.yaml | 55 ++++++++++++++-
> .../bindings/display/st,stm32mp25-lvds.yaml | 13 +++-
> arch/arm64/boot/dts/st/stm32mp251.dtsi | 19 ++++++
> arch/arm64/boot/dts/st/stm32mp255.dtsi | 20 +++++-
> arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 79 ++++++++++++++++++++++
> drivers/gpu/drm/stm/drv.c | 12 +++-
> drivers/gpu/drm/stm/ltdc.c | 58 +++++++++++++++-
> drivers/gpu/drm/stm/ltdc.h | 6 ++
> 9 files changed, 275 insertions(+), 18 deletions(-)
> ---
> base-commit: c8cea4371e5eca30cda8660aabb337747dabc51d
> change-id: 20250617-drm-misc-next-4af406c1c45f
>
> Best regards,
Hi Raphael,
Thank you for these great patches.
If you agree, I think you can merge 01-08 in misc.
Best regards
Philippe :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property
2025-08-28 15:18 ` Christophe ROULLIER
@ 2025-08-28 15:28 ` Raphael Gallais-Pou
0 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-28 15:28 UTC (permalink / raw)
To: Christophe ROULLIER, Yannick Fertre, Philippe Cornu,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Maxime Coquelin, Alexandre Torgue, Catalin Marinas, Will Deacon
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel
On 8/28/25 17:18, Christophe ROULLIER wrote:
> On 8/22/25 16:34, Raphael Gallais-Pou wrote:
>> On STM32MP25 SoC, the syscfg peripheral provides a clock to the display
>> subsystem through a multiplexer. Since it only provides a single clock,
>> the cell value is 0.
>>
>> Doing so allows the clock consumers to reach the peripheral and gate the
>> clock accordingly.
>>
>> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>> Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
>> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
>> ---
>> .../bindings/arm/stm32/st,stm32-syscon.yaml | 31 +++++++++++++++-------
>> 1 file changed, 21 insertions(+), 10 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
>> b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
>> index
>> ed97652c84922813e94b1818c07fe8714891c089..95d2319afe235fa86974d80f89c9deeae2275232
>> 100644
>> --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
>> +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml
>> @@ -36,20 +36,31 @@ properties:
>> clocks:
>> maxItems: 1
>> + "#clock-cells":
>> + const: 0
>> +
>> required:
>> - compatible
>> - reg
>> -if:
>> - properties:
>> - compatible:
>> - contains:
>> - enum:
>> - - st,stm32mp157-syscfg
>> - - st,stm32f4-gcan
>> -then:
>> - required:
>> - - clocks
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - st,stm32mp157-syscfg
>> + - st,stm32f4-gcan
>> + then:
>> + required:
>> + - clocks
>> + - if:
>> + properties:
>> + compatible:
>> + const: st,stm32mp25-syscfg
>> + then:
>> + required:
>> + - "#clock-cells"
>> additionalProperties: false
>>
> Acked-by: Christophe Roullier <christophe.roullier@foss.st.com>
>
> You can merge it on DRM MISC.
Thanks Christophe ! :)
Best regards,
Raphaël
>
> Best Regards,
> Christophe
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v5 00/13] Enable display support for STM32MP25
2025-08-28 15:27 ` [PATCH v5 00/13] Enable display support for STM32MP25 Philippe CORNU
@ 2025-08-29 7:10 ` Raphael Gallais-Pou
0 siblings, 0 replies; 22+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-29 7:10 UTC (permalink / raw)
To: Philippe CORNU, Yannick Fertre, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
Alexandre Torgue, Catalin Marinas, Will Deacon,
Christophe Roullier
Cc: dri-devel, devicetree, linux-stm32, linux-arm-kernel,
linux-kernel, Krzysztof Kozlowski
On 8/28/25 17:27, Philippe CORNU wrote:
>
>
> On 8/22/25 16:34, Raphael Gallais-Pou wrote:
>> This series aims to add and enable sufficient LVDS display support for
>> STM32MP257F-EV1 board.
>>
>> LVDS is the default use case to drive a display panel on STM32MP257F-EV,
>> even though DSI panels will be supported in the near future.
>>
>> The LTDC needs a pixel rate in sync with the bridge currently in use.
>> For that both DSI and LVDS bridges need to declare an internal clock and
>> become clock provider to the mux. The mux then selects the reference
>> clock for the LTDC pixel rate generation.
>>
>> For now this mux is handled internally in the LTDC, while waiting for
>> the STM32 clock framework to merge a 'clk-mux' based on the SYSCFG.
>> This explains the link done in the patch [7/8] between the LVDS,
>> providing the reference clock for the LTDC internals.
>>
>> +----------+ |\
>> | DSI PHY |------------->| \ +------------+
>> | |ck_dsi_phy | | | |
>> +----------+ | |--------->| LTDC |
>> +----------+ | |pixel_clk | |
>> | LVDS PHY |------------->| | +------------+
>> | |clk_pix_lvds | |
>> +----------+ | |
>> | |
>> ck_ker_ltdc ------------>| /
>> |/|
>> └- SYSCFG
>>
>> Clock selection applies as follow:
>> - 0b00: Selects ck_dsi_phy
>> - 0b01: Selects clk_pix_lvds
>> - 0b10: Selects ck_ker_ltdc (for parallel or DSI display).
>> - 0b11: Reserved
>>
>> The reset value of the register controlling the mux is 0b01, meaning
>> that the default clock assigned is the clk_pix_lvds. This causes two
>> things:
>>
>> - In order to get basic display on the LVDS encoder, like intended,
>> nothing has to be done on this mux within the LTDC driver (which for now
>> explains the unused syscfg phandle on the LTDC node in the device-tree).
>>
>> - 'pixel_clk' is dependent from 'clk_pix_lvds' because of the LTDC clock
>> domains. They also need to be sync to get a coherent pixel rate though
>> the display clock tree (which explains the LVDS phandle on the LTDC node
>> in the device-tree).
>>
>> Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
>> ---
>> Changes in v5:
>> - Documentation:
>> - LTDC: Clamp correctly min/maxItems value (again)
>> - Add Yannick's trailers where relevant except in patch [01/13] which
>> has been modified
>> - Link to v4:
>> https://lore.kernel.org/r/20250821-drm-misc-next-v4-0-7060500f8fd3@foss.st.com
>>
>> Changes in v4:
>> - Documentation:
>> - LTDC: Add "st,stm32mp255-ltdc" compatible. After internal
>> discussion, we came to the solution that the LTDC on STM32MP255 SoC
>> needs its own compatible, since it does have the same amount of
>> clocks than on STM32MP251 SoC.
>> - Devicetree:
>> - Add "st,stm32mp255" compatible on corresponding dtsi
>> - Drivers:
>> - LTDC: Handle "st,stm32mp255" compatible
>> - Remove Rob's r-b from patch [01/13] since it was modified.
>> - Link to v3:
>> https://lore.kernel.org/r/20250819-drm-misc-next-v3-0-04153978ebdb@foss.st.com
>>
>> Changes in v3:
>> - Rebased on latest drm-misc-next
>> - Documentation:
>> - LTDC: Clamp correctly min/maxItems value
>> - LVDS: Remove second 'items' keyword
>> - Add Krzysztof's trailer where relevant
>> - Link to v2:
>> https://lore.kernel.org/r/20250812-drm-misc-next-v2-0-132fd84463d7@foss.st.com
>>
>> Changes in v2:
>> - Documentation:
>> - Add support for new compatible "st,stm32mp255-lvds"
>> - Change LTDC compatible for SoC compliant one
>> - Make clearer LTDC clock-names property
>> - Devicetree:
>> - Change compatible according to the documentation
>> - Change clock and clock-names order to match documentation (and avoid
>> warnings)
>> - Drivers:
>> - Change LTDC compatible
>> - Add Rob's trailer where relevant
>> - Link to v1:
>> https://lore.kernel.org/r/20250725-drm-misc-next-v1-0-a59848e62cf9@foss.st.com
>>
>> ---
>> Raphael Gallais-Pou (11):
>> dt-bindings: display: st: add two new compatibles to LTDC device
>> dt-bindings: display: st,stm32-ltdc: add access-controllers property
>> dt-bindings: display: st: add new compatible to LVDS device
>> dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
>> dt-bindings: display: st,stm32mp25-lvds: add power-domains property
>> dt-bindings: arm: stm32: add required #clock-cells property
>> arm64: dts: st: add ltdc support on stm32mp251
>> arm64: dts: st: add ltdc support on stm32mp255
>> arm64: dts: st: add lvds support on stm32mp255
>> arm64: dts: st: add clock-cells to syscfg node on stm32mp251
>> arm64: dts: st: enable display support on stm32mp257f-ev1 board
>>
>> Yannick Fertre (2):
>> drm/stm: ltdc: support new hardware version for STM32MP25 SoC
>> drm/stm: ltdc: handle lvds pixel clock
>>
>> .../bindings/arm/stm32/st,stm32-syscon.yaml | 31 ++++++---
>> .../devicetree/bindings/display/st,stm32-ltdc.yaml | 55 ++++++++++++++-
>> .../bindings/display/st,stm32mp25-lvds.yaml | 13 +++-
>> arch/arm64/boot/dts/st/stm32mp251.dtsi | 19 ++++++
>> arch/arm64/boot/dts/st/stm32mp255.dtsi | 20 +++++-
>> arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 79 ++++++++++++++++++++++
>> drivers/gpu/drm/stm/drv.c | 12 +++-
>> drivers/gpu/drm/stm/ltdc.c | 58 +++++++++++++++-
>> drivers/gpu/drm/stm/ltdc.h | 6 ++
>> 9 files changed, 275 insertions(+), 18 deletions(-)
>> ---
>> base-commit: c8cea4371e5eca30cda8660aabb337747dabc51d
>> change-id: 20250617-drm-misc-next-4af406c1c45f
>>
>> Best regards,
>
> Hi Raphael,
> Thank you for these great patches.
>
> If you agree, I think you can merge 01-08 in misc.
Hi Philippe,
Applied patches [01/13] -> [08/13] on drm-misc-next.
Thanks,
Best regards,
Raphaël
>
> Best regards
> Philippe :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2025-08-29 7:13 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22 14:34 [PATCH v5 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
2025-08-24 9:21 ` Krzysztof Kozlowski
2025-08-28 13:51 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
2025-08-28 15:18 ` Christophe ROULLIER
2025-08-28 15:28 ` Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
2025-08-28 13:52 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
2025-08-28 13:53 ` Philippe CORNU
2025-08-22 14:34 ` [PATCH v5 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
2025-08-22 14:34 ` [PATCH v5 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
2025-08-28 15:27 ` [PATCH v5 00/13] Enable display support for STM32MP25 Philippe CORNU
2025-08-29 7:10 ` Raphael Gallais-Pou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).