All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Samuel Holland <samuel@sholland.org>,
	Ryan Walklin <ryan@testtoast.com>
Cc: Andre Przywara <andre.przywara@arm.com>,
	Chris Morgan <macroalpha82@gmail.com>,
	Hironori KIKUCHI <kikuchan98@gmail.com>,
	Philippe Simons <simons.philippe@gmail.com>,
	linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Ryan Walklin <ryan@testtoast.com>
Subject: Re: [PATCH 5/8] arm64: dts: allwinner: h616: Add TCON nodes to H616 DTSI
Date: Sat, 22 Feb 2025 10:45:27 +0100	[thread overview]
Message-ID: <1916004.CQOukoFCf9@jernej-laptop> (raw)
In-Reply-To: <20250216092827.15444-6-ryan@testtoast.com>

Dne nedelja, 16. februar 2025 ob 10:27:12 Srednjeevropski standardni čas je Ryan Walklin napisal(a):
> From: Jernej Skrabec <jernej.skrabec@gmail.com>
> 
> The Allwinner H616 has a display pipeline similar to other Allwinner
> devices, specifically the A10, but using a newer display engine
> revision (DE33).
> 
> Not all output pins are exposed on all package variants, for example
> only the H700 and T507 have LCD pins exposed, but all variants support
> HDMI output. However on the die these are connected to a display engine
> via a TCON TOP and one or more timing controllers (TCONs).
> 
> HDMI output support is not provided in this series (but will be in a
> subsequent patch) so for now note this within the relevant node to
> prevent a DT compiler error.
> 
> Add TCON nodes for the TOP, and the LCD and TV timing controllers. The
> timing controllers are compatible with the existing R40 driver.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Signed-off-by: Ryan Walklin <ryan@testtoast.com>
> ---
>  .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 133 ++++++++++++++++++
>  1 file changed, 133 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> index ab8b70ce7df89..242bac95840f8 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> @@ -7,9 +7,12 @@
>  #include <dt-bindings/clock/sun50i-h616-ccu.h>
>  #include <dt-bindings/clock/sun50i-h6-r-ccu.h>
>  #include <dt-bindings/clock/sun6i-rtc.h>
> +#include <dt-bindings/clock/sun8i-de2.h>
> +#include <dt-bindings/clock/sun8i-tcon-top.h>
>  #include <dt-bindings/reset/sun50i-h616-ccu.h>
>  #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
>  #include <dt-bindings/thermal/thermal.h>
> +#include <dt-bindings/reset/sun8i-de2.h>
>  
>  / {
>  	interrupt-parent = <&gic>;
> @@ -909,6 +912,136 @@ ohci3: usb@5311400 {
>  			status = "disabled";
>  		};
>  
> +		tcon_top: tcon-top@6510000 {
> +			compatible = "allwinner,sun50i-h6-tcon-top";
> +			reg = <0x06510000 0x1000>;
> +			clocks = <&ccu CLK_BUS_TCON_TOP>,
> +				 <&ccu CLK_TCON_TV0>;
> +			clock-names = "bus", "tcon-tv0";
> +			clock-output-names = "tcon-top-tv0";
> +			#clock-cells = <0>;
> +			resets = <&ccu RST_BUS_TCON_TOP>;
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				tcon_top_mixer0_in: port@0 {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <0>;
> +
> +					tcon_top_mixer0_in_mixer0: endpoint@0 {
> +						reg = <0>;
> +						remote-endpoint = <&mixer0_out_tcon_top_mixer0>;
> +					};
> +				};
> +
> +				tcon_top_mixer0_out: port@1 {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <1>;
> +
> +					tcon_top_mixer0_out_tcon_lcd0: endpoint@0 {
> +						reg = <0>;
> +						remote-endpoint = <&tcon_lcd0_in_tcon_top_mixer0>;
> +					};
> +
> +					tcon_top_mixer0_out_tcon_tv0: endpoint@2 {
> +						reg = <2>;
> +						remote-endpoint = <&tcon_tv0_in_tcon_top_mixer0>;
> +					};
> +				};
> +
> +				tcon_top_hdmi_in: port@4 {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <4>;
> +
> +					tcon_top_hdmi_in_tcon_tv0: endpoint@0 {
> +						reg = <0>;
> +						remote-endpoint = <&tcon_tv0_out_tcon_top>;
> +					};
> +				};
> +
> +				tcon_top_hdmi_out: port@5 {
> +					reg = <5>;
> +
> +					tcon_top_hdmi_out_hdmi: endpoint {
> +						/* placeholder for HDMI  - remote-endpoint = <&hdmi_in_tcon_top>;*/
> +					};
> +				};
> +			};
> +		};
> +		
> +		tcon_lcd0: lcd-controller@6511000 {
> +			compatible = "allwinner,sun8i-r40-tcon-lcd";
> +			reg = <0x06511000 0x1000>;
> +			interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_TCON_LCD0>, <&ccu CLK_TCON_LCD0>;
> +			clock-names = "ahb", "tcon-ch0";
> +			clock-output-names = "tcon-data-clock";
> +			#clock-cells = <0>;
> +			resets = <&ccu RST_BUS_TCON_LCD0>, <&ccu RST_BUS_TCON_LCD1>;
> +			reset-names = "lcd", "lvds";

That's not true, is it? LVDS should be LVDS reset. Check my WIP patch:
https://github.com/jernejsk/linux-1/commit/8b090dc866d4c4b5b0a1804da021a9f44c67d5f1

It turns out that H616 clock driver missed LVDS reset, as it can be seen here:
https://github.com/jernejsk/linux-1/commit/88bad1a59876f5d385bcd45a363784ed2beec6ae#diff-b340c978bcdbe240f7b99f4d0d96ea130a8acb1a5786a8efbb24d9e7a0b14e53R1084

I also commented on this series:
https://lore.kernel.org/linux-sunxi/20250213172248.158447-1-macroalpha82@gmail.com/T/#t

Best regards,
Jernej

> +			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				tcon_lcd0_in: port@0 {
> +					reg = <0>;
> +
> +					tcon_lcd0_in_tcon_top_mixer0: endpoint {
> +						remote-endpoint = <&tcon_top_mixer0_out_tcon_lcd0>;
> +					};
> +				};
> +
> +				tcon_lcd0_out: port@1 {
> +					reg = <1>;
> +				};
> +			};
> +		};
> +		
> +		tcon_tv0: lcd-controller@6515000 {
> +			compatible = "allwinner,sun50i-h6-tcon-tv",
> +				     "allwinner,sun8i-r40-tcon-tv";
> +			reg = <0x06515000 0x1000>;
> +			interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&ccu CLK_BUS_TCON_TV0>,
> +				 <&tcon_top CLK_TCON_TOP_TV0>;
> +			clock-names = "ahb", "tcon-ch1";
> +			#clock-cells = <0>;
> +			resets = <&ccu RST_BUS_TCON_TV0>;
> +			reset-names = "lcd";
> +			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				tcon_tv0_in: port@0 {
> +					reg = <0>;
> +
> +					tcon_tv0_in_tcon_top_mixer0: endpoint {
> +						remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>;
> +					};
> +				};
> +
> +				tcon_tv0_out: port@1 {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <1>;
> +
> +					tcon_tv0_out_tcon_top: endpoint@1 {
> +						reg = <1>;
> +						remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>;
> +					};
> +				};
> +			};
> +		};
> +
>  		rtc: rtc@7000000 {
>  			compatible = "allwinner,sun50i-h616-rtc";
>  			reg = <0x07000000 0x400>;
> 






  reply	other threads:[~2025-02-22  9:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16  9:27 [PATCH 0/8] arm64: dts: allwinner: h616: add LCD timing controller and display engine support Ryan Walklin
2025-02-16  9:27 ` [PATCH 1/8] bus: sun50i: add DE33 compatible string to the DE2 bus driver Ryan Walklin
2025-02-22  9:35   ` Jernej Škrabec
2025-02-22 23:38     ` Ryan Walklin
2025-02-16  9:27 ` [PATCH 2/8] arm64: dts: allwinner: h616: add display engine, bus and mixer nodes Ryan Walklin
2025-02-24 18:00   ` Andre Przywara
2025-02-16  9:27 ` [PATCH 3/8] dt-bindings: allwinner: Add TCON_TOP and TCON_LCD clock/reset defines Ryan Walklin
2025-02-19 23:11   ` Rob Herring (Arm)
2025-02-16  9:27 ` [PATCH 4/8] drm/sun4i: tcon: Add support for R40 LCD Ryan Walklin
2025-02-16  9:27 ` [PATCH 5/8] arm64: dts: allwinner: h616: Add TCON nodes to H616 DTSI Ryan Walklin
2025-02-22  9:45   ` Jernej Škrabec [this message]
2025-02-22 23:39     ` Ryan Walklin
2025-02-16  9:27 ` [PATCH 6/8] arm64: dts: allwinner: h616: add LCD, LVDS and PWM pins Ryan Walklin
2025-02-22  9:48   ` Jernej Škrabec
2025-02-22 23:40     ` Ryan Walklin
2025-02-16  9:27 ` [PATCH 7/8] arm64: dts: allwinner: rg35xx: Enable LCD output Ryan Walklin
2025-02-22  9:46   ` Jernej Škrabec
2025-02-16  9:27 ` [PATCH 8/8] arm64: dts: allwinner: rg35xx: Add GPIO backlight control Ryan Walklin
2025-02-17  8:13   ` Philippe Simons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1916004.CQOukoFCf9@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kikuchan98@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=macroalpha82@gmail.com \
    --cc=robh@kernel.org \
    --cc=ryan@testtoast.com \
    --cc=samuel@sholland.org \
    --cc=simons.philippe@gmail.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.