From nobody Fri May 17 21:10:28 2024 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54D04567F; Wed, 17 Apr 2024 02:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321759; cv=none; b=uih2rVhkofR+enKKNTy/q/57+yMI2VYPv3po9pJR+D72lEd5JvmlRbJ0iUDTcitEQgaGuFmW+8Z+iVrJYM5yEhshFgMzGgd4i+UbtLrecvECdU6S5gcrX1SmtoYi7+x7SEghGhr8lSLuApaehNpv4JiGc0+CbFTDtAqBjz14R+o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321759; c=relaxed/simple; bh=8yajIAMtfrnOR0YPhjzLw1ZaJc0hJ5ZYx12eiEu4sWU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AhvomwJb7gbKzVKkcogxJvNceCrspBJhnGl4xmROimPyNejkMIRxO3hMu3jH0XejRvcAysX5CIuM5fCufE6yalUnzPFaIB/za/XxF7bm2Z/Yk6ci+sZ/z8mnV960GtIShyyD3ghL/NJul76W61UlgCymzV9VwEhuiFwCE3XvITI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=CkPNGCqv; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="CkPNGCqv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713321758; x=1744857758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8yajIAMtfrnOR0YPhjzLw1ZaJc0hJ5ZYx12eiEu4sWU=; b=CkPNGCqvWmIWVhGBtfJdDD6uAUlz2o3hnRw0FkGtEB9dqZxk1sVSXJkf +rLDAgtF3LZoSi7KcdKsHs3wjxXkvE2zfcW+kyGIVB9dUyxahfYtz1dYu 3XLOKkcfzuhkqKTz3TR7bQ3Ei8gov8uccygKOfsJFfEY9kcEcrj+YZwvx 2fP2Z8FqGFfp1Aq30hNVcW4/vno4XOr1jxqCHZ1tijloDVHanPRbpWoLX 5tl4MV4ve2nAOkH7nm0CfJ9JW6lEqnG/WH1tHnildOc4gOuQEGGFG/TH4 Rns76r9cNWRMa5PwftUjTFhWbtFRmA3YBqq8jC9IkfVACjcFkgTMRRJhm g==; X-CSE-ConnectionGUID: rOmQUjIYQSOnYHCy61jG5w== X-CSE-MsgGUID: 3sG7qdeIQKmvyyvR8cJiww== X-IronPort-AV: E=Sophos;i="6.07,207,1708412400"; d="scan'208";a="21373548" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Apr 2024 19:42:31 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 16 Apr 2024 19:42:20 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 16 Apr 2024 19:42:09 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , Dharma Balasubiramani , Rob Herring Subject: [PATCH v6 1/4] dt-bindings: display: bridge: add sam9x75-lvds binding Date: Wed, 17 Apr 2024 08:11:34 +0530 Message-ID: <20240417024137.144727-2-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240417024137.144727-1-dharma.b@microchip.com> References: <20240417024137.144727-1-dharma.b@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add the 'sam9x75-lvds' compatible binding, which describes the Low Voltage Differential Signaling (LVDS) Controller found on some Microchip's sam9x7 series System-on-Chip (SoC) devices. This binding will be used to define the properties and configuration for the LVDS Controller in DT. Signed-off-by: Dharma Balasubiramani Reviewed-by: Rob Herring --- Changelog v5 -> v6 - No Changes. v4 -> v5 - No changes. v3 -> v4 - Rephrase the commit subject. v2 -> v3 - No changes. v1 -> v2 - Remove '|' in description, as there is no formatting to preserve. - Remove 'gclk' from clock-names as there is only one clock(pclk). - Remove the unused headers and include only used ones. - Change the compatible name specific to SoC (sam9x75) instead of entire se= ries. - Change file name to match the compatible name. --- .../bridge/microchip,sam9x75-lvds.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/microc= hip,sam9x75-lvds.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/microchip,sam= 9x75-lvds.yaml b/Documentation/devicetree/bindings/display/bridge/microchip= ,sam9x75-lvds.yaml new file mode 100644 index 000000000000..862ef441ac9f --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/microchip,sam9x75-lv= ds.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/microchip,sam9x75-lvds.y= aml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip SAM9X75 LVDS Controller + +maintainers: + - Dharma Balasubiramani + +description: + The Low Voltage Differential Signaling Controller (LVDSC) manages data + format conversion from the LCD Controller internal DPI bus to OpenLDI + LVDS output signals. LVDSC functions include bit mapping, balanced mode + management, and serializer. + +properties: + compatible: + const: microchip,sam9x75-lvds + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: Peripheral Bus Clock + + clock-names: + items: + - const: pclk + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + lvds-controller@f8060000 { + compatible =3D "microchip,sam9x75-lvds"; + reg =3D <0xf8060000 0x100>; + interrupts =3D <56 IRQ_TYPE_LEVEL_HIGH 0>; + clocks =3D <&pmc PMC_TYPE_PERIPHERAL 56>; + clock-names =3D "pclk"; + }; --=20 2.25.1 From nobody Fri May 17 21:10:28 2024 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E81994685; Wed, 17 Apr 2024 02:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321762; cv=none; b=LvC+LFzuL6VOisIJbDCUtAP69FIBZx+JvhhZArG45+t5DyvQZvoh3iIMIfL4E2etAKvEuz1z2BPhP9IkX1IPHUDOwHs/2F4QAzJDFvNOhmbV1B3BNFUk4BpMQCXfpRXY1nroZCHzYhnAFt+3MX7KVhgtvd6Q0Qalk/gwwfMfQcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321762; c=relaxed/simple; bh=iDEJkvcGZurxsFdQ+lxuLVkBWypAQLoLWAJ5Qob1Clk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CcWYCsO5ig2sIVihUEbb8YMEHeGZTnnzzc/TW2QrykIRaqlKpe4DuOM+JceJOeBfIxSHXAKprXhK5C8AkrefAILpaZJ+dxVyt2PYUqqnYDyEuh5dlLuVtIMrvTvqKxnKJCDNNqwcZTHhcWCdMA8O2CloaxoMNmjpuTDgHV8hIWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=JTb4PoQ8; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="JTb4PoQ8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713321760; x=1744857760; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iDEJkvcGZurxsFdQ+lxuLVkBWypAQLoLWAJ5Qob1Clk=; b=JTb4PoQ8zV0sbjnPGxktBZrf8lUNRDxwyvVOz3qJJPfIAW6nl9v9QuFo 1GJ4ocK8d7AIFJlFbTtMYXAYmiz2fL7nAEBnablRwMNkta3GauLlNl8dj OGujwag9k+iNCbrxwkJlXbIvZQ7rRvHUyXsf7GBxzB8td2LAy4vapfTOs e8O3ZF841z8z+dVAg+nU0j1gpuBI9PqtoD959fYhL46jRfmFqeGUlp9Jl B7c2cDpUyYCtHmSRd1OgbmAGvhviOiNNTzcIIQp6eHivNehHy5CotxrNy JHwzYDunSaK4ZDzMim8zL8+dagGV0rQE5XP9ZmRP8j0OvPbBrqDRdaEWi g==; X-CSE-ConnectionGUID: rOmQUjIYQSOnYHCy61jG5w== X-CSE-MsgGUID: OnqmvDjrQPquuangdwbz9w== X-IronPort-AV: E=Sophos;i="6.07,207,1708412400"; d="scan'208";a="21373555" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Apr 2024 19:42:32 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 16 Apr 2024 19:42:31 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 16 Apr 2024 19:42:20 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , Dharma Balasubiramani , Manikandan Muralidharan Subject: [PATCH v6 2/4] drm/bridge: add lvds controller support for sam9x7 Date: Wed, 17 Apr 2024 08:11:35 +0530 Message-ID: <20240417024137.144727-3-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240417024137.144727-1-dharma.b@microchip.com> References: <20240417024137.144727-1-dharma.b@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a new LVDS controller driver for sam9x7 which does the following: - Prepares and enables the LVDS Peripheral clock - Defines its connector type as DRM_MODE_CONNECTOR_LVDS and adds itself to the global bridge list. - Identifies its output endpoint as panel and adds it to the encoder display pipeline - Enables the LVDS serializer Signed-off-by: Manikandan Muralidharan Signed-off-by: Dharma Balasubiramani --- Changelog v5 -> v6 - No Changes. v4 -> v5 - Drop the unused variable 'format'. - Use DRM wrapper for dev_err() to maintain uniformity. - return -ENODEV instead of -EINVAL to maintain consistency with other DRM bridge drivers. v3 -> v4 - No changes. v2 ->v3 - Correct Typo error "serializer". - Consolidate get() and prepare() functions and use devm_clk_get_prepared(). - Remove unused variable 'ret' in probe(). - Use devm_pm_runtime_enable() and drop the mchp_lvds_remove(). v1 -> v2 - Drop 'res' variable and combine two lines into one. - Handle deferred probe properly, use dev_err_probe(). - Don't print anything on deferred probe. Dropped print. - Remove the MODULE_ALIAS and add MODULE_DEVICE_TABLE(). - symbol 'mchp_lvds_driver' was not declared. It should be static. --- drivers/gpu/drm/bridge/Kconfig | 7 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/microchip-lvds.c | 228 ++++++++++++++++++++++++ 3 files changed, 236 insertions(+) create mode 100644 drivers/gpu/drm/bridge/microchip-lvds.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index efd996f6c138..889098e2d65f 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -190,6 +190,13 @@ config DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW to DP++. This is used with the i.MX6 imx-ldb driver. You are likely to say N here. =20 +config DRM_MICROCHIP_LVDS_SERIALIZER + tristate "Microchip LVDS serializer support" + depends on OF + depends on DRM_ATMEL_HLCDC + help + Support for Microchip's LVDS serializer. + config DRM_NWL_MIPI_DSI tristate "Northwest Logic MIPI DSI Host controller" depends on DRM diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makef= ile index 017b5832733b..7df87b582dca 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_DRM_LONTIUM_LT9611) +=3D lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) +=3D lontium-lt9611uxc.o obj-$(CONFIG_DRM_LVDS_CODEC) +=3D lvds-codec.o obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) +=3D megachips-stdpxxxx-= ge-b850v3-fw.o +obj-$(CONFIG_DRM_MICROCHIP_LVDS_SERIALIZER) +=3D microchip-lvds.o obj-$(CONFIG_DRM_NXP_PTN3460) +=3D nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) +=3D parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) +=3D parade-ps8640.o diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/brid= ge/microchip-lvds.c new file mode 100644 index 000000000000..149704f498a6 --- /dev/null +++ b/drivers/gpu/drm/bridge/microchip-lvds.c @@ -0,0 +1,228 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Microchip Technology Inc. and its subsidiaries + * + * Author: Manikandan Muralidharan + * Author: Dharma Balasubiramani + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define LVDS_POLL_TIMEOUT_MS 1000 + +/* LVDSC register offsets */ +#define LVDSC_CR 0x00 +#define LVDSC_CFGR 0x04 +#define LVDSC_SR 0x0C +#define LVDSC_WPMR 0xE4 + +/* Bitfields in LVDSC_CR (Control Register) */ +#define LVDSC_CR_SER_EN BIT(0) + +/* Bitfields in LVDSC_CFGR (Configuration Register) */ +#define LVDSC_CFGR_PIXSIZE_24BITS 0 +#define LVDSC_CFGR_DEN_POL_HIGH 0 +#define LVDSC_CFGR_DC_UNBALANCED 0 +#define LVDSC_CFGR_MAPPING_JEIDA BIT(6) + +/*Bitfields in LVDSC_SR */ +#define LVDSC_SR_CS BIT(0) + +/* Bitfields in LVDSC_WPMR (Write Protection Mode Register) */ +#define LVDSC_WPMR_WPKEY_MASK GENMASK(31, 8) +#define LVDSC_WPMR_WPKEY_PSSWD 0x4C5644 + +struct mchp_lvds { + struct device *dev; + void __iomem *regs; + struct clk *pclk; + struct drm_panel *panel; + struct drm_bridge bridge; + struct drm_bridge *panel_bridge; +}; + +static inline struct mchp_lvds *bridge_to_lvds(struct drm_bridge *bridge) +{ + return container_of(bridge, struct mchp_lvds, bridge); +} + +static inline u32 lvds_readl(struct mchp_lvds *lvds, u32 offset) +{ + return readl_relaxed(lvds->regs + offset); +} + +static inline void lvds_writel(struct mchp_lvds *lvds, u32 offset, u32 val) +{ + writel_relaxed(val, lvds->regs + offset); +} + +static void lvds_serialiser_on(struct mchp_lvds *lvds) +{ + unsigned long timeout =3D jiffies + msecs_to_jiffies(LVDS_POLL_TIMEOUT_MS= ); + + /* The LVDSC registers can only be written if WPEN is cleared */ + lvds_writel(lvds, LVDSC_WPMR, (LVDSC_WPMR_WPKEY_PSSWD & + LVDSC_WPMR_WPKEY_MASK)); + + /* Wait for the status of configuration registers to be changed */ + while (lvds_readl(lvds, LVDSC_SR) & LVDSC_SR_CS) { + if (time_after(jiffies, timeout)) { + DRM_DEV_ERROR(lvds->dev, "%s: timeout error\n", + __func__); + return; + } + usleep_range(1000, 2000); + } + + /* Configure the LVDSC */ + lvds_writel(lvds, LVDSC_CFGR, (LVDSC_CFGR_MAPPING_JEIDA | + LVDSC_CFGR_DC_UNBALANCED | + LVDSC_CFGR_DEN_POL_HIGH | + LVDSC_CFGR_PIXSIZE_24BITS)); + + /* Enable the LVDS serializer */ + lvds_writel(lvds, LVDSC_CR, LVDSC_CR_SER_EN); +} + +static int mchp_lvds_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) +{ + struct mchp_lvds *lvds =3D bridge_to_lvds(bridge); + + bridge->encoder->encoder_type =3D DRM_MODE_ENCODER_LVDS; + + return drm_bridge_attach(bridge->encoder, lvds->panel_bridge, + bridge, flags); +} + +static void mchp_lvds_enable(struct drm_bridge *bridge) +{ + struct mchp_lvds *lvds =3D bridge_to_lvds(bridge); + int ret; + + ret =3D clk_enable(lvds->pclk); + if (ret < 0) { + DRM_DEV_ERROR(lvds->dev, "failed to enable lvds pclk %d\n", ret); + return; + } + + ret =3D pm_runtime_get_sync(lvds->dev); + if (ret < 0) { + DRM_DEV_ERROR(lvds->dev, "failed to get pm runtime: %d\n", ret); + clk_disable(lvds->pclk); + return; + } + + lvds_serialiser_on(lvds); +} + +static void mchp_lvds_disable(struct drm_bridge *bridge) +{ + struct mchp_lvds *lvds =3D bridge_to_lvds(bridge); + + pm_runtime_put(lvds->dev); + clk_disable(lvds->pclk); +} + +static const struct drm_bridge_funcs mchp_lvds_bridge_funcs =3D { + .attach =3D mchp_lvds_attach, + .enable =3D mchp_lvds_enable, + .disable =3D mchp_lvds_disable, +}; + +static int mchp_lvds_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct mchp_lvds *lvds; + struct device_node *port; + + if (!dev->of_node) + return -ENODEV; + + lvds =3D devm_kzalloc(&pdev->dev, sizeof(*lvds), GFP_KERNEL); + if (!lvds) + return -ENOMEM; + + lvds->dev =3D dev; + + lvds->regs =3D devm_ioremap_resource(lvds->dev, + platform_get_resource(pdev, IORESOURCE_MEM, 0)); + if (IS_ERR(lvds->regs)) + return PTR_ERR(lvds->regs); + + lvds->pclk =3D devm_clk_get_prepared(lvds->dev, "pclk"); + if (IS_ERR(lvds->pclk)) + return dev_err_probe(lvds->dev, PTR_ERR(lvds->pclk), + "could not get pclk_lvds prepared\n"); + + port =3D of_graph_get_remote_node(dev->of_node, 1, 0); + if (!port) { + DRM_DEV_ERROR(dev, + "can't find port point, please init lvds panel port!\n"); + return -ENODEV; + } + + lvds->panel =3D of_drm_find_panel(port); + of_node_put(port); + + if (IS_ERR(lvds->panel)) + return -EPROBE_DEFER; + + lvds->panel_bridge =3D devm_drm_panel_bridge_add(dev, lvds->panel); + + if (IS_ERR(lvds->panel_bridge)) + return PTR_ERR(lvds->panel_bridge); + + lvds->bridge.of_node =3D dev->of_node; + lvds->bridge.type =3D DRM_MODE_CONNECTOR_LVDS; + lvds->bridge.funcs =3D &mchp_lvds_bridge_funcs; + + dev_set_drvdata(dev, lvds); + devm_pm_runtime_enable(dev); + + drm_bridge_add(&lvds->bridge); + + return 0; +} + +static const struct of_device_id mchp_lvds_dt_ids[] =3D { + { + .compatible =3D "microchip,sam9x75-lvds", + }, + {}, +}; +MODULE_DEVICE_TABLE(of, mchp_lvds_dt_ids); + +static struct platform_driver mchp_lvds_driver =3D { + .probe =3D mchp_lvds_probe, + .driver =3D { + .name =3D "microchip-lvds", + .of_match_table =3D mchp_lvds_dt_ids, + }, +}; +module_platform_driver(mchp_lvds_driver); + +MODULE_AUTHOR("Manikandan Muralidharan "); +MODULE_AUTHOR("Dharma Balasubiramani "); +MODULE_DESCRIPTION("Low Voltage Differential Signaling Controller Driver"); +MODULE_LICENSE("GPL"); --=20 2.25.1 From nobody Fri May 17 21:10:28 2024 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AB458F72; Wed, 17 Apr 2024 02:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321805; cv=none; b=eigm2dZ5ZGLAkYc7fL9BFCUSpHB25DVEgkgBcgIEDCXSv6q0O3rg3g7kEhJ0yATH5j7AzyMe1qXMyr30jCuhaWWsZW1YV2CcQ3KBKEWjEACktAFN8zBpIb0j2Cnfc/spmRKCRhouoR1ipVupxKn6M3sDJEa5df6mEcp+pQjkgOE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321805; c=relaxed/simple; bh=RW42ADRJHbjCU+N4jM5hsf6GoRXrS/Cmrp4V+FIUu5E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fucL357ZtYtre/vBOYGANK4eF+hpxctK6SlbRSMVsQ9eh358htenOHWTv1KUbWKPUfSC/oIIzUP4ATLKEzwqSqnjA+dvzZq1d4lD3MvcRE6IblP0nL2tyTtH2KPDVgaZic7yZlmRaD0OJcs3XzTRJi2uAOtn9U1k0Hg3NlkzNKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=Yu5hAx2K; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Yu5hAx2K" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713321804; x=1744857804; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RW42ADRJHbjCU+N4jM5hsf6GoRXrS/Cmrp4V+FIUu5E=; b=Yu5hAx2KL8ec4gIXlCFECeQNuexb6AQfKJ96mf0JFbOMScXI96G1J5W3 KZWRinjmOJNil77vNj6pEKZQ5WyGBNN1Cz7D4bdNnMZJRx2XrJvfgUkOR y962GvtUcmdmhOXir9nfAMCuneDs0hjo6QOA3UDafeQ1EyMHmw9Gz7sl5 Wk0CI09bkxdUZzHTEG9/f7j2G0wdJt9H3Ai6kYsuoK4GIrgDS812hWIV9 cAB0+Xz87/3sOgCs+eG0ZynyyVnwjzvnyx6zB70R+H/7HXab+Uxe/eH+x QW9l9mbkfc0flJFPKsMkQxzBsK1C2WHkZ4BPs39EdLAQHXPeHJaOq2dXV A==; X-CSE-ConnectionGUID: lGxh+0ByRtCkzh726CowEg== X-CSE-MsgGUID: TmGpvyGHREyqXt8rLiNfvA== X-IronPort-AV: E=Sophos;i="6.07,207,1708412400"; d="scan'208";a="252174814" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Apr 2024 19:43:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 16 Apr 2024 19:42:43 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 16 Apr 2024 19:42:32 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , Dharma Balasubiramani , Nicolas Ferre Subject: [PATCH v6 3/4] MAINTAINERS: add SAM9X7 SoC's LVDS controller Date: Wed, 17 Apr 2024 08:11:36 +0530 Message-ID: <20240417024137.144727-4-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240417024137.144727-1-dharma.b@microchip.com> References: <20240417024137.144727-1-dharma.b@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add the newly added LVDS controller for the SAM9X7 SoC to the existing MAINTAINERS entry. Signed-off-by: Dharma Balasubiramani Reviewed-by: Neil Armstrong Acked-by: Nicolas Ferre --- Changelog v5 -> v6 - Correct the file name sam9x7-lvds.yaml -> sam9x75-lvds.yaml. v4 -> v5 v3 -> v4 - No changes. v2 -> v3 - Move the entry before "MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER". v1 -> v2 - No Changes. --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c23fda1aa1f0..e49347eac596 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14563,6 +14563,14 @@ S: Supported F: Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml F: drivers/pwm/pwm-atmel.c =20 +MICROCHIP SAM9x7-COMPATIBLE LVDS CONTROLLER +M: Manikandan Muralidharan +M: Dharma Balasubiramani +L: dri-devel@lists.freedesktop.org +S: Supported +F: Documentation/devicetree/bindings/display/bridge/microchip,sam9x75-lvds= .yaml +F: drivers/gpu/drm/bridge/microchip-lvds.c + MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER M: Eugen Hristev L: linux-iio@vger.kernel.org --=20 2.25.1 From nobody Fri May 17 21:10:28 2024 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4AE566A; Wed, 17 Apr 2024 02:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321785; cv=none; b=oGgyxlBVyAk/jr3wRBrnGSGtQv7vA8TwY3u6Akksltgcoep5Aio6j1ztFrpBwZphB5m8z7kxXjNqAiL4hzOMk7vNPBDbw/bQYK7VyAlrriA9a6cjdnuObXY9TwIWpZ4zS0mX9V4lXilnGb9PHvsZn4PTS/1+lL4otqdohNBh+NE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713321785; c=relaxed/simple; bh=po9zb6Qn/5fT2i3jnTl0DLe9EyYWr9PtZv3ZiG+LgXk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qXUfC+hw0qspf6LYHth/KLepFwVHHxSQnq2Yhh1+Ju5rymph8lspCPKR5S7Vx9NFsV6LeMSageyOkpacsrnTAf9EXloVhE0ZGqcQR6ZyNHEr9AA/84ooV52H9S+7AYiKCu8p8JNHHglN9bJi0yMjyfxLX4nQGxJOp05i1AoIQyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=q+C5sCj2; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="q+C5sCj2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713321784; x=1744857784; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=po9zb6Qn/5fT2i3jnTl0DLe9EyYWr9PtZv3ZiG+LgXk=; b=q+C5sCj2hOl5nuwL9BCHVSiOPDbhM6BKvGoFWjhVqtwyeHArhSUATzFY 4NPmlDyihGveSlMn73DihzUHlMA2mruqpLWNOhPSBWQAbq9p2M619Y03W 9baGTHTUEkIkIkeDQkRL2vPjHhwZbc3W0/1cZ8/jZiR8VranWKp1TpOqW WyrxVwyynSbSqaakrOI7lpqKghemUyF8hWjfX18AEjZTYGu/A37krHEMP 3dosrq/eMu+/S+L53EVP+fkqg5B6jH6uPXVFyF/ch6yh8FE46vmjxiipY 8A+rt85VzTw8T5bQrdIfUE8FDfbMYJAc31ByitpNBDHe5UUFcBqpqTYDB w==; X-CSE-ConnectionGUID: lhqfj+ClRBmMsnzlRSNyvA== X-CSE-MsgGUID: /4SB2i6AQ1W1hSmKUxDBJw== X-IronPort-AV: E=Sophos;i="6.07,207,1708412400"; d="scan'208";a="23379754" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Apr 2024 19:43:03 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 16 Apr 2024 19:42:54 -0700 Received: from che-lt-i70843lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 16 Apr 2024 19:42:43 -0700 From: Dharma Balasubiramani To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , Dharma Balasubiramani , Hari Prasath Gujulan Elango , Nicolas Ferre Subject: [PATCH v6 4/4] ARM: configs: at91: Enable LVDS serializer support Date: Wed, 17 Apr 2024 08:11:37 +0530 Message-ID: <20240417024137.144727-5-dharma.b@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240417024137.144727-1-dharma.b@microchip.com> References: <20240417024137.144727-1-dharma.b@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Enable LVDS serializer support for display pipeline. Signed-off-by: Dharma Balasubiramani Acked-by: Hari Prasath Gujulan Elango Acked-by: Nicolas Ferre --- Changelog v4 -> v5 v3 -> v4 v2 -> v3 - No Changes. --- arch/arm/configs/at91_dt_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_= defconfig index 1d53aec4c836..6eabe2313c9a 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig @@ -143,6 +143,7 @@ CONFIG_VIDEO_OV2640=3Dm CONFIG_VIDEO_OV7740=3Dm CONFIG_DRM=3Dy CONFIG_DRM_ATMEL_HLCDC=3Dy +CONFIG_DRM_MICROCHIP_LVDS_SERIALIZER=3Dy CONFIG_DRM_PANEL_SIMPLE=3Dy CONFIG_DRM_PANEL_EDP=3Dy CONFIG_FB_ATMEL=3Dy --=20 2.25.1