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: 253268 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=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,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 C0F6EC433E2 for ; Fri, 28 Aug 2020 12:06:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 948F420872 for ; Fri, 28 Aug 2020 12:06:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vD2vnOmK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729171AbgH1MGF (ORCPT ); Fri, 28 Aug 2020 08:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729172AbgH1MEy (ORCPT ); Fri, 28 Aug 2020 08:04:54 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD35C06121B for ; Fri, 28 Aug 2020 05:04:53 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id x77so582079lfa.0 for ; Fri, 28 Aug 2020 05:04:53 -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=PegM7B8COuEQ5TZolDpaV2NGU87ehe9LX6RLNwhLsb3662qVv/cmOGzp6+h5NwbXtF Zx9Mmb5JBxJO8Zylu/uu4wTkCVpVCw5mqVoALYcZt1CEk+lOYwPDOUQapfGy6hsprTax GHNnU5bROvx4TIQ9lIPFsGbYz6Pt9C1DrMYHBod3mLXAJbfCjFuxbeCnm682iONucQ/J kbDKg/RontBw1eNqHhT7VnPmjIVD/lj/MBo0DMiygxjIdqocaf6rUU5xm5zNt4H6zCRr 6GU7NgXFrDzo46crmG5cfl3EKTvsVWyNtXEy/ScZ2QcMty3GIWLYxp0J/vEiyMkCaHFM Wm0w== X-Gm-Message-State: AOAM5309YlIp8nIVWNVYYnorarSzhkt/rqCuUUU1ole/rP7upyLpMRZ6 DqHhDCBNJAGeyC5RLPPvvkLP9HdeTK/S2Q== 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 Cc: linux-arm-msm@vger.kernel.org, Rob Herring , Daniel Vetter , David Airlie , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Vinod Koul 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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