From patchwork Mon Apr 5 23:47:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12183867 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=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 E63C3C433B4 for ; Mon, 5 Apr 2021 23:47:23 +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 8907E61394 for ; Mon, 5 Apr 2021 23:47:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8907E61394 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 4A3C489DFC; Mon, 5 Apr 2021 23:47:22 +0000 (UTC) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86CBA89DFC for ; Mon, 5 Apr 2021 23:47:20 +0000 (UTC) Received: by mail-lf1-x12a.google.com with SMTP id v15so19835780lfq.5 for ; Mon, 05 Apr 2021 16:47:20 -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:mime-version :content-transfer-encoding; bh=divuDw1Bw8vhpwH95l0qBbQqrq0Vszv0MvP4vrcJ4Ls=; b=gSKPkIsuOq8K0ubM4PFzOl0cKa3i6ofssIuICWFCADkUVBA0hdosmO0zrJ/TuIJ8Lv wB4vT1MQx9gf7NR5C2CS+sTXf/FVIruuDvuzYbTDdFNkGfvhgujb3hFO0cOeXts/z9XH 3Ez28GKdecrdgxl/1WqvAIJECXV8S3cKvKbBZkbgz0bACo7k4V9VqaVRPJ0XMIiYvXoM cL75+WU55CualEfw6cKLEmmKjdbTL0lTrf00MHPNj/GGPt+PptbIvSR3iQV6HrYJjpeO x5W6FVzpUX2d1BRcbsYpL3mZys598WzdoHcwwP/m8bSFm60z7qv2ELgXBs9TVi5Fuyvu s6Vg== 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=divuDw1Bw8vhpwH95l0qBbQqrq0Vszv0MvP4vrcJ4Ls=; b=iDwNVnguJG4mpBtc/pcKaPq3XfHNw+Oj4V82hXZ2SXbpNEA1kEWEL5vf+LlRII1QUT H2mM1mnY2D1bCFxDegf2h98zFZQcDgNYmSOOrN90gYQFSBFIrOHxSdcf02fmpyzmcRoq GCMJthCnMwrQ4zF+5hODwl7K01Nm2DEk9h8sDg8cypP4/09z0OQZHrM14DmnB6nPJ8ok 7NdCrz2RcEP98ruAFyDiIccLuZRn5vN7aRvbSRDPsDiw7XWs+t7Hbo4QJ0jm6GbO8KQ3 49e7LWjSpA9l4fo9VxzI6/SiM0Gq/D1st74EKzf+WEhNUZqjmA3wTKMz3fNijj+X4uGr mJNg== X-Gm-Message-State: AOAM532zHpT527HliaR4Ke7nA47+FhlKEme/Qn7VHawUmmQyz/wkLiNQ prGy2ExFrZnIS0K6IP55ErLLlw== X-Google-Smtp-Source: ABdhPJz5ltIW539VopoXIo575cP8e+bzvyS7myP90bj6YwbFgtnQtxwrT9uK4ez9mllrZhFvpM116g== X-Received: by 2002:a19:4850:: with SMTP id v77mr19172791lfa.6.1617666438832; Mon, 05 Apr 2021 16:47:18 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Apr 2021 16:47:18 -0700 (PDT) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/panel: Add DT bindings for Samsung LMS397KF04 Date: Tue, 6 Apr 2021 01:47:12 +0200 Message-Id: <20210405234713.3190693-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 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: , Cc: devicetree@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This adds device tree bindings for the Samsung LMS397KF04 RGB DPI display panel. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson --- .../display/panel/samsung,lms397kf04.yaml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml diff --git a/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml new file mode 100644 index 000000000000..4cb75a5f2e3a --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/samsung,lms397kf04.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung LMS397KF04 display panel + +description: The datasheet claims this is based around a display controller + named DB7430 with a separate backlight controller. + +maintainers: + - Linus Walleij + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: samsung,lms397kf04 + + reg: true + + reset-gpios: true + + vci-supply: + description: regulator that supplies the VCI analog voltage + usually around 3.0 V + + vccio-supply: + description: regulator that supplies the VCCIO voltage usually + around 1.8 V + + backlight: true + + spi-max-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: inherited as a SPI client node, the datasheet specifies + maximum 300 ns minimum cycle which gives around 3 MHz max frequency + maximum: 3000000 + + port: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + panel@0 { + compatible = "samsung,lms397kf04"; + spi-max-frequency = <3000000>; + reg = <0>; + vci-supply = <&lcd_3v0_reg>; + vccio-supply = <&lcd_1v8_reg>; + reset-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + backlight = <&ktd259>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; + }; + +... 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