drm/solomon: Add support for the SSD133x controller family
Subsystems (4)
Javier Martinez Canillas
maintainerv5 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 v5 that is basically the same than the previous v4 but dropping support for I2C since the ssd133x family does not support that interface.
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 v5:
- Drop I2C example in DT binding schema due that bus not being supported.
- Drop "solomon,ssd1331" entry from ssd130x-i2c due I2C bus not being supported.
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 | 45 +++ drivers/gpu/drm/solomon/ssd130x-spi.c | 7 + drivers/gpu/drm/solomon/ssd130x.c | 370 ++++++++++++++++++ drivers/gpu/drm/solomon/ssd130x.h | 5 +- 6 files changed, 442 insertions(+), 17 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml
Signature · 1 line
2.43.0
Javier Martinez Canillas
maintainerPATCH v5 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 v5 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 v5 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.
---
Changes in v5:
- Drop I2C example in DT binding schema due that bus not being supported.
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 | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/solomon,ssd133x.yaml
Documentation/devicetree/bindings/display/solomon,ssd133x.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# 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: + - | + 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 v5 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 v5:
- Drop "solomon,ssd1331" entry from ssd130x-i2c due I2C bus not being supported.
Changes in v4:
- Fix typo in commit message (Jocelyn Falempe).
drivers/gpu/drm/solomon/ssd130x-spi.c | 7 + drivers/gpu/drm/solomon/ssd130x.c | 370 ++++++++++++++++++++++++++ drivers/gpu/drm/solomon/ssd130x.h | 5 +- 3 files changed, 381 insertions(+), 1 deletion(-)
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
Quoted 12 lines · Javier Martinez Canillas
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 v5 that is basically the same than the previous v4 but dropping support for I2C since the ssd133x family does not support that interface.
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_checktarget.
Quoted 8 lines
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
Pushed to drm-misc (drm-misc-next). Thanks!
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat