From patchwork Wed Jun 22 11:49:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12890581 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 6B993C433EF for ; Wed, 22 Jun 2022 11:51:37 +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=+Po9VOccNoS5HiJna1oBK5bOiqlexDSgyfKZMvQNO6c=; b=l4rMc4/gxc+6a8 kBIf1M96jtNZA32z8+F1u3iJAc5Uo7mx/ieroVxvt0HKr8DjH7lhrrWrm1xgvZcUiuQvlHkLk7ljj O64qCKHxWXoXdCZwqqDBZmNEAXJncyhGJAOurZ85aeME+zFp7NP5jU1iCDp1GBwphoRzGI2vc47M3 +ZVYJABTQVyDEQawU7KgkZjI7cdjM/8VuCwBQrLXYB9rkE/yEysnCcRBXwpDN83z5CgKx1qN0cOFe FFzm3PBO/faRA8zFXChexwiRV7r5rYmlXEN/9Bn5qcfaWg6kxu8Jwl7MwBVqMi/5wuRJTuJvj4olq WV+Lq0eLA3WeEavN+GHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3ysU-00ABpH-Ka; Wed, 22 Jun 2022 11:50:34 +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 1o3ys1-00ABaJ-Uw for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2022 11:50:08 +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=1655898606; x=1687434606; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dKQdLKDDQGDaUKXxGGBsiWhbA/ht4/Rd1rbGHp/CLf0=; b=Kh0RMaMQE3aeOadHmIS2ZkSKFTfVDB3pYXHFJzhVFnrnUZ2z4VAYS/Ij lAL2VEXyCCyk6jOMtPS2G85EFxjmfmV/7AZsvUIb7RqIqxiUA+n/5itGM tD+qJOx8KZpFRuJQxweO8+0rpoWrjCtChP3oznE3V9sKD2Xhk0vWFxiWO 7axq+7rWLFfTlOueLtPY2RRGJ0ZM3XvR/oW5ybsIaO9W/01+pT5f+Q9l4 ydUPbzXhtG/ZzSKOZPs0W9RWHCWKoJcOYaRAHIMgfVOqU83OQD4eDeSza 62pyGBBxHuGsTA6WoY0Nb+OcwsE/naMq+7qvc/063VUBW2d5rFV2NhJN8 g==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24603211" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Jun 2022 13:49:56 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Jun 2022 13:49:56 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Jun 2022 13:49:56 +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=1655898596; x=1687434596; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dKQdLKDDQGDaUKXxGGBsiWhbA/ht4/Rd1rbGHp/CLf0=; b=EPcSOoAGeCdHoyFttdijZo555gZ4Vu86rK6p/Tf82o+ETJtXxM5kHNuM TkvJ4KUPltkZlPygztZatxluqtB1QRmZXBEdkx6yZjU4oAX+u4fE4XJwp WYboeG2OixfA5OT3tbsoTzarHvETms6YnSxevpRhPnNlS6HCKQnnB4EUt YVoHgExOhdBdltrSl0WnKJhYrLA2s877J/k9VWNwtBRegkN9SruvcE6W0 qk++pQ8OKgAPiDp5xnC6J9edMphYwDf3BGV88xa7YyuzihG1VmRB2V7z8 yLXFhMe5f3NgJ4oDTsGSLZLXv767BApYElFmWHX8nIhV6vql3O3bxb4V8 A==; X-IronPort-AV: E=Sophos;i="5.92,212,1650924000"; d="scan'208";a="24603210" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Jun 2022 13:49:56 +0200 Received: from steina-w.tq-net.de (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 D8FEC280072; Wed, 22 Jun 2022 13:49:55 +0200 (CEST) From: Alexander Stein To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Markus Niebel Subject: [PATCH v2 3/3] [DNI/WIP] arm64: dts: freescale: Add LVDS overlay for TQMa8MPxL Date: Wed, 22 Jun 2022 13:49:49 +0200 Message-Id: <20220622114949.889274-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220622114949.889274-1-alexander.stein@ew.tq-group.com> References: <20220622114949.889274-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-20220622_045006_373100_A62E70B2 X-CRM114-Status: GOOD ( 20.99 ) 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. Signed-off-by: Alexander Stein --- This is the current WIP LVDS overlay which demonstrates how the compatible is added this late. The display is not fixed and can optionally be attached, but some connections like power-supply etc are set. To get this overlay to work or even compile, imx8mp.dtsi patches are required, e.g. [1]. I also noticed on issue when using ldb_lvds_ch0 (the endpoint node from lcdif): Apparently in the overlay dtc is not able to determine that the phandle refers to a node which is named endpoint. See the following warnings: DTC arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo: Warning (graph_port): /fragment@4: graph port node name should be 'port' ../arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts:26.15-28.3: Warning (graph_endpoint): /fragment@4/__overlay__: graph endpoint node name should be 'endpoint' DTOVL arch/arm64/boot/dts/freescale/tqma8mpql-mba8mpxl-lvds.dtb Using the configuration as subnodes to lvds_bridge (commented out right now), the warnings are gone. But this seems a bit tedious. What is the right way to configure this? [1] https://gitlab.collabora.com/martyn/linux/-/commit/3830154763ff4a1c77ae0118d76bdb0465e94307 arch/arm64/boot/dts/freescale/Makefile | 2 + .../imx8mp-tqma8mpql-mba8mpxl-lvds.dts | 44 +++++++++++++++++++ .../freescale/imx8mp-tqma8mpql-mba8mpxl.dts | 6 +++ 3 files changed, 52 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index f814595cd351..64e999f006e1 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -84,6 +84,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl.dtb +tqma8mpql-mba8mpxl-lvds-dtbs += imx8mp-tqma8mpql-mba8mpxl.dtb imx8mp-tqma8mpql-mba8mpxl-lvds.dtbo +dtb-$(CONFIG_ARCH_MXC) += tqma8mpql-mba8mpxl-lvds.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-venice-gw74xx.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dahlia.dtb dtb-$(CONFIG_ARCH_MXC) += imx8mp-verdin-nonwifi-dev.dtb diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts new file mode 100644 index 000000000000..1d57e96d669b --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl-lvds.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) +/* + * Copyright 2022 TQ-Systems GmbH + * 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"; +}; + +&lcdif2 { + status = "okay"; +}; + +&ldb_lvds_ch0 { + remote-endpoint = <&panel_in_lvds0>; +}; + +&lvds_bridge { + status = "okay"; + + // ports { + // port@1 { + // ldb_lvds_ch0: endpoint { + // remote-endpoint = <&panel_in_lvds0>; + // }; + // }; + // }; +}; + +&pwm2 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts index d8ca52976170..772cbb664b2a 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dts @@ -106,6 +106,12 @@ display: display { enable-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; backlight = <&backlight_lvds>; status = "disabled"; + + port { + panel_in_lvds0: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; }; reg_usdhc2_vmmc: regulator-usdhc2 {