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: 248589 Delivered-To: patch@linaro.org Received: by 2002:a17:906:6447:0:0:0:0 with SMTP id l7csp1104290ejn; Fri, 28 Aug 2020 08:49:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6N0GWLlJoRDebTeLsaDsKkm67pFufVTatZoxIPNSUuG3PUW/hkls8uN7vubvzto2XTtoY X-Received: by 2002:a17:906:768c:: with SMTP id o12mr2408303ejm.269.1598629779175; Fri, 28 Aug 2020 08:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598629779; cv=none; d=google.com; s=arc-20160816; b=I4uZqpn4Sf+ZJfVa/TL8uhWsLiljvQi6RWHQV62yHoga2K6Sxx5CRjla+L941mG55M ouv6A98BkIw/k4iDVAIJfz/36s8cMBBoajrw5DykC1bF3zBiNvoZX0X60zlVKoSaTXp8 e7Rs42oNIeMhfeDDxVwGb6OrAmFtVCAyV7uXNPe3GKSudQpoGBWv+cOzjloZ+Ze9Gc1W 5bX+cwhIrApGJNizbEVwBO0JWjej/fn8G1yvGqGFpz+0gxs/Fh4lmXgiWtw32oTcT1oC M9RA9PMpyz3UBLfIh/Lt27WElplRNQ3KWfOkxXLKRWj6ik5iXcTvunE9vm3No7UQ2XD0 c24g== 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=jiQc6zvXqgVhlCLDJncG5pRO4+at1Ds7tUMNn9lLvNs=; b=wbmM4mi+FFZ46fgQZAfExZP0aA9x9g8RnpcRgHSojfFhK/9ZTJhdqGKUz+lA3UkX3P u/vxAokh/lnMtq+sBqU3obGrM7v5ZVLKXM9PD3fzX1jWxpfrtH7F1niw16pVBpxJr+Qp 91HngoDxPjlIbcpK0qhc8GGuUoKfRn4QOqzYHa7JOMHAagZAZ36WkB73TE5kCN3sGaDm hcj94dgHKk5FTQ2mAuSWvrphMLjPVk41JJt8fgM5fLBRLHKR/3KSTYqrYIcn6U7fTmLK ssA10QVii8F0sRU4vE4kg8Ks0Ymd3REIZkZF13P7hkDWPpU0tvDB4GcQrjDAKyvSjgXC WVqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fV3BdhMY; 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 d2si929283ejm.717.2020.08.28.08.49.38; Fri, 28 Aug 2020 08:49:39 -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=fV3BdhMY; 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 S1728039AbgH1Ptc (ORCPT + 15 others); 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-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 -- 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..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