From nobody Fri Dec 19 09:43:02 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72680EE14AD for ; Wed, 6 Sep 2023 16:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242993AbjIFQX1 (ORCPT ); Wed, 6 Sep 2023 12:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232536AbjIFQX0 (ORCPT ); Wed, 6 Sep 2023 12:23:26 -0400 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 480B01992; Wed, 6 Sep 2023 09:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1694017403; x=1725553403; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=KrG2MZOvGizkIauCc3KWNFT1LrSe5AapyjWhd8HHjzw=; b=nFrXfywm8vIqMf0viZunfjwoaEYf53rY2mYe0TNtZJo6ySVg1yhKRZJH vLqxIXyhdBWb46eT+Ad187J24ZrNXQ9VYyM0Gkkjbn844LAqdiZVZ4SYi i+DX1DVAxlGPAbsegf3bkuFqL1fs4Jcr5ZbgsquAGso9EpvwsRZ4C1Ok2 Me3UD2DnfqRKNZ5BDZ2B9/BuXNfP6b6MhExY4fDTqbiQngps5aTjnNKxv yMJCWCjJ2aLobN9EECAZlo0RPcYE1AfNpWlanlkhhLHBzQCLSBQElkc4F tPymOKd5syW+3dDQsOQUp6rBHfh30Ftjb1ob4nuUf+l+solL5w3eOq1Kx A==; From: Stefan x Nilsson Date: Wed, 6 Sep 2023 18:22:16 +0200 Subject: [PATCH 1/2] dt-bindings: display: Add st7735s driver MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20230906-st7735s-v1-1-add92677c190@axis.com> References: <20230906-st7735s-v1-0-add92677c190@axis.com> In-Reply-To: <20230906-st7735s-v1-0-add92677c190@axis.com> To: David Lechner , David Airlie , Daniel Vetter , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley CC: , , , Stefan x Nilsson , X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add bindings for a driver for Sitronix st7735s display controller, as well as for a Winstar wf0096atyaa3dnn0 0.96" 80x160 TFT panel. Signed-off-by: Stefan x Nilsson --- .../bindings/display/sitronix,st7735s.yaml | 81 ++++++++++++++++++= ++++ MAINTAINERS | 6 ++ 2 files changed, 87 insertions(+) diff --git a/Documentation/devicetree/bindings/display/sitronix,st7735s.yam= l b/Documentation/devicetree/bindings/display/sitronix,st7735s.yaml new file mode 100644 index 000000000000..36234ec22fe2 --- /dev/null +++ b/Documentation/devicetree/bindings/display/sitronix,st7735s.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/sitronix,st7735s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sitronix ST7735S Display Panels + +maintainers: + - Stefan x Nilsson + +description: + This binding is for display panels using a Sitronix ST7735S + controller in SPI mode. + +allOf: + - $ref: panel/panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + oneOf: + - description: + Winstar WF0096ATYAA3DNN0 0.96" 80x160 Color TFT + items: + - enum: + - winstar,wf0096atyaa3dnn0 + - const: sitronix,st7735s + + dc-gpios: + maxItems: 1 + description: Display data/command selection (D/CX) + + backlight: true + reg: true + spi-max-frequency: true + reset-gpios: true + rotation: true + +required: + - compatible + - reg + - dc-gpios + +additionalProperties: true + +examples: + - | + #include + + backlight: backlight { + compatible =3D "gpio-backlight"; + gpios =3D <&gpio 44 GPIO_ACTIVE_HIGH>; + }; + + regdisplay: regulatordisplay { + compatible =3D "regulator-fixed"; + regulator-name =3D "display"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <100000>; + enable-active-high; + }; + + spi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + display@0 { + compatible =3D "winstar,wf0096atyaa3dnn0","sitronix,st= 7735s"; + reg =3D <0>; + spi-max-frequency =3D <12000000>; + dc-gpios =3D <&gpio 43 GPIO_ACTIVE_HIGH>; + reset-gpios =3D <&gpio 23 GPIO_ACTIVE_HIGH>; + backlight =3D <&backlight>; + power-supply =3D <®dsiplay>; + rotation =3D <270>; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 6308efa121e1..c00b2b9086f2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6728,6 +6728,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/sitronix,st7735r.yaml F: drivers/gpu/drm/tiny/st7735r.c =20 +DRM DRIVER FOR SITRONIX ST7735S PANELS +M: Stefan x Nilsson +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/sitronix,st7735s.yaml + DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS M: Javier Martinez Canillas S: Maintained --=20 2.30.2 From nobody Fri Dec 19 09:43:02 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC84EE14AD for ; Wed, 6 Sep 2023 16:23:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243039AbjIFQXd (ORCPT ); Wed, 6 Sep 2023 12:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236226AbjIFQX3 (ORCPT ); Wed, 6 Sep 2023 12:23:29 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1660E19A0; Wed, 6 Sep 2023 09:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1694017404; x=1725553404; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=aUAwXvtXGHutTByOh+hjaBOyIhjW4Rjz+jAnGbHGoFs=; b=cfxI3GtPDVp6JUpkZk7QHC3h3+dgzaOrHGxdKWNa6BG7DUQue4qh9NQq 9WNalcWU6o3qRiAA4Dtnw9ZVjbLKW/WMGTEzO1Yd144tNJ8Tvp4lJrl+k 9/hkwI4evOK0DOiDRJ+XJbym6NJmZAuZxaD5gRSDnnvzNsaBz57RgjgQa PaFk6lUiZYBoPHoh4gxE9JcivaEcb+0IleVf8E0QJNYMd5sEUMRcv9hHD M9up2og6Ks0G5J8bAVPxntfVI52U3mchzLNZdcjE1vjN4GGJaNHSKpU44 KvOz8rKzEkoHc8tZLWd227pJ/KmeWebna3y04vaVDIs8aL69ioq/flejF g==; From: Stefan x Nilsson Date: Wed, 6 Sep 2023 18:22:17 +0200 Subject: [PATCH 2/2] drm: tiny: Add st7735s driver MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20230906-st7735s-v1-2-add92677c190@axis.com> References: <20230906-st7735s-v1-0-add92677c190@axis.com> In-Reply-To: <20230906-st7735s-v1-0-add92677c190@axis.com> To: David Lechner , David Airlie , Daniel Vetter , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley CC: , , , Stefan x Nilsson , X-Mailer: b4 0.12.3 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a driver for Sitronix st7735s display controller, as well as a Winstar wf0096atyaa3dnn0 0.96" 80x160 TFT panel. The driver code is very similar to st7735r, but with adaptations for the pipe_enable function. There is also optional support to specify a power regulator for the display. Signed-off-by: Stefan x Nilsson --- MAINTAINERS | 1 + drivers/gpu/drm/tiny/Kconfig | 14 +++ drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/st7735s.c | 264 +++++++++++++++++++++++++++++++++++++= ++++ 4 files changed, 280 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c00b2b9086f2..f24295d691e5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6733,6 +6733,7 @@ M: Stefan x Nilsson S: Maintained T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/sitronix,st7735s.yaml +F: drivers/gpu/drm/tiny/st7735s.c =20 DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS M: Javier Martinez Canillas diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index f6889f649bc1..2917f5412ddd 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -212,3 +212,17 @@ config TINYDRM_ST7735R * Okaya RH128128T 1.44" 128x128 TFT =20 If M is selected the module will be called st7735r. + +config TINYDRM_ST7735S + tristate "DRM support for Sitronix ST7735S display panels" + depends on DRM && SPI + select DRM_KMS_HELPER + select DRM_GEM_DMA_HELPER + select DRM_MIPI_DBI + select BACKLIGHT_CLASS_DEVICE + help + DRM driver for Sitronix ST7735S with one of the following + LCDs: + * Winstar WF0096ATYAA3DNN0 0.96" 80x160 Color TFT + + If M is selected the module will be called st7735s. diff --git a/drivers/gpu/drm/tiny/Makefile b/drivers/gpu/drm/tiny/Makefile index 76dde89a044b..2e805c5b6f16 100644 --- a/drivers/gpu/drm/tiny/Makefile +++ b/drivers/gpu/drm/tiny/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_TINYDRM_MI0283QT) +=3D mi0283qt.o obj-$(CONFIG_TINYDRM_REPAPER) +=3D repaper.o obj-$(CONFIG_TINYDRM_ST7586) +=3D st7586.o obj-$(CONFIG_TINYDRM_ST7735R) +=3D st7735r.o +obj-$(CONFIG_TINYDRM_ST7735S) +=3D st7735s.o diff --git a/drivers/gpu/drm/tiny/st7735s.c b/drivers/gpu/drm/tiny/st7735s.c new file mode 100644 index 000000000000..42290f4128db --- /dev/null +++ b/drivers/gpu/drm/tiny/st7735s.c @@ -0,0 +1,264 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * DRM driver for display panels connected to a Sitronix ST7735S + * display controller in SPI mode. + * + * Copyright (C) 2023 Axis Communications AB + */ + +#include +#include +#include +#include +#include +#include +#include +#include