From patchwork Thu Feb 18 21:05:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12094349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D061C433E0 for ; Thu, 18 Feb 2021 21:55:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAAC564DDA for ; Thu, 18 Feb 2021 21:55:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAAC564DDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 567186EA63; Thu, 18 Feb 2021 21:55:25 +0000 (UTC) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by gabe.freedesktop.org (Postfix) with ESMTPS id D74786EA60 for ; Thu, 18 Feb 2021 21:05:17 +0000 (UTC) Received: by mail-wr1-x42f.google.com with SMTP id v15so4488675wrx.4 for ; Thu, 18 Feb 2021 13:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t5l3d0kDf23czhBRFA0lvtKtXerTBefqvKS8i3dJCWU=; b=Z5XGtDzHTKI+5lFCoQSYoEWYd8AImrB9jQbPADHzlHLjYXlRBkDgNcBRxX0/pKCasg eBrOj+2QAjk2pPzEtfyWiqUodpQLlQQkStx7QmUxqKdhR32EiILcnA4e4IQM+CfujeHN tRAXgO2dh+Wfm1tep+ZUZ2BB/9BkJ9ww5jLMWgvyoLeENdU9dwKJfOZcy81CJhPjPEVa 7utR/SalGJTHu63v/8RKYRI1PDXO8bHgIzd5wF7b5cjNKdKTOp2oUIrcn0+HFRpM/FLU /nYYX6ZJFuaEPPyNTcs9nAgPrp2wsPZKqQlLH1IB3LrJRxBWFmiI80XSQGvAJjJIm0mp y3QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t5l3d0kDf23czhBRFA0lvtKtXerTBefqvKS8i3dJCWU=; b=C3q3uQUSGXjD/NgYbPj6oMRzK6IJyd18yWlhqQ4w+ANTkNsCtdKahrqdX4TeTeGnE8 K4tVEvbJYnIfK6UNVHG4cS/cSOgXSvHnWc9Qn/JT0fUfGUv1jzjC0wfJZY+KD2yvi3sS Fu+zwZVNRSwLSYQAbrkCHcEEiZ/vvhOev5t+Zh0a21Joc1iVujrQX+kRLR6M54wzW4Oc KQgvXI++umS5W9AzpDOHb7EiPqqQ85rpyQ68zKLTQEMxXm7z+Vc5vyERZSRx6Gi/Uf3g tUG2QXI1UcywLFcMMXauLEfTV7xxISNbt1OSWm2kV3ctLX8LIlOh1NuWcHztTg8mCnRx 6WMA== X-Gm-Message-State: AOAM533GVRcXqJSXfitK2H5QPl8LLIFj6nPO9ECY43nZlcfdX2L94QJb UOUaJXjOR7qjj+xNpJgUOO4= X-Google-Smtp-Source: ABdhPJxREHMt9IqKQ257TRA9q2IA1QCdZQHJer3SjM5Cw3TxTt2bjueefVM0GK4PeQgX/g6SvCzFcw== X-Received: by 2002:a5d:5047:: with SMTP id h7mr5956557wrt.67.1613682316534; Thu, 18 Feb 2021 13:05:16 -0800 (PST) Received: from localhost.localdomain (2a01cb0008bd270040b01df6f3b9f578.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:40b0:1df6:f3b9:f578]) by smtp.gmail.com with ESMTPSA id m2sm8450878wml.34.2021.02.18.13.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 13:05:16 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH v3 1/2] dt-bindings: display: bridge: Add documentation for LT8912 Date: Thu, 18 Feb 2021 22:05:03 +0100 Message-Id: <20210218210504.375752-2-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210218210504.375752-1-adrien.grassein@gmail.com> References: <20210218210504.375752-1-adrien.grassein@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 18 Feb 2021 21:55:23 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, narmstrong@baylibre.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, jonas@kwiboo.se, linux-kernel@vger.kernel.org, robert.foss@linaro.org, a.hajda@samsung.com, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, Adrien Grassein Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Lontium LT8912 is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reviewed-by: Rob Herring --- .../display/bridge/lontium,lt8912.yaml | 102 ++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml new file mode 100644 index 000000000000..1e5a2ad5eb47 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/lontium,lt8912.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Lontium LT8912 MIPI to HDMI Bridge + +maintainers: + - Adrien Grassein + +description: | + The LT8912 is a bridge device which convert DSI to HDMI + +properties: + compatible: + enum: + - lontium,lt8912 + + reg: + maxItems: 1 + + reset-gpios: + maxItems: 1 + description: GPIO connected to active high RESET pin. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: + Primary MIPI port for MIPI input + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: true + + required: + - data-lanes + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: | + HDMI port, should be connected to a node compatible with the + hdmi-connector binding. + + required: + - port@0 + - port@1 + +required: + - compatible + - reg + - reset-gpios + - ports + +additionalProperties: false + +examples: + - | + #include + + i2c4 { + #address-cells = <1>; + #size-cells = <0>; + + hdmi-bridge@48 { + compatible = "lontium,lt8912"; + reg = <0x48>; + reset-gpios = <&max7323 0 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hdmi_out_in: endpoint { + data-lanes = <0 1 2 3>; + remote-endpoint = <&mipi_dsi_out>; + }; + }; + + port@1 { + reg = <1>; + + endpoint { + remote-endpoint = <&hdmi_in>; + }; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 4ad16d3bb517..5d1ed281cd41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10458,6 +10458,11 @@ S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git F: drivers/hid/hid-lg-g15.c +LONTIUM LT8912 MIPI TO HDMI BRIDGE +M: Adrien Grassein +S: Maintained +F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml + LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash M: Sreekanth Reddy From patchwork Thu Feb 18 21:05:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12094347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D072C433DB for ; Thu, 18 Feb 2021 21:55:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D048364E38 for ; Thu, 18 Feb 2021 21:55:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D048364E38 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 093D16E894; Thu, 18 Feb 2021 21:55:25 +0000 (UTC) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by gabe.freedesktop.org (Postfix) with ESMTPS id E55C96EA64 for ; Thu, 18 Feb 2021 21:05:23 +0000 (UTC) Received: by mail-wr1-x433.google.com with SMTP id a4so2252603wro.8 for ; Thu, 18 Feb 2021 13:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zk2aPlnXjy9r0Bh7c1RiTTOxFNBjK2Z2GvPUSWoIyBE=; b=I0ouDeew3d4S+h4jdIv0dZjcDG6dziokMIG19t1pr8iMrOJcdb27XpL0nFRrla2Tc8 za/NMA/vM8MLBEd2y0vz8/eSIXmfBvyRuUn9K4WbTSuU+yZFhArjfdsYZEzCq9bl06PL pwWx/x2/s+7I7JdfUrnuHqs49yOrY6F10nUgiazLQuV7DVFBvTiRfXRL+J1V7BVV0pRw GjVaflRW6IJ4VgNq/1sSogatkHPJ0519QqugtIWbAcsoNo+PVLNrus6fzfkyL+t5Tyzj uKRkLJXMm8gnSLPNEv8tAHHXCmtCcFUM2Yc7fMxC98m4Ywm1gZOJB1Ai0DXBwlyvr7+m 2zNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zk2aPlnXjy9r0Bh7c1RiTTOxFNBjK2Z2GvPUSWoIyBE=; b=PTYA6QhD3oxJWBClzKUU7tt9G6bIQx1Lnnt6MMKosylI+2G3RfC021bLAAVItFt5dq 0xLKiZJMkDu2N9JTD9u/izk+E7Y/aSbAmHS0zhM1zkj47L5LnDT+2an4k6b2MnV5Rrej GAP7+7m4vhkFImljunowj7Oy1RzIkn1V0//Y5hwKqSjeCdZBjbOCovoSo0lXa3+XeBU6 jloqeH8LJgv3zjg490yDupMaySxWqhWSNZIPWQKsdJDhe4wgs3dAilM4jF8E0NLAVe3R 4Z6pjviQ8c3xoYRDvT+UjEZMWjHLCSeouQrddgJByM/WysT3BZxZqQoGns6rIcX6bPwG OWwg== X-Gm-Message-State: AOAM531RuQNuOwHDO+yL1ZuIMTqITbuqYRZZNN40FUZLOAwL1p9NTlXz YhOCTRq0tLI2eJRSlHYdub0= X-Google-Smtp-Source: ABdhPJy6HuoYRdc3efJ0F8mWF45w2FO/Hi/GIWr/jtiILXEL/XXB5f9O254Yyg7XM2OyDKt3aelWyA== X-Received: by 2002:adf:c446:: with SMTP id a6mr3568893wrg.418.1613682317133; Thu, 18 Feb 2021 13:05:17 -0800 (PST) Received: from localhost.localdomain (2a01cb0008bd270040b01df6f3b9f578.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:40b0:1df6:f3b9:f578]) by smtp.gmail.com with ESMTPSA id m2sm8450878wml.34.2021.02.18.13.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 13:05:16 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH v3 2/2] drm/bridge: Introduce LT8912 DSI to HDMI bridge Date: Thu, 18 Feb 2021 22:05:04 +0100 Message-Id: <20210218210504.375752-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210218210504.375752-1-adrien.grassein@gmail.com> References: <20210218210504.375752-1-adrien.grassein@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 18 Feb 2021 21:55:23 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, narmstrong@baylibre.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, jonas@kwiboo.se, linux-kernel@vger.kernel.org, robert.foss@linaro.org, a.hajda@samsung.com, robh+dt@kernel.org, Laurent.pinchart@ideasonboard.com, Adrien Grassein Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Lontium Lt8912 is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein --- MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 14 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt8912.c | 760 ++++++++++++++++++++++++ 4 files changed, 776 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c diff --git a/MAINTAINERS b/MAINTAINERS index 5d1ed281cd41..58f8f45a7c86 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10462,6 +10462,7 @@ LONTIUM LT8912 MIPI TO HDMI BRIDGE M: Adrien Grassein S: Maintained F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml +F: drivers/gpu/drm/bridge/lontium-lt8912.c LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index e4110d6ca7b3..5b36d4b86e3c 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -48,6 +48,20 @@ config DRM_DISPLAY_CONNECTOR on ARM-based platforms. Saying Y here when this driver is not needed will not cause any issue. +config DRM_LONTIUM_LT8912 + tristate "Lontium LT8912 DSI/HDMI bridge" + depends on OF + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select REGMAP_I2C + help + Driver for Lontium LT8912 DSI to HDMI bridge + chip driver. + Please say Y if you have such hardware. + + Say M here if you want to support this hardware as a module. + The module will be named "lontium-lt8912". + config DRM_LONTIUM_LT9611 tristate "Lontium LT9611 DSI/HDMI bridge" select SND_SOC_HDMI_CODEC if SND_SOC diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 86e7acc76f8d..5a1b201cea1f 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o +obj-$(CONFIG_DRM_LONTIUM_LT8912) += lontium-lt8912.o obj-$(CONFIG_DRM_LONTIUM_LT9611) += lontium-lt9611.o obj-$(CONFIG_DRM_LONTIUM_LT9611UXC) += lontium-lt9611uxc.o obj-$(CONFIG_DRM_LVDS_CODEC) += lvds-codec.o diff --git a/drivers/gpu/drm/bridge/lontium-lt8912.c b/drivers/gpu/drm/bridge/lontium-lt8912.c new file mode 100644 index 000000000000..8bdb584d22ce --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912.c @@ -0,0 +1,760 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include