From patchwork Tue Jun 19 08:19:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10473701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D6BC960230 for ; Tue, 19 Jun 2018 08:21:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0CA328B87 for ; Tue, 19 Jun 2018 08:21:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD88528B26; Tue, 19 Jun 2018 08:21:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8698E28B87 for ; Tue, 19 Jun 2018 08:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937478AbeFSIUx (ORCPT ); Tue, 19 Jun 2018 04:20:53 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:45009 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937419AbeFSIUJ (ORCPT ); Tue, 19 Jun 2018 04:20:09 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180619082004euoutp02795b637bdda67e4ffebf9eed9e866dab~5ge07TYmJ1527215272euoutp02C; Tue, 19 Jun 2018 08:20:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180619082004euoutp02795b637bdda67e4ffebf9eed9e866dab~5ge07TYmJ1527215272euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1529396404; bh=HCHl/tbrJkKBu+tvKkfbTt7UILumojL13lnXKlnqfg8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=jf0uIOLLS+GsJmVHzNdqs+R6hpD7MsjKWoOUK4ZyijRb39DhgEwfSsVVb0KjXcRjt es+7kZ9ab3Z++ZFkQwr+xlt1jKO0O5SxUvSRfMj3EKJgvC5i5+JwFsA1xfU39gYYtr 2xGkLsJCLd9Ui0bxWbfc4GOVyOBpU85dmKHG2TU4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180619082003eucas1p1d736e159aa748318df6d8bc06cd504b7~5ge0Ih_IS0549505495eucas1p1x; Tue, 19 Jun 2018 08:20:03 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 3A.88.10409.3BCB82B5; Tue, 19 Jun 2018 09:20:03 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180619082002eucas1p2e3606dff0191ab5380cc455e33083459~5gezSxA1-1912919129eucas1p2l; Tue, 19 Jun 2018 08:20:02 +0000 (GMT) X-AuditID: cbfec7f5-f95739c0000028a9-e1-5b28bcb335c7 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 38.E3.04183.2BCB82B5; Tue, 19 Jun 2018 09:20:02 +0100 (BST) Received: from AMDC2075.DIGITAL.local ([106.120.51.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PAK00EJ59T2RV00@eusync4.samsung.com>; Tue, 19 Jun 2018 09:20:02 +0100 (BST) From: Maciej Purski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: David Airlie , Rob Herring , Mark Rutland , Thierry Reding , Kukjin Kim , Krzysztof Kozlowski , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Maciej Purski Subject: [PATCH v3 7/9] drm/bridge: tc358764: Add DSI to LVDS bridge driver Date: Tue, 19 Jun 2018 10:19:28 +0200 Message-id: <1529396370-18761-8-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1529396370-18761-1-git-send-email-m.purski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSa0hTYRjHe3fO2TmuFodp+KolNpCWpRVZvFBYlNkJIYqiD1rZzIMzncrm NcNULG9oNhNXXqtpNixt3lJSYq5WiFtmaJrzgiTOWxdTMUxzbn77P8/z+z8XeChMkEU4U2GR MawsUhwh5PLwpvdLRs/6N6LA/V3dFBp4aSBQruEjB6VlzhDolbKWQOW6tdyX+R9cpBjOx9HE UDeO7o1NYchorCNRV9o0ibLuq0ikGeslUE9rCRcpje0cVGEewNELnYlElX3dHHSnTUciZYGZ i5Zay/Dj25iashrA9OTlcpiWRyaSKc58SDAadRaXaV4YIZjhHD2HqVfdZvIa1ICZ07ie4wXw joawEWFxrGyfzzWepLbOBKKrM0CCeWQWTwF50dnAjoK0N2xbXMazAY8S0NUAKiqqSEtBQM8B +GAF34AGW+aAFaoC0Py2HbMGqwD++65boyiKS3vAmowgS96BVgNY/3Vm3YHRhQT8VD5FWFrZ 0/6wc7qZa9E47Q7LW8bXR/BpX5jTMWUb5wr7DVmYRdvRp+Cj0kWOpRGkC0j41Dxjg3zh0JMq zKrt4aS+gbTq7bCnIMfGJMHn5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brzq7970/u0QqYjLZVn3x5+r6x3boHRDLVdWZtvMF1xsNwSbsVTtp9P aneqwo3mR68NlnZoBZdPyJjE9iveN2DzEcEkzhvrDbvFepxXflGaWrh98rWZ6uq2KlsuLDg2 0fsla5n1/QV1kyY9+nW7fGmBRn1anvjOOWkFCU7dMkosxRmJhlrMRcWJAMvV2Hh6AgAA X-CMS-MailID: 20180619082002eucas1p2e3606dff0191ab5380cc455e33083459 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180619082002eucas1p2e3606dff0191ab5380cc455e33083459 References: <1529396370-18761-1-git-send-email-m.purski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andrzej Hajda Add a drm_bridge driver for the Toshiba TC358764 DSI to LVDS bridge. Signed-off-by: Andrzej Hajda Signed-off-by: Maciej Purski --- drivers/gpu/drm/bridge/Kconfig | 8 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358764.c | 521 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 530 insertions(+) create mode 100644 drivers/gpu/drm/bridge/tc358764.c diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index fa2c799..f3da8a7 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -110,6 +110,14 @@ config DRM_THINE_THC63LVD1024 ---help--- Thine THC63LVD1024 LVDS/parallel converter driver. +config DRM_TOSHIBA_TC358764 + tristate "TC358764 DSI/LVDS bridge" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + help + Toshiba TC358764 DSI/LVDS bridge driver. + config DRM_TOSHIBA_TC358767 tristate "Toshiba TC358767 eDP bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 35f88d4..bf7c0ce 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -10,6 +10,7 @@ obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o 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_ANALOGIX_DP) += analogix/ obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c new file mode 100644 index 0000000..0aee155 --- /dev/null +++ b/drivers/gpu/drm/bridge/tc358764.c @@ -0,0 +1,521 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 Samsung Electronics Co., Ltd + * + * Authors: + * Andrzej Hajda + * Maciej Purski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. + * + */ + +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include