]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: st: add ltdc support on stm32mp255
authorRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Fri, 22 Aug 2025 14:34:19 +0000 (16:34 +0200)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Mon, 15 Sep 2025 15:51:31 +0000 (17:51 +0200)
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>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Link: https://lore.kernel.org/r/20250822-drm-misc-next-v5-10-9c825e28f733@foss.st.com
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm64/boot/dts/st/stm32mp251.dtsi
arch/arm64/boot/dts/st/stm32mp255.dtsi

index aecbdea07385fc33a56bf8ca84516e1a3b432de8..e2a2fc9070f089b5ce8d3b675a2e4b2123950b65 100644 (file)
                        compatible = "fixed-clock";
                        clock-frequency = <64000000>;
                };
+
+               clk_flexgen_27_fixed: clk-54000000 {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <54000000>;
+               };
        };
 
        firmware {
index f689b47c5010033120146cf1954d6624c0270045..48a95af1741c42300195b753b710e714abc60d96 100644 (file)
@@ -5,6 +5,12 @@
  */
 #include "stm32mp253.dtsi"
 
+&ltdc {
+       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";