From patchwork Mon May 28 09:47:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10430335 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 C651F601BE for ; Mon, 28 May 2018 09:47:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4BA5289A5 for ; Mon, 28 May 2018 09:47:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A795828A6E; Mon, 28 May 2018 09:47:51 +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=ham 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 5CC11289A5 for ; Mon, 28 May 2018 09:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932213AbeE1Jrt (ORCPT ); Mon, 28 May 2018 05:47:49 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55038 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754313AbeE1Jrc (ORCPT ); Mon, 28 May 2018 05:47:32 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180528094730euoutp019e8c352111f2ca982d96fde42a161336~yxe40CU_-1908919089euoutp01F; Mon, 28 May 2018 09:47:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180528094730euoutp019e8c352111f2ca982d96fde42a161336~yxe40CU_-1908919089euoutp01F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527500850; bh=W30jzM/VTBXiiNu3saSRMURld+ykacue3wx1UNoxFV8=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=Q4+HYrmqBF79CUtqLJQUzG2lAQSVCgodRXq4fzGKWK0NlZAGGtg5p5EXXkc2GJivd Sr5BOukxpT5XSH3aFQWTxzQR2ESMiEuBaTdEHISQ/69WWwHMe/mzuhJMnrtPwkuPmG PGuB21x2IMEN4hIGX+q3oK51lJ48xa9VuuKFbr+A= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180528094729eucas1p24b30d1f344ad7cc47ef70f1b798c2b0c~yxe4EFIUg2267622676eucas1p21; Mon, 28 May 2018 09:47:29 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 6C.F7.10409.130DB0B5; Mon, 28 May 2018 10:47:29 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528094728eucas1p128e8a44fa6c3bcb29d056a8191c039af~yxe3WALwN0866108661eucas1p1F; Mon, 28 May 2018 09:47:28 +0000 (GMT) X-AuditID: cbfec7f5-f95739c0000028a9-0b-5b0bd0312dae Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 20.71.04178.030DB0B5; Mon, 28 May 2018 10:47:28 +0100 (BST) Received: from AMDC2075.DIGITAL.local ([106.120.51.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9F00D27N6R5P70@eusync1.samsung.com>; Mon, 28 May 2018 10:47:28 +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 08/12] drm/bridge: tc358764: Add DSI to LVDS bridge driver Date: Mon, 28 May 2018 11:47:12 +0200 Message-id: <1527500833-16005-9-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1527500833-16005-1-git-send-email-m.purski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSXUhTYRjHe8/HdpzNTlPxVcOLgRCSptTFC2V5oXAsLOnCC6Vs6UFFnbLj /IwSxbVN/BzpNFERDZuaNsVMVPKjlpibYqTN1NnIMrMUP0iUynnq7vf8n9/78jzwULikiPSi kuQZrEIuS5EKRETv6z2zf9CUc0zgp3JPZH1qJlGJeRxDBep1Ej3Td5KoYewwe7fzU4Aql8oJ 9HVxmkBl9jUcWSxdQjRZ8F2INBXNQmS0vyfRTH+dAOktQxhqXLUSqGNsQYhaZqcxVDQ4JkR6 3aoA7fXXEyHuTHt9O2BmSksw5kXtgpB5pK4hGaNBI2Ce79pIZqnYhDHdzfeZ0h4DYLaMPpGi aNHFeDYlKZNVnL10W5S4bUtO7yoG2eWzy0Q+aOG0wImC9Hk4Xt2KO1hCtwK4V5ehBaJD3gJw sWeU0ALqSOrXkLzzGMBXTXLe+QNgrbFD4HAEtB9sfxDryN1oA4Ddc+vAUeD0QxJONawdvXal r8DFkSbCwQTtC+d0a5iDxXQonNzvAPxEPvCDWXM0kRMdBmcGVQLHR5AuE8LmN/M4L4XC7ZoN gmdX+M3UI+T5FNSohzGe02DRiv1fng2HSiZIni/AUdP0EeO0C6z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l4/fSEXSYNsy9Evlf1 0ulzTKuJymo+tO+BPnu5E1O6lf6HRWGlrtZKip9yzpwKs/sYvt2ybP6Gnarrj5qtPitr80uG nfsql9OeF5abudZZCZw5mZ8VpHigplbJolSJpTgj0VCLuag4EQBVZjs1dgIAAA== X-CMS-MailID: 20180528094728eucas1p128e8a44fa6c3bcb29d056a8191c039af X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180528094728eucas1p128e8a44fa6c3bcb29d056a8191c039af References: <1527500833-16005-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 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 | 7 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/tc358764.c | 547 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 555 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..58e19af 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -110,6 +110,13 @@ 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 + select VIDEOMODE_HELPERS + 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..0bd520a --- /dev/null +++ b/drivers/gpu/drm/bridge/tc358764.c @@ -0,0 +1,547 @@ +/* + * 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