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: 12183869 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=-21.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,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 58B10C433ED for ; Mon, 5 Apr 2021 23:47:29 +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 D516861394 for ; Mon, 5 Apr 2021 23:47:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D516861394 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.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) 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-Google-Smtp-Source: ABdhPJzhUv/10inHZOygtf8PnpiwHgCmmPEMzabhY1prH/BqZxJ5U8ksow1qr0+isnj/dGQdb+wFIw== 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