| Message ID | 20211111101456.584061-3-jagan@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBOG2WOGAMGQEAV6LD5Q@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 20FC33F075 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 11 Nov 2021 11:15:22 +0100 (CET) Received: by mail-pl1-f199.google.com with SMTP id m15-20020a170902bb8f00b0014382b67873sf1787928pls.19 for <linux-amarula@patchwork.amarulasolutions.com>; Thu, 11 Nov 2021 02:15:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636625720; cv=pass; d=google.com; s=arc-20160816; b=VPGbkPv1OjjETa6Nm79wAhtTepX+zDVmysCVRh12HsITiNhsnCG2cKAOtHnr0djpKm 3yXxSSuAoWXwDbgLKDnOOBPgw/echsy/nVWs9Y0IRD3P0D4HyafABxs/BUqfQQ05b9UD jE8vzoY0GCOGEm1byN9D3GLWU7IYFfth9M28aczDNvOWHVgwyx6nFEAhh1rVbf2QYk9U 4S4BzHSn/zhWeQuWcAnN4NLiQjfVBE/5wuzm66k5ACrpcLI4DJVimp48+1m+t87wGzx5 9oehiZBH4XL0bvay3WdPnYlC0hw0hvn/KcfEQzQLUCA0muT9p5gG4D+MUejc8XyQyZZC wU3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DLSg0l9wCvr7DOeY5584N4kb+oSy3sstv+ipN/ktmTw=; b=IB0Qyf6lej55CzjhGnYywlZKrqixmJ77ktFh73c39Mx1AF328LOKr66s8cx0odFOfd qkKwlzQ58nQ19HF6JVr5hP1y/L0lVtVB8szzsawWpd6E+9re8kBt1i6n+1vl/PGAFaHE l72/OuHWwHxXOyYksVlwpDD32SwdX4VwgaCifhXQxC8Ox+KhWZExIy18v1n6mgBEsnuJ sILVltbzHE443GgWjfCSziJ952Dn53kBGC9eaARevSv4NTLIZ6rQWK6O9XZoLOZ9ePrK skUvTccVyWQm5VnzRKfCLUvNwJZA4QKSYdJ6mZWSkwnrSKNhagNP4KuuWDIApJgTIc7K CuJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pX2LgSK0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=DLSg0l9wCvr7DOeY5584N4kb+oSy3sstv+ipN/ktmTw=; b=DuFE5UePuHSXGx66f7Gm/j887G5Ws24IwYbD9Cqp+VagBjkRyDnKHc7/hwaTx5QsmU KktbRt1AlGb6I9KUAezOEd0B4ueFqFJrpWyt2bKKQgG8NVMyT7QLOARqj4o5UNZ/jUa1 IS5WwIFS0IZAZAOTl+Y0QN56o6xrYMP2hKyyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=DLSg0l9wCvr7DOeY5584N4kb+oSy3sstv+ipN/ktmTw=; b=vHJeqs0CQ8nOR5MOiuwzgWJIujTrHwCLbJ43pTY8mb/Yb218lzwATv/WV9bcoyWaMH L5o6P5KA9Dt4uFUfrQiaNrkVsk+/dOHtjehEyxwe6HxhlhfPlNm8M4uYM8TCAgaJu/ge /IB5OLMRoYzmkUgQ/GLARXSKvZt2TQxnsJKF5P1eCRlmT6jMlZ3i5p1KCzapV7kSYFy2 MlB1hZdczONo8lgiroVl8mmXZRmTzHqp2r8kxjF10oDBof/AHwtzJYIWL7LAQpq7TICy 12aPx5kXYIuI1xLHvYNRf//rSk6vNWHn7zUEBocyeu/HhUJ0q0+lYT/PZ1cexPTaCsVq LxyA== X-Gm-Message-State: AOAM533kcIFG6kYuRbx/vc3qM3p9bCNLmBPG/VBYU3NWS4m8zbsEwgFs 5pzKyHAbu8vliXMCBj6kOQx5KK+S X-Google-Smtp-Source: ABdhPJzCq/IObPwa4hxc7w8fySdKt0JSc97DsMDS20Rq5Aa7mkMf9cCs3xCkc8DxLx6awcQUT0Rpeg== X-Received: by 2002:a63:d110:: with SMTP id k16mr3875386pgg.90.1636625720416; Thu, 11 Nov 2021 02:15:20 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:1c05:: with SMTP id c5ls681084pgc.6.gmail; Thu, 11 Nov 2021 02:15:19 -0800 (PST) X-Received: by 2002:a63:694a:: with SMTP id e71mr3843462pgc.232.1636625719587; Thu, 11 Nov 2021 02:15:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636625719; cv=none; d=google.com; s=arc-20160816; b=WI7qbC7HLXwyAIzjc53480neL+DUABJ/3yDFQxe+RX8R81yBbZ3vT//9F0texjLeey sx2sUenVpRLBevEmhbjrAgJ7NO2oYQeYg4qQdFNQyktI0fqsw3qKjasRhYixpLYz9MBf rTMLSMW5W4ncz7BoNU3xSs9dyZzeGhDkvDZLOzIsnvJlfUg7nr+76LBcKf9m/IycNdcM 7XjE9R6+f9+Xof2wLZVoZRf6RzamsNeU+68BSdeUeeo2FFt3bPj5ftNH1ClB/UOJiLIz R5/ViZss5VgMClzPgWXqfekmzF5s6MJ/oi9+quTg7U5/L4JIWUPN+ND61gzT4yEir3ji yFyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=G4Vsnm+KN57AyBuovnCtAA6nuAOl1P3qjMg431Kf+ME=; b=uST86M52IPrV/t13uilJNk4Brnz4aQrI3bPyJHFq+bJB7oIsLu0w5myCvzokRHgOQd BeOfKu+Ct3zl85ZXPHmRKz3ia54o3T9LdMgQyoKNe2DGqJ3VleU0vwhILR6DC7+yNgYP uP1Cm2cCmAUrhEieeFnbjR+Qg/OF5EOC+4zr7zujS2uDxnDaDacIecOXeXtDaxQct4rY nZGQcrzIl4X8NCWwxGtudXnamgUwm8kfnZ+e+FMoo5mrl+o8uIG6RYm2qpRowD5FfSaA ESMZQV7k0+oJSOVCR9nrKfRmNHj5f7pVoV7aGvRSMB5W2zH0MXKw/qGFKkmw1t/OTROH paoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pX2LgSK0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d18sor1411545pfv.20.2021.11.11.02.15.19 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Thu, 11 Nov 2021 02:15:19 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:9101:0:b0:49f:af85:b72c with SMTP id 1-20020aa79101000000b0049faf85b72cmr5502332pfh.53.1636625719136; Thu, 11 Nov 2021 02:15:19 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:3041:135c:4e21:846c]) by smtp.gmail.com with ESMTPSA id t12sm8035667pjo.44.2021.11.11.02.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 02:15:18 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Tim Harvey <tharvey@gateworks.com>, Adam Ford <aford173@gmail.com>, Fabio Estevam <festevam@gmail.com>, Lucas Stach <l.stach@pengutronix.de>, Peng Fan <peng.fan@nxp.com>, Shawn Guo <shawnguo@kernel.org>, Marek Vasut <marex@denx.de>, Frieder Schrempf <frieder.schrempf@kontron.de> Cc: NXP Linux Team <linux-imx@nxp.com>, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Matteo Lisi <matteo.lisi@engicam.com>, Jagan Teki <jagan@amarulasolutions.com> Subject: [RFC PATCH v2 2/3] arm64: dts: imx8mm: Add MIPI DSI pipeline Date: Thu, 11 Nov 2021 15:44:55 +0530 Message-Id: <20211111101456.584061-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211111101456.584061-1-jagan@amarulasolutions.com> References: <20211111101456.584061-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pX2LgSK0; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
arm64: imx8mm: Add MIPI DSI support
|
|
Commit Message
Jagan Teki
Nov. 11, 2021, 10:14 a.m. UTC
Add MIPI DSI pipeline for i.MX8MM.
Video pipeline start from eLCDIF to MIPI DSI and respective
Panel or Bridge on the backend side.
Add support for it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm64/boot/dts/freescale/imx8mm.dtsi | 55 +++++++++++++++++++++++
1 file changed, 55 insertions(+)
Comments
On 11/11/21 11:14 AM, Jagan Teki wrote: [...] > + dsi: dsi@32e10000 { > + compatible = "fsl,imx8mm-mipi-dsim"; > + reg = <0x32e10000 0x400>; > + clocks = <&clk IMX8MM_CLK_DSI_CORE>, > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > + clock-names = "bus_clk", "sclk_mipi"; > + assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>, > + <&clk IMX8MM_VIDEO_PLL1_OUT>, > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > + assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>, > + <&clk IMX8MM_VIDEO_PLL1_BYPASS>, > + <&clk IMX8MM_VIDEO_PLL1_OUT>; > + assigned-clock-rates = <266000000>, <594000000>, <27000000>; > + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; > + phys = <&mipi_phy 0>; > + phy-names = "dsim"; > + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_DSI>; > + samsung,burst-clock-frequency = <891000000>; > + samsung,esc-clock-frequency = <54000000>; > + samsung,pll-clock-frequency = <27000000>; > + status = "disabled"; This 27 MHz is really IMX8MM_CLK_DSI_PHY_REF and samsung,burst-clock-frequency is really the DSI link clock which is panel/bridge specific ... but, why do we need to specify such policy in DT rather than have the panel/bridge drivers negotiate the best clock settings with DSIM bridge driver ? This should be something which should be implemented in the DRM subsystem, not hard-coded in DT. These ad-hoc samsung,*-clock-frequency properties shouldn't even be needed then. Also, are the DSIM bindings stable now ?
On Thu, Nov 11, 2021 at 3:51 PM Marek Vasut <marex@denx.de> wrote: > > On 11/11/21 11:14 AM, Jagan Teki wrote: > > [...] > > > + dsi: dsi@32e10000 { > > + compatible = "fsl,imx8mm-mipi-dsim"; > > + reg = <0x32e10000 0x400>; > > + clocks = <&clk IMX8MM_CLK_DSI_CORE>, > > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > > + clock-names = "bus_clk", "sclk_mipi"; > > + assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>, > > + <&clk IMX8MM_VIDEO_PLL1_OUT>, > > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > > + assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>, > > + <&clk IMX8MM_VIDEO_PLL1_BYPASS>, > > + <&clk IMX8MM_VIDEO_PLL1_OUT>; > > + assigned-clock-rates = <266000000>, <594000000>, <27000000>; > > + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; > > + phys = <&mipi_phy 0>; > > + phy-names = "dsim"; > > + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_DSI>; > > + samsung,burst-clock-frequency = <891000000>; > > + samsung,esc-clock-frequency = <54000000>; > > + samsung,pll-clock-frequency = <27000000>; > > + status = "disabled"; > > > This 27 MHz is really IMX8MM_CLK_DSI_PHY_REF and > samsung,burst-clock-frequency is really the DSI link clock which is > panel/bridge specific ... but, why do we need to specify such policy in > DT rather than have the panel/bridge drivers negotiate the best clock > settings with DSIM bridge driver ? This should be something which should > be implemented in the DRM subsystem, not hard-coded in DT. These ad-hoc > samsung,*-clock-frequency properties shouldn't even be needed then. This look confusion for me, all three clock are used it directly from exynos. and these indeed are computing pll for this bridge and clock control of dsim registers are updated from this out come values. No thoughts as of now how to handle these externally and update the internal register based on those out come values. > > Also, are the DSIM bindings stable now ? Issue still lies on exynos dsi side, the final driver is not binding properly. I'm trying to send the next version patches only for existing exynos dsi to convert into bridge. and subsequently adding i.mx8mm specifics. More problem for me to test it on exynos boards, i don't have any either. Jagan.
On Thu, Nov 11, 2021 at 2:15 AM Jagan Teki <jagan@amarulasolutions.com> wrote: > > Add MIPI DSI pipeline for i.MX8MM. > > Video pipeline start from eLCDIF to MIPI DSI and respective > Panel or Bridge on the backend side. > > Add support for it. Jagan, Thanks for your continued work on IMX8MM DSI support! It doesn't look like you sent this to the Device Tree mainling list so I added that to cc. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm64/boot/dts/freescale/imx8mm.dtsi | 55 +++++++++++++++++++++++ > 1 file changed, 55 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > index caeb93313413..eddf3a467fd2 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi > @@ -188,6 +188,12 @@ clk_ext4: clock-ext4 { > clock-output-names = "clk_ext4"; > }; > > + mipi_phy: mipi-video-phy { > + compatible = "fsl,imx8mm-mipi-video-phy"; > + syscon = <&disp_blk_ctrl>; > + #phy-cells = <1>; > + }; > + > psci { > compatible = "arm,psci-1.0"; > method = "smc"; > @@ -1085,6 +1091,55 @@ lcdif: lcdif@32e00000 { > interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; > power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_LCDIF>; > status = "disabled"; > + > + port { > + lcdif_out_dsi: endpoint { > + remote-endpoint = <&dsi_in_lcdif>; > + }; > + }; > + }; > + > + dsi: dsi@32e10000 { I wonder if this should this be 'mipi_dsi' like the CSI bindings Adam's submitted here: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20211106155427.753197-2-aford173@gmail.com/ > + compatible = "fsl,imx8mm-mipi-dsim"; > + reg = <0x32e10000 0x400>; > + clocks = <&clk IMX8MM_CLK_DSI_CORE>, > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > + clock-names = "bus_clk", "sclk_mipi"; > + assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>, > + <&clk IMX8MM_VIDEO_PLL1_OUT>, > + <&clk IMX8MM_CLK_DSI_PHY_REF>; > + assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>, > + <&clk IMX8MM_VIDEO_PLL1_BYPASS>, > + <&clk IMX8MM_VIDEO_PLL1_OUT>; > + assigned-clock-rates = <266000000>, <594000000>, <27000000>; > + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; > + phys = <&mipi_phy 0>; > + phy-names = "dsim"; > + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_DSI>; > + samsung,burst-clock-frequency = <891000000>; > + samsung,esc-clock-frequency = <54000000>; > + samsung,pll-clock-frequency = <27000000>; > + status = "disabled"; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + #address-cells = <1>; > + #size-cells = <0>; I don't think the '#address-cells' and '#size-cells' are needed here but I defer to the dt experts! > + > + dsi_in_lcdif: endpoint@0 { > + reg = <0>; Per Adam's comment to my posting this should be just "port {" and we can get rid of the @0 and the "reg=0" Best regards, Tim > + remote-endpoint = <&lcdif_out_dsi>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + }; > + }; > }; > > disp_blk_ctrl: blk-ctrl@32e28000 { > -- > 2.25.1 >
diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index caeb93313413..eddf3a467fd2 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -188,6 +188,12 @@ clk_ext4: clock-ext4 { clock-output-names = "clk_ext4"; }; + mipi_phy: mipi-video-phy { + compatible = "fsl,imx8mm-mipi-video-phy"; + syscon = <&disp_blk_ctrl>; + #phy-cells = <1>; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; @@ -1085,6 +1091,55 @@ lcdif: lcdif@32e00000 { interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_LCDIF>; status = "disabled"; + + port { + lcdif_out_dsi: endpoint { + remote-endpoint = <&dsi_in_lcdif>; + }; + }; + }; + + dsi: dsi@32e10000 { + compatible = "fsl,imx8mm-mipi-dsim"; + reg = <0x32e10000 0x400>; + clocks = <&clk IMX8MM_CLK_DSI_CORE>, + <&clk IMX8MM_CLK_DSI_PHY_REF>; + clock-names = "bus_clk", "sclk_mipi"; + assigned-clocks = <&clk IMX8MM_CLK_DSI_CORE>, + <&clk IMX8MM_VIDEO_PLL1_OUT>, + <&clk IMX8MM_CLK_DSI_PHY_REF>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>, + <&clk IMX8MM_VIDEO_PLL1_BYPASS>, + <&clk IMX8MM_VIDEO_PLL1_OUT>; + assigned-clock-rates = <266000000>, <594000000>, <27000000>; + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; + phys = <&mipi_phy 0>; + phy-names = "dsim"; + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_DSI>; + samsung,burst-clock-frequency = <891000000>; + samsung,esc-clock-frequency = <54000000>; + samsung,pll-clock-frequency = <27000000>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + dsi_in_lcdif: endpoint@0 { + reg = <0>; + remote-endpoint = <&lcdif_out_dsi>; + }; + }; + + port@1 { + reg = <1>; + }; + }; }; disp_blk_ctrl: blk-ctrl@32e28000 {