* [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 8:00 ` Krzysztof Kozlowski
2025-08-22 12:29 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
` (11 subsequent siblings)
12 siblings, 2 replies; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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 | 50 +++++++++++++++++++++-
1 file changed, 48 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..bcedcfef5427f5725a0473c09628e70d172c8f58 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,44 @@ 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:
+ maxItems: 2
+ clock-names:
+ 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] 30+ messages in thread
* Re: [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-21 11:08 ` [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
@ 2025-08-22 8:00 ` Krzysztof Kozlowski
2025-08-22 12:51 ` Raphael Gallais-Pou
2025-08-22 12:29 ` Yannick FERTRE
1 sibling, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-22 8:00 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 Thu, Aug 21, 2025 at 01:08:51PM +0200, Raphael Gallais-Pou wrote:
> + 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
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-22 8:00 ` Krzysztof Kozlowski
@ 2025-08-22 12:51 ` Raphael Gallais-Pou
0 siblings, 0 replies; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-22 12:51 UTC (permalink / raw)
To: Krzysztof Kozlowski
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 8/22/25 10:00, Krzysztof Kozlowski wrote:
> On Thu, Aug 21, 2025 at 01:08:51PM +0200, Raphael Gallais-Pou wrote:
>> + 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
>
> Best regards,
> Krzysztof
Dumb mistakes... I'll correct it in the upcoming version.
Thanks,
Best regards,
Raphaël
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device
2025-08-21 11:08 ` [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
2025-08-22 8:00 ` Krzysztof Kozlowski
@ 2025-08-22 12:29 ` Yannick FERTRE
1 sibling, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:29 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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 | 50 +++++++++++++++++++++-
> 1 file changed, 48 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..bcedcfef5427f5725a0473c09628e70d172c8f58 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,44 @@ 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:
> + maxItems: 2
> + clock-names:
> + maxItems: 2
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - st,stm32mp255-ltdc
> + then:
> + properties:
> + clocks:
> + minItems: 4
> + clock-names:
> + minItems: 4
> +
> additionalProperties: false
>
> examples:
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
2025-08-21 11:08 ` [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:40 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
` (10 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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 bcedcfef5427f5725a0473c09628e70d172c8f58..e27347acee5dacf56cb3971d4b62c34dfc64d7e2 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] 30+ messages in thread
* Re: [PATCH v4 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property
2025-08-21 11:08 ` [PATCH v4 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
@ 2025-08-22 12:40 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:40 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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 bcedcfef5427f5725a0473c09628e70d172c8f58..e27347acee5dacf56cb3971d4b62c34dfc64d7e2 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: |
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 03/13] dt-bindings: display: st: add new compatible to LVDS device
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
2025-08-21 11:08 ` [PATCH v4 01/13] dt-bindings: display: st: add two new compatibles to LTDC device Raphael Gallais-Pou
2025-08-21 11:08 ` [PATCH v4 02/13] dt-bindings: display: st,stm32-ltdc: add access-controllers property Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:42 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
` (9 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 03/13] dt-bindings: display: st: add new compatible to LVDS device
2025-08-21 11:08 ` [PATCH v4 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
@ 2025-08-22 12:42 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:42 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> properties:
> compatible:
> - const: st,stm32mp25-lvds
> + oneOf:
> + - items:
> + - enum:
> + - st,stm32mp255-lvds
> + - const: st,stm32mp25-lvds
> + - const: st,stm32mp25-lvds
>
> "#clock-cells":
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (2 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 03/13] dt-bindings: display: st: add new compatible to LVDS device Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:46 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
` (8 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property
2025-08-21 11:08 ` [PATCH v4 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
@ 2025-08-22 12:46 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:46 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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
>
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (3 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 04/13] dt-bindings: display: st,stm32mp25-lvds: add access-controllers property Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:46 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
` (7 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property
2025-08-21 11:08 ` [PATCH v4 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
@ 2025-08-22 12:46 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:46 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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
>
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 06/13] dt-bindings: arm: stm32: add required #clock-cells property
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (4 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 05/13] dt-bindings: display: st,stm32mp25-lvds: add power-domains property Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:51 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
` (6 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 06/13] dt-bindings: arm: stm32: add required #clock-cells property
2025-08-21 11:08 ` [PATCH v4 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
@ 2025-08-22 12:51 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:51 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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
>
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (5 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 06/13] dt-bindings: arm: stm32: add required #clock-cells property Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:55 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
` (5 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC
2025-08-21 11:08 ` [PATCH v4 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
@ 2025-08-22 12:55 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:55 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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;
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 08/13] drm/stm: ltdc: handle lvds pixel clock
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (6 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 07/13] drm/stm: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:56 ` Yannick FERTRE
2025-08-21 11:08 ` [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
` (4 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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>
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] 30+ messages in thread
* Re: [PATCH v4 08/13] drm/stm: ltdc: handle lvds pixel clock
2025-08-21 11:08 ` [PATCH v4 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
@ 2025-08-22 12:56 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:56 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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>
> 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;
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (7 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 08/13] drm/stm: ltdc: handle lvds pixel clock Raphael Gallais-Pou
@ 2025-08-21 11:08 ` Raphael Gallais-Pou
2025-08-22 12:57 ` Yannick FERTRE
2025-08-22 12:59 ` Yannick FERTRE
2025-08-21 11:09 ` [PATCH v4 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
` (3 subsequent siblings)
12 siblings, 2 replies; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:08 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.
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] 30+ messages in thread
* Re: [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251
2025-08-21 11:08 ` [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
@ 2025-08-22 12:57 ` Yannick FERTRE
2025-08-22 12:59 ` Yannick FERTRE
1 sibling, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:57 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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.
>
> 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>;
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251
2025-08-21 11:08 ` [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
2025-08-22 12:57 ` Yannick FERTRE
@ 2025-08-22 12:59 ` Yannick FERTRE
1 sibling, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 12:59 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:08, Raphael Gallais-Pou a écrit :
> 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.
>
> 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>;
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 10/13] arm64: dts: st: add ltdc support on stm32mp255
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (8 preceding siblings ...)
2025-08-21 11:08 ` [PATCH v4 09/13] arm64: dts: st: add ltdc support on stm32mp251 Raphael Gallais-Pou
@ 2025-08-21 11:09 ` Raphael Gallais-Pou
2025-08-22 13:05 ` Yannick FERTRE
2025-08-21 11:09 ` [PATCH v4 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
` (2 subsequent siblings)
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:09 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.
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] 30+ messages in thread
* Re: [PATCH v4 10/13] arm64: dts: st: add ltdc support on stm32mp255
2025-08-21 11:09 ` [PATCH v4 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
@ 2025-08-22 13:05 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 13:05 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:09, Raphael Gallais-Pou a écrit :
> 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.
>
> 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";
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 11/13] arm64: dts: st: add lvds support on stm32mp255
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (9 preceding siblings ...)
2025-08-21 11:09 ` [PATCH v4 10/13] arm64: dts: st: add ltdc support on stm32mp255 Raphael Gallais-Pou
@ 2025-08-21 11:09 ` Raphael Gallais-Pou
2025-08-22 13:08 ` Yannick FERTRE
2025-08-21 11:09 ` [PATCH v4 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
2025-08-21 11:09 ` [PATCH v4 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:09 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.
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] 30+ messages in thread
* Re: [PATCH v4 11/13] arm64: dts: st: add lvds support on stm32mp255
2025-08-21 11:09 ` [PATCH v4 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
@ 2025-08-22 13:08 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 13:08 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:09, Raphael Gallais-Pou a écrit :
> The LVDS is used on STM32MP2 as a display interface.
>
> Add the LVDS node.
>
> 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
> +};
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (10 preceding siblings ...)
2025-08-21 11:09 ` [PATCH v4 11/13] arm64: dts: st: add lvds " Raphael Gallais-Pou
@ 2025-08-21 11:09 ` Raphael Gallais-Pou
2025-08-22 13:09 ` Yannick FERTRE
2025-08-21 11:09 ` [PATCH v4 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:09 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.
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] 30+ messages in thread
* Re: [PATCH v4 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251
2025-08-21 11:09 ` [PATCH v4 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
@ 2025-08-22 13:09 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 13:09 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:09, Raphael Gallais-Pou a écrit :
> Make the syscfg node a clock provider so clock consumers can reach child
> clocks through device-tree.
>
> 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 {
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v4 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board
2025-08-21 11:08 [PATCH v4 00/13] Enable display support for STM32MP25 Raphael Gallais-Pou
` (11 preceding siblings ...)
2025-08-21 11:09 ` [PATCH v4 12/13] arm64: dts: st: add clock-cells to syscfg node on stm32mp251 Raphael Gallais-Pou
@ 2025-08-21 11:09 ` Raphael Gallais-Pou
2025-08-22 13:10 ` Yannick FERTRE
12 siblings, 1 reply; 30+ messages in thread
From: Raphael Gallais-Pou @ 2025-08-21 11:09 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
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] 30+ messages in thread
* Re: [PATCH v4 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board
2025-08-21 11:09 ` [PATCH v4 13/13] arm64: dts: st: enable display support on stm32mp257f-ev1 board Raphael Gallais-Pou
@ 2025-08-22 13:10 ` Yannick FERTRE
0 siblings, 0 replies; 30+ messages in thread
From: Yannick FERTRE @ 2025-08-22 13:10 UTC (permalink / raw)
To: Raphael Gallais-Pou, 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
Hi Raphael,
Thanks for the patch.
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Le 21/08/2025 à 13:09, Raphael Gallais-Pou a écrit :
> 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
>
> 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";
> };
>
^ permalink raw reply [flat|nested] 30+ messages in thread