brintos

brintos / linux-shallow public Read only

0
0
Text · 6.6 KiB · 153ff86 Raw
270 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 Framebuffer8 9maintainers:10  - Maxime Ripard <mripard@kernel.org>11  - Javier Martinez Canillas <javierm@redhat.com>12 13properties:14  compatible:15    oneOf:16      # Deprecated compatible strings17      - enum:18          - solomon,ssd1305fb-i2c19          - solomon,ssd1306fb-i2c20          - solomon,ssd1307fb-i2c21          - solomon,ssd1309fb-i2c22        deprecated: true23      - enum:24          - sinowealth,sh110625          - solomon,ssd130526          - solomon,ssd130627          - solomon,ssd130728          - solomon,ssd130929 30  pwms:31    maxItems: 132 33  vbat-supply:34    description: The supply for VBAT35 36  solomon,page-offset:37    $ref: /schemas/types.yaml#/definitions/uint3238    default: 139    description:40      Offset of pages (band of 8 pixels) that the screen is mapped to41 42  solomon,segment-no-remap:43    type: boolean44    description:45      Display needs normal (non-inverted) data column to segment mapping46 47  solomon,col-offset:48    $ref: /schemas/types.yaml#/definitions/uint3249    default: 050    description:51      Offset of columns (COL/SEG) that the screen is mapped to52 53  solomon,com-seq:54    type: boolean55    description:56      Display uses sequential COM pin configuration57 58  solomon,com-lrremap:59    type: boolean60    description:61      Display uses left-right COM pin remap62 63  solomon,com-invdir:64    type: boolean65    description:66      Display uses inverted COM pin scan direction67 68  solomon,com-offset:69    $ref: /schemas/types.yaml#/definitions/uint3270    default: 071    description:72      Number of the COM pin wired to the first display line73 74  solomon,prechargep1:75    $ref: /schemas/types.yaml#/definitions/uint3276    default: 277    description:78      Length of deselect period (phase 1) in clock cycles79 80  solomon,prechargep2:81    $ref: /schemas/types.yaml#/definitions/uint3282    default: 283    description:84      Length of precharge period (phase 2) in clock cycles.  This needs to be85      the higher, the higher the capacitance of the OLED's pixels is.86 87  solomon,dclk-div:88    $ref: /schemas/types.yaml#/definitions/uint3289    minimum: 190    maximum: 1691    description:92      Clock divisor. The default value is controller-dependent.93 94  solomon,dclk-frq:95    $ref: /schemas/types.yaml#/definitions/uint3296    minimum: 097    maximum: 1598    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-array104    maxItems: 4105    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: boolean112    description:113      Display uses color mode114 115  solomon,low-power:116    type: boolean117    description:118      Display runs in low power mode119 120required:121  - compatible122  - reg123 124allOf:125  - $ref: solomon,ssd-common.yaml#126 127  - if:128      properties:129        compatible:130          contains:131            const: sinowealth,sh1106132    then:133      properties:134        solomon,width:135          default: 132136        solomon,height:137          default: 64138        solomon,dclk-div:139          default: 1140        solomon,dclk-frq:141          default: 5142 143  - if:144      properties:145        compatible:146          contains:147            enum:148              - solomon,ssd1305-i2c149              - solomon,ssd1305150    then:151      properties:152        solomon,width:153          default: 132154        solomon,height:155          default: 64156        solomon,dclk-div:157          default: 1158        solomon,dclk-frq:159          default: 7160 161  - if:162      properties:163        compatible:164          contains:165            enum:166              - solomon,ssd1306-i2c167              - solomon,ssd1306168    then:169      properties:170        solomon,width:171          default: 128172        solomon,height:173          default: 64174        solomon,dclk-div:175          default: 1176        solomon,dclk-frq:177          default: 8178 179  - if:180      properties:181        compatible:182          contains:183            enum:184              - solomon,ssd1307-i2c185              - solomon,ssd1307186    then:187      properties:188        solomon,width:189          default: 128190        solomon,height:191          default: 39192        solomon,dclk-div:193          default: 2194        solomon,dclk-frq:195          default: 12196      required:197        - pwms198 199  - if:200      properties:201        compatible:202          contains:203            enum:204              - solomon,ssd1309-i2c205              - solomon,ssd1309206    then:207      properties:208        solomon,width:209          default: 128210        solomon,height:211          default: 64212        solomon,dclk-div:213          default: 1214        solomon,dclk-frq:215          default: 10216 217unevaluatedProperties: false218 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    };270