From patchwork Thu Dec 8 09:08:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13068154 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 D0CC7C3A5A7 for ; Thu, 8 Dec 2022 09:26:27 +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: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:In-Reply-To:References: List-Owner; bh=NCCeEGRPPSG780jaehDwg7zWmMO1AQKIpRiYz1n9pP4=; b=KbU4kCZ23HfRBj wFpkJ/Mu/SnguWvVHB2ox40nJOTMQI5XMZIW6SXCC9CvxCJzjA38oHFFpFdxAGmwma81g3b16kvyH qLCupvKEMsBKyail6EKbkUIpkFpAUlRqVxipQ760JoM1GGJQeviAh/73uybnQyG25Aaawd08dWiHQ To3a8B9Gc6CR8927u6pvgUxkmoOhCqWcaLJ4jq3ZYVxMfAoPhUBi6F9peuKvUOFGx0Gr8atgYZMN2 DNgTIk/vIjV7M65OcymB5VGfWI8EsUqaT9AFb1olQqa/qCiOB0zJXI8Lz4vmjsF4jkUHy0Sv09Ozq HmeYB0De2KzV9jIafg2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3D9Y-00ApRg-9R; Thu, 08 Dec 2022 09:25:16 +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 1p3Ctd-00AdUv-FA for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 09:08:52 +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=1670490529; x=1702026529; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=h0uI75b/XLO5fwpolzeROMRFzfbiSy8hveLLAfG1BeM=; b=S9iPyT4KdJ3y8ylrtcGUsa4fFwhpVd2KwwEycwU0p9NLgQKuVoz3oCH2 oO/cHK2hgSp76NGM2gORkXULxuq21iWPb2RgeKaQR0FdlvJnb2mHOP/rL P6/eEaJ2uCm6qq4UT8Zen4E+u3VB/iy7AoyzrzAW/y15mNad4khMOyhP7 0knHCEakcmWtpcFgXb49qbTu/Nr+UOMvUwLnuapZvdR+U/PCx0Q69zUYO 0LqYwjtEj/ukJphkcPMPNV709iwDzlVd4n2XksRHP5F8TCmNMCefhZAaH Rl0MUQPTZLJYPkIQdJ0JZmHxqUIPHqGZhTWxd8Qfp0sEjN/wzVsevbN0e Q==; X-IronPort-AV: E=Sophos;i="5.96,227,1665439200"; d="scan'208";a="27831351" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 08 Dec 2022 10:08:46 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 08 Dec 2022 10:08:46 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 08 Dec 2022 10:08:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1670490526; x=1702026526; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=h0uI75b/XLO5fwpolzeROMRFzfbiSy8hveLLAfG1BeM=; b=GU9eHAseTY1I62vI6AY7mmd+1z8X+ZenI3NG0hKyLQzS/do4XmluF1zN A29UBICzQs5344kNUsENzbawRzCZnvP25t3Ez7Y1UsloUQfZrfQxm/6Ff XwzhykNo8703NwJVoL5P9kvDysbdb6jUUtQ4tK4PPfS2ugh5iFwFljmWL CJaCeAlO+xJE5amZ237LQPUSBvU8mf8nWV1f+QXobcwcvz49o0oex+DIS AwyBZqVAEPgrb3XD3ofD2NzoFxPQwOrsQ6b8sb3OG2/ulEeoB/2O6Xm5M ZDhN4Z45ioqvlL3rGpr2I9rT3sKLCrN+jmlVnwiM3EkwO/nfWu28Hbde5 A==; X-IronPort-AV: E=Sophos;i="5.96,227,1665439200"; d="scan'208";a="27831350" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 08 Dec 2022 10:08:46 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (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 752CC280071; Thu, 8 Dec 2022 10:08:46 +0100 (CET) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] arm64: dts: imx8mp: Add LCDIF2 & LDB nodes Date: Thu, 8 Dec 2022 10:08:41 +0100 Message-Id: <20221208090842.2869374-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_010850_039724_4A3CEC53 X-CRM114-Status: GOOD ( 12.14 ) 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 LCDIF2 is directly attached to the LVDS Display Bridge (LDB). Both need the same clock source (VIDEO_PLL1). Signed-off-by: Alexander Stein Tested-by: Richard Leitner Tested-by: Rasmus Villemoes --- I opted to add both at the same time, so the remote-endpoints are already connected. blk-ctrl@32ec0000 needs the 'simple-bus' compatible so that bridge@5c is actually probed. arch/arm64/boot/dts/freescale/imx8mp.dtsi | 65 ++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 7a6e6221f4219..c1beff33c4981 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -1098,10 +1098,35 @@ aips4: bus@32c00000 { #size-cells = <1>; ranges; + lcdif2: display-controller@32e90000 { + compatible = "fsl,imx8mp-lcdif"; + reg = <0x32e90000 0x238>; + interrupts = ; + clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX_ROOT>, + <&clk IMX8MP_CLK_MEDIA_AXI_ROOT>, + <&clk IMX8MP_CLK_MEDIA_APB_ROOT>; + clock-names = "pix", "axi", "disp_axi"; + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>, + <&clk IMX8MP_VIDEO_PLL1>; + assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>, + <&clk IMX8MP_VIDEO_PLL1_REF_SEL>; + assigned-clock-rates = <0>, <1039500000>; + power-domains = <&media_blk_ctrl IMX8MP_MEDIABLK_PD_LCDIF_2>; + status = "disabled"; + + port { + lcdif2_to_ldb: endpoint { + remote-endpoint = <&ldb_from_lcdif2>; + }; + }; + }; + media_blk_ctrl: blk-ctrl@32ec0000 { compatible = "fsl,imx8mp-media-blk-ctrl", - "syscon"; + "simple-bus", "syscon"; reg = <0x32ec0000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; power-domains = <&pgc_mediamix>, <&pgc_mipi_phy1>, <&pgc_mipi_phy1>, @@ -1146,6 +1171,44 @@ media_blk_ctrl: blk-ctrl@32ec0000 { assigned-clock-rates = <500000000>, <200000000>; #power-domain-cells = <1>; + + lvds_bridge: bridge@5c { + compatible = "fsl,imx8mp-ldb"; + clocks = <&clk IMX8MP_CLK_MEDIA_LDB>; + clock-names = "ldb"; + reg = <0x5c 0x4>, <0x128 0x4>; + reg-names = "ldb", "lvds"; + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>; + assigned-clock-parents = <&clk IMX8MP_VIDEO_PLL1_OUT>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + ldb_from_lcdif2: endpoint { + remote-endpoint = <&lcdif2_to_ldb>; + }; + }; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + }; + }; + + port@2 { + reg = <2>; + + ldb_lvds_ch1: endpoint { + }; + }; + }; + }; }; pcie_phy: pcie-phy@32f00000 { From patchwork Thu Dec 8 09:08:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13068155 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 1D81AC4332F for ; Thu, 8 Dec 2022 09:27:18 +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=BY1lJZRBpIFO9nyB5IfQ8YPiSNK0NX+EIGypdKD/JJc=; b=qVulAv2aTJReja ogtlu7FsmFsSHEcSPH8JsXQ3XE2bmuuKh9ACb4KJgOKuDjLfysRf95CTJav0alvhIcOmcaLJtW8cp HNmvAIuu1aqUhWC8mQJQgJoYuO6sdHh6u+jeVkgiyNN6+rv1Sc17Nfh5G0nbAVvb8K6pFvDELQ6ZG lhuWjAoH2/cDWzMKEP8ayLMAiiKR32nwcnSg3Uvd+WtburhWXnfUQaiMJPABcBm5CxxdwmlV/CfEn BII3rIyYSWUzeA69+lzEzl9aRDV/a31qSOZ2NSLnClDqf7k36iUKIKuIdfDMDp/tf8s94HVop/qgd aGniSN5fSlhRppIe95Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3DAD-00Apza-ND; Thu, 08 Dec 2022 09:25:58 +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 1p3Ctg-00AdUv-JS for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 09:08:54 +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=1670490532; x=1702026532; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IRxyjKwx8MYOWiyaUgXq4MZ0RFREaiW9N9dB3Mi9UhE=; b=ZhXQ26FLtE8/Kb1dAasAntzUu3uIUoxmxq2DF5p/Anq5peiPaatnizyN BHd9mhFcTOEWKrH6aLd65l26ywXb7odUzYIBKEq8L5oECIGpiihT/3V5S j/R1TZ7Jx6C+B0t5G/bHk+S/bVgCIZyHCzTIsOkJ9ZYUpqvGqks1Pb4Tr ncYyBbsXNuDSoWI0uQ2MKGASPzye2KLz+2B1C9JtgW19+gl3QQnFUhQRB 41wt1Sx1a+bFVoFI2k4VCTk4vOGO+6UgT2ZiOKrfVPyyij1Ds5fJdANzi dqPsI1HG4p0O6CYrEnNvO55TyLPCBsMQHaefqkBQISHgHJqSQaQujkska w==; X-IronPort-AV: E=Sophos;i="5.96,227,1665439200"; d="scan'208";a="27831353" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 08 Dec 2022 10:08:46 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 08 Dec 2022 10:08:46 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 08 Dec 2022 10:08:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1670490526; x=1702026526; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IRxyjKwx8MYOWiyaUgXq4MZ0RFREaiW9N9dB3Mi9UhE=; b=E5eBGwk3O4uELi1QeY4FAwbVFQN4mT7uUaF+NCVWdBRdIr79yQjeelSe Na4UGZQJXG6j+P1N8GxNXkCaI4oPWrB4vv3p5ngRG1LcvMoMsjHKUv5W4 HC+cFqKKz6bnD2uHWuZDFJTuvdK56SvEoT+xn8v+A0hU8m6iYQR5cowTE 8onomeH7xust0UVQSBG8pyw8swpdCv0Dfwg5jWNTEqDuOuS+lbBT15tBQ mBtXNDaD4Bu6T/VX+dBSEbvMllm+sXn50+LzwzY+n/BXkX87Ub2mCwzTj trt8lLzxM6oVZrh/zz/sGkhDW6cyEqJzB84fVLuSWRgGI63k7U1eNu6BT Q==; X-IronPort-AV: E=Sophos;i="5.96,227,1665439200"; d="scan'208";a="27831352" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 08 Dec 2022 10:08:46 +0100 Received: from steina-w.tq-net.de (unknown [10.123.53.21]) (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 A2105280072; Thu, 8 Dec 2022 10:08:46 +0100 (CET) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , Pengutronix Kernel Team , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL Date: Thu, 8 Dec 2022 10:08:42 +0100 Message-Id: <20221208090842.2869374-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221208090842.2869374-1-alexander.stein@ew.tq-group.com> References: <20221208090842.2869374-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_010853_006963_F75C9C1B X-CRM114-Status: GOOD ( 16.02 ) 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 This adds an overlay for the supported LVDS display tianma tm070jvhg33. The display timings have to be specified explicitly. Using the typical pixel clock, the LDB clock can not be configured as the 7-fold of that. By setting pixel clock to 74.25 MHz, LDB can be configured to exactly 519.75 MHz. Signed-off-by: Alexander Stein --- To be hold I'm unsure where to list the overlays. I checked other overlays and opted to added them at the end of imx8mp section. arch/arm64/boot/dts/freescale/Makefile | 4 ++ .../imx8mp-tqma8mpql-mba8mpxl-lvds.dtso | 61 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index ef6f364eaa183..9eedee68413b2 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -97,6 +97,10 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dahlia.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-wifi-dev.dtb + +imx8mp-tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo +dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl-lvds.dtb + dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mq-kontron-pitx-imx8m.dtb diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso new file mode 100644 index 0000000000000..ea44d605342ba --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtso @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) +/* + * Copyright (c) 2022 TQ-Systems GmbH , + * D-82229 Seefeld, Germany. + * Author: Alexander Stein + */ + +/dts-v1/; +/plugin/; + +&{/} { + compatible = "tq,imx8mp-tqma8mpql-mba8mpxl", "tq,imx8mp-tqma8mpql", "fsl,imx8mp"; +}; + +&backlight_lvds { + status = "okay"; +}; + +&display { + compatible = "tianma,tm070jvhg33"; + status = "okay"; + + panel-timing { + clock-frequency = <74250000>; + hactive = <1280>; + vactive = <800>; + hfront-porch = <64>; + hback-porch = <5>; + hsync-len = <1>; + vfront-porch = <40>; + vback-porch = <2>; + vsync-len = <1>; + de-active = <1>; + }; + + port { + panel_in_lvds0: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + status = "okay"; + + ports { + port@1 { + ldb_lvds_ch0: endpoint { + remote-endpoint = <&panel_in_lvds0>; + }; + }; + }; +}; + +&pwm2 { + status = "okay"; +};