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 enum: 16 - solomon,ssd1305fb-i2c 17 - solomon,ssd1306fb-i2c 18 - solomon,ssd1307fb-i2c 19 - solomon,ssd1309fb-i2c 20 21 reg: 22 maxItems: 1 23 24 pwms: 25 maxItems: 1 26 27 reset-gpios: 28 maxItems: 1 29 30 vbat-supply: 31 description: The supply for VBAT 32 33 solomon,height: 34 $ref: /schemas/types.yaml#/definitions/uint32 35 default: 16 36 description: 37 Height in pixel of the screen driven by the controller 38 39 solomon,width: 40 $ref: /schemas/types.yaml#/definitions/uint32 41 default: 96 42 description: 43 Width in pixel of the screen driven by the controller 44 45 solomon,page-offset: 46 $ref: /schemas/types.yaml#/definitions/uint32 47 default: 1 48 description: 49 Offset of pages (band of 8 pixels) that the screen is mapped to 50 51 solomon,segment-no-remap: 52 type: boolean 53 description: 54 Display needs normal (non-inverted) data column to segment mapping 55 56 solomon,col-offset: 57 $ref: /schemas/types.yaml#/definitions/uint32 58 default: 0 59 description: 60 Offset of columns (COL/SEG) that the screen is mapped to 61 62 solomon,com-seq: 63 type: boolean 64 description: 65 Display uses sequential COM pin configuration 66 67 solomon,com-lrremap: 68 type: boolean 69 description: 70 Display uses left-right COM pin remap 71 72 solomon,com-invdir: 73 type: boolean 74 description: 75 Display uses inverted COM pin scan direction 76 77 solomon,com-offset: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 default: 0 80 description: 81 Number of the COM pin wired to the first display line 82 83 solomon,prechargep1: 84 $ref: /schemas/types.yaml#/definitions/uint32 85 default: 2 86 description: 87 Length of deselect period (phase 1) in clock cycles 88 89 solomon,prechargep2: 90 $ref: /schemas/types.yaml#/definitions/uint32 91 default: 2 92 description: 93 Length of precharge period (phase 2) in clock cycles. This needs to be 94 the higher, the higher the capacitance of the OLED's pixels is. 95 96 solomon,dclk-div: 97 $ref: /schemas/types.yaml#/definitions/uint32 98 minimum: 1 99 maximum: 16 100 description: 101 Clock divisor. The default value is controller-dependent. 102 103 solomon,dclk-frq: 104 $ref: /schemas/types.yaml#/definitions/uint32 105 minimum: 0 106 maximum: 15 107 description: 108 Clock frequency, higher value means higher frequency. 109 The default value is controller-dependent. 110 111 solomon,lookup-table: 112 $ref: /schemas/types.yaml#/definitions/uint8-array 113 maxItems: 4 114 description: 115 8 bit value array of current drive pulse widths for BANK0, and colors A, 116 B, and C. Each value in range of 31 to 63 for pulse widths of 32 to 64. 117 Color D is always width 64. 118 119 solomon,area-color-enable: 120 type: boolean 121 description: 122 Display uses color mode 123 124 solomon,low-power: 125 type: boolean 126 description: 127 Display runs in low power mode 128 129required: 130 - compatible 131 - reg 132 133allOf: 134 - if: 135 properties: 136 compatible: 137 contains: 138 const: solomon,ssd1305fb-i2c 139 then: 140 properties: 141 solomon,dclk-div: 142 default: 1 143 solomon,dclk-frq: 144 default: 7 145 146 - if: 147 properties: 148 compatible: 149 contains: 150 const: solomon,ssd1306fb-i2c 151 then: 152 properties: 153 solomon,dclk-div: 154 default: 1 155 solomon,dclk-frq: 156 default: 8 157 158 - if: 159 properties: 160 compatible: 161 contains: 162 const: solomon,ssd1307fb-i2c 163 then: 164 properties: 165 solomon,dclk-div: 166 default: 2 167 solomon,dclk-frq: 168 default: 12 169 required: 170 - pwms 171 172 - if: 173 properties: 174 compatible: 175 contains: 176 const: solomon,ssd1309fb-i2c 177 then: 178 properties: 179 solomon,dclk-div: 180 default: 1 181 solomon,dclk-frq: 182 default: 10 183 184additionalProperties: false 185 186examples: 187 - | 188 i2c1 { 189 #address-cells = <1>; 190 #size-cells = <0>; 191 192 ssd1307: oled@3c { 193 compatible = "solomon,ssd1307fb-i2c"; 194 reg = <0x3c>; 195 pwms = <&pwm 4 3000>; 196 reset-gpios = <&gpio2 7>; 197 }; 198 199 ssd1306: oled@3d { 200 compatible = "solomon,ssd1306fb-i2c"; 201 reg = <0x3c>; 202 pwms = <&pwm 4 3000>; 203 reset-gpios = <&gpio2 7>; 204 solomon,com-lrremap; 205 solomon,com-invdir; 206 solomon,com-offset = <32>; 207 solomon,lookup-table = /bits/ 8 <0x3f 0x3f 0x3f 0x3f>; 208 }; 209 }; 210