File Index
Files and directories
Sign in
FILE

solomon,ssd1307fb.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/display/solomon,ssd1307fb.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Solomon SSD1307 OLED Controller Framebuffer
  8
  9maintainers:
 10  - Maxime Ripard <mripard@kernel.org>
 11  - Javier Martinez Canillas <javierm@redhat.com>
 12
 13properties:
 14  compatible:
 15    oneOf:
 16      # Deprecated compatible strings
 17      - enum:
 18          - solomon,ssd1305fb-i2c
 19          - solomon,ssd1306fb-i2c
 20          - solomon,ssd1307fb-i2c
 21          - solomon,ssd1309fb-i2c
 22        deprecated: true
 23      - enum:
 24          - sinowealth,sh1106
 25          - solomon,ssd1305
 26          - solomon,ssd1306
 27          - solomon,ssd1307
 28          - solomon,ssd1309
 29
 30  pwms:
 31    maxItems: 1
 32
 33  vbat-supply:
 34    description: The supply for VBAT
 35
 36  solomon,page-offset:
 37    $ref: /schemas/types.yaml#/definitions/uint32
 38    default: 1
 39    description:
 40      Offset of pages (band of 8 pixels) that the screen is mapped to
 41
 42  solomon,segment-no-remap:
 43    type: boolean
 44    description:
 45      Display needs normal (non-inverted) data column to segment mapping
 46
 47  solomon,col-offset:
 48    $ref: /schemas/types.yaml#/definitions/uint32
 49    default: 0
 50    description:
 51      Offset of columns (COL/SEG) that the screen is mapped to
 52
 53  solomon,com-seq:
 54    type: boolean
 55    description:
 56      Display uses sequential COM pin configuration
 57
 58  solomon,com-lrremap:
 59    type: boolean
 60    description:
 61      Display uses left-right COM pin remap
 62
 63  solomon,com-invdir:
 64    type: boolean
 65    description:
 66      Display uses inverted COM pin scan direction
 67
 68  solomon,com-offset:
 69    $ref: /schemas/types.yaml#/definitions/uint32
 70    default: 0
 71    description:
 72      Number of the COM pin wired to the first display line
 73
 74  solomon,prechargep1:
 75    $ref: /schemas/types.yaml#/definitions/uint32
 76    default: 2
 77    description:
 78      Length of deselect period (phase 1) in clock cycles
 79
 80  solomon,prechargep2:
 81    $ref: /schemas/types.yaml#/definitions/uint32
 82    default: 2
 83    description:
 84      Length of precharge period (phase 2) in clock cycles.  This needs to be
 85      the higher, the higher the capacitance of the OLED's pixels is.
 86
 87  solomon,dclk-div:
 88    $ref: /schemas/types.yaml#/definitions/uint32
 89    minimum: 1
 90    maximum: 16
 91    description:
 92      Clock divisor. The default value is controller-dependent.
 93
 94  solomon,dclk-frq:
 95    $ref: /schemas/types.yaml#/definitions/uint32
 96    minimum: 0
 97    maximum: 15
 98    description:
 99      Clock frequency, higher value means higher frequency.
100      The default value is controller-dependent.
101
102  solomon,lookup-table:
103    $ref: /schemas/types.yaml#/definitions/uint8-array
104    maxItems: 4
105    description:
106      8 bit value array of current drive pulse widths for BANK0, and colors A,
107      B, and C. Each value in range of 31 to 63 for pulse widths of 32 to 64.
108      Color D is always width 64.
109
110  solomon,area-color-enable:
111    type: boolean
112    description:
113      Display uses color mode
114
115  solomon,low-power:
116    type: boolean
117    description:
118      Display runs in low power mode
119
120required:
121  - compatible
122  - reg
123
124allOf:
125  - $ref: solomon,ssd-common.yaml#
126
127  - if:
128      properties:
129        compatible:
130          contains:
131            const: sinowealth,sh1106
132    then:
133      properties:
134        solomon,width:
135          default: 132
136        solomon,height:
137          default: 64
138        solomon,dclk-div:
139          default: 1
140        solomon,dclk-frq:
141          default: 5
142
143  - if:
144      properties:
145        compatible:
146          contains:
147            enum:
148              - solomon,ssd1305-i2c
149              - solomon,ssd1305
150    then:
151      properties:
152        solomon,width:
153          default: 132
154        solomon,height:
155          default: 64
156        solomon,dclk-div:
157          default: 1
158        solomon,dclk-frq:
159          default: 7
160
161  - if:
162      properties:
163        compatible:
164          contains:
165            enum:
166              - solomon,ssd1306-i2c
167              - solomon,ssd1306
168    then:
169      properties:
170        solomon,width:
171          default: 128
172        solomon,height:
173          default: 64
174        solomon,dclk-div:
175          default: 1
176        solomon,dclk-frq:
177          default: 8
178
179  - if:
180      properties:
181        compatible:
182          contains:
183            enum:
184              - solomon,ssd1307-i2c
185              - solomon,ssd1307
186    then:
187      properties:
188        solomon,width:
189          default: 128
190        solomon,height:
191          default: 39
192        solomon,dclk-div:
193          default: 2
194        solomon,dclk-frq:
195          default: 12
196      required:
197        - pwms
198
199  - if:
200      properties:
201        compatible:
202          contains:
203            enum:
204              - solomon,ssd1309-i2c
205              - solomon,ssd1309
206    then:
207      properties:
208        solomon,width:
209          default: 128
210        solomon,height:
211          default: 64
212        solomon,dclk-div:
213          default: 1
214        solomon,dclk-frq:
215          default: 10
216
217unevaluatedProperties: false
218
219examples:
220  - |
221    i2c {
222            #address-cells = <1>;
223            #size-cells = <0>;
224
225            ssd1307_i2c: oled@3c {
226                    compatible = "solomon,ssd1307";
227                    reg = <0x3c>;
228                    pwms = <&pwm 4 3000>;
229                    reset-gpios = <&gpio2 7>;
230            };
231
232            ssd1306_i2c: oled@3d {
233                    compatible = "solomon,ssd1306";
234                    reg = <0x3d>;
235                    pwms = <&pwm 4 3000>;
236                    reset-gpios = <&gpio2 7>;
237                    solomon,com-lrremap;
238                    solomon,com-invdir;
239                    solomon,com-offset = <32>;
240                    solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>;
241            };
242    };
243  - |
244    spi {
245            #address-cells = <1>;
246            #size-cells = <0>;
247
248            ssd1307_spi: oled@0 {
249                    compatible = "solomon,ssd1307";
250                    reg = <0x0>;
251                    pwms = <&pwm 4 3000>;
252                    reset-gpios = <&gpio2 7>;
253                    dc-gpios = <&gpio2 8>;
254                    spi-max-frequency = <10000000>;
255            };
256
257            ssd1306_spi: oled@1 {
258                    compatible = "solomon,ssd1306";
259                    reg = <0x1>;
260                    pwms = <&pwm 4 3000>;
261                    reset-gpios = <&gpio2 7>;
262                    dc-gpios = <&gpio2 8>;
263                    spi-max-frequency = <10000000>;
264                    solomon,com-lrremap;
265                    solomon,com-invdir;
266                    solomon,com-offset = <32>;
267                    solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>;
268            };
269    };
~/ Read-only file preview.