From patchwork Mon Apr 5 23:47:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 415343 Delivered-To: patch@linaro.org Received: by 2002:a17:906:5290:0:0:0:0 with SMTP id c16csp3850328ejm; Mon, 5 Apr 2021 16:47:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqp5H+WQ7Otl0LfUjsXpWw48GevNA+VBK6xA5F8dj87NSCHiSIPeSjYcD/6//BL3j9CHRi X-Received: by 2002:a63:c:: with SMTP id 12mr24543450pga.129.1617666450257; Mon, 05 Apr 2021 16:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617666450; cv=none; d=google.com; s=arc-20160816; b=LSWJj7avJ5QYLG22UXCcE1SRIhMbyAPBGkbQdNH/2dI8lE+4KIFCoF7iVmknuXTTji R1ANlGs7VdseW2kQEYHE2ezIoXNMNRE/XWWvXKQkN4msZdzDST9FRTqMIC7b0p6WBRaj MHOslCPhkoCFBiQnf3fzzq6PQAZ59JtsQLYH4LHtP/hXnU24qYBywRwrqac6393g9e9D +uFUZcm1g7JL4Zs29zb6Z0+wBXDs2JTmsIXFyBOIM3EngDrdWda/Rm7SB3ewl2A2O6B9 oRd4odUTJOz7H+9XTHQwzxf6inFKk+XsjLL1+JbJ1Q02uHMAAstOAlDvNIhXL61RPPHH Q8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=sGy30Sb9uxOX4tlHvar8Jn0h7JZy1TBuH8i73iUDcfw=; b=zytJC+DY7Plh2HpytMItEWPxE0krv9CjTc32ZKrtvsuWYYKT9Ol5tcHkApuRQRLH6j 2LivPBQOw3Trxz3D+dP60xmWfJ3DZLPf1mt7Q2KPeA6uOpJZacX7g41raXps3/XKdT5L 33UcZEFQH5gCPvMGZXAicPS5pSghycrkcxKfbOJYzI4E15RoZkoUaamiGSIGdD0XoU1G j4WCp6u6KN3In0vZg5+FQA7C9hmlRZzIRiE/vFTnUzMDCikyb5ldWcvHcoPgUwaIkul5 K9SmldxhvCxv05QRu5Jy8CNgwsVlOs+/E72+pyP2c9a8GYSX4raNb8kff8OYjG140Nn2 fj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HsFImk/v"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s1si19254627plq.105.2021.04.05.16.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 16:47:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HsFImk/v"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 67ECA89F92; Mon, 5 Apr 2021 23:47:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id E23D289F9F for ; Mon, 5 Apr 2021 23:47:22 +0000 (UTC) Received: by mail-lj1-x22e.google.com with SMTP id u9so14357708ljd.11 for ; Mon, 05 Apr 2021 16:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xX9xY0GD54DMJGU72WqFsnQ5eH5ln8YmnbLFt/ArpQQ=; b=HsFImk/vG58HygtsNmia/4X5adlwhdIhD1eUHzLp5TUGOGPbu5HcVbV6bqgyh9lLr2 DZlSqGlqUNRdyGc3iIPOcijx7c0ozu5P8SK/4xGtf/SGt3o8O+39XYIHQjJRl+JUfYEO VVXnL50NI1XcQH+U9LYSShSEN2quG+WyWLx8HGE93/syNFX4tuQcmfmXmQ+omYqX7566 1nKlvcqzjLh6SUjz/0FVnumFyKnfuk0Kp/XjHbi/R/ed8pShNvLmIb8o78ng8mfR6u5T IwDc7Az4uit5b4JJtkrQSzIDe1IHnTKFhKyU4v3dd1DSrybxnR0vEGbkKpDPwrUBWBWs 6J4Q== 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=xX9xY0GD54DMJGU72WqFsnQ5eH5ln8YmnbLFt/ArpQQ=; b=cwT8a9XuZ6oCOidFV11Gfsk2SK+xasY8Pgs6hyg9JnD17YdQwUmZz9DsNbwJTysI+P CIbnMEAWMdWbdN+ob+Q8Nw6MB2mBZ9lHNloiCSlhFhhNsqzEpTYpqcPT9onzgCK8RK7P FfFHStBco/oGgIlKVb5iSvhIj4ygQhQ4vCF5JqNA6wWmWXbl7W7fxQ5JFdlpddstkK8G J5t+8AsGqzZrkqwQ8dTt1Y+7IHUGzLQiAY0d82iOFKt9a7C9IbcEmhkVQ+rkcyVQFnfr gqKdJRO0GknOfvOSRUfBG+NDkfwF4/6ymqzzPOsVRpzDvggIhG/RcJsFiCu8z84c9pei fUMg== X-Gm-Message-State: AOAM532yaqukVcVvRtBJMS5hGem3OifiQRJr/Yqyphd32k80W9vII6Hc bQ107wQPmrI+Aczy0V90m+hWbQ== X-Received: by 2002:a2e:9b95:: with SMTP id z21mr17531046lji.112.1617666441273; Mon, 05 Apr 2021 16:47:21 -0700 (PDT) Received: from localhost.localdomain (c-14cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.20]) by smtp.gmail.com with ESMTPSA id d27sm1941930lfm.203.2021.04.05.16.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 16:47:20 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/panel: lms397kf04: Add driver for LMS397KF04 Date: Tue, 6 Apr 2021 01:47:13 +0200 Message-Id: <20210405234713.3190693-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210405234713.3190693-1-linus.walleij@linaro.org> References: <20210405234713.3190693-1-linus.walleij@linaro.org> MIME-Version: 1.0 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 new driver for the Samsung LMS397KF04 DPI display controlled over SPI. Signed-off-by: Linus Walleij --- MAINTAINERS | 7 + drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-samsung-lms397kf04.c | 421 ++++++++++++++++++ 4 files changed, 437 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-lms397kf04.c diff --git a/MAINTAINERS b/MAINTAINERS index d92f85ca831d..6d32432adebe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5731,6 +5731,13 @@ S: Maintained F: Documentation/devicetree/bindings/display/panel/raydium,rm67191.yaml F: drivers/gpu/drm/panel/panel-raydium-rm67191.c +DRM DRIVER FOR SAMSUNG LMS397KF04 PANELS +M: Linus Walleij +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml +F: drivers/gpu/drm/panel/panel-samsung-lms397kf04.c + DRM DRIVER FOR SITRONIX ST7703 PANELS M: Guido Günther R: Purism Kernel Team diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 4894913936e9..8e24a92ad9ce 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_LMS397KF04 + tristate "Samsung LMS397KF04 DPI panel" + depends on OF && SPI && GPIOLIB + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Samsung + LMS397KF04 480x800 DPI 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 cae4d976c069..de23d00937db 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o 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_LMS397KF04) += panel-samsung-lms397kf04.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_S6E3HA2) += panel-samsung-s6e3ha2.o diff --git a/drivers/gpu/drm/panel/panel-samsung-lms397kf04.c b/drivers/gpu/drm/panel/panel-samsung-lms397kf04.c new file mode 100644 index 000000000000..41290cadc351 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-lms397kf04.c @@ -0,0 +1,421 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Panel driver for the Samsung LMS397KF04 480x800 DPI RGB panel. + * According to the data sheet the display controller is called DB7430 + * Linus Walleij + */ +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include