Message ID | 20241215053639.738890-3-anarsoul@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | arm64: allwinner: a64: fix video output on Pinebook | expand |
Hello Vasily, On 2024-12-15 06:34, Vasily Khoruzhick wrote: > 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 > > 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") > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Thanks for fixing this issue! I've been banging my head for a while about how to fix it without introducing new DT properties, and I hope that the maintainers will like your approach. I'd suggest that the patch description is improved further a bit, by incorporating some parts of the good description of the issue that's already in the cover letter. With that addressed, please feel free to include Reviewed-by: Dragan Simic <dsimic@manjaro.org> > --- > arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 ++ > arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 ++ > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++ > 3 files changed, 6 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts > index 379c2c8466f5..86d44349e095 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts > @@ -390,6 +390,8 @@ &sound { > &tcon0 { > pinctrl-names = "default"; > pinctrl-0 = <&lcd_rgb666_pins>; > + assigned-clocks = <&ccu CLK_TCON0>; > + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; > > status = "okay"; > }; > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > index b407e1dd08a7..ec055510af8b 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts > @@ -369,6 +369,8 @@ &sound { > &tcon0 { > pinctrl-names = "default"; > pinctrl-0 = <&lcd_rgb666_pins>; > + assigned-clocks = <&ccu CLK_TCON0>; > + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; > > status = "okay"; > }; > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > index a5c3920e0f04..0fecf0abb204 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > @@ -445,6 +445,8 @@ tcon0: lcd-controller@1c0c000 { > 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";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index 379c2c8466f5..86d44349e095 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -390,6 +390,8 @@ &sound { &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; + assigned-clocks = <&ccu CLK_TCON0>; + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts index b407e1dd08a7..ec055510af8b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts @@ -369,6 +369,8 @@ &sound { &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; + assigned-clocks = <&ccu CLK_TCON0>; + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index a5c3920e0f04..0fecf0abb204 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -445,6 +445,8 @@ tcon0: lcd-controller@1c0c000 { 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";
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 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") Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++ 3 files changed, 6 insertions(+)