From patchwork Fri Aug 28 15:49:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11743251 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 D204513A4 for ; Fri, 28 Aug 2020 15:49:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B432208D5 for ; Fri, 28 Aug 2020 15:49:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fV3BdhMY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbgH1Ptc (ORCPT ); Fri, 28 Aug 2020 11:49:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725894AbgH1PtU (ORCPT ); Fri, 28 Aug 2020 11:49:20 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A245C06121B for ; Fri, 28 Aug 2020 08:49:19 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id e11so1829033ljn.6 for ; Fri, 28 Aug 2020 08:49:19 -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=jiQc6zvXqgVhlCLDJncG5pRO4+at1Ds7tUMNn9lLvNs=; b=fV3BdhMYs0lF88jK+AZ9TLj4c/j8HfXoPCvbx2qb1W+7CVNrvElzRv9j0lNfbBjhbK k1xwAi+8lvNByEeuT7x66WmvvLS9QaYq0pWlinQZqvq/q/Yb+xXbZRZNu6nTgB0mU/MK V4e6ElxPpUHfqu2NyGgENo5lPl6uEKfZHEzGQbR6xOUNudkU4CffBFJC777I4B9IeMEb 1gl/VcSX8aVcj+7g7DOFaZa0DeAYLLR6fDhHgSDyWwhBPms+DpWMmBlW9OtHanUROkut hZCwqxMim9Dr+WcapTBDwZXfqmcKJYmHTukhmm4mqZPm9ZTcxkwBvX6RpQx8Eo8NQS4X 5RTw== 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=jiQc6zvXqgVhlCLDJncG5pRO4+at1Ds7tUMNn9lLvNs=; b=QQejv4RoykVn89ZAC1zM1WE04BaH+DmzULjz3YN4CaYV35G8hB5yI/OoKtMjjQUJ/O fWOTZgaCVvM3aKM9wVybeomxYpQH2TK/6Cz4SvgCSwoxd5qQMevdhTueioaDl+IL+8LC b6VKA9GW+JY0i/LITa0Rna+h0n/a1pNHXxYQUg9cIUFr4uplpUrPmdjmm0zfaxScso1G mhOBGiednSL4UEJ0upPLPDc8QGYdJxvQY1ycZNSfjrq2xDuJXAXhQOMWwS9LiqI4ybbY kv0JV/8aodu2y2V/SBaG8oo23vzhX9J+gGqy5lyAih/Nf4E0wb2U2HizV5ieY2eaeX7+ M+QQ== X-Gm-Message-State: AOAM533CyORahItA9YgiN3DD15vByOweIM5bvc3I2uN6+kGC+enM0A4q RT+z1BIQFaD6bPMp/+ZInLlKig== X-Google-Smtp-Source: ABdhPJzUfSc3oxmmLjCirBHmRvw75/rAsk//cTND9NkcJsOQ9d7YbM4MbknkaYpm65MOdaX7wYYx5g== X-Received: by 2002:a2e:99cc:: with SMTP id l12mr1091744ljj.235.1598629757737; Fri, 28 Aug 2020 08:49:17 -0700 (PDT) Received: from eriador.lan ([188.162.64.62]) by smtp.gmail.com with ESMTPSA id r16sm270215ljd.71.2020.08.28.08.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 08:49:17 -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 , Sam Ravnborg Subject: [PATCH v2 2/3] drm: bridge: add support for lontium LT9611UXC bridge Date: Fri, 28 Aug 2020 18:49:05 +0300 Message-Id: <20200828154906.1662611-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200828154906.1662611-1-dmitry.baryshkov@linaro.org> References: <20200828154906.1662611-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 | 774 +++++++++++++++++++++ 3 files changed, 788 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..77c5aa5c6ad7 --- /dev/null +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -0,0 +1,774 @@ +// 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