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 D5D9AC77B60 for ; Mon, 24 Apr 2023 00:49:45 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=blViXiMrei92WvJyyk3NpXi0Rf9CHDm4gQIVK17g5CU=; b=EbLDMHo+gWhLna 7tNDyuaUqkQk8+uj7YCmPrDlWqJVhock+0kIgbSLJDxIVa7XbHZNxqATa9OVdDaMO35ZZmgZzLQkg 9LF+UErrLzFVwqU6hl/Z/ybmYwELR8v3JdG1nPsh3A4XsZjtDMs1Mx7+lVbxngk+UD7iNGX/k5QeE lJmG6esUnewQKiFhYO0I73Prn31pCMg5R8PgyP4b8YZFDxy69FSsxuGr203GSutZJF5SxO4UXAVuN 61omRbYV+oVve7LnBzxFhfmfKgGIIMffEDn1fQSZ84BcUeBsRI89ktI29SzX5gUjvkfndl97otZcG HGMA5S7Ac+TAhyo/iQ+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pqkNz-00F0Kd-1Y; Mon, 24 Apr 2023 00:48:55 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pqkNw-00F0Ji-0G for linux-arm-kernel@lists.infradead.org; Mon, 24 Apr 2023 00:48:53 +0000 Received: from pendragon.ideasonboard.com (133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 00102A1A; Mon, 24 Apr 2023 02:48:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1682297321; bh=9mhAxbcpZ1v4L6uo2Y2JIDexdhgTf6lIdLPkHUK7Sww=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pAdCRFvILVMyOj2WpF43kUD3KLdGiC1pbs41CaEwZ87iaPe6iYTpbkKeAMeyhAZ4X wppPZ74ke0tpMgF/FN2PAnXgcIDwfg/By4tLgAUnPmugy1Q316IXoQti2DQQNAyDXF 2v3U61PqZG7CxAwVn3yRIOcmTeGpY9L9C6+KrGLg= Date: Mon, 24 Apr 2023 03:49:02 +0300 From: Laurent Pinchart To: Adam Ford Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes Message-ID: <20230424004902.GN21943@pendragon.ideasonboard.com> References: <20230423212656.1381002-1-aford173@gmail.com> <20230424004706.GL21943@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230424004706.GL21943@pendragon.ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230423_174852_272058_07531C16 X-CRM114-Status: GOOD ( 25.77 ) 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 On Mon, Apr 24, 2023 at 03:47:13AM +0300, Laurent Pinchart wrote: > Hi Adam, Another comment, do you plan to submit a patch with a camera DT overlay for an i.MX8MN board ? > Thank you for the patch. > > On Sun, Apr 23, 2023 at 04:26:55PM -0500, Adam Ford wrote: > > The CSI in the imx8mn is the same as what is used in the imx8mm, > > but it's routed to the ISI on the Nano. Add both the ISI and CSI > > nodes, and pointing them to each other. Since the CSI capture is > > dependent on an attached camera, mark both ISI and CSI as > > disabled by default. > > I'd then write the subject line as "Add CSI and ISI nodes". > > > Signed-off-by: Adam Ford > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > index 8be8f090e8b8..102550b41f22 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > @@ -1104,6 +1104,24 @@ dsim_from_lcdif: endpoint { > > }; > > }; > > > > + isi: isi@32e20000 { > > + compatible = "fsl,imx8mn-isi"; > > + reg = <0x32e20000 0x100>; > > The i.MX8MN reference manual documents the ISI registers block size to > be 64kB. Should we use the same here, even if all the registers we need > are within the first 256 bytes ? > > > + interrupts = ; > > + clocks = <&clk IMX8MN_CLK_DISP_AXI_ROOT>, > > + <&clk IMX8MN_CLK_DISP_APB_ROOT>; > > + clock-names = "axi", "apb"; > > + fsl,blk-ctrl = <&disp_blk_ctrl>; > > + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>; > > + status = "disabled"; > > + > > + port { > > + isi_in: endpoint { > > + remote-endpoint = <&mipi_csi_out>; > > + }; > > + }; > > This will fail to validate against the ISI DT binding, as they require a > "ports" node. When a single port is present using a "port" node directly > is fine from an OF graph point of view, but to avoid too much complexity > in the ISI binding the consensus was to always require a "ports" node > for the ISI. > > > + }; > > + > > disp_blk_ctrl: blk-ctrl@32e28000 { > > compatible = "fsl,imx8mn-disp-blk-ctrl", "syscon"; > > reg = <0x32e28000 0x100>; > > @@ -1147,6 +1165,42 @@ disp_blk_ctrl: blk-ctrl@32e28000 { > > #power-domain-cells = <1>; > > }; > > > > + mipi_csi: mipi-csi@32e30000 { > > + compatible = "fsl,imx8mm-mipi-csi2"; > > + reg = <0x32e30000 0x1000>; > > + interrupts = ; > > + assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>, > > + <&clk IMX8MN_CLK_CSI1_PHY_REF>; > > + assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>, > > + <&clk IMX8MN_SYS_PLL2_1000M>; > > + assigned-clock-rates = <333000000>; > > + clock-frequency = <333000000>; > > + clocks = <&clk IMX8MN_CLK_DISP_APB_ROOT>, > > + <&clk IMX8MN_CLK_CAMERA_PIXEL>, > > + <&clk IMX8MN_CLK_CSI1_PHY_REF>, > > + <&clk IMX8MN_CLK_DISP_AXI_ROOT>; > > + clock-names = "pclk", "wrap", "phy", "axi"; > > + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_CSI>; > > + status = "disabled"; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + port@0 { > > + reg = <0>; > > + }; > > + > > + port@1 { > > + reg = <1>; > > + > > + mipi_csi_out: endpoint { > > + remote-endpoint = <&isi_in>; > > + }; > > + }; > > + }; > > + }; > > + > > usbotg1: usb@32e40000 { > > compatible = "fsl,imx8mn-usb", "fsl,imx7d-usb", "fsl,imx27-usb"; > > reg = <0x32e40000 0x200>; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46759C6FD18 for ; Mon, 24 Apr 2023 00:48:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjDXAsz (ORCPT ); Sun, 23 Apr 2023 20:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjDXAsx (ORCPT ); Sun, 23 Apr 2023 20:48:53 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13985ED; Sun, 23 Apr 2023 17:48:52 -0700 (PDT) Received: from pendragon.ideasonboard.com (133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 00102A1A; Mon, 24 Apr 2023 02:48:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1682297321; bh=9mhAxbcpZ1v4L6uo2Y2JIDexdhgTf6lIdLPkHUK7Sww=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pAdCRFvILVMyOj2WpF43kUD3KLdGiC1pbs41CaEwZ87iaPe6iYTpbkKeAMeyhAZ4X wppPZ74ke0tpMgF/FN2PAnXgcIDwfg/By4tLgAUnPmugy1Q316IXoQti2DQQNAyDXF 2v3U61PqZG7CxAwVn3yRIOcmTeGpY9L9C6+KrGLg= Date: Mon, 24 Apr 2023 03:49:02 +0300 From: Laurent Pinchart To: Adam Ford Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes Message-ID: <20230424004902.GN21943@pendragon.ideasonboard.com> References: <20230423212656.1381002-1-aford173@gmail.com> <20230424004706.GL21943@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230424004706.GL21943@pendragon.ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Apr 24, 2023 at 03:47:13AM +0300, Laurent Pinchart wrote: > Hi Adam, Another comment, do you plan to submit a patch with a camera DT overlay for an i.MX8MN board ? > Thank you for the patch. > > On Sun, Apr 23, 2023 at 04:26:55PM -0500, Adam Ford wrote: > > The CSI in the imx8mn is the same as what is used in the imx8mm, > > but it's routed to the ISI on the Nano. Add both the ISI and CSI > > nodes, and pointing them to each other. Since the CSI capture is > > dependent on an attached camera, mark both ISI and CSI as > > disabled by default. > > I'd then write the subject line as "Add CSI and ISI nodes". > > > Signed-off-by: Adam Ford > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > index 8be8f090e8b8..102550b41f22 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi > > @@ -1104,6 +1104,24 @@ dsim_from_lcdif: endpoint { > > }; > > }; > > > > + isi: isi@32e20000 { > > + compatible = "fsl,imx8mn-isi"; > > + reg = <0x32e20000 0x100>; > > The i.MX8MN reference manual documents the ISI registers block size to > be 64kB. Should we use the same here, even if all the registers we need > are within the first 256 bytes ? > > > + interrupts = ; > > + clocks = <&clk IMX8MN_CLK_DISP_AXI_ROOT>, > > + <&clk IMX8MN_CLK_DISP_APB_ROOT>; > > + clock-names = "axi", "apb"; > > + fsl,blk-ctrl = <&disp_blk_ctrl>; > > + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_ISI>; > > + status = "disabled"; > > + > > + port { > > + isi_in: endpoint { > > + remote-endpoint = <&mipi_csi_out>; > > + }; > > + }; > > This will fail to validate against the ISI DT binding, as they require a > "ports" node. When a single port is present using a "port" node directly > is fine from an OF graph point of view, but to avoid too much complexity > in the ISI binding the consensus was to always require a "ports" node > for the ISI. > > > + }; > > + > > disp_blk_ctrl: blk-ctrl@32e28000 { > > compatible = "fsl,imx8mn-disp-blk-ctrl", "syscon"; > > reg = <0x32e28000 0x100>; > > @@ -1147,6 +1165,42 @@ disp_blk_ctrl: blk-ctrl@32e28000 { > > #power-domain-cells = <1>; > > }; > > > > + mipi_csi: mipi-csi@32e30000 { > > + compatible = "fsl,imx8mm-mipi-csi2"; > > + reg = <0x32e30000 0x1000>; > > + interrupts = ; > > + assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>, > > + <&clk IMX8MN_CLK_CSI1_PHY_REF>; > > + assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>, > > + <&clk IMX8MN_SYS_PLL2_1000M>; > > + assigned-clock-rates = <333000000>; > > + clock-frequency = <333000000>; > > + clocks = <&clk IMX8MN_CLK_DISP_APB_ROOT>, > > + <&clk IMX8MN_CLK_CAMERA_PIXEL>, > > + <&clk IMX8MN_CLK_CSI1_PHY_REF>, > > + <&clk IMX8MN_CLK_DISP_AXI_ROOT>; > > + clock-names = "pclk", "wrap", "phy", "axi"; > > + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_CSI>; > > + status = "disabled"; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + port@0 { > > + reg = <0>; > > + }; > > + > > + port@1 { > > + reg = <1>; > > + > > + mipi_csi_out: endpoint { > > + remote-endpoint = <&isi_in>; > > + }; > > + }; > > + }; > > + }; > > + > > usbotg1: usb@32e40000 { > > compatible = "fsl,imx8mn-usb", "fsl,imx7d-usb", "fsl,imx27-usb"; > > reg = <0x32e40000 0x200>; -- Regards, Laurent Pinchart