From patchwork Sun Jan 24 15:08:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12043077 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 2FD48C433DB for ; Mon, 25 Jan 2021 08:45:28 +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 AFBDD22D03 for ; Mon, 25 Jan 2021 08:45:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFBDD22D03 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 96FBD89BBD; Mon, 25 Jan 2021 08:45:26 +0000 (UTC) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5BEA089D7B for ; Sun, 24 Jan 2021 15:08:47 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id y187so8553079wmd.3 for ; Sun, 24 Jan 2021 07:08:47 -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=Ag6006OGpj/LnO01jq+OCQKPnWe8b0yCa7D0tLaFvmM=; b=TOCbp+BDx6RM11NVVijlGdB35BiNyQxSxKuDKWkhO4WEpH3e+pxel1Z0G43APR36c5 FXI5cWN/NA2C6IVh7v2ZvfVhmZ61uRMyH/GfACuVvHYezD7CyyDQ+AygdmyFCY97VKHj C6obY5CUJ+TcZzpJq1LqpBFr+CdWSj9KdVZ7id2Jp7tiTghHREuuAARBrjIl2S2nJoWn GI0OVLsAl2+9mIQoBy2VmJawA/EDIZ3+mZzbYWvVMQAvGKkxglRhJyC85WFtkmI7zqdm qu/rx45j3AHNxRBb16aZsTLfQIaET4uwba7iqFTsrT5OUVT+pk2MGkWg6Lx1Z+M/xyos 7p1g== 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=Ag6006OGpj/LnO01jq+OCQKPnWe8b0yCa7D0tLaFvmM=; b=qYutMTAY1SqJ1ZlFPlOq4bYMbrw4iwAYbYheWGJqsOeBJ92xXGKEVTy1YFEGShBLOm MSKS5VbaKR/gFuU1vhyy46KJXtl8tnQfjIH1KEKIHpt/7UHzkpN9OvQzokNtHAfU+2Zl r+RNq3HszyUrcZ3jIrc1jEpHd3a/qwBbDkOQzBzNGo8WxmcjJN15j2wv6atdjeBfA5Cj tLgf5FVrFLEPtSTR6gfRqW78hGhgZFx5oe03bVmHQxsNmZFLWY4gAPX7W5fA0CS4m/s+ jpn9x/myjJxdF5tt3BeF8+frdagMeULVvV5ACsObpWurxtb5EL00zrAtxmxGfIniVwS2 fuOA== X-Gm-Message-State: AOAM530atHhEyuvE4OBuGEiYqGxbzmX/UemK+CE2S4/y4BaHFnNLz+93 HPaCs3IX0ByjRgR7XhYN+9g= X-Google-Smtp-Source: ABdhPJzfpNHEnuZxE5BgO0IyKRgf4NPq8SLJLxIo76XFtcaIsh3V8uoLikb9aNFH7f9QrXt1pMxxzQ== X-Received: by 2002:a1c:8095:: with SMTP id b143mr478249wmd.71.1611500926117; Sun, 24 Jan 2021 07:08:46 -0800 (PST) Received: from adgra-XPS-15-9570.home (2a01cb0008bd2700e58e9e649f9020b2.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:e58e:9e64:9f90:20b2]) by smtp.gmail.com with ESMTPSA id m18sm244608wrx.17.2021.01.24.07.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 07:08:45 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH 1/2] dt-bindings: display: bridge: Add documentation for LT8912 Date: Sun, 24 Jan 2021 16:08:33 +0100 Message-Id: <20210124150835.1522899-2-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210124150835.1522899-1-adrien.grassein@gmail.com> References: <20210124150835.1522899-1-adrien.grassein@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 25 Jan 2021 08:45:26 +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, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.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 --- .../display/bridge/lontium,lt8912.yaml | 92 +++++++++++++++++++ MAINTAINERS | 5 + 2 files changed, 97 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..ed1a6ddaab2f --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt8912.yaml @@ -0,0 +1,92 @@ +# 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 + + ddc-i2c-bus: + maxItems: 1 + description: i2c bus used to read EDID of the connected display. + + dsi-lanes: + maxItems: 1 + description: dsi lanes count interconnected with lt8912. + + 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-1 for MIPI input + + required: + - port@0 + +required: + - compatible + - ddc-i2c-bus + - dsi-lanes + - 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>; + dsi-lanes = <4>; + ddc-i2c-bus = <&ddc_i2c_bus>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + hdmi_out_in: endpoint { + remote-endpoint = <&mipi_dsi_out>; + }; + }; + }; + }; + }; + + ddc_i2c_bus: i2c5 { + #address-cells = <1>; + #size-cells = <0>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 5aa18cbfb883..01e7e356bfac 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10472,6 +10472,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 Sun Jan 24 15:08:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12043085 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 D8299C433E6 for ; Mon, 25 Jan 2021 08:45:38 +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 7F7CD22D03 for ; Mon, 25 Jan 2021 08:45:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F7CD22D03 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 9752389FAC; Mon, 25 Jan 2021 08:45:33 +0000 (UTC) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1DCA389D7B for ; Sun, 24 Jan 2021 15:08:49 +0000 (UTC) Received: by mail-wr1-x42a.google.com with SMTP id d16so9067218wro.11 for ; Sun, 24 Jan 2021 07:08:49 -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=xkUG7S5Sw0xDi+Z96aUr443gD3FEW1KzhOw9XyD9WoA=; b=ggliS7Iz2RvWLJrhi85sUCjG1edaN9Y3RBETPEYLEmSt8gd6ObGmT/ihp3rFru4qJw Ph0MdKzGnuigIVnkFAvMWgZovEtwPM21CZ6Pa/hCkbpq9Fv6UdIzWGdg5ExbFtyfm8IN XOXOWq9aC5FuPFRTQCDrRHYOStBZbXFuNhS6HF6eLHMs2dtv6o5muPPXLinGp33CmsAF o3hZ/hXcgpWkLWNE6lJ1pPcJEraa89wX06VP7vHCwLltHfBUuIKBRhMGmH2weAlhKGkI c7cscp+3Xc2m9pk0BatndU7ggYe4YLBM6hOVuroBqsjciialA9D5tE6L0ZIfBLn8IA22 vIEw== 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=xkUG7S5Sw0xDi+Z96aUr443gD3FEW1KzhOw9XyD9WoA=; b=DGL+M5bnFuK5iamBFOYiRsIwa8FkjCGb6em5p32Dl3WU3lKR4eaWvrExdJpkZr7bkN fJ+ot0lhVQpIG6EesE++mcGI7qoim2y9FgJF53KHWwDT9xwM3Te5F84pC1QlVWJ/LHby EIA/nK573vFQOWMcvakstNlRAqiK6v84sGwf+qNtECu4lUOBskVHQZo8Ecxqz3Ja9wSz poB2HSiYfbD3GnUqxgbvFIn1/tuQ52y7dChktPPp8gnExXSxxOUtWKkpAQKK64z5WhOT GVZ42cQ7b1wX2MOTzg+5bIt3icHqqOE5pCcA8Ez8ZLYEpqDyMuIT9KxoSE6QD6P+PeHA aFBw== X-Gm-Message-State: AOAM530kVTKxwhOtuOz1onCHpwdEg23brHldtyspHZVlB0HH0vaN3vzS AssFL4UZ31USQ/be/oQdlSQ= X-Google-Smtp-Source: ABdhPJwPkd2EjtReMFA5HeZf2FxAGLzE/pMCeSJIDYKpMaJOdHyHFryJShGYTrdPYnzl5zD9NTmGkg== X-Received: by 2002:adf:c64f:: with SMTP id u15mr3002958wrg.270.1611500927709; Sun, 24 Jan 2021 07:08:47 -0800 (PST) Received: from adgra-XPS-15-9570.home (2a01cb0008bd2700e58e9e649f9020b2.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:e58e:9e64:9f90:20b2]) by smtp.gmail.com with ESMTPSA id m18sm244608wrx.17.2021.01.24.07.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jan 2021 07:08:47 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH 2/2] drm/bridge: Introduce LT8912 DSI to HDMI bridge Date: Sun, 24 Jan 2021 16:08:35 +0100 Message-Id: <20210124150835.1522899-4-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210124150835.1522899-1-adrien.grassein@gmail.com> References: <20210124150835.1522899-1-adrien.grassein@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 25 Jan 2021 08:45:26 +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, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.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 | 749 ++++++++++++++++++++++++ 4 files changed, 765 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c diff --git a/MAINTAINERS b/MAINTAINERS index 01e7e356bfac..65fb19382e40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10476,6 +10476,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..dd2ac92a5730 --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912.c @@ -0,0 +1,749 @@ +// 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