[PATCH 2/5] dt-bindings: display: sitronix,st7571: add optional inverted property

Marcus Folkesson posted 5 patches 2 months, 3 weeks ago
There is a newer version of this series
[PATCH 2/5] dt-bindings: display: sitronix,st7571: add optional inverted property
Posted by Marcus Folkesson 2 months, 3 weeks ago
Depending on which display that is connected to the controller, an "1"
means either a black or a white pixel.

The supported formats (R1/R2/XRGB8888) expects the pixels
to map against (4bit):
00 => Black
01 => Dark Gray
10 => Light Gray
11 => White

If this is not what the display map against, the controller has support
to invert these values.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/display/sitronix,st7571.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/sitronix,st7571.yaml b/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
index 4fea782fccd701f5095a08290c13722a12a58b52..065d61b718dc92e04419056b1e2d73fd0b2cb345 100644
--- a/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
+++ b/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
@@ -28,6 +28,11 @@ properties:
     description:
       Display supports 4-level grayscale.
 
+  sitronix,inverted:
+    type: boolean
+    description: |
+      Display pixels are inverted, i.e. 0 is white and 1 is black.
+
   reset-gpios: true
   width-mm: true
   height-mm: true

-- 
2.49.0
Re: [PATCH 2/5] dt-bindings: display: sitronix,st7571: add optional inverted property
Posted by Rob Herring 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 10:04:00AM +0200, Marcus Folkesson wrote:
> Depending on which display that is connected to the controller, an "1"
> means either a black or a white pixel.
> 
> The supported formats (R1/R2/XRGB8888) expects the pixels
> to map against (4bit):
> 00 => Black
> 01 => Dark Gray
> 10 => Light Gray
> 11 => White
> 
> If this is not what the display map against, the controller has support
> to invert these values.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  Documentation/devicetree/bindings/display/sitronix,st7571.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/sitronix,st7571.yaml b/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
> index 4fea782fccd701f5095a08290c13722a12a58b52..065d61b718dc92e04419056b1e2d73fd0b2cb345 100644
> --- a/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
> +++ b/Documentation/devicetree/bindings/display/sitronix,st7571.yaml
> @@ -28,6 +28,11 @@ properties:
>      description:
>        Display supports 4-level grayscale.
>  
> +  sitronix,inverted:
> +    type: boolean
> +    description: |

Don't need '|'.

> +      Display pixels are inverted, i.e. 0 is white and 1 is black.
> +
>    reset-gpios: true
>    width-mm: true
>    height-mm: true
> 
> -- 
> 2.49.0
>
Re: [PATCH 2/5] dt-bindings: display: sitronix,st7571: add optional inverted property
Posted by Javier Martinez Canillas 2 months, 3 weeks ago
Marcus Folkesson <marcus.folkesson@gmail.com> writes:

> Depending on which display that is connected to the controller, an "1"
> means either a black or a white pixel.
>
> The supported formats (R1/R2/XRGB8888) expects the pixels
> to map against (4bit):
> 00 => Black
> 01 => Dark Gray
> 10 => Light Gray
> 11 => White
>
> If this is not what the display map against, the controller has support
> to invert these values.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---

Could you please rebase on top of my series that adds the ST7567? Because
I see that this controller also have a "Inverse Display" command, so this
property will also apply.

Or do you prefer for this to land before and then I could post a v3 on top?

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
Re: [PATCH 2/5] dt-bindings: display: sitronix,st7571: add optional inverted property
Posted by Marcus Folkesson 2 months, 3 weeks ago
On Mon, Jul 14, 2025 at 12:51:12PM +0200, Javier Martinez Canillas wrote:
> Marcus Folkesson <marcus.folkesson@gmail.com> writes:
> 
> > Depending on which display that is connected to the controller, an "1"
> > means either a black or a white pixel.
> >
> > The supported formats (R1/R2/XRGB8888) expects the pixels
> > to map against (4bit):
> > 00 => Black
> > 01 => Dark Gray
> > 10 => Light Gray
> > 11 => White
> >
> > If this is not what the display map against, the controller has support
> > to invert these values.
> >
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> 
> Could you please rebase on top of my series that adds the ST7567? Because
> I see that this controller also have a "Inverse Display" command, so this
> property will also apply.

Sure, I will rebase on top of your series and include support for the
inverse display command for the ST7567 controller as well.

> 
> Or do you prefer for this to land before and then I could post a v3 on top?
> 
> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> 
> -- 
> Best regards,
> 
> Javier Martinez Canillas
> Core Platforms
> Red Hat

Best regards,
Marcus Folkesson