devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Jonker <jbx6244@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>, dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
	kernel@pengutronix.de,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Michael Riesch" <michael.riesch@wolfvision.net>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Peter Geis" <pgwipeout@gmail.com>
Subject: Re: [PATCH 08/12] arm64: dts: rockchip: rk356x: Add VOP2 nodes
Date: Thu, 25 Nov 2021 21:25:28 +0100	[thread overview]
Message-ID: <8451aeb1-03c9-6c90-c95e-c4a76e2159b8@gmail.com> (raw)
In-Reply-To: <20211117143347.314294-9-s.hauer@pengutronix.de>

Hi Sascha,


On 11/17/21 3:33 PM, Sascha Hauer wrote:
> The VOP2 is the display output controller on the RK3568. Add the node
> for it to the dtsi file along with the required display-subsystem node
> and the iommu node.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm64/boot/dts/rockchip/rk356x.dtsi | 52 ++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> index 46d9552f60284..6ebf7c14e096a 100644
> --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
> @@ -447,6 +447,58 @@ gmac1_mtl_tx_setup: tx-queues-config {
>  		};
>  	};
>  

> +	display_subsystem: display-subsystem {
> +		compatible = "rockchip,display-subsystem";
> +		ports = <&vop_out>;
> +	};

Some DT sort rules:

For nodes:
Sort things without reg alphabetical first,
then sort the rest by reg address.

> +
> +	vop: vop@fe040000 {

> +		compatible = "rockchip,rk3568-vop";

From rockchip-vop2.yaml:
+properties:
+  compatible:
+    enum:

+      - rockchip,rk3568-vop
+      - rockchip,rk3566-vop

Maybe sort yaml compatibles in alphabetical order.

rockchip,rk3566-vop is not used in the dtsi I think.

Comment by Andy Yan:
> 
> But take care that the vop on rk3566 has a special limitation: there are 
> three
> 
> windows(Cluster1/Esmart1/Smart1) that have a mirror lock, that means they
> 
> can't be programed framebuffer address independently , they can only
> 
> share framebuffer address with Cluster0/Esmart0/Smart0.

Question:
Given Andy's comment could someone explain weather the vop and hdmi
nodes should be in rk3566.dtsi and rk3568.dtsi with an extra
rockchip,rk3566-dw-hdmi compatible?

> +		reg = <0x0 0xfe040000 0x0 0x3000>, <0x0 0xfe044000 0x0 0x1000>;
> +		reg-names = "regs", "gamma_lut";

> +		rockchip,grf = <&grf>;
Heiko's sort rules:

compatible
reg
interrupts
[alphabetical]
status [if needed]

> +		interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>, <&cru DCLK_VOP0>, <&cru DCLK_VOP1>, <&cru DCLK_VOP2>;
> +		clock-names = "aclk_vop", "hclk_vop", "dclk_vp0", "dclk_vp1", "dclk_vp2";
> +		iommus = <&vop_mmu>;
> +		power-domains = <&power RK3568_PD_VO>;
> +		status = "disabled";
> +
> +		vop_out: ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			vp0: port@0 {

> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <0>;

My incomplete list:

Inside nodes:
If exists on top: compatible, reg and interrupts.
In alphabetical order the required properties.
Then in alphabetical order the other properties.
And as last things that start with '#' in alphabetical order.
Add status below all other properties for soc internal components with
any board-specifics.

> +			};
> +
> +			vp1: port@1 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <1>;
> +			};
> +
> +			vp2: port@2 {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <2>;
> +			};
> +		};
> +	};
> +
> +	vop_mmu: iommu@fe043e00 {
> +		compatible = "rockchip,rk3568-iommu";
> +		reg = <0x0 0xfe043e00 0x0 0x100>, <0x0 0xfe043f00 0x0 0x100>;
> +		interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;

> +		interrupt-names = "vop_mmu";

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml

arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dt.yaml: iommu@fe043e00:
'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml

> +		clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>;
> +		clock-names = "aclk", "iface";
> +		#iommu-cells = <0>;
> +		status = "disabled";
> +	};
> +
>  	qos_gpu: qos@fe128000 {
>  		compatible = "rockchip,rk3568-qos", "syscon";
>  		reg = <0x0 0xfe128000 0x0 0x20>;
> 

  reply	other threads:[~2021-11-25 20:30 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 14:33 [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 01/12] dt-bindings: display: rockchip: Add compatible for rk3568 HDMI Sascha Hauer
2021-11-27 15:07   ` Heiko Stuebner
2021-11-17 14:33 ` [PATCH 02/12] drm/rockchip: dw_hdmi: Do not leave clock enabled in error case Sascha Hauer
2021-11-17 14:33 ` [PATCH 03/12] drm/rockchip: dw_hdmi: add rk3568 support Sascha Hauer
2021-11-17 14:33 ` [PATCH 04/12] drm/rockchip: dw_hdmi: add regulator support Sascha Hauer
2021-11-29 22:46   ` Rob Herring
2021-12-07 17:01   ` Robin Murphy
2021-11-17 14:33 ` [PATCH 05/12] of: graph: Allow disabled endpoints Sascha Hauer
2021-11-17 14:33 ` [PATCH 06/12] dt-bindings: " Sascha Hauer
2021-11-17 14:33 ` [PATCH 07/12] dt-bindings: display: rockchip: Add binding for VOP2 Sascha Hauer
2021-11-17 16:10   ` Rob Herring
2021-11-17 14:33 ` [PATCH 08/12] arm64: dts: rockchip: rk356x: Add VOP2 nodes Sascha Hauer
2021-11-25 20:25   ` Johan Jonker [this message]
2021-11-26  7:40     ` Sascha Hauer
2021-11-26  8:15       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 09/12] arm64: dts: rockchip: rk356x: Add HDMI nodes Sascha Hauer
2021-11-17 15:13   ` Rob Herring
2021-12-01 16:04     ` Sascha Hauer
2021-11-17 14:33 ` [PATCH 10/12] arm64: dts: rockchip: rk3568-evb: Enable VOP2 and hdmi Sascha Hauer
2021-11-17 15:19   ` Rob Herring
2021-12-02 15:34     ` Sascha Hauer
2021-12-02 15:41       ` Heiko Stübner
2021-12-02 16:09         ` Sascha Hauer
2021-11-17 15:20   ` Michael Riesch
2021-11-17 15:44   ` [PATCH] arm64: dts: rockchip: enable vop2 and hdmi tx on quartz64a Michael Riesch
2021-11-25 19:44     ` Johan Jonker
2021-11-17 14:33 ` [PATCH 11/12] drm/rockchip: Make VOP driver optional Sascha Hauer
2021-11-17 14:40   ` Heiko Stübner
2021-11-17 14:50     ` Sascha Hauer
2021-11-17 15:16       ` Heiko Stübner
2021-11-17 14:33 ` [PATCH 12/12] drm: rockchip: Add VOP2 driver Sascha Hauer
2021-11-17 18:05   ` Nicolas Frattaroli
2021-11-17 19:45     ` Sascha Hauer
2021-11-26  6:44   ` kernel test robot
2021-11-17 14:54 ` [PATCH v1 00/12] drm/rockchip: RK356x VOP2 support Rob Herring
2021-11-17 15:41   ` Sascha Hauer
2021-11-18  1:27 ` Kever Yang
2021-11-18  9:26   ` Heiko Stübner
2021-11-18  9:53     ` Daniel Stone
2021-11-18 10:50       ` Kever Yang
2021-11-18 11:08         ` Michael Riesch
2021-11-18 12:07         ` Daniel Stone
2021-11-18 13:14           ` Andy Yan
2021-11-18 13:24             ` Daniel Stone
2021-11-18 10:03     ` Sascha Hauer
2021-11-21 23:18 ` Alex Bee
2021-11-22  8:10   ` Sascha Hauer
2021-11-22 17:47     ` Alex Bee
2021-11-22 19:21       ` Robin Murphy

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=8451aeb1-03c9-6c90-c95e-c4a76e2159b8@gmail.com \
    --to=jbx6244@gmail.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=s.hauer@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).