From patchwork Fri Jan 24 10:55:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 182942 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp440478ile; Fri, 24 Jan 2020 02:55:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyIqWe1op+bCqG2rqegOyiw5iKeq24RP7dF9lTkKShIZ4rntN8aZg6mRw0m17TRj58zEmgx X-Received: by 2002:a17:902:502:: with SMTP id 2mr2925967plf.151.1579863321781; Fri, 24 Jan 2020 02:55:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579863321; cv=none; d=google.com; s=arc-20160816; b=Z9bx+hQlP5PxpcBS6388C2rpJwFMoyJoxxKFq0MfRTrgVXJG+RcXVXak4YjnczN4el ghUTuCA1MjHW7Lw5aB1G8+TwmSuc2nnTtkdZ/Lz86KNGf55PNazpb/SWblW/8nHdJdYi gfUF0JCH9Z0RsRbsAQFggXxKBBZbZt+NvbmU2UmN4mYnF2sgLKRNoImaHH1LE0cyfMtm D+V1fF5Rlv/+pnc5nM11S7BW/5/pJzeZ3XsVpI/WBXNFirMqwz+VFpRZwzw9U31ryrhs Ig82tdu9t80Q+5z0wsZx7yvslfx40qNlhmlnx0w9elVirFORR3yaXyVfpShucGba68K1 qVQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=U14hFX0zSmOpzkfNXYTgj6AA4rntZovnWHPat6klAGM=; b=C0zEiDcIdJb2zXDOAGVa4QDQi5EzyurAHi3NRrLQcPOEh72+5NnuECZy8zVM5f12UO Eb4M/lXJxSEsYLMY7FVgkqGk8m1gVty8uPF3nk1qjzCFEh0ACFi4hjjWcFH4UCy8g96i 9KpGutuNCkR8zlpKhQmsKe8bwFMnFkrXhnoBmn17bMKZHHM+9lMz6x4LcWHp4SToZany iq3pWnCWEaairIy9tVzdRuuFkUX9dHSokcZxrzNo8Pp0zFbLonJ4+wrOw1iVlm4iw7Ce uCiwtts5PHgnUG/weJlOb2PQ0yb9Wj6zMGpQSffPzSlSMeKc2etARxwWyWECaSRhC5ih Fy3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=IH8OTlYh; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id h9si4055617pfn.227.2020.01.24.02.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2020 02:55:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=IH8OTlYh; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA20C6E312; Fri, 24 Jan 2020 10:55:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15E7A6E312 for ; Fri, 24 Jan 2020 10:55:13 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 00OAt4uL071832; Fri, 24 Jan 2020 04:55:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1579863304; bh=CRHeCMGXlxNYbsG4X/H/yIktIZk9I7gBu6Z0t0NnPh8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IH8OTlYh1CO4HurAaWhhsoNd6dOfZayPiEKM4yq47da931hOdVfpgNsoVgcH/zLfT 9ejVrwnUDUPHsA8Uu8bokWltzd/V4PRnBOjdIrzv2VGZDtw6Ta6yGACots3CcRB8h7 N0Fh0yi0dBRXKI7lwTU9Mck3hoCHK0U0I7TEaKrM= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00OAt4Og024196; Fri, 24 Jan 2020 04:55:04 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 24 Jan 2020 04:55:03 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 24 Jan 2020 04:55:03 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 00OAsrHr078085; Fri, 24 Jan 2020 04:55:00 -0600 From: Peter Ujfalusi To: , , , , , Subject: [PATCH v2 2/2] drm/bridge: Add tc358768 driver Date: Fri, 24 Jan 2020 12:55:37 +0200 Message-ID: <20200124105537.21651-3-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124105537.21651-1-peter.ujfalusi@ti.com> References: <20200124105537.21651-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, jernej.skrabec@siol.net, jonas@kwiboo.se, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tomi.valkeinen@ti.com, Laurent.pinchart@ideasonboard.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add basic support for the Toshiba TC358768 RGB to DSI bridge. Not all the features of the TC358768 is implemented by the initial driver: MIPI_DSI_MODE_VIDEO and MIPI_DSI_FMT_RGB888 is only supported and tested. Only write is implemented for mipi_dsi_host_ops.transfer. Signed-off-by: Peter Ujfalusi --- drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358768.c | 992 ++++++++++++++++++++++++++++++ 3 files changed, 1003 insertions(+) create mode 100644 drivers/gpu/drm/bridge/tc358768.c -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 0b9ca5862455..3fef3513bdd0 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -122,6 +122,16 @@ config DRM_TOSHIBA_TC358767 ---help--- Toshiba TC358767 eDP bridge chip driver. +config DRM_TOSHIBA_TC358768 + tristate "Toshiba TC358768 MIPI DSI bridge" + depends on OF + select DRM_KMS_HELPER + select REGMAP_I2C + select DRM_PANEL + select DRM_MIPI_DSI + help + Toshiba TC358768AXBG/TC358778XBG DSI bridge chip driver. + config DRM_TI_TFP410 tristate "TI TFP410 DVI/HDMI bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index cd16ce830270..06fc265de0ef 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o +obj-$(CONFIG_DRM_TOSHIBA_TC358768) += tc358768.o obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c new file mode 100644 index 000000000000..5e12b1390254 --- /dev/null +++ b/drivers/gpu/drm/bridge/tc358768.c @@ -0,0 +1,992 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com + * Author: Peter Ujfalusi + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include