From patchwork Fri Jan 25 16:46:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10782591 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 E18476C2 for ; Sat, 26 Jan 2019 20:35:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D04532A411 for ; Sat, 26 Jan 2019 20:35:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C46482C086; Sat, 26 Jan 2019 20:35:23 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 75A3D2A411 for ; Sat, 26 Jan 2019 20:35:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B9216E68C; Sat, 26 Jan 2019 20:35:03 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 706596F309 for ; Fri, 25 Jan 2019 16:46:58 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id g11-v6so8932348ljk.3 for ; Fri, 25 Jan 2019 08:46:58 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=8/Orv3a49mHdt2En2NviO/VS3JHy0Qqr765jzlm9HW4=; b=c4PLOee7Ixp3bokSGPaLF2kwbOUv4JUfo+XFOsvgJ+8UPzqH/zTl+fHoFP7xnFKkro l6PEdR3X77uRt7JKKO/jaNoa44G/NoZVnXjm6zd6c3DcNjG06UFbHkVMWGxa/ZYKYNmN kuOqI2HKrbVntJYgjkMianAF9RxS5WAsZpa/X3w76mDOaP8bFn0uMVGr/pSkp3+4opwl MZD8dp7GId9+ePTaoEba6ixE1PFXLHV0574dcTtg8d09Zax4Cug1YZBpuYDtheGzrf2y mNy1up+ka9A7tFkOgORf1V5F1ggN6B9k+h2ZIHAPssh3nIEp1x+Qml35InHSvvAo0A8h vt3A== X-Gm-Message-State: AJcUukdWrwcl6ohi73GQ7m3gTFrL9Gb5P6/olgomUoFmJByJqnnLESbC nYsGUSxv1oILEb4U6wNfP3w= X-Google-Smtp-Source: ALg8bN6YQRbKph6ym/t/YT0eEOpv14zlkAUmJpgrxNwOwP34veJzcZm/al/vCWychbQgweUfdp70aA== X-Received: by 2002:a2e:8256:: with SMTP id j22-v6mr9544116ljh.40.1548434816639; Fri, 25 Jan 2019 08:46:56 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:6921:1f1d:2918:d853]) by smtp.googlemail.com with ESMTPSA id b25sm1531540lfa.96.2019.01.25.08.46.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 08:46:55 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: thierry.reding@gmail.com Subject: [PATCH 1/2] drm: panel: Add Samsung s6e63m0 panel documentation Date: Fri, 25 Jan 2019 17:46:44 +0100 Message-Id: <20190125164645.19208-1-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 26 Jan 2019 20:34:37 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, airlied@linux.ie, Jonathan Bakker , linux-kernel@vger.kernel.org, krzk@kernel.org, robh+dt@kernel.org, dri-devel@lists.freedesktop.org, =?utf-8?q?Pawe=C5=82_Chmiel?= , m.szyprowski@samsung.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Jonathan Bakker This commit adds documentation for Samsung s6e63m0 AMOLED LCD panel driver. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- .../display/panel/samsung,s6e63m0.txt | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt b/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt new file mode 100644 index 000000000000..4979200e2dd2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt @@ -0,0 +1,60 @@ +Samsung s6e63m0 AMOLED LCD panel + +Required properties: + - compatible: "samsung,s6e63m0" + - reset-gpio: GPIO spec for reset pin + - vdd3-supply: VDD regulator + - vci-supply: VCI regulator + - display-timings: timings for the connected panel as described by [1] + +Optional properties: + - reset-delay: Delay in ms after adjusting reset-gpio, default 120ms + - power-on-delay: Delay in ms after powering on, default 25ms + - power-off-delay: Delay in ms before powering off, default 200ms + - panel-width-mm: physical panel width in mm + - panel-height-mm: physical panel height in mm + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in [2]. This +node should describe panel's video bus. + +[1]: Documentation/devicetree/bindings/display/panel/display-timing.txt +[2]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + + s6e63m0: display@0 { + compatible = "samsung,s6e63m0"; + reg = <0>; + reset-gpio = <&mp05 5 1>; + vdd3-supply = <&ldo12_reg>; + vci-supply = <&ldo11_reg>; + spi-max-frequency = <1000000>; + + power-on-delay = <0>; + power-off-delay = <0>; + reset-delay = <10>; + panel-width-mm = <53>; + panel-height-mm = <89>; + + display-timings { + timing-0 { + /* 480x800@60Hz */ + clock-frequency = <25628040>; + hactive = <480>; + vactive = <800>; + hfront-porch = <16>; + hback-porch = <16>; + hsync-len = <2>; + vfront-porch = <28>; + vback-porch = <1>; + vsync-len = <2>; + }; + }; + + port { + lcd_ep: endpoint { + remote-endpoint = <&fimd_ep>; + }; + }; + }; From patchwork Fri Jan 25 16:46:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10782571 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 2694D6C2 for ; Sat, 26 Jan 2019 20:34:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1058F2A411 for ; Sat, 26 Jan 2019 20:34:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03C682B42C; Sat, 26 Jan 2019 20:34:46 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 816BE2A411 for ; Sat, 26 Jan 2019 20:34:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51E366E180; Sat, 26 Jan 2019 20:34:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5F6FE6F309 for ; Fri, 25 Jan 2019 16:47:00 +0000 (UTC) Received: by mail-lf1-x143.google.com with SMTP id b20so7375957lfa.12 for ; Fri, 25 Jan 2019 08:47:00 -0800 (PST) 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=Xz6SfLbGJzzNks5UmiMVgFW0+4LQpfnDfJxZuFLPO+U=; b=t/w5Qw+FzZQUK1+oRukzWDSmfF7/s6b36kjQOzHGns61gE/Qho47UcfuEuA0+VqWMH tHGQUiT9SgD+AtsmK1wXus3KCCQnGDDIMvnXjBsMa1l40KAcv52WO6bh+tyIaMnFS7fa 7OuwtY8ujzuFvoS8Jr++7bVBzThG1lIW7JnbID7tRYSC0z6BZm70edNuJkey1uWMpPXg RguQ6h6UcW350lgHlrU6Ykke3veD0ZXoMCvle7K+uitj8uDX+rMC5WgIrwQ9XQaKN+SI L46zlkJ6XK1m3Syq4ZN6VFCL1dW+s43hG/stad5tIjMRKsZDTMSrA8c/MdJHSKYVl7hX dgIA== X-Gm-Message-State: AJcUukfBRMEHYCQHjoFLR5s/qEkRfxTHHI/YYkNR062RJnTvw3sQA5qz TYLsoH1kE9v+Z3jQlOptnVg= X-Google-Smtp-Source: ALg8bN4xCBhlJ5UQmGFRVfiu7sFbI1EE0WO7TV2+QTgC3Q6feaHvQM4d5cdY6Rh88TXO+HBTwC2M+A== X-Received: by 2002:ac2:4116:: with SMTP id b22mr8858826lfi.19.1548434818224; Fri, 25 Jan 2019 08:46:58 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:6921:1f1d:2918:d853]) by smtp.googlemail.com with ESMTPSA id b25sm1531540lfa.96.2019.01.25.08.46.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 08:46:57 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: thierry.reding@gmail.com Subject: [PATCH 2/2] drm/panel: Add driver for Samsung S6E63M0 panel Date: Fri, 25 Jan 2019 17:46:45 +0100 Message-Id: <20190125164645.19208-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190125164645.19208-1-pawel.mikolaj.chmiel@gmail.com> References: <20190125164645.19208-1-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 26 Jan 2019 20:34:37 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, airlied@linux.ie, linux-kernel@vger.kernel.org, krzk@kernel.org, robh+dt@kernel.org, dri-devel@lists.freedesktop.org, =?utf-8?q?Pawe=C5=82_Chmiel?= , m.szyprowski@samsung.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds Samsung S6E63M0 AMOLED LCD panel driver, connected over spi. It's based on already removed, non dt s6e63m0 driver and panel-samsung-ld9040. There is possibility to choose one from 3 different gamma tables. It can be found for example in some of Samsung Aries based phones. Signed-off-by: Paweł Chmiel --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 712 ++++++++++++++++++ 3 files changed, 720 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3f3537719beb..4a4b64f74e70 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -82,6 +82,13 @@ config DRM_PANEL_SAMSUNG_LD9040 depends on OF && SPI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_S6E63M0 + tristate "Samsung S6E63M0 RGB/SPI panel" + depends on OF + depends on SPI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + config DRM_PANEL_LG_LG4573 tristate "LG4573 RGB/SPI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 4396658a7996..3e5d53fdee47 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.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_S6E63M0) += panel-samsung-s6e63m0.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_S6E8AA0) += panel-samsung-s6e8aa0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c new file mode 100644 index 000000000000..cb5c090621ad --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c @@ -0,0 +1,712 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * S6E63M0 AMOLED LCD drm_panel driver. + * + * Copyright (C) 2019 Paweł Chmiel + * Derived from drivers/gpu/drm/panel-samsung-ld9040.c + * + * Andrzej Hajda + * + * 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. + */ + +#include +#include + +#include +#include +#include +#include + +#include