From patchwork Fri Mar 26 12:19:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12166481 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=ham 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 F3F9CC433E0 for ; Fri, 26 Mar 2021 12:20:12 +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 9D3AE61948 for ; Fri, 26 Mar 2021 12:20:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D3AE61948 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 356096E1C0; Fri, 26 Mar 2021 12:20:09 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 017F66E1CF for ; Fri, 26 Mar 2021 12:20:03 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id c8so5422459wrq.11 for ; Fri, 26 Mar 2021 05:20:03 -0700 (PDT) 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=2MGEMeZQ1Wf/5VT4KOq9r5jQD5BO1/9uwWLAhZnJD4I=; b=g7IwsOUE632Qod8Ghdyrlvr/lFMzhjp9uDiblYOc25TVNIz2VveiDeBIYTwwjDZSYd OS/Uo4WDtP5OwJMCz6cEeAwngGr+AleAoRvvwyyiqpxuaG4eaXtZLtsius9fK72jd2/T xErwpNd6PJHWmBvjxUbNFg1H2wQ4+/K+7KUDUczt0leB7UhLzg2gcXmbbkBmQ7V95W+7 v3A4rhi74D/eMcNf7KPzMvHc81ZG7Votp6+5Up1m/G4ZnTxDICmP9mqNF0T0Gd8+Z9K8 x7I6R1a08sEpDk8BO3aG/+/Ko24+obDkYR9z7CV6bAZnBfWeyBL4mrfj1vLZd6JtJarC SdhA== 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=2MGEMeZQ1Wf/5VT4KOq9r5jQD5BO1/9uwWLAhZnJD4I=; b=lhxeQ7dLljyeGyiHlTas8POW4zV1DjP9fgXLUcvPIDYp2FEtKr4ozofTrtjNl7oagk d9q++sFOrYENV2GxQp7IJt04HahE73/0SIWH4YsA+J4KDLOuMUvw6PiFPrheRKSGQFVb JTXp/0DXXbxWiTd7j5LKevzVxWLgR3Gh6SJ87H0KIZbrSsjCKX5u8NZ4Nm+C7in2izOf kLrdWZ8muSdnmAFs0mTcC0E9EakMb8OsfqZoFvwOwfh710cvGC82UQQ2PVWvoKkbHeXk wPn1YLBFd+eharG9XS4eqdXSEVQ6QhZoNAU+tzlxWqyqGaz0KXejdnMMqsKOWnyz4Pb/ +x3g== X-Gm-Message-State: AOAM532AsAR1fvI4hiKYzYDuDnLxD1GxwEA2Si0KoWXODNpHRQTm/Iid ZtxA6W0NZrxKl08rh3pCpJ0= X-Google-Smtp-Source: ABdhPJy+8eJ6uiqME3CcKQ58RkBKqXNzeM7Tl2SnrLEcL/qy9Vi5dEexhPwXKxHvJKPLVh//QwxIlQ== X-Received: by 2002:a05:6000:223:: with SMTP id l3mr14213150wrz.5.1616761202508; Fri, 26 Mar 2021 05:20:02 -0700 (PDT) Received: from localhost.localdomain (2a01cb0008bd2700f1419764c24345e5.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:f141:9764:c243:45e5]) by smtp.gmail.com with ESMTPSA id l6sm11150102wrt.56.2021.03.26.05.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 05:20:02 -0700 (PDT) From: Adrien Grassein To: Subject: [PATCH v9 2/2] drm/bridge: Introduce LT8912B DSI to HDMI bridge Date: Fri, 26 Mar 2021 13:19:55 +0100 Message-Id: <20210326121955.1266230-3-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326121955.1266230-1-adrien.grassein@gmail.com> References: <20210326121955.1266230-1-adrien.grassein@gmail.com> MIME-Version: 1.0 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, kernel test robot , 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 LT8912B is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reported-by: kernel test robot Reviewed-by: Robert Foss --- MAINTAINERS | 1 + drivers/gpu/drm/bridge/Kconfig | 14 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt8912b.c | 765 +++++++++++++++++++++++ 4 files changed, 781 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt8912b.c diff --git a/MAINTAINERS b/MAINTAINERS index 0dd60d51c001..a4e03d19f579 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10552,6 +10552,7 @@ LONTIUM LT8912B MIPI TO HDMI BRIDGE M: Adrien Grassein S: Maintained F: Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml +F: drivers/gpu/drm/bridge/lontium-lt8912b.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 330ee70ed746..dba62f92d051 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -61,6 +61,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_LT8912B + tristate "Lontium LT8912B DSI/HDMI bridge" + depends on OF + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select REGMAP_I2C + help + Driver for Lontium LT8912B 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-lt8912b". + 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 3eb84b638988..5c61b50c1663 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o obj-$(CONFIG_DRM_CHIPONE_ICN6211) += chipone-icn6211.o obj-$(CONFIG_DRM_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.o +obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.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-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c new file mode 100644 index 000000000000..61491615bad0 --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c @@ -0,0 +1,765 @@ +// 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