From patchwork Fri Aug 28 12:04:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11744269 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70069161F for ; Sat, 29 Aug 2020 09:21:57 +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 4E55220825 for ; Sat, 29 Aug 2020 09:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vD2vnOmK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E55220825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 3C48D6EC10; Sat, 29 Aug 2020 09:21:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 045CC6E49F for ; Fri, 28 Aug 2020 12:04:53 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id d2so585829lfj.1 for ; Fri, 28 Aug 2020 05:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oolx21JNteVrfX+mXEwLYeFD1vdkJLb/rH7VH9rJ2ic=; b=vD2vnOmKPtOcDYFfmfMJR4YTuHJZAaYPPbaYEP75t08AcRLKkxHM6b3bKDZv4SswNv j74wdRYjIMaZk/REJG917GZCHVnV/mTjYWm7mG92/f8TfO3+OE5+9qML8EfJkGR2xyKv dkigy3IbgaMkTZ8OOztnuyAxeNjq2ooaMGMXnE99/qA0ki55EUeoMJy5tL5yknRwKq1r EE/pNMTfUM6K+vcWbyQv+XDI0hoy1xpQI2pg++6sr64aiSgyiYNHuks9xNQQaaKaD3bn D2W9kyCmcrXFHpzaiP4j9Oz9NJh6nhkuvVuenP4azGgcGpv/OBwEr61Fsm+bDBJn5uVF QWaQ== 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=Oolx21JNteVrfX+mXEwLYeFD1vdkJLb/rH7VH9rJ2ic=; b=a7Lx6pMN1vZa4STkIGyIsIOdaULH1PCzPhcLCVDqE9xfWqjWFTqkeWA4xYKgpF83xf uHnrJ+jyFT+kGvZxB/qrukyCsHU+eQIHl/Kifg0oUBrcE96/yt8rpA3VGmL4aWxpg5Pp NgGqYkKBT/1VQUjC204GZEzuTc+Xr1uI9EknvQERqx/j5MuL+wzUchAYtAErDIbTIT0D LizryvDhw3yiNWxi0/cQ9sUqo3B3y0G3EpPl8ZlrDnxtQQBS92xeMYGkyNjj5Uqww7zL bNv9OxxNA3qmb606g+ciyc/1nw+J7215eflPAubTtuLe0kpp5DZ2TXKdxCVnk1FgNAMQ V6iA== X-Gm-Message-State: AOAM533F2BlUmjfD0AxRyby88dMeeS5i4Ef47nMqLLmScvYO9krDO5IE 5Psp8xVtBClGYtkvFHJyGAGW/g== X-Google-Smtp-Source: ABdhPJxyJtbI0vhP3fS2IWHoATAMmJpNSLG002m73VqawpYCbK4nydwGTljiel8AUodkCn+fREB10g== X-Received: by 2002:ac2:546f:: with SMTP id e15mr660408lfn.133.1598616291128; Fri, 28 Aug 2020 05:04:51 -0700 (PDT) Received: from eriador.lan ([188.162.64.62]) by smtp.gmail.com with ESMTPSA id c4sm163340ljk.70.2020.08.28.05.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 05:04:50 -0700 (PDT) From: Dmitry Baryshkov To: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v1 2/2] drm: bridge: add support for lontium LT9611UXC bridge Date: Fri, 28 Aug 2020 15:04:31 +0300 Message-Id: <20200828120431.1636402-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200828120431.1636402-1-dmitry.baryshkov@linaro.org> References: <20200828120431.1636402-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 Aug 2020 09:21:18 +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: Jernej Skrabec , Neil Armstrong , David Airlie , linux-arm-msm@vger.kernel.org, Jonas Karlman , Andrzej Hajda , Vinod Koul , Rob Herring , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add support for Lontium LT9611UXC HDMI bridge. Lontium LT9611UXC is a DSI to HDMI bridge which supports two DSI ports and I2S port as an input and HDMI port as output. Despite name being similar to LT9611, these devices are different enough to warrant separate driver. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/Kconfig | 13 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 777 +++++++++++++++++++++ 3 files changed, 791 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611uxc.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 3e11af4e9f63..8343fb054652 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -61,6 +61,19 @@ config DRM_LONTIUM_LT9611 HDMI signals Please say Y if you have such hardware. +config DRM_LONTIUM_LT9611UXC + tristate "Lontium LT9611UXC DSI/HDMI bridge" + select SND_SOC_HDMI_CODEC if SND_SOC + depends on OF + select DRM_PANEL_BRIDGE + select DRM_KMS_HELPER + select REGMAP_I2C + help + Driver for Lontium LT9611UXC DSI to HDMI bridge + chip driver that converts dual DSI and I2S to + HDMI signals + Please say Y if you have such hardware. + config DRM_LVDS_CODEC tristate "Transparent LVDS encoders and decoders support" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index c589a6a7cbe1..306850a5899b 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_CHRONTEL_CH7033) += chrontel-ch7033.o obj-$(CONFIG_DRM_DISPLAY_CONNECTOR) += display-connector.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 obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c new file mode 100644 index 000000000000..fc363b65590d --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -0,0 +1,777 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2019-2020. Linaro Limited. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include