From patchwork Sun Feb 14 23:29: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: 12087801 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,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 BFEA7C433E0 for ; Mon, 15 Feb 2021 08:22:08 +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 5A37C64E00 for ; Mon, 15 Feb 2021 08:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A37C64E00 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 7EB2A89E43; Mon, 15 Feb 2021 08:22:02 +0000 (UTC) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by gabe.freedesktop.org (Postfix) with ESMTPS id 862286E141 for ; Sun, 14 Feb 2021 23:29:40 +0000 (UTC) Received: by mail-wm1-x331.google.com with SMTP id w4so4594747wmi.4 for ; Sun, 14 Feb 2021 15:29:40 -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=HLzZbG/n6LRdmbqEsjbdO0ubFYXmV0nnc9C1Av36nuw=; b=o2xM9MKB1hE/KVyKT2bjBBUEG/cvJlhfcBfpZmGmueqXE5t65oexFYxVkXE+Tiin4f XY/ddiviIwWwl+nKBc4YfcU9TgK1Lqej5qLAWn3DNIL0tvwuZqKWt8BVmWs3NpP4YKL4 BCdCdbRD+si1F2n3re5ZUfsEBVffR3WnH3r1/si3vuk5qFnrUDQTHKB1Z4VWKeXqNBCc 7Umo7wUsFs5PXaALTtEuW0mLEPoA4qvchRV4sN8cprRrfUgNmCA0OkIqnyug+Y3H2inC NvX+uveJ9DE/TSTVRdKs9aXYlDvyRySjvGlIdRq17baMg9RI527zzxHM+DiZZmRlUhau NYig== 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=HLzZbG/n6LRdmbqEsjbdO0ubFYXmV0nnc9C1Av36nuw=; b=RTh6UCS2pUDQX2/SZHQ0mWgiMV8bxylfPvtqUb/NGKxVrMNTbbvi5MI+0ehyCNJp9G 5FVPERMycLCCM7iYbsuJy4SPAtMiNAsb6/bBq7Wa9KvXlkyjw4BrqamYp+k1WipND6iE ojQ5ht2dGEugzKcCxeyMOFT+l5L7zY33y+GNS4LdrewYicOYxNWMJiVFqQQ/bJRSuW8o 1IXUxoLIYUV1w3IT2Wbm3MpP9JmeS1NgNMskz+AUmmsYZtfvbMbjVLuyVLgBUlSQBWtZ iARfvAxVVcC1rBgSqKb/IwDBPaBpOHBy3R/PEs03/Sh8g0/zUCrHyL4tytJi/pQ72bb5 c7SA== X-Gm-Message-State: AOAM5308Mw/hMWT9e2gpGT2Y1PR0cqqOHBqI++w1sBifISNbjyusyxRg S01bn5prK0D3LURV3k4MjFA= X-Google-Smtp-Source: ABdhPJy5T4gn+1unjIicofP1RFwKiIuIfzm56yNnTbAhxUrW0/NBwPkHBSUEFBcHCZpKC9iB3Ib/Aw== X-Received: by 2002:a1c:220a:: with SMTP id i10mr11548905wmi.102.1613345379189; Sun, 14 Feb 2021 15:29:39 -0800 (PST) Received: from adgra-XPS-15-9570.home (2a01cb0008bd2700341b9a8437bdab47.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:341b:9a84:37bd:ab47]) by smtp.gmail.com with ESMTPSA id l1sm19522478wmq.17.2021.02.14.15.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 15:29:38 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH v2 2/2] drm/bridge: Introduce LT8912 DSI to HDMI bridge Date: Mon, 15 Feb 2021 00:29:04 +0100 Message-Id: <20210214232904.1142706-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210214232904.1142706-1-adrien.grassein@gmail.com> References: <20210214232904.1142706-1-adrien.grassein@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 15 Feb 2021 08:22:01 +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 | 719 ++++++++++++++++++++++++ 4 files changed, 735 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912.c diff --git a/MAINTAINERS b/MAINTAINERS index f010b485aa7c..8b3d64b689c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10444,6 +10444,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..d713d3365c3e --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912.c @@ -0,0 +1,719 @@ +// 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