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 3238AC43334 for ; Mon, 20 Jun 2022 12:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=wOyn6wF+XAspZojUUxECeym3Bb231+RgVbj2zW6KQPQ=; b=Hew2Khqp8WlYgi 2GksOhFS0M74Dt7RRN5KYRNy60bsIiRvWZDDTr81+ilW/qB9uQUbafvwA7fRLBaDFkM86fD0qyPtO xtGxIudtvqk/kmjYh0EFCCWWXBWDmRmXoeWwpksaqL9gUn6q20tyf3nLushuiTOp8u0MDj3GMhaif aJt0YMzfvjI6OotsIuhoi7GtLh0CH2+ExMbNu832cMTSs3sJxBIX/fIHST1h68i1jnBaAEVg0dDbm QfVsdhk84pC2i/CKPz80CURx3FdpAZ+K9L4lGbBKHaCD0eib+2ZdHkuCiMHcfjXQRVAN+aEfH5r/V nr2I+9WxcoacOh944bbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3GU0-000Pac-Qh; Mon, 20 Jun 2022 12:26:21 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3GPD-000NP1-Qv for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2022 12:21:26 +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=1655727683; x=1687263683; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JcZGJjSSP6wOKdQ6qZDb5Wr4Rc53SWX+TasNUSNE/cY=; b=adKUpWV2OBLfyKbJwSuoIPvTwylenZrdQONpYn4sClBx020g/4QzAKpJ xATSTOWvIMi3omEVjrjFI+RWurVRH/9FwEaT/Ai2PApsCRtlupS75lsut uV2SOqCWa2mCS6AYVKvMwsOwLSNp0v7S/st/xoMqXJmSNla+vG+EEASd5 4Qj9zi0QYM6rRoC6BIczhHBtF+mfjXj8eGW/G2Rjv+8YoPlDsHtN1o9QA KfOgdsvL5Lz89yr3LGdxeVLm31rct7g6TgIuHDJpf0QW+uxyLxV+vu4+E YLr3R9bWgxeiF7I9+NWUndUgqCtmy739qsilfx+tEguQmWivZDXsgQJZ6 A==; X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="24547471" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 20 Jun 2022 14:21:13 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Mon, 20 Jun 2022 14:21:13 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Mon, 20 Jun 2022 14:21:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1655727673; x=1687263673; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JcZGJjSSP6wOKdQ6qZDb5Wr4Rc53SWX+TasNUSNE/cY=; b=ELMMbXq1sIqzN2c2hCwrSIaaycLOMghnmeYOU+Mv2T/dG4scD6qZijmk +/xrh0U0v1JRqe7Snlvx/BcDaLwORheDEaVOCae+xyWGySgTEurXtqPZf DmvtCqfQMf/K4lSGloKW9rhbqO4bQNBiTxpk4oKqB7h5g85jOkC2NVP9f AV/ZC0Kukw89uME3fxJPlv3/nSl85exzeerDylAJPcQBX80Go0h14tNxq H7TSnTxpxgBYt2DoCTttHRwoUz+LuVKA+763nRoqx7VesekvVcqFBRxlw HXj7SoFjc/KQ5TZBSwADIzyfkmxmgwawcO77KYDiLYIgY2mdb8ldbt/tK w==; X-IronPort-AV: E=Sophos;i="5.92,306,1650924000"; d="scan'208";a="24547470" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 20 Jun 2022 14:21:13 +0200 Received: from steina-w.localnet (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id F06CA280056; Mon, 20 Jun 2022 14:21:12 +0200 (CEST) From: Alexander Stein To: Laurent Pinchart Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, Shawn Guo , Sascha Hauer , Fabio Estevam , Paul Elder Subject: Re: (EXT) Re: (EXT) [PATCH] arm64: dts: imx8mp: Add CSIS DT nodes Date: Mon, 20 Jun 2022 14:21:10 +0200 Message-ID: <4722627.GXAFRqVoOG@steina-w> Organization: TQ-Systems GmbH In-Reply-To: References: <20220616161643.22867-1-laurent.pinchart@ideasonboard.com> <15420032.uLZWGnKmhe@steina-w> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220620_052124_255534_8498ED85 X-CRM114-Status: GOOD ( 40.08 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Samstag, 18. Juni 2022, 00:31:10 CEST schrieb Laurent Pinchart: > Hi Alexander, > > On Fri, Jun 17, 2022 at 08:43:53AM +0200, Alexander Stein wrote: > > Hello Laurent, > > > > thanks for ths and the other MIPI CSI-2 related patches. > > > > Am Donnerstag, 16. Juni 2022, 18:16:43 CEST schrieb Laurent Pinchart: > > > Add DT nodes for the two CSI-2 receivers of the i.MX8MP. > > > > > > Signed-off-by: Laurent Pinchart > > > --- > > > This patch depends on the DT bindings submitted in [1], for which I plan > > > to submit a pull request for v5.20. > > > > > > [1] > > > https://lore.kernel.org/linux-media/83e27382-6f97-015f-2ee1-f4382096709 > > > 3@linaro.org/T/#u --- > > > > > > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 60 +++++++++++++++++++++++ > > > 1 file changed, 60 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index > > > d9542dfff83f..c8ed206b7f41 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > > > @@ -1063,6 +1063,66 @@ media_blk_ctrl: blk-ctrl@32ec0000 { > > > > > > #power-domain-cells = <1>; > > > > > > }; > > > > > > + mipi_csi_0: csi@32e40000 { > > > + compatible = "fsl,imx8mp-mipi- csi2", "fsl,imx8mm-mipi-csi2"; > > > + reg = <0x32e40000 0x10000>; > > > + interrupts = ; > > > + clock-frequency = <500000000>; > > > > According to datasheet (IMX8MPIEC Rev 1, Table 1, Subsystem "MIPI > > Interface") "MIPI CSI1" supports up to 500MHz only in single camera use > > and overdrive mode. In normal mode only 400MHz are supported. For dual > > camera usage only up to 266MHz is supported. > > I wasn't aware of that, thank you for the information. I wasn't either ;-) Just stumbled across when looking why mpi_csi_1 had only 266MHz. > > Apparently this is when using ISP, things might be > > different when using ISI. > > Table 13 documents the maximum frequencies of clocks > MEDIA_CAM1_PIX_CLK_ROOT and MEDIA_CAM2_PIX_CLK_ROOT to be 400/500MHz > (normal/overdrive) and 277/277MHz respectively, so I'd say this affects > the ISI too. I wonder what causes the 266MHz constraint for dual camera > mode. > > There's also a constraint of at most 375 MPixel/s aggregate performance > for the two ISP instances, but I don't know if that's due to the memory > bandwidth, or if it is on the input side in which case it may include > blanking and translate directly to clock frequencies. If I had to guess, > I'd say the former. I do not know either. A colleague suggested it might be due to DMA bandwidth limitation, but this is pure speculation. > > I'm hesitating specifying the overdrive mode > > frequency here. Most users, most probably using normal mode, would have > > requiring them to adjust this. > > For dual camera this is even as low as 266MHz, but IMHO this is a special > > case. > > I agree, we should at least lower the frequency to 400MHz here. Given > that the frequency limit depends on whether one or two cameras are used, > I'm actually tempted to either specify the worst case (2x 266MHz), or > even drop the clock-frequency completely, forcing users to think about > what they need. The driver however silently falls back to a default > frequency of 166MHz when the property isn't set, so developers won't > necessarily immediately notice that something is wrong, or why. > > Should I specify 400 MHz and 266 MHz here, or go for the safer option of > 266 MHz and 266 MHz ? If the property is dropped and 166MHz is selected by default, then a dev_info should be added at least. I have no experience how common a dual camera setup is, so I tend to the, probably, more common single camera setup. I was not able to get the same information for imx8mm, but maybe these limits or hint about the difference for single/dual camera can be put into the DT bindings. Best regards, Alexander > > > + clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_CAM1_PIX_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_MIPI_PHY1_REF_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>; > > > + clock-names = "pclk", "wrap", "phy", "axi"; > > > + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_CAM1_PIX>; > > > + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>; > > > + assigned-clock-rates = <500000000>; > > > + power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_MIPI_CSI2_1>; > > > + status = "disabled"; > > > + > > > + ports { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + port@0 { > > > + reg = <0>; > > > + }; > > > + > > > + port@1 { > > > + reg = <1>; > > > + }; > > > + }; > > > + }; > > > + > > > + mipi_csi_1: csi@32e50000 { > > > + compatible = "fsl,imx8mp-mipi- csi2", "fsl,imx8mm-mipi-csi2"; > > > + reg = <0x32e50000 0x10000>; > > > + interrupts = ; > > > + clock-frequency = <266000000>; > > > > For single camera usage this can even go as high as 277MHz. 266MHz is only > > for dual camera use. > > > > > + clocks = <&clk IMX8MP_CLK_MEDIA_APB_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_CAM2_PIX_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_MIPI_PHY1_REF_ROOT>, > > > + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>; > > > + clock-names = "pclk", "wrap", "phy", "axi"; > > > + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_CAM2_PIX>; > > > + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>; > > > + assigned-clock-rates = <266000000>; > > > + power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_MIPI_CSI2_2>; > > > + status = "disabled"; > > > + > > > + ports { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + port@0 { > > > + reg = <0>; > > > + }; > > > + > > > + port@1 { > > > + reg = <1>; > > > + }; > > > + }; > > > + }; > > > + > > > > > > hsio_blk_ctrl: blk-ctrl@32f10000 { > > > > > > compatible = "fsl,imx8mp-hsio-blk- ctrl", "syscon"; > > > reg = <0x32f10000 0x24>; > > > > > > base-commit: b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel