From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Adam Ford <aford173@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes
Date: Mon, 24 Apr 2023 06:16:35 +0300 [thread overview]
Message-ID: <20230424031635.GA4652@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAHCN7xLNeN52vhNt0ampSsMfdGx7L+oc3YhUtrvYv-1imQj9eQ@mail.gmail.com>
Hi Adam,
On Sun, Apr 23, 2023 at 09:59:11PM -0500, Adam Ford wrote:
> On Sun, Apr 23, 2023 at 9:22 PM Adam Ford wrote:
> > On Sun, Apr 23, 2023 at 7:46 PM Laurent Pinchart wrote:
> > > 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".
> >
> > That makes sense, especially since I disabled them by default.
> > >
> > > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > >
> > > > 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 ?
> >
> > I can do that.
>
> There is a typo in the Nano Ref Manual. Even though the table in
> "Table 2-6. AIPS4 Memory Map" reads 64K, the DISPLAY_BLK_CTRL starts
> at 32e2_8000. The largest size we can do is 0x8000 (32k)
32k is fine. If you prefer keeping 0x100, that's fine with me too.
> > > > + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
> > > > + 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.
> >
> >
> > Argh! I pulled from the wrong test repo. I remember the discussion
> > from a few months back. I'll fix it and the others when I submit V2.
>
> It appears that using ports still throws warnings:
>
> arch/arm64/boot/dts/freescale/imx8mn.dtsi:1118.11-1128.7: Warning
> (graph_child_address): /soc@0/bus@32c00000/isi@32e20000/ports: graph
> node has single child node 'port@0', #address-cells/#size-cells are
> not necessary
Aarghhhh :-)
> I'll leave it like this because we were told to do so.
Let's see if Rob or Krzysztof have a recommendation.
> > > > + };
> > > > +
> > > > 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 = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
> > > > + 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
prev parent reply other threads:[~2023-04-24 3:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-23 21:26 [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes Adam Ford
2023-04-23 21:26 ` [PATCH 2/2] arm64: defconfig: Enable video capture drivers on imx8mm/imx8mn Adam Ford
2023-04-24 0:48 ` Laurent Pinchart
2023-04-24 0:47 ` [PATCH 1/2] arm64: dts: imx8mn: Enable CSI and ISI Nodes Laurent Pinchart
2023-04-24 0:49 ` Laurent Pinchart
2023-04-24 2:29 ` Adam Ford
2023-04-24 3:17 ` Laurent Pinchart
2023-04-24 2:22 ` Adam Ford
2023-04-24 2:59 ` Adam Ford
2023-04-24 3:16 ` Laurent Pinchart [this message]
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=20230424031635.GA4652@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=will@kernel.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 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).