drm/solomon: Add support for the SSD133x controller family
Subsystems (4)
Javier Martinez Canillas
maintainerv4 cover drm/solomon: Add support for the SSD133x controller family
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
Signature · 1 line
2.43.0
Javier Martinez Canillas
maintainerPATCH v4 1/4 dt-bindings: display: ssd1307fb: Add vendor prefix to width and height
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.
---
(no changes since v1)
.../bindings/display/solomon,ssd1307fb.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml +10 -10
@@ -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
Signature · 1 line
2.43.0
Javier Martinez Canillas
maintainerPATCH v4 2/4 dt-bindings: display: ssd132x: Add vendor prefix to width and height
In reply to Javier Martinez CanillasCommit 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.
---
(no changes since v1)
.../devicetree/bindings/display/solomon,ssd132x.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/display/solomon,ssd132x.yaml +6 -6
@@ -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
Signature · 1 line
2.43.0
Javier Martinez Canillas
maintainerPATCH v4 3/4 dt-bindings: display: Add SSD133x OLED controllers
In reply to Javier Martinez CanillasAdd a Device Tree binding schema for the OLED panels based on the Solomon SSD133x family of controllers.
---
(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
Documentation/devicetree/bindings/display/solomon,ssd133x.yaml new file +57 -0
@@ -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 <[email protected]> + +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>; + }; + };
Signature · 1 line
2.43.0
Javier Martinez Canillas
maintainerPATCH v4 4/4 drm/ssd130x: Add support for the SSD133x OLED controller family
In reply to Javier Martinez CanillasThe Solomon SSD133x controllers (such as the SSD1331) are used by RGB dot matrix OLED panels, add a modesetting pipeline to support the chip family.
The SSD133x controllers support 256 (8-bit) and 65k (16-bit) color depths but only the 256-color mode (DRM_FORMAT_RGB332) is implemented for now.
---
Changes in v4:
- Fix typo in commit message (Jocelyn Falempe).
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 +- 4 files changed, 386 insertions(+), 1 deletion(-)
drivers/gpu/drm/solomon/ssd130x-i2c.c +5 -0
@@ -105,6 +105,11 @@ static const struct of_device_id ssd130x_of_match[] = { .compatible = "solomon,ssd1327", .data = &ssd130x_variants[SSD1327_ID], }, +/* ssd133x family */ + { + .compatible = "solomon,ssd1331", + .data = &ssd130x_variants[SSD1331_ID], + }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, ssd130x_of_match);
drivers/gpu/drm/solomon/ssd130x-spi.c +7 -0
@@ -142,6 +142,11 @@ static const struct of_device_id ssd130x_of_match[] = { .compatible = "solomon,ssd1327", .data = &ssd130x_variants[SSD1327_ID], }, +/* ssd133x family */ + { + .compatible = "solomon,ssd1331", + .data = &ssd130x_variants[SSD1331_ID], + }, {/* sentinel */ } };MODULE_DEVICE_TABLE (of, ssd130x_of_match);
@@ -166,6 +171,8 @@ static const struct spi_device_id ssd130x_spi_table[] = { { "ssd1322", SSD1322_ID }, { "ssd1325", SSD1325_ID }, { "ssd1327", SSD1327_ID }, +/* ssd133x family */ + { "ssd1331", SSD1331_ID }, { /* sentinel */ } };MODULE_DEVICE_TABLE (spi, ssd130x_spi_table);
drivers/gpu/drm/solomon/ssd130x.c +370 -0
454 lines not on this page · raw message
drivers/gpu/drm/solomon/ssd130x.h +4 -1
@@ -25,7 +25,8 @@enum ssd130x_family_ids {SSD130X_FAMILY , -SSD132X_FAMILY +SSD132X_FAMILY , +SSD133X_FAMILY };enum ssd130x_variants {
@@ -39,6 +40,8 @@ enum ssd130x_variants {SSD1322_ID ,SSD1325_ID ,SSD1327_ID , +/* ssd133x family */ +SSD1331_ID , NR_SSD130X_VARIANTS };
Signature · 1 line
2.43.0