Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp784611pxt; Thu, 5 Aug 2021 11:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZXWlNHLT2jEopdT6Dq2XRIw+puLd1jvamQoNxPOBH/ECkuazKDnTHojPNGxHo7yA/gNAX X-Received: by 2002:a50:9b06:: with SMTP id o6mr8508856edi.284.1628188509679; Thu, 05 Aug 2021 11:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628188509; cv=none; d=google.com; s=arc-20160816; b=0bCfrEH68Y00d91LQ9FWCyrkb/V7sQW9++b1Z65YTLkBRmHvZzSW2kb173Tmt7l3rz mHsHb7MB2tGJOFYygRTaW1vR7YYdAXeaGvF71ZAMFVY6FuQBLICUAl/K1X7fBzQBzwbL khbNnADa/3JG1WozXl5oP+c07IapCaufbr66iOLYV6sPWRscOs+BmEAln0zlI6f1oCp0 UXdZwnLnM2wyJngMAEw7nVcV5RwYZlvekr2ZUQyonVYKeWbyWVa+OByOshNVnZPUJ2lP 5CFRg5hN6hf4hwlkQk7mvfOPdcj5Zultb6Lza5RTVV0EMN791hP3Ev61UZyr1Jl08K2q Sqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wa2R63dFgTkwixEosOXtkJRWEQJGmEaf6S/uMfe3ers=; b=arsICGfIzrAGH20tN9zyU3vJJeBZimwBYLwapD5tOzxsXCeC6FLaSFozHknQgIcHfi x40k136UA+r7i7oQRxqyoCHzcS5SJNHJUqtOhu9HdDp7k8iJPR6hXnEvUMy5ofCrPpuu aGnu+OrqGhmVoDaVXcHlTSj4xwQqUzG2hrpWOaJcVT9FSnKfQ4G0reCYLR9Ap9kFRTCk HUS5Lk3mU88LB9yLvsgWf3B9Q1XoCdweHTf1IImfssN1Rv450LKopHtS6tYrWBJ3EhUw n987lFK9xgKbY5lBDOyesclsNBLt478KzCHKy6QexMMFTX8LM+ye/IGdst90zLnriRpx 1KhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lPn4vcAF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si6277607edd.421.2021.08.05.11.34.37; Thu, 05 Aug 2021 11:35:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lPn4vcAF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241740AbhHENga (ORCPT + 99 others); Thu, 5 Aug 2021 09:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241737AbhHENg3 (ORCPT ); Thu, 5 Aug 2021 09:36:29 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A74C0613C1; Thu, 5 Aug 2021 06:36:14 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id u13so7123124lje.5; Thu, 05 Aug 2021 06:36:14 -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=wa2R63dFgTkwixEosOXtkJRWEQJGmEaf6S/uMfe3ers=; b=lPn4vcAFui0dr3VqKLN4dd+4t82Exo3Mw7tJXCyqPXfY98jyC5R3gjjRcdbTQuGRIt /s3N4MB2F4kSpi01+oP/bxkW6qGySvdV+e6FcrkNRLd8gXHKz57YLURsiCpRcrb4Di0b 5ZQjGYIAGVN6VW2dZu+zggyBHGwCDkOIgblFx1i6NvfmRnlMVsj4V8ZuxVKbZaKRXkvj NDrzZazd50VyL/3jHT70qoeBYtaeZLmIHcH/cIr//ZmaT16n6rwcO2Y871NS+ttyTsfQ +u7UYPV5zpJj6F2n8DeNR/j0OIL0ny6jHOGbsghH7stvb+b5LpZ97A54H6r+nL4yBeJp rpBw== 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=wa2R63dFgTkwixEosOXtkJRWEQJGmEaf6S/uMfe3ers=; b=m3mrvsq+38Mwd3iruBxycPf7F6+muFESr0sdrLzXD/AXnSUXrOzj9Wjqv9mRoIGMoW ptfM2SND1BsQZ3l2fTGaxKddapX+rgrH60q/G6DWeIbl2mulkyeBX0iPYVqPgOoJsnQh 0IiWomYwlIrVVHv+FGPtzuugZcUrGLOaWoZD0kBfUy6gWnYxoBkewycjB9IZaR9gZB8d OmhKbw0an695fhdBRppHgZWpL5p3hvEITbXkwDYpLUSv92WGipf7gkiy5vwPtctrECD5 NpJNdUcdatkkWob8zeY2UsdZvfUbuFpmn0i0z1L41Cy8DwBZlVCKSigL5vEIsStBMRew fRuA== X-Gm-Message-State: AOAM533BX2Dmp9lXm76bURG6Cuux9ZJwycwUZWZDYWAnHfuWPOzdDFQN DNf9NrA65EoWq73mN9R0U2GaOKBaW3bmWJFN X-Received: by 2002:a2e:9ec1:: with SMTP id h1mr3267838ljk.0.1628170572969; Thu, 05 Aug 2021 06:36:12 -0700 (PDT) Received: from nergzd-desktop.localdomain ([62.122.67.26]) by smtp.gmail.com with ESMTPSA id t3sm516232lfe.241.2021.08.05.06.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 06:36:12 -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 , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel Date: Thu, 5 Aug 2021 16:33:42 +0300 Message-Id: <20210805133343.27032-3-markuss.broks@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210805133343.27032-1-markuss.broks@gmail.com> References: <20210805133343.27032-1-markuss.broks@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; 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 v2 -> v3: fixed checkpatch warnings - not sure about MAINTAINERS, should I put my name up there? --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6d27a1.c | 323 ++++++++++++++++++ 3 files changed, 335 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 beb581b96e..0b37849413 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -392,6 +392,17 @@ 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. + + This panel can be found in Samsung Galaxy Ace 2 + GT-I8160 mobile phone. + 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 c8132050bc..60c0149fc5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.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..6a77a15136 --- /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