From patchwork Thu May 18 19:26:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13247268 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 3BCC5C77B7A for ; Thu, 18 May 2023 19:27:06 +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=9GVfQB7ECZrrVcnjbKreg6MnKC8jxiNO03Y5Q4GTUfg=; b=vP2/2x54qQiZpV VhAv7tHDUHiX9w0wwDvSv4TM/PFjNYddU/ZZ4sTUo8lfwXyLEv5si4Uz75Hlp7dT+pAE5y36zLqXq 1HOH4WDN1TQaK1W1fOFQRQcJoxYjDV2TtZFD3kb/78L9SRG8IYys8iQMn+4xORHebGRAjLbBdS9uJ KDLhxT03BDjWl5aRqHGByLLyaP2djGxaDgoipMQliHBoE1+V+Fh0NjGOKOOUhqYJw51KIWszX61jr OlUTZRvyrt8Tm6+BKRaIT9rIOzqT5dExvS0rcfLgFWT+a9BG3k3JqCT50khTKc9q0i5cZWM8NMIYy w2FC/VlgtFq9smnHoWZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzjGp-00Dxi6-1T; Thu, 18 May 2023 19:26:39 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzjGl-00Dxh8-2s for linux-arm-kernel@lists.infradead.org; Thu, 18 May 2023 19:26:37 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-19a0f511155so280179fac.1 for ; Thu, 18 May 2023 12:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684437994; x=1687029994; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4/Z7FK8gXfOK/eLbI8J6uzD+8ahNn0HJ8uv1V8cuJ9g=; b=O3Jx49kBYo71nczBSK1IXlSvGtNrdjlRQksE6kT0j0NavulS/mztg+x1qio51X7IKZ +hlGTg21ZCTfqswXg+i4U/nldZGFvovihiYZ0NZYmwhUXHyqY2dctsjw29ADZ/QW0sWm Ag6mEoUkUT27zzxHQOQGu76kGAxVClmxoB8ziEOp8TQZT1xEViGY5A9oi3wJUq0kYW14 lfvnp13qBsudGuyPBgW8lpoOTvrGT9Jng3X9zGai7M2RTpHuBJynDy2WpvGUaeO9jeTQ a5TQp8ISQcOQK9hscnKgmE+1p4UFJw6VBbBSrUOM63HOueTrkIHA8/AVfxGizQ+fhQel PMdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684437994; x=1687029994; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4/Z7FK8gXfOK/eLbI8J6uzD+8ahNn0HJ8uv1V8cuJ9g=; b=PpNgEonTsHZSoeiXFhCyLtF+VauzvlMj+hWYE7POakaU0fpFKhu7chyDStY2ptPJ7s Ad/u+7G3NnnU8QH5U+eXtHft530TDK/f4JIi/CbsO5I7TrZ7/YHTzcKIdc+mgO4eIUZG TtwETgJgtls8N7KWFkzRbdXOfaSKmhwO/1cU2NUlo4EGN8A7w4xIvX+WurVmhFqEjemg zCOM66FEMKr6vWYTE/rkRIXMaDWTiThO7XGMHivqLNeND+9pFI+UquzMK2stYBIWTnzG 3mIOfQF8RrAJ/9+uzlxEQLLUDhBpm6ZFrOYOeMg81UPEvJUNqzastEFUyZoWejtTp/yF wkVA== X-Gm-Message-State: AC+VfDwWVQe0CRm7ZytjdklDPjOEH+eQ8LNJsRSKM5DUZGVRd/7kiQDm TWoEAjLmdGbeGD9wcxAqM1A= X-Google-Smtp-Source: ACHHUZ6Ma0v70Cd77SrUB70pu+f5aZ/qv0YWBhUkUZ3/xODGk5A2PKms9kGkXuvW2tDlV8o8FPUL0g== X-Received: by 2002:a05:6870:9a14:b0:192:7328:d with SMTP id fo20-20020a0568709a1400b001927328000dmr4353456oab.4.1684437994258; Thu, 18 May 2023 12:26:34 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:e366:77e8:4ae8:a240]) by smtp.gmail.com with ESMTPSA id q14-20020a9d654e000000b006ac87b54ca4sm956609otl.34.2023.05.18.12.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 12:26:33 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: marex@denx.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 1/2] ARM: dts: imx6sx: Add LDB support Date: Thu, 18 May 2023 16:26:27 -0300 Message-Id: <20230518192628.151462-1-festevam@gmail.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-20230518_122635_952811_3CDC2074 X-CRM114-Status: GOOD ( 11.69 ) 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 From: Fabio Estevam i.MX6SX has an LVDS controller that is connected to the eLCDIF. Add support for it. Signed-off-by: Fabio Estevam --- Changes since v1: - Do not use simple-bus for gpr (Marek and Krzysztof). arch/arm/boot/dts/imx6sx.dtsi | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi index 4233943a1cca..565b95b36b77 100644 --- a/arch/arm/boot/dts/imx6sx.dtsi +++ b/arch/arm/boot/dts/imx6sx.dtsi @@ -844,7 +844,38 @@ iomuxc: pinctrl@20e0000 { gpr: iomuxc-gpr@20e4000 { compatible = "fsl,imx6sx-iomuxc-gpr", "fsl,imx6q-iomuxc-gpr", "syscon"; + #address-cells = <1>; + #size-cells = <1>; reg = <0x020e4000 0x4000>; + + lvds_bridge: bridge@18 { + compatible = "fsl,imx6sx-ldb"; + clocks = <&clks IMX6SX_CLK_LDB_DI0>; + clock-names = "ldb"; + reg = <0x18 0x4>; + reg-names = "ldb"; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + ldb_from_lcdif1: endpoint { + remote-endpoint = <&lcdif1_to_ldb>; + }; + }; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + }; + }; + }; + }; }; sdma: dma-controller@20ec000 { @@ -1278,6 +1309,14 @@ lcdif1: lcdif@2220000 { clock-names = "pix", "axi", "disp_axi"; power-domains = <&pd_disp>; status = "disabled"; + + ports { + port { + lcdif1_to_ldb: endpoint { + remote-endpoint = <&ldb_from_lcdif1>; + }; + }; + }; }; lcdif2: lcdif@2224000 { From patchwork Thu May 18 19:26:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13247267 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 54B28C77B7D for ; Thu, 18 May 2023 19:27:06 +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=JpQYMsF8xPDcjWIHlz8w1NeJcVaB+JzusljFeynZYvw=; b=Kut8QlSbaBZ9j9 eaJscD7NH8IGubmPtZQh5Oeaja+GX1lGnq5uvkD+DYbyH1/usdA6jkhUauHioy3W4p9ZA64lEOnVp ZmE2r/3k5xoOlqdTqE4Bn+tWRmGYHwHx8nE5S8vT5fNhGtpn5UNzYX1oFLl4HbLs3E3Y305P6XZxE YBOIR3CehGQ9A2CoTVS9o1pguyBjn45V55nhCy25UFl7R8/aFzJowYfKyhwMQk3VzH0Ys7nCRPEqC pc8pZoQCk3iCCORPpOwOrNY2e9SBd+RJsWJiH13hNmU14pRN35uztZuZx/wnutghAJkIT3K8FsP9N YX+sTKTcMobawAa4XwWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzjGu-00Dxj2-0M; Thu, 18 May 2023 19:26:44 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzjGn-00Dxhc-2N for linux-arm-kernel@lists.infradead.org; Thu, 18 May 2023 19:26:38 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-199e2e85212so287567fac.1 for ; Thu, 18 May 2023 12:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684437997; x=1687029997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wjpxP8+xqN8IGpkkBYSjeVQ16z0BQyUdfEfeND4sVus=; b=n+FWgUD5g4ss2FySMlttnD0K9eA5FhTLRNnLPF8K75b3d5fhwl/XBeEBi6tBzXwUax s773yt710vXU++O1pgCPGJFsQwP3IwJoyBmwNCB8IHHgzKk6KUbJXC56sMkZoqOymTlh QG0h1mwdHc0HxqHT4TpEdNAPeS7jWHuHmja97idWFOn8iEAc4JrAExi7M/DIbxxNyUHm FRScuGqp/JTZR4He97IUiUTcYo0DmGzIFfEE57A6OZcdRDM6Z3kb/Gg2KVSM8sSAStF3 qhSD6uRpsCnWF0gWDZFw4LJvxw9whZOcR38CS1S9KA743ILXzcTyCt6b9h4Jt8CEMdY3 PVZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684437997; x=1687029997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wjpxP8+xqN8IGpkkBYSjeVQ16z0BQyUdfEfeND4sVus=; b=ET7Gu74CgHWpvM9yUpMVDn9AM5PWxahVSNr2Mjf+ulLKs+KIBt8KrNqyzAKeX71SsV IxDiLqIjuq8NvlENVmsQ27R1VzeBUEoRAvrfCEe5pId5GrDaQx280Jb8zXWs9RJXnAm+ GoTkz9vqnL9jeKzb8oFVqyHycZD8qJvKph+thm1wFBc5DXumh+yURCXZySQYVllja7qm g37jqHCp70oX3GPAtlX/okHeBv8NvTRpLSUObHuaKO2YJWQXgI04DdetWX6U72gA953F HmMvIlgAmBHXcc3nCTR+d6MNVGPp9ISxLtzIL0dm1OdHmrCWxvjRHY50saI9+mRxaplC HALA== X-Gm-Message-State: AC+VfDwPNmtMtontV6oXhr+LRntcHKwNi3KHBgQXT4oq6kNukPEt+vrn rJMozNrB1iicCSlwbDoOU1I= X-Google-Smtp-Source: ACHHUZ6w7YdpP8pmL/DeR2d8ykT3J7XA2hUd9ajzOI/RhmMGUVZQ2f0SxvA62FY4KEzrthsMfdyzYw== X-Received: by 2002:a05:6870:c1cc:b0:199:c25b:f966 with SMTP id i12-20020a056870c1cc00b00199c25bf966mr4662120oad.2.1684437997064; Thu, 18 May 2023 12:26:37 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b69:e366:77e8:4ae8:a240]) by smtp.gmail.com with ESMTPSA id q14-20020a9d654e000000b006ac87b54ca4sm956609otl.34.2023.05.18.12.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 12:26:36 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Cc: marex@denx.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam Subject: [PATCH v2 2/2] soc: imx: imx6sx-gpr: Introduce a GPR driver Date: Thu, 18 May 2023 16:26:28 -0300 Message-Id: <20230518192628.151462-2-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230518192628.151462-1-festevam@gmail.com> References: <20230518192628.151462-1-festevam@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230518_122637_775075_AEA0C628 X-CRM114-Status: GOOD ( 16.43 ) 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 From: Fabio Estevam The motivation for this imx6sx-gpr driver is to allow describing the LVDS LDB bridge as a GPR subnode. Signed-off-by: Fabio Estevam --- Changes since v1: - Newly introduced. drivers/soc/imx/Makefile | 1 + drivers/soc/imx/imx6sx-gpr.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 drivers/soc/imx/imx6sx-gpr.c diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index a28c44a1f16a..9840d4c41015 100644 --- a/drivers/soc/imx/Makefile +++ b/drivers/soc/imx/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_MXC) += soc-imx.o endif obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o +obj-$(CONFIG_SOC_IMX6SX) += imx6sx-gpr.o obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o diff --git a/drivers/soc/imx/imx6sx-gpr.c b/drivers/soc/imx/imx6sx-gpr.c new file mode 100644 index 000000000000..7684acbe43ff --- /dev/null +++ b/drivers/soc/imx/imx6sx-gpr.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include + +static int imx6sx_gpr_probe(struct platform_device *pdev) +{ + return devm_of_platform_populate(&pdev->dev); +} + +static const struct of_device_id imx6sx_gpr_ids[] = { + { .compatible = "fsl,imx6sx-iomuxc-gpr" }, + { } +}; +MODULE_DEVICE_TABLE(of, imx6sx_gpr_ids); + +static struct platform_driver imx6sx_gpr_driver = { + .driver = { + .name = "imx6sx_gpr", + .of_match_table = imx6sx_gpr_ids, + }, + .probe = imx6sx_gpr_probe, +}; +module_platform_driver(imx6sx_gpr_driver); + +MODULE_AUTHOR("Fabio Estevam "); +MODULE_DESCRIPTION("NXP i.MX6SX GPR driver"); +MODULE_LICENSE("GPL");