From: Rob Herring <robh@kernel.org>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: david@lechnology.com, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-staging@lists.linux.dev, dave.stevenson@raspberrypi.com,
maxime@cerno.tech
Subject: Re: [PATCH 4/6] dt-bindings: display: sitronix,st7735r: Add initialization properties
Date: Wed, 1 Dec 2021 16:08:34 -0600 [thread overview]
Message-ID: <YafyYgrwga0Tf/EB@robh.at.kernel.org> (raw)
In-Reply-To: <20211124150757.17929-5-noralf@tronnes.org>
On Wed, Nov 24, 2021 at 04:07:55PM +0100, Noralf Trønnes wrote:
> Add initialization properties that are commonly used to initialize the
> controller for a specific display panel. It is common for displays to have
> a datasheet listing the necessary controller settings or some example code
> doing the same. These settings can be matched directly to the DT
> properties.
>
> The commands FRMCTR2, FRMCTR3, PWCTR4 and PWCTR5 are usually part of the
> setup examples but they are skipped here since they deal with partial and
> idle mode which are powersaving modes for very special use cases.
>
> dc-gpios is made optional because its absence indicates 3-line mode.
>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
> .../bindings/display/sitronix,st7735r.yaml | 118 +++++++++++++++++-
> 1 file changed, 116 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml
> index 157b1a7b18f9..2db1cfe6ae30 100644
> --- a/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml
> +++ b/Documentation/devicetree/bindings/display/sitronix,st7735r.yaml
> @@ -19,6 +19,10 @@ allOf:
> properties:
> compatible:
> oneOf:
> + - description:
> + Sitronix ST7735R 262K Color Single-Chip TFT Controller/Driver
> + items:
> + - const: sitronix,st7735r
> - description:
> Adafruit 1.8" 160x128 Color TFT LCD (Product ID 358 or 618)
> items:
> @@ -32,20 +36,99 @@ properties:
> - okaya,rh128128t
> - const: sitronix,st7715r
>
> + width:
> + description:
> + Width of display panel in pixels
> +
> + height:
> + description:
> + Height of display panel in pixels
We already have width-mm and height-mm for physical size so this might
be a bit confusing. There's also panel-timing 'vactive' and 'hactive'
which is effectively the same thing you are defining.
> +
> + frmctr1:
Are all these standardized by MIPI or otherwise common? If not, they
need vendor prefixes.
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Frame Rate Control (In normal mode/Full colors) (B1h)
> + minItems: 3
> + maxItems: 3
> +
> + invctr:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Display Inversion Control (B4h)
> + minItems: 1
> + maxItems: 1
> +
> + pwctr1:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Power Control 1 (C0h)
> + minItems: 3
> + maxItems: 3
> +
> + pwctr2:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Power Control 2 (C1h)
> + minItems: 1
> + maxItems: 1
> +
> + pwctr3:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Power Control 3 (in Normal mode/Full colors) (C2h)
> + minItems: 2
> + maxItems: 2
> +
> + vmctr1:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + VCOM Control 1 (C5h)
> + minItems: 1
> + maxItems: 1
> +
> + madctl:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Memory Data Access Control (36h)
> + minItems: 1
> + maxItems: 1
> +
> + gamctrp1:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Gamma Positive Polarity Correction Characteristics Setting (E0h)
> + minItems: 16
> + maxItems: 16
> +
> + gamctrn1:
> + $ref: /schemas/types.yaml#definitions/uint8-array
> + description:
> + Gamma Negative Polarity Correction Characteristics Setting (E1h)
> + minItems: 16
> + maxItems: 16
> +
> + write-only:
> + type: boolean
> + description:
> + Controller is not readable (ie. MISO is not wired up).
> +
> dc-gpios:
> maxItems: 1
> - description: Display data/command selection (D/CX)
> + description: |
> + Controller data/command selection (D/CX) in 4-line SPI mode.
> + If not set, the controller is in 3-line SPI mode.
>
> backlight: true
> reg: true
> spi-max-frequency: true
> reset-gpios: true
> rotation: true
> + width-mm: true
> + height-mm: true
>
> required:
> - compatible
> - reg
> - - dc-gpios
>
> additionalProperties: false
>
> @@ -72,5 +155,36 @@ examples:
> backlight = <&backlight>;
> };
> };
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + spi {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sainsmart18@0{
> + compatible = "sitronix,st7735r";
> + reg = <0>;
> + spi-max-frequency = <40000000>;
> +
> + width = <160>;
> + height = <128>;
> +
> + frmctr1 = [ 01 2C 2D ];
> + invctr = [ 07 ];
> + pwctr1 = [ A2 02 84 ];
> + pwctr2 = [ C5 ];
> + pwctr3 = [ 0A 00 ];
> + vmctr1 = [ 0E ];
> + madctl = [ 60 ];
> + gamctrp1 = [ 0F 1A 0F 18 2F 28 20 22 1F 1B 23 37 00 07 02 10 ];
> + gamctrn1 = [ 0F 1B 0F 17 33 2C 29 2E 30 30 39 3F 00 07 03 10 ];
> +
> + dc-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&gpio 80 GPIO_ACTIVE_HIGH>;
> + write-only;
> + };
> + };
> +
>
> ...
> --
> 2.33.0
>
>
next prev parent reply other threads:[~2021-12-01 22:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-24 15:07 [PATCH 0/6] drm/tiny/st7735r: Match up with staging/fbtft driver Noralf Trønnes
2021-11-24 15:07 ` [PATCH 1/6] dt-bindings: display: sitronix,st7735r: Fix backlight in example Noralf Trønnes
2021-12-01 21:57 ` Rob Herring
2021-12-06 8:53 ` Geert Uytterhoeven
2021-12-06 15:18 ` David Lechner
2021-11-24 15:07 ` [PATCH 2/6] dt-bindings: display: sitronix,st7735r: Make reset-gpios optional Noralf Trønnes
2021-12-01 21:57 ` Rob Herring
2021-12-06 15:18 ` David Lechner
2021-11-24 15:07 ` [PATCH 3/6] dt-bindings: display: sitronix,st7735r: Remove spi-max-frequency limit Noralf Trønnes
2021-12-01 21:57 ` Rob Herring
2021-12-06 15:19 ` David Lechner
2021-12-06 16:02 ` Noralf Trønnes
2021-11-24 15:07 ` [PATCH 4/6] dt-bindings: display: sitronix,st7735r: Add initialization properties Noralf Trønnes
2021-12-01 22:08 ` Rob Herring [this message]
2021-11-24 15:07 ` [PATCH 5/6] drm/mipi-dbi: Add device property functions Noralf Trønnes
2021-11-24 15:07 ` [PATCH 6/6] drm: tiny: st7735r: Support DT initialization of controller Noralf Trønnes
2021-11-24 22:03 ` [PATCH 0/6] drm/tiny/st7735r: Match up with staging/fbtft driver David Lechner
2021-11-25 17:21 ` Noralf Trønnes
2021-11-29 9:39 ` Maxime Ripard
2021-11-30 8:13 ` Geert Uytterhoeven
2021-11-30 9:03 ` Maxime Ripard
2021-11-30 14:30 ` Noralf Trønnes
2021-12-01 14:52 ` Maxime Ripard
2021-12-06 15:26 ` David Lechner
2021-12-06 16:04 ` Noralf Trønnes
2022-03-09 10:37 ` Noralf Trønnes
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=YafyYgrwga0Tf/EB@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=david@lechnology.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=maxime@cerno.tech \
--cc=noralf@tronnes.org \
/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).