From patchwork Thu Sep 27 11:48:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10617921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5F6414BD for ; Thu, 27 Sep 2018 12:03:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D20CC2858F for ; Thu, 27 Sep 2018 12:03:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C56C920000; Thu, 27 Sep 2018 12:03:27 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE22A20000 for ; Thu, 27 Sep 2018 12:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ifmLj9YA3F14B/PqC9XiQHM8gaFtLuqetShxqG6w5KQ=; b=uzHlKQ1Djjdbrm XFpNRfzeUmCDEpMFGTXuWPR1U+H4Sb9UO/rDea73sUXe6SaTVe5H0oQpRNnNDCoOXQkcHcCnr8rJe aithlObMvSPw3+wPEalDeC68CcCrg3Zq2BOCNbcjAZWt4zSV97I+SeDZhxhlzT+b95vKfsHpdvXty lR+C09pLDdbDiUxQO4W4LyAHSmzdkmYepcFe/04gv+ufepJGEp2Fj6hSzZBgWpXDUxc1ShLC2I6cB lBWaBKZnRx+Gx7b/3k+Dfh5sU6Yf/4Er1/BAOsp3VyjiU6dL2wFfAzPkdcmCTStjib3pvhhk9FO3d hHd/EYCBckwdvmO3fGcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5V0i-0003X4-HT; Thu, 27 Sep 2018 12:03:12 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g5Uoj-0004Z2-QJ for linux-arm-kernel@lists.infradead.org; Thu, 27 Sep 2018 11:51:41 +0000 Received: by mail-pf1-x444.google.com with SMTP id b7-v6so1754618pfo.3 for ; Thu, 27 Sep 2018 04:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ye3BHTYw3hsX6SekIxERfAK/2gCXXkytVmCv8lGdJeU=; b=XS4jskXBa6ajaQ6Il3cCLChRb7VXVD+mm/EDyGLYuw4MaVHLPdCrz79nLMcneWSHQB LTAmX4vTqcMT1pZCiJYiJE2PeMBqYAzIPdnvDuu8b0CluQsqECs+boqTgicqWA7mAu9W VN+ftSoRx21asn2ibRUiWo2tRoNyAAmaoegoA= 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=ye3BHTYw3hsX6SekIxERfAK/2gCXXkytVmCv8lGdJeU=; b=qC4xu4JZVGfI2RJUIGzikXDSRIl0aTe5LGTBZPcPwWP9isiClgbOg9HHoV+VzRjO8C NApnivmO5Q75ktDY9CF/kdgf6dRIM34o6gXShXO8vEGP0mSxGJPhCd+OZgYCJyStkDNh FOv2CNCDidnV5if21JPu7Z8cXDXUm8eyNBpr0nKb/r3W+BaH8aTuGRpX9LxmbPMNcxr2 uf5eOp7hLQDKYDOICYXVtEm7kHQKhbVYnNVONtya5ctZ8vUwzUL0u/7Fw2j7aR5BlwPR ESYlvPldV+SeGsBZII22pIAGJWl1y7tmn41EP9GCbrsPgmWfbcSxU/PgyMD5NL4bnCEB f0Vw== X-Gm-Message-State: ABuFfohw6zocdO7n/HqT2Qmo95dygliHAq4v0BPsOQRGpPCJ5/XskRdR 3FUMg2u2uEXff7HxgoQPHWwRyA== X-Google-Smtp-Source: ACcGV61C3MWQhpiVTDjjDZ8O2Uk9bssNx1bPcNKn7qNA6iiwc3rX4chyQUYNmPTm2Uk15BHR5skNBQ== X-Received: by 2002:a17:902:7001:: with SMTP id y1-v6mr10780813plk.259.1538049026262; Thu, 27 Sep 2018 04:50:26 -0700 (PDT) Received: from localhost.localdomain ([183.82.230.83]) by smtp.gmail.com with ESMTPSA id v36-v6sm3744872pgn.85.2018.09.27.04.50.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 04:50:25 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , David Airlie , dri-devel@lists.freedesktop.org, Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Michael Trimarchi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH 10/12] drm/panel: Add Bananapi S070WV20-CT16 MIPI-DSI panel driver Date: Thu, 27 Sep 2018 17:18:48 +0530 Message-Id: <20180927114850.24565-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20180927114850.24565-1-jagan@amarulasolutions.com> References: <20180927114850.24565-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180927_045049_919972_DA61B74B X-CRM114-Status: GOOD ( 21.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Bananapi S070WV20-CT16 is 800x480, 4-lane MIPI-DSI panel which can be used to connect via BPI-M64 board, so add a driver for it. The same panel PCB comes with parallel RBG which is supported via panel-simple driver with "bananapi,s070wv20-ct16" compatible. Signed-off-by: Jagan Teki --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-bananapi-s070wv20.c | 336 ++++++++++++++++++ 3 files changed, 346 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-bananapi-s070wv20.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6020c30a33b3..d25960a63b10 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -17,6 +17,15 @@ config DRM_PANEL_ARM_VERSATILE reference designs. The panel is detected using special registers in the Versatile family syscon registers. +config DRM_PANEL_BANANAPI_S070WV20 + tristate "Bananapi S070WV20-CT16 MIPI-DSI panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Bananapi S070WV20-CT16 MIPI-DSI controller. + config DRM_PANEL_LVDS tristate "Generic LVDS panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 5ccaaa9d13af..345b6475d3a4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o +obj-$(CONFIG_DRM_PANEL_BANANAPI_S070WV20) += panel-bananapi-s070wv20.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o diff --git a/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c b/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c new file mode 100644 index 000000000000..6c9adbec6dd8 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-bananapi-s070wv20.c @@ -0,0 +1,336 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2018 Amarula Solutions + * Author: Jagan Teki + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include