devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] drm/solomon: Add support for the SSD133x controller family
@ 2023-12-22 10:01 Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 1/4] dt-bindings: display: ssd1307fb: Add vendor prefix to width and height Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2023-12-22 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Maxime Ripard, Jocelyn Falempe, Peter Robinson, Rob Herring,
	Krzysztof Kozlowski, Geert Uytterhoeven, Conor Dooley,
	Thomas Zimmermann, Javier Martinez Canillas, Conor Dooley,
	Daniel Vetter, David Airlie, Krzysztof Kozlowski,
	Maarten Lankhorst, Rob Herring, devicetree, dri-devel

Hello,

This patch-set adds support for the family of SSD133x Solomon controllers,
such as the SSD1331. These are used for RGB Dot Matrix OLED/PLED panels.

This is a v4 that addresses issues pointed out in v3:

https://lists.freedesktop.org/archives/dri-devel/2023-December/435686.html

The patches were tested on a Waveshare SSD1331 display using glmark2-drm,
fbcon, fbtests and the retroarch emulator. The binding schema were tested
using the `make W=1 dt_binding_check` target.

Patch #1 and #2 are fixes for the DT binding schema of the existing SSD130x
and SSD132x families.

Patch #3 adds a DT binding schema for the SSD133x controllers and patch #4
extends the ssd130x DRM driver to support the SSD133x controller family.

Best regards,
Javier

Changes in v4:
- Fix typo in commit message (Jocelyn Falempe).
- Add collected tags.

Changes in v3:
- Move solomon,ssd-common.yaml ref before the properties section and
  width/height constraints after the other properties (Conor Dooley).

Changes in v2:
- Unconditionally set the width and height constraints (Conor Dooley).
- Fix indentation in the DTS examples (Krzysztof Kozlowski).

Javier Martinez Canillas (4):
  dt-bindings: display: ssd1307fb: Add vendor prefix to width and height
  dt-bindings: display: ssd132x: Add vendor prefix to width and height
  dt-bindings: display: Add SSD133x OLED controllers
  drm/ssd130x: Add support for the SSD133x OLED controller family

 .../bindings/display/solomon,ssd1307fb.yaml   |  20 +-
 .../bindings/display/solomon,ssd132x.yaml     |  12 +-
 .../bindings/display/solomon,ssd133x.yaml     |  57 +++
 drivers/gpu/drm/solomon/ssd130x-i2c.c         |   5 +
 drivers/gpu/drm/solomon/ssd130x-spi.c         |   7 +
 drivers/gpu/drm/solomon/ssd130x.c             | 370 ++++++++++++++++++
 drivers/gpu/drm/solomon/ssd130x.h             |   5 +-
 7 files changed, 459 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 1/4] dt-bindings: display: ssd1307fb: Add vendor prefix to width and height
  2023-12-22 10:01 [PATCH v4 0/4] drm/solomon: Add support for the SSD133x controller family Javier Martinez Canillas
@ 2023-12-22 10:01 ` Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 2/4] dt-bindings: display: ssd132x: " Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 3/4] dt-bindings: display: Add SSD133x OLED controllers Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2023-12-22 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Maxime Ripard, Jocelyn Falempe, Peter Robinson, Rob Herring,
	Krzysztof Kozlowski, Geert Uytterhoeven, Conor Dooley,
	Thomas Zimmermann, Javier Martinez Canillas, Conor Dooley,
	Daniel Vetter, David Airlie, Krzysztof Kozlowski,
	Maarten Lankhorst, Rob Herring, devicetree, dri-devel

The commit 591825fba8a2 ("dt-bindings: display: ssd1307fb: Remove default
width and height values") used the wrong properties for width and height,
instead of the correct "solomon,width" and "solomon,height" properties.

Fix this by adding the vendor prefix to the width and height properties.

Fixes: 591825fba8a2 ("dt-bindings: display: ssd1307fb: Remove default width and height values")
Reported-by: Conor Dooley <conor@kernel.org>
Closes: https://lore.kernel.org/dri-devel/20231218-example-envision-b41ca8efa251@spud/
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
---

(no changes since v1)

 .../bindings/display/solomon,ssd1307fb.yaml   | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
index 3afbb52d1b7f..153ff86fb405 100644
--- a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
+++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
@@ -131,9 +131,9 @@ allOf:
             const: sinowealth,sh1106
     then:
       properties:
-        width:
+        solomon,width:
           default: 132
-        height:
+        solomon,height:
           default: 64
         solomon,dclk-div:
           default: 1
@@ -149,9 +149,9 @@ allOf:
               - solomon,ssd1305
     then:
       properties:
-        width:
+        solomon,width:
           default: 132
-        height:
+        solomon,height:
           default: 64
         solomon,dclk-div:
           default: 1
@@ -167,9 +167,9 @@ allOf:
               - solomon,ssd1306
     then:
       properties:
-        width:
+        solomon,width:
           default: 128
-        height:
+        solomon,height:
           default: 64
         solomon,dclk-div:
           default: 1
@@ -185,9 +185,9 @@ allOf:
               - solomon,ssd1307
     then:
       properties:
-        width:
+        solomon,width:
           default: 128
-        height:
+        solomon,height:
           default: 39
         solomon,dclk-div:
           default: 2
@@ -205,9 +205,9 @@ allOf:
               - solomon,ssd1309
     then:
       properties:
-        width:
+        solomon,width:
           default: 128
-        height:
+        solomon,height:
           default: 64
         solomon,dclk-div:
           default: 1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 2/4] dt-bindings: display: ssd132x: Add vendor prefix to width and height
  2023-12-22 10:01 [PATCH v4 0/4] drm/solomon: Add support for the SSD133x controller family Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 1/4] dt-bindings: display: ssd1307fb: Add vendor prefix to width and height Javier Martinez Canillas
@ 2023-12-22 10:01 ` Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 3/4] dt-bindings: display: Add SSD133x OLED controllers Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2023-12-22 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Maxime Ripard, Jocelyn Falempe, Peter Robinson, Rob Herring,
	Krzysztof Kozlowski, Geert Uytterhoeven, Conor Dooley,
	Thomas Zimmermann, Javier Martinez Canillas, Conor Dooley,
	Daniel Vetter, David Airlie, Krzysztof Kozlowski,
	Maarten Lankhorst, Rob Herring, devicetree, dri-devel

Commit 2d23e7d6bacb ("dt-bindings: display: Add SSD132x OLED controllers")
used the wrong properties for width and height, instead of the correct
"solomon,width" and "solomon,height" properties.

Fix this by adding the vendor prefix to the width and height properties.

Fixes: 2d23e7d6bacb ("dt-bindings: display: Add SSD132x OLED controllers")
Reported-by: Conor Dooley <conor@kernel.org>
Closes: https://lore.kernel.org/dri-devel/20231218-example-envision-b41ca8efa251@spud/
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
---

(no changes since v1)

 .../devicetree/bindings/display/solomon,ssd132x.yaml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml
index 37975ee61c5a..dd7939989cf4 100644
--- a/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml
+++ b/Documentation/devicetree/bindings/display/solomon,ssd132x.yaml
@@ -30,9 +30,9 @@ allOf:
             const: solomon,ssd1322
     then:
       properties:
-        width:
+        solomon,width:
           default: 480
-        height:
+        solomon,height:
           default: 128
 
   - if:
@@ -42,9 +42,9 @@ allOf:
             const: solomon,ssd1325
     then:
       properties:
-        width:
+        solomon,width:
           default: 128
-        height:
+        solomon,height:
           default: 80
 
   - if:
@@ -54,9 +54,9 @@ allOf:
             const: solomon,ssd1327
     then:
       properties:
-        width:
+        solomon,width:
           default: 128
-        height:
+        solomon,height:
           default: 128
 
 unevaluatedProperties: false
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v4 3/4] dt-bindings: display: Add SSD133x OLED controllers
  2023-12-22 10:01 [PATCH v4 0/4] drm/solomon: Add support for the SSD133x controller family Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 1/4] dt-bindings: display: ssd1307fb: Add vendor prefix to width and height Javier Martinez Canillas
  2023-12-22 10:01 ` [PATCH v4 2/4] dt-bindings: display: ssd132x: " Javier Martinez Canillas
@ 2023-12-22 10:01 ` Javier Martinez Canillas
  2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2023-12-22 10:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Maxime Ripard, Jocelyn Falempe, Peter Robinson, Rob Herring,
	Krzysztof Kozlowski, Geert Uytterhoeven, Conor Dooley,
	Thomas Zimmermann, Javier Martinez Canillas, Conor Dooley,
	Daniel Vetter, David Airlie, Krzysztof Kozlowski,
	Maarten Lankhorst, Rob Herring, devicetree, dri-devel

Add a Device Tree binding schema for the OLED panels based on the
Solomon SSD133x family of controllers.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---

(no changes since v3)

Changes in v3:
- Move solomon,ssd-common.yaml ref before the properties section and
  width/height constraints after the other properties (Conor Dooley).

Changes in v2:
- Unconditionally set the width and height constraints (Conor Dooley).
- Fix indentation in the DTS examples (Krzysztof Kozlowski).

 .../bindings/display/solomon,ssd133x.yaml     | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml

diff --git a/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml
new file mode 100644
index 000000000000..e93879b3da5d
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/solomon,ssd133x.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/solomon,ssd133x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Solomon SSD133x OLED Display Controllers
+
+maintainers:
+  - Javier Martinez Canillas <javierm@redhat.com>
+
+allOf:
+  - $ref: solomon,ssd-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - solomon,ssd1331
+
+  solomon,width:
+    default: 96
+
+  solomon,height:
+    default: 64
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        oled@3c {
+            compatible = "solomon,ssd1331";
+            reg = <0x3c>;
+            reset-gpios = <&gpio2 7>;
+        };
+
+    };
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        oled@0 {
+            compatible = "solomon,ssd1331";
+            reg = <0x0>;
+            reset-gpios = <&gpio2 7>;
+            dc-gpios = <&gpio2 8>;
+            spi-max-frequency = <10000000>;
+        };
+    };
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-22 10:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 10:01 [PATCH v4 0/4] drm/solomon: Add support for the SSD133x controller family Javier Martinez Canillas
2023-12-22 10:01 ` [PATCH v4 1/4] dt-bindings: display: ssd1307fb: Add vendor prefix to width and height Javier Martinez Canillas
2023-12-22 10:01 ` [PATCH v4 2/4] dt-bindings: display: ssd132x: " Javier Martinez Canillas
2023-12-22 10:01 ` [PATCH v4 3/4] dt-bindings: display: Add SSD133x OLED controllers Javier Martinez Canillas

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).