]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: allwinner: a64: explicitly assign clock parent for TCON0
authorVasily Khoruzhick <anarsoul@gmail.com>
Sat, 4 Jan 2025 07:36:59 +0000 (23:36 -0800)
committerChen-Yu Tsai <wens@csie.org>
Sat, 4 Jan 2025 12:16:51 +0000 (20:16 +0800)
TCON0 seems to need a different clock parent depending on output type.
For RGB it has to be PLL-VIDEO0-2X, while for DSI it has to be PLL-MIPI,
so select it explicitly.

Video output doesn't work if incorrect clock is assigned.

On my Pinebook I manually configured PLL-VIDEO0-2X and PLL-MIPI to the same
rate, and while video output works fine with PLL-VIDEO0-2X, it doesn't
work at all (as in no picture) with PLL-MIPI.

Fixes: ca1170b69968 ("clk: sunxi-ng: a64: force select PLL_MIPI in TCON0 mux")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Frank Oltmanns <frank@oltmanns.dev> # on PinePhone
Tested-by: Stuart Gathman <stuart@gathman.org> # on OG Pinebook
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Link: https://patch.msgid.link/20250104074035.1611136-4-anarsoul@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

index 379c2c8466f504cc8ad91cc78f65f636750967c1..86d44349e0951729f30b94906e783ec08b92e1c3 100644 (file)
 &tcon0 {
        pinctrl-names = "default";
        pinctrl-0 = <&lcd_rgb666_pins>;
+       assigned-clocks = <&ccu CLK_TCON0>;
+       assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>;
 
        status = "okay";
 };
index b407e1dd08a737884efa0f3a83faf9b7e454d2fb..ec055510af8b6882eb3d33e142e359dd4e55df8b 100644 (file)
 &tcon0 {
        pinctrl-names = "default";
        pinctrl-0 = <&lcd_rgb666_pins>;
+       assigned-clocks = <&ccu CLK_TCON0>;
+       assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>;
 
        status = "okay";
 };
index a5c3920e0f048e4fd6e368093d58b99b2803568e..0fecf0abb204c7b195843071634acc2658db1934 100644 (file)
                        clock-names = "ahb", "tcon-ch0";
                        clock-output-names = "tcon-data-clock";
                        #clock-cells = <0>;
+                       assigned-clocks = <&ccu CLK_TCON0>;
+                       assigned-clock-parents = <&ccu CLK_PLL_MIPI>;
                        resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
                        reset-names = "lcd", "lvds";