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