devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Lanzano <lanzano.alex@gmail.com>
To: mehdi.djait@bootlin.com, Alex Lanzano <lanzano.alex@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dt-bindings: display: Add Sharp Memory LCD bindings
Date: Wed, 24 Jul 2024 20:47:02 -0400	[thread overview]
Message-ID: <20240725004734.644986-2-lanzano.alex@gmail.com> (raw)
In-Reply-To: <20240725004734.644986-1-lanzano.alex@gmail.com>

Add device tree bindings for the monochrome Sharp Memory LCD

Signed-off-by: Alex Lanzano <lanzano.alex@gmail.com>
---
 .../bindings/display/sharp,sharp-memory.yaml  | 97 +++++++++++++++++++
 include/dt-bindings/display/sharp-memory.h    |  9 ++
 2 files changed, 106 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/sharp,sharp-memory.yaml
 create mode 100644 include/dt-bindings/display/sharp-memory.h

diff --git a/Documentation/devicetree/bindings/display/sharp,sharp-memory.yaml b/Documentation/devicetree/bindings/display/sharp,sharp-memory.yaml
new file mode 100644
index 000000000000..a79edd97c857
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/sharp,sharp-memory.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/sharp,sharp-memory.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sharp Memory LCD panels
+
+maintainers:
+  - Alex Lanzano <lanzano.alex@gmail.com>
+
+description:
+  This binding is for the Sharp Memory LCD monochrome displays.
+
+properties:
+  compatible:
+    enum:
+      - sharp,ls010b7dh04
+      - sharp,ls011b7dh03
+      - sharp,ls012b7dd01
+      - sharp,ls013b7dh03
+      - sharp,ls013b7dh05
+      - sharp,ls018b7dh02
+      - sharp,ls027b7dh01
+      - sharp,ls027b7dh01a
+      - sharp,ls032b7dd02
+      - sharp,ls044q7dh01
+
+  reg:
+    maxItems: 1
+
+  spi-cs-high: true
+
+  spi-max-frequency:
+    maximum: 2000000
+
+  vcom-mode:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: |
+      VCOM is a signal that prevents DC bias from being built up in
+      the panel resulting in pixels being forever stuck in one state.
+      vcom-mode can be set to one of three modes
+
+      SHARP_MEMORY_SOFTWARE_VCOM - This method uses a kthread to periodically send a
+      "maintain display" message to the display, toggling the vcom
+      bit on and off with each message
+
+      SHARP_MEMORY_EXTERNAL_VCOM - This method relies on an external clock to generate
+      the signal on the EXTCOMM pin
+
+      SHARP_MEMORY_PWM_VCOM - This method uses a pwm device to generate the signal
+      on the EXTCOMM pin
+
+    enum: [ 0, 1, 2 ]
+
+  enable-gpios:
+    maxItems: 1
+    description: Enables display
+
+  pwms:
+    maxItems: 1
+    description: External VCOM signal
+
+required:
+  - compatible
+  - reg
+  - spi-cs-high
+  - vcom-mode
+
+if:
+  properties:
+    vcom-mode:
+      # SHARP_MEMORY_PWM_VCOM
+      enum: [2]
+then:
+  required:
+    - pwms
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/display/sharp-memory.h>
+
+    spi {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            display@0{
+                    compatible = "sharp,ls013b7dh03";
+                    reg = <0>;
+                    spi-cs-high;
+                    spi-max-frequency = <1000000>;
+                    vcom-mode = <SHARP_MEMORY_SOFTWARE_VCOM>;
+            };
+    };
+...
diff --git a/include/dt-bindings/display/sharp-memory.h b/include/dt-bindings/display/sharp-memory.h
new file mode 100644
index 000000000000..dea14c7bd7ec
--- /dev/null
+++ b/include/dt-bindings/display/sharp-memory.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+#ifndef _DT_BINDINGS_SHARP_MEMORY
+#define _DT_BINDINGS_SHARP_MEMORY
+
+#define SHARP_MEMORY_SOFTWARE_VCOM	0
+#define SHARP_MEMORY_EXTERNAL_VCOM	1
+#define SHARP_MEMORY_PWM_VCOM		2
+
+#endif
-- 
2.45.2


  reply	other threads:[~2024-07-25  0:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  0:47 [PATCH 0/2] Add driver for Sharp Memory LCD Alex Lanzano
2024-07-25  0:47 ` Alex Lanzano [this message]
2024-07-25  6:17   ` [PATCH 1/2] dt-bindings: display: Add Sharp Memory LCD bindings Krzysztof Kozlowski
2024-07-26  0:33     ` Alex Lanzano
2024-07-27 16:30     ` Alex Lanzano
2024-07-28  8:40       ` Krzysztof Kozlowski
2024-07-28 12:56         ` Alex Lanzano
2024-07-28 14:43           ` Krzysztof Kozlowski
2024-07-28 14:52             ` Alex Lanzano
2024-07-25  6:18   ` Krzysztof Kozlowski
2024-07-26  0:36     ` Alex Lanzano
2024-07-25  0:47 ` [PATCH 2/2] drm/tiny: Add driver for Sharp Memory LCD Alex Lanzano
2024-07-25  5:20   ` Christophe JAILLET
2024-07-25  6:08   ` Krzysztof Kozlowski
2024-07-26  1:25     ` Alex Lanzano
2024-07-26  8:43       ` Krzysztof Kozlowski
2024-07-25  5:45 ` [PATCH 0/2] " Thomas Petazzoni
2024-07-26  0:07   ` Alex Lanzano
2024-07-26  6:27     ` Thomas Petazzoni
2024-07-26 19:44 ` [PATCH v2 " Alex Lanzano
2024-07-26 19:44   ` [PATCH v2 1/2] dt-bindings: display: Add Sharp Memory LCD bindings Alex Lanzano
2024-07-27  9:06     ` Krzysztof Kozlowski
2024-07-27 18:54       ` Alex Lanzano
2024-07-26 19:44   ` [PATCH v2 2/2] drm/tiny: Add driver for Sharp Memory LCD Alex Lanzano
2024-07-26 22:00     ` kernel test robot
2024-07-26 22:12     ` Christophe JAILLET
2024-07-27  4:53       ` Alex Lanzano
2024-07-27  9:03     ` Krzysztof Kozlowski
2024-07-27 17:45       ` Alex Lanzano
2024-07-27  9:00   ` [PATCH v2 0/2] " Krzysztof Kozlowski
2024-07-27 17:26     ` Alex Lanzano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240725004734.644986-2-lanzano.alex@gmail.com \
    --to=lanzano.alex@gmail.com \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mehdi.djait@bootlin.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).