1# Copyright 2023 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4description: ST7796S Display controller
5
6compatible: "sitronix,st7796s"
7
8include: [mipi-dbi-spi-device.yaml, display-controller.yaml]
9
10properties:
11  frmctl1:
12    type: uint8-array
13    default: [0xA0, 0x10]
14    description: |
15      Frame rate control (partial mode / full colors). The default value should
16      result in a framerate of ~41 FPS.
17
18  frmctl2:
19    type: uint8-array
20    default: [0x00, 0x10]
21    description: |
22      Frame rate control (idle mode / 8 colors). This property sets the
23      division ratio for internal clocks in idle mode
24
25  frmctl3:
26    type: uint8-array
27    default: [0x00, 0x10]
28    description: |
29      Frame rate control (partial mode / full colors). This property sets the
30      division ratio for internal clocks in partial mode
31
32  bpc:
33    type: uint8-array
34    default: [0x02, 0x02, 0x00, 0x04]
35    description: |
36      Blanking porch control. This sets the vertical and horizontal
37      front/back porch values
38
39  dfc:
40    type: uint8-array
41    default: [0x80, 0x02, 0x3B]
42    description: |
43      Display function control. Sets display graphical ram mode, as well as
44      gate scan mode
45
46  pwr1:
47    type: uint8-array
48    default: [0x80, 0x25]
49    description: Power control parameter 1. Sets AVDDS, AVLCS, and VGHS
50
51  pwr2:
52    type: int
53    default: 0x13
54    description: Power control parameter 2. Sets VAP
55
56  pwr3:
57    type: int
58    default: 0xA
59    description: Power control parameter 3. Sets source and gamma current levels
60
61  vcmpctl:
62    type: int
63    default: 0x1C
64    description: |
65      VCOM control setting. Value starts at 0.300V, and moves upwards in
66      increments of 0.025V. Maximum of 1.875V
67
68  doca:
69    type: uint8-array
70    default: [0x40, 0x8A, 0x00, 0x00, 0x25, 0x0A, 0x38, 0x33]
71    description: |
72      Display output control adjust. Sets display timing controls
73
74  pgc:
75    type: uint8-array
76    required: true
77    description: |
78      Positive gamma control settings. No default is provided by controller,
79      as this setting is panel specific.
80  ngc:
81    type: uint8-array
82    required: true
83    description: |
84      Negative gamma control settings. No default is provided by controller,
85      as this setting is panel specific.
86
87  madctl:
88    type: int
89    default: 0x0
90    description: |
91       Memory data access control value. This controls the panel color format,
92       as well as rotation settings.
93
94  color-invert:
95    type: boolean
96    description: When present, inverts display colors
97
98  invert-mode:
99    type: string
100    default: "1-dot"
101    enum:
102      - "column"
103      - "1-dot"
104      - "2-dot"
105    description: |
106      Display inversion control mode.
107
108  rgb-is-inverted:
109    type: boolean
110    description: |
111      Inverting color format order (RGB->BGR or BGR->RGB)
112      In the case of enabling this option, API reports pixel-format in capabilities
113      as the inverted value of the RGB pixel-format specified in MADCTL.
114      This option is convenient for supporting displays with bugs
115      where the actual color is different from the pixel format of MADCTL.
116