From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50A21C5321D for ; Mon, 19 Aug 2024 09:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=U1TkSphNSMxHD50Xsko/faoS7VqgPaYacMBOlxn4LoU=; b=Irdg819/1GRampMHnx7lytAnxm uUCOJEl8gHzYcA+01HmIWOc6ZAScJDLQMeFt70aO3z8c1IZxcHGXzf2T24ltxdvQvP5I3ZmYZ4c/f 6ART14Po6G6R4dLw3h5PkCDqn0YGSuRyLzx3r3Nt5/Tif0ifAVk+V5VSA0XqPFLoj2/KGk4mcD4X8 oqkIOEizljXCF4en4/T07aUwEwIC97b+r7WAeO2j0O08TjWIhJIQaAynsevsmZlWXvAKOcGBHwhsh YIawktA5DWMPzniakyIuFV9SmDeG+o9bhFcXB3U5R5xxzU9UcwXVsdoJjdrWfa9hECAmjiuQFCFcd FVwANEyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfyxX-000000010m6-2MsR; Mon, 19 Aug 2024 09:45:55 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sfyu0-0000000100y-0GR6 for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 09:42:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1724060536; x=1755596536; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U1TkSphNSMxHD50Xsko/faoS7VqgPaYacMBOlxn4LoU=; b=OSD/0S32Ov7abc/PtnZol7EZUleIE7i3m1sxQRPew6JzXQf5tdT6uMlM XzTwhSjCXi/lyhJ+gNXyH/6lgMz8ez6/YK+AXQdJjN/s0l/bvRM7hTD0A q/o86go1o3keo5VPe1gnluq3Sh1IohAjdsf50z6rZfBGxxkXCKOyJJxOT HFE0KJUnO204wK4EbfvGw3hIa4iBWv1CT7g19TzAC6+JOR2KCY6D2N+Lr 253zovgbBFtYaC64mfJdYhSaebocuVi16o9aYKNqSy/iUyigQhAX8s99f uRH7Coxrth1kNngJlA5t+s4fv+hW17TQEefAIxTgAtIoEl85r7/cWVcMh g==; X-CSE-ConnectionGUID: tvWOwWTcQnqMHmoHS8qSww== X-CSE-MsgGUID: Ln+xExcaRKqzaCI87k2+NA== X-IronPort-AV: E=Sophos;i="6.10,158,1719871200"; d="scan'208";a="38463626" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 19 Aug 2024 11:42:11 +0200 X-CheckPoint: {66C31373-34-45EF2B36-F6E28480} X-MAIL-CPID: 79A054C457F1C023EE635B3C6EFBB172_0 X-Control-Analysis: str=0001.0A782F21.66C31373.0156,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 27474166864; Mon, 19 Aug 2024 11:42:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1724060527; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=U1TkSphNSMxHD50Xsko/faoS7VqgPaYacMBOlxn4LoU=; b=mM/hx4w/Ss+K1azF1RpUUSF1uJGn+6ihKSN2MiJVwRB2/zvHpOpkKqY0Luhzoo2nIYo9Ry ogm0bc6CwOUuRWwG23V4cOfbPDPzI758uzJbDuaIF2OTcWFS2YFwbk2bfEnACFwOGvsM+2 YmvEwoFTM4SgYDKumtqOaMgaGBL4MtHgIpt6aJyb7xhnC9/OtFYPSOwsTKvULt1a3LT47u sdP/r6H4BckcH+WwHoXi63RptMMJnGnO3wpPKe4NNaePveP3Z6Ff2bMbnjXbZSxA8utqQi P/f/4P3K6bHQmDrTv1vvmVU/zw3DLaduVvmKkIQppLmXjm9ZKHsIXB3xAlWHxQ== From: Alexander Stein To: Laurent Pinchart Cc: imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Paul Elder , Adam Ford , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Marek Vasut , Peng Fan , Rob Herring , Sascha Hauer , Shawn Guo , Pengutronix Kernel Team , devicetree@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH v4] arm64: dts: imx8mp: Add DT nodes for the two ISPs Date: Mon, 19 Aug 2024 11:42:04 +0200 Message-ID: <6077383.lOV4Wx5bFT@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20240817182546.GC29320@pendragon.ideasonboard.com> References: <20240814161451.32119-1-laurent.pinchart@ideasonboard.com> <13578505.uLZWGnKmhe@steina-w> <20240817182546.GC29320@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_024216_621530_E2DAEC29 X-CRM114-Status: GOOD ( 31.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Laurent, Am Samstag, 17. August 2024, 20:25:46 CEST schrieb Laurent Pinchart: > Hi Alexander, >=20 > On Thu, Aug 15, 2024 at 02:05:39PM +0200, Alexander Stein wrote: > > Am Mittwoch, 14. August 2024, 18:14:51 CEST schrieb Laurent Pinchart: > > > From: Paul Elder > > >=20 > > > The ISP supports both CSI and parallel interfaces, where port 0 > > > corresponds to the former and port 1 corresponds to the latter. Since > > > the i.MX8MP's ISPs are connected by the parallel interface to the CSI > > > receiver, set them both to port 1. > > >=20 > > > Signed-off-by: Paul Elder > > > Signed-off-by: Laurent Pinchart > > > --- > > > Changes since v3: > > >=20 > > > - Add comment regarding the IMX8MP_CLK_MEDIA_ISP clock rate > > > - Fix assigned-clock-rates > > > - Dropping Tested-by as the clock configuration has changed > > >=20 > > > Changes since v2: > > >=20 > > > - Assign clock parent and frequency in blk-ctrl > > >=20 > > > Changes since v1: > > >=20 > > > - Fix clock ordering > > > - Add #address-cells and #size-cells to ports nodes > > > --- > > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 57 +++++++++++++++++++++= +- > > > 1 file changed, 55 insertions(+), 2 deletions(-) > > >=20 > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/b= oot/dts/freescale/imx8mp.dtsi > > > index d9b5c40f6460..f3531cfb0d79 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > @@ -1673,6 +1673,50 @@ isi_in_1: endpoint { > > > }; > > > }; > > > =20 > > > + isp_0: isp@32e10000 { > > > + compatible =3D "fsl,imx8mp-isp"; > > > + reg =3D <0x32e10000 0x10000>; > > > + interrupts =3D ; > > > + clocks =3D <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; > > > + clock-names =3D "isp", "aclk", "hclk"; > > > + power-domains =3D <&media_blk_ctrl IMX8MP_MEDIABLK_PD_ISP>; > > > + fsl,blk-ctrl =3D <&media_blk_ctrl 0>; > > > + status =3D "disabled"; > > > + > > > + ports { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + > > > + port@1 { > > > + reg =3D <1>; > > > + }; > > > + }; > > > + }; > > > + > > > + isp_1: isp@32e20000 { > > > + compatible =3D "fsl,imx8mp-isp"; > > > + reg =3D <0x32e20000 0x10000>; > > > + interrupts =3D ; > > > + clocks =3D <&clk IMX8MP_CLK_MEDIA_ISP_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; > > > + clock-names =3D "isp", "aclk", "hclk"; > > > + power-domains =3D <&media_blk_ctrl IMX8MP_MEDIABLK_PD_ISP>; > > > + fsl,blk-ctrl =3D <&media_blk_ctrl 1>; > > > + status =3D "disabled"; > > > + > > > + ports { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + > > > + port@1 { > > > + reg =3D <1>; > > > + }; > > > + }; > > > + }; > > > + > > > dewarp: dwe@32e30000 { > > > compatible =3D "nxp,imx8mp-dw100"; > > > reg =3D <0x32e30000 0x10000>; > > > @@ -1869,17 +1913,26 @@ media_blk_ctrl: blk-ctrl@32ec0000 { > > > clock-names =3D "apb", "axi", "cam1", "cam2", > > > "disp1", "disp2", "isp", "phy"; > > > =20 > > > + /* > > > + * The ISP maximum frequency is 400MHz in normal mode > > > + * and 500MHz in overdrive mode. The 400MHz operating > > > + * point hasn't been successfully tested yet, so set > > > + * IMX8MP_CLK_MEDIA_ISP to 500MHz for the time being. > > > + */ > > > assigned-clocks =3D <&clk IMX8MP_CLK_MEDIA_AXI>, > > > <&clk IMX8MP_CLK_MEDIA_APB>, > > > <&clk IMX8MP_CLK_MEDIA_DISP1_PIX>, > > > <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>, > > > + <&clk IMX8MP_CLK_MEDIA_ISP>, > > > <&clk IMX8MP_VIDEO_PLL1>; > > > assigned-clock-parents =3D <&clk IMX8MP_SYS_PLL2_1000M>, > > > <&clk IMX8MP_SYS_PLL1_800M>, > > > <&clk IMX8MP_VIDEO_PLL1_OUT>, > > > - <&clk IMX8MP_VIDEO_PLL1_OUT>; > > > + <&clk IMX8MP_VIDEO_PLL1_OUT>, > > > + <&clk IMX8MP_SYS_PLL2_500M>; > > > assigned-clock-rates =3D <500000000>, <200000000>, > > > - <0>, <0>, <1039500000>; > > > + <0>, <0>, <500000000>, > > > + <1039500000>; > >=20 > > Unfortunately for some reason this reparenting doesn't work (on my plat= form). > > 'media_isp' is still below IMX8MP_CLK_24M. > > $ grep -B1 media_isp /sys/kernel/debug/clk/clk_summary > > mipi_dsi_esc_rx 0 0 0 24000000= 0 0 50000 N deviceless no_c= onnection_id =20 > > media_isp 0 0 0 24000000= 0 0 50000 N deviceless no_c= onnection_id =20 > > media_isp_root_clk 0 0 0 24000000= 0 0 50000 N 32e10000.isp i= sp >=20 > Hmmm... I get >=20 > sys_pll2_500m 3 3 0 500000000 = 0 0 50000 Y deviceless = no_connection_id > media_isp 0 0 0 500000000 = 0 0 50000 N deviceless = no_connection_id > media_isp_root_clk 0 0 0 500000= 000 0 0 50000 N 32e10000.isp = isp >=20 > > I have to add this diff for isp_0 (and isp_1 if you use it): > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > @@ -1683,6 +1683,9 @@ isp_0: isp@32e10000 { > > clock-names =3D "isp", "aclk", "hclk"; > > power-domains =3D <&media_blk_ctrl IMX8= MP_MEDIABLK_PD_ISP>; > > fsl,blk-ctrl =3D <&media_blk_ctrl 0>; > > + assigned-clocks =3D <&clk IMX8MP_CLK_ME= DIA_ISP>; > > + assigned-clock-parents =3D <&clk IMX8MP= _SYS_PLL2_500M>; > > + assigned-clock-rates =3D <500000000>; > > status =3D "disabled"; > > =20 > > ports { > >=20 > > Now clock is setup properly: > > $ grep -B1 media_isp /sys/kernel/debug/clk/clk_summary > > sys_pll2_500m 3 3 0 50000000= 0 0 0 50000 Y deviceless = no_connection_id =20 > > media_isp 0 0 0 50000000= 0 0 0 50000 N deviceless = no_connection_id =20 > > media_isp_root_clk 0 0 0 5000= 00000 0 0 50000 N 32e10000.isp = isp >=20 > I'm not sure why that's the case, I don't have assigned-clock* > properties in the ISP nodes in my device tree and things still work > properly. Would you be able to investigate ? I had a local board-specific overwrite in place for node 'media_blk_ctrl' I forgot about... So this patch does what it is supposed to do: Reviewed-by: Alexander Stein =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/