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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 50A64C432BE for ; Tue, 3 Aug 2021 17:25:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18CA76023E for ; Tue, 3 Aug 2021 17:25:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 18CA76023E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B3176E8A4; Tue, 3 Aug 2021 17:25:44 +0000 (UTC) Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADD636E8A3 for ; Tue, 3 Aug 2021 17:25:42 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id y34so40991046lfa.8 for ; Tue, 03 Aug 2021 10:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mXaWfCBJ15QkkxOL37ql3IzMIyK5Ar2gtetOmCZgwyA=; b=KWMW7mCYEw1voGvv4a+mwkTa09OVWeawTceZ/yFz2Z5f8F8RvD07gJ03MY7vc2Hux3 un15tOYhrLvMQKk8VqxSqoVHWNxU85Qwg8Z2Tg2t+EFDe59oFyWZUNxte3qK1wpwyq4N hb0Q7le1VxFi22b4Ps42pB+AzKCCe0hLiyS//sfStWga1fBcVqO0LD6Fb15DlmyK8fLc uFBmQ8Ip0BuriyTyRdDzAodlF8ptgfQlkQy+tFeAQNfLjZ5gLDrtkgAc2OKfrTdSMUjP tksxrHyTFUu0vrIZ5r+4HGWRm4OVtP/1oA2XPGiALuA2TCVSElwLdI/POVMcLMPqRop0 t/bA== 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=mXaWfCBJ15QkkxOL37ql3IzMIyK5Ar2gtetOmCZgwyA=; b=fvLdel7sGAa/V5JSyA1jAGHypUujzpICwIPoYO9tiUQSR4EujKsvl7SkdM2ytb4jGW FH6ZyBI/OvnD4M7nAg51/gtl+o9FE9QpBYaWbOTdad+92Cqoi8jJrMq0RV6iEdeFHiII AzIw9a2OczevuJB4BHpWvsT7AcmudxEQ751LaBGgNV/5aDOnUl20T9qwwXY8JrWc881d PYoV0vnUZkfR8nile4DyrXvm27SLyRfpg++Rvs2KaulLJs4ry8PweLutjJkQl6ZO0g3+ 3Bi/3HUlnB2vQ0+BVXiRZXvWiFM25nMNeKWoxOHf/bidqlwydDl5ciO/jf7ZkylmECVk D5AA== X-Gm-Message-State: AOAM53168dDxtEuaLhX4cepnhmXAd+5OXUiAOGzfRvLt3RJ6NJQ6LWko x83NujiydzjYtLqwpfp26xE= X-Google-Smtp-Source: ABdhPJwKcG7oFk2MQThYkSj+PhWyNTzT8d1DwypcJWkqkO1SJjCKV1NcJzhbsx4gz0R3BuF1YvcSTQ== X-Received: by 2002:ac2:484c:: with SMTP id 12mr8732399lfy.31.1628011541066; Tue, 03 Aug 2021 10:25:41 -0700 (PDT) Received: from nergzd-desktop.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id g11sm1147618ljl.139.2021.08.03.10.25.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 10:25:40 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, phone-devel@vger.kernel.org, Markuss Broks , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel Date: Tue, 3 Aug 2021 20:24:50 +0300 Message-Id: <20210803172458.10971-1-markuss.broks@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds a driver for Samsung S6D27A1 display controller and panel. This panel is found in the Samsung GT-I8160 mobile phone, and possibly some other mobile phones. This display needs manufacturer commands to configure it to a working state; the commands used in this driver were taken from downstream driver by Gareth Phillips; sadly, there is almost no documentation on what they actually do. This driver re-uses the DBI infrastructure to communicate with the display. This driver is heavily based on WideChips WS2401 display controller driver by Linus Walleij and on other panel drivers for reference. Signed-off-by: Markuss Broks --- drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d27a1.c | 323 ++++++++++++++++++ 3 files changed, 332 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6d27a1.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index f4fe1dba99..21007b2032 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -348,6 +348,14 @@ config DRM_PANEL_SAMSUNG_S6D16D0 depends on DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_S6D27A1 + tristate "Samsung S6D27A1 DPI panel driver" + depends on OF && SPI && GPIOLIB + select DRM_MIPI_DBI + help + Say Y here if you want to enable support for the Samsung + S6D27A1 DPI 480x800 panel. + config DRM_PANEL_SAMSUNG_S6E3HA2 tristate "Samsung S6E3HA2 DSI video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index d94c27df17..d2a6fe81e9 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -35,6 +35,7 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d27a1.c b/drivers/gpu/drm/panel/panel-samsung-s6d27a1.c new file mode 100644 index 0000000000..073454349d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6d27a1.c @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Panel driver for the Samsung S6D27A1 480x800 DPI RGB panel. + * Found in the Samsung Galaxy Ace 2 GT-I8160 mobile phone. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include