From patchwork Fri Aug 28 15:49:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11743249 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 7D3C913A4 for ; Fri, 28 Aug 2020 15:49:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65A00208C9 for ; Fri, 28 Aug 2020 15:49:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ObOhJQlc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728267AbgH1Pt1 (ORCPT ); Fri, 28 Aug 2020 11:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728204AbgH1PtR (ORCPT ); Fri, 28 Aug 2020 11:49:17 -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 13B98C061232 for ; Fri, 28 Aug 2020 08:49:17 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id e11so1828879ljn.6 for ; Fri, 28 Aug 2020 08:49:16 -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=RzO/u82bhYkbGzYXqTgJ4HBSdRoIsJl4r3uZiLJLve4=; b=ObOhJQlcC2wrUZvz/Sa5WdH6CBtF1FirWagTSTjFA478ShCAfENPUBhWqBwSJsc7ph IBfCh4/UZVho2Zy0Z3a1Ww1HT3KpaWJU3MEY4WqznZRbdzfWbICAeWy+KNWiHrRHPx1l YBjp6QEYudGlvTQA9AibpmhCWGp4MqDic+eza712jiI5N1uvoL7ailsyn3MzRDNP7M8i SqxIJmTrT2GFx/o612QaG180NBIlYD9O1g7C/5+1gOwkIFi12ZHsYnmPQRB3aMHbEYcf MoGwDAmqwtpRS0kMdgka8hW2RReAgMVkokjZH3spi6HxzxoQPdQHJd+Nqgeg7dvyQhQw TEyg== 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=RzO/u82bhYkbGzYXqTgJ4HBSdRoIsJl4r3uZiLJLve4=; b=kQ02EKSnlpqf69vuRMqr4/JeqynEBu/jdOtQAvXNKUFJt1f937kHgwoWLAaTz7Hat6 CYZnUf1yUcL6kM4nerK892/FqjI2Yv8CgWyFcb5A+rx3qGS/2aDtUzfJbkc8Upg2tUtZ DcleDrXxThXSY76lv8cMqbDDuztiU9a8TI9Gl5a48AU+7nYURwvy3r3rTYz2TRqU0+JB oRR2vxV0A1JEL4QHz3fSyqlptUb6NQb/77gfFXHFrlW4SEgzgW2lnCdRwEWE1Xn2k6RB eQYiO2sx9JpUV2eDivo5r5HtwljmcGkbQSqh9BW6PgK3+YEDouHnglg/vSj+C9tn5VQC 1eBQ== X-Gm-Message-State: AOAM531tYDbWAp8LYNqi/u/LbUiH35uz5ih7MouOmQ8lvOWNu4hLNScE rjJ8OCSV3MAdg4CXZqt8Prx27Z0gnEEwEw== X-Google-Smtp-Source: ABdhPJxzFZT3xAeu/O5lodHhBa/sAIGF7iAxnNo9eQnh4WtgUBokeiPOTTMFNBe7D17Jmxr/83YieA== X-Received: by 2002:a2e:910d:: with SMTP id m13mr1266060ljg.240.1598629755378; Fri, 28 Aug 2020 08:49:15 -0700 (PDT) Received: from eriador.lan ([188.162.64.62]) by smtp.gmail.com with ESMTPSA id r16sm270215ljd.71.2020.08.28.08.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 08:49:14 -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 1/3] dt-bindings: display: bridge: Add documentation for LT9611UXC Date: Fri, 28 Aug 2020 18:49:04 +0300 Message-Id: <20200828154906.1662611-2-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 Lontium LT9611UXC is a DSI to HDMI bridge which supports 2 DSI ports and I2S port as input and one HDMI port as output. The LT9611UXC chip is handled by a separate driver, but the bindings used are fully compatible with the LT9611 chip, so let's reuse the lt9611.yaml schema. Signed-off-by: Dmitry Baryshkov Acked-by: Vinod Koul Acked-by: Sam Ravnborg --- .../devicetree/bindings/display/bridge/lontium,lt9611.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml b/Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml index d60208359234..7a1c89b995e2 100644 --- a/Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml +++ b/Documentation/devicetree/bindings/display/bridge/lontium,lt9611.yaml @@ -4,18 +4,19 @@ $id: http://devicetree.org/schemas/display/bridge/lontium,lt9611.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Lontium LT9611 2 Port MIPI to HDMI Bridge +title: Lontium LT9611(UXC) 2 Port MIPI to HDMI Bridge maintainers: - Vinod Koul description: | - The LT9611 is a bridge device which converts DSI to HDMI + The LT9611 and LT9611UXC are bridge devices which convert DSI to HDMI properties: compatible: enum: - lontium,lt9611 + - lontium,lt9611uxc reg: maxItems: 1 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