From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 539D9ECE561 for ; Thu, 27 Sep 2018 11:50:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8779215E5 for ; Thu, 27 Sep 2018 11:50:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="XS4jskXB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8779215E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727804AbeI0SIW (ORCPT ); Thu, 27 Sep 2018 14:08:22 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43701 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbeI0SIW (ORCPT ); Thu, 27 Sep 2018 14:08:22 -0400 Received: by mail-pf1-f193.google.com with SMTP id j26-v6so1726987pfi.10 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=qOdppsK1SjmH+Q2n1QRuDVz0mtl3Udbrkv5YNk2dTc1BaZ1lMkSD725i4hPSb/n7jT ARBAlhaNu8WTGxjhAh7QhRiIx3XWCj2tOdMzUuECSN13oATYef2KNjhhoGZmAvUosuY1 O45gTIAkwOQ2ECGa4/LD1Swn04UQC3PqD8dbOvMmc2uRtly77+ItkDZxXXDJlWYoh6Qz c3STNv8PSy4tD4Iy74l0dkRD8JRIve9/lJSCPAFVEugBDZHGMCChBIdzNyYYEuXHrrFd Ei/v2EzBtMQy7laXZORM7vrEdG19cMGqwlPyg2zjrPhj+7etHXYbLkpizVCGIWbM7Whq ZC1g== X-Gm-Message-State: ABuFfogsmzq/T6pDqQ4v3l4ZAcyf5o0Cq+iOcZY0f3eD462O8eUoetLN aMt1I37yxTIf4n9R6ut6z5FaMg== 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 Cc: Jagan Teki 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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