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: 248505 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1001528ilg; Fri, 28 Aug 2020 05:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxkQdUJoPi8mrkb/m+TzVdlm6LTAVZNeOJ8dtbPmrQwndWZyzdBUXt8F22RBxeB2zgJW7C X-Received: by 2002:a17:906:7c46:: with SMTP id g6mr1429474ejp.178.1598616366875; Fri, 28 Aug 2020 05:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598616366; cv=none; d=google.com; s=arc-20160816; b=GKHRSrKjmPEbXyUggO59ANxDWkpy5eziHFioM1wmOwmQvtkLMA/wmX+2Wvppj54uBo eNF2Q1TqoT8Uf0CqZCYIWaNWk57TEfsSnXGMbjCTx7pHSzLYupLY8/7DfR/OFjwlQFqn kZni8Oh8T03IAlsEdAGWUhnhWlsFf00Yj1jSFp7Bg+LV7biROMi5f4/D2fWvdy6esKfY cF87oQuKHC8Svzcmf21gH99az18t34mHbKXY6e53/3DWrQtXIgWTUlHsw8Yfa1fwp9G1 7qUBcS6aaNLgcA/HaC1B0DPb8mghHBYyAxwuuUMpeKzzE7CM4YqAXCjLKbLmJGInb74c YjVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Oolx21JNteVrfX+mXEwLYeFD1vdkJLb/rH7VH9rJ2ic=; b=cXtLDgRBIdGLz1JP5C72LHJYMm2YfK38+T1M2OTIJK6F/cmWcEhA1rz6YmRsJoqBBL LeosbLINhRQ6cyOcSssp0uMQCJDPTIVlWfGMUtiIiiK1yxmGiuQYXp+zlbVZ/WajlNaP VOzbhwGcDz36yj7oyxyalsCPTfaMR0lKA/aw4Fk/OvKfYgxfdGivp75p/4wvNtYNCPl+ ibKRaWRmjTcER565uAR8yRief4FRJbR652JdUCWZopnW30J94wlhitcIINEd3M+jlbRl RYlXPdauM3IW+bm1m/YmHCru8se8xjVbKA+IHKC81yKe3vYQDmVONL9LGP0BKaxxsdxj qu2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vD2vnOmK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si490264edq.178.2020.08.28.05.06.06; Fri, 28 Aug 2020 05:06:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vD2vnOmK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729123AbgH1MGD (ORCPT + 15 others); Fri, 28 Aug 2020 08:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729040AbgH1MEx (ORCPT ); Fri, 28 Aug 2020 08:04:53 -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 0DB8BC061264 for ; Fri, 28 Aug 2020 05:04:53 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id v12so567683lfo.13 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=GpebqKuQPiRycARgOPVx4MoYgB57o55HU4kYZY3zzylxsO1x4s7/Q9tb6sB8GHSs3z /J/nLcFtNRI0KiHqkdF4ON49kre8p3PrlHWthOrwYGcbVwGMEQyuSOFB3IjsxpK8S1rI niXYcnq5lCtZ0z8ejYaYO+KQAP5Ti34Bk7HQtYLNqgvzLJPx/bk5QUOhzUEHYmwPbYMO Pv96Zdd0uKOeJ2tBMb7Gln3uube2WXq69AOehuYY2u3xKWZiPblXDKdP3tBJ6DXtMTSb jsuYPeNjY2Eq4XrMmHkIv13LPFLDkOZnXKyLYXWyH+z8vNj/sghokX+fF4MC/KH5U2Xq kNbw== X-Gm-Message-State: AOAM530V4pq9b6XIbrcD0bVPO3Ly2CzNBLI1/FgodQrCA/y03YumstDq G0Kazct8auS+DVPZhUcxjtUkoQ== 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: 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 | 777 +++++++++++++++++++++ 3 files changed, 791 insertions(+) create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611uxc.c -- 2.28.0 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