tegrakernel/kernel/kernel-4.9/Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt

135 lines
4.8 KiB
Plaintext
Raw Normal View History

2022-02-16 09:13:02 -06:00
For pwm-backlight bindings
1. backlight node
Required properties:
- compatible: "pwm-backlight"
- pwms: OF device-tree PWM specification (see PWM binding[0])
- lth-brightness: low threshold brightness to retain the linearity of the graph when the intensity
of backlight goes to zero(OFF) when the value in not zero almost nearing to zero(some x%)
- pwm-gpio: specifies a GPIO used for pwm pin if there is.
- bl-measured: Arrays for backlight calibration, which is usually for linear backlight response.
- brightness-levels: Array of distinct brightness levels. Typically these
are in the range from 0 to 255, but any range starting at 0 will do.
The actual brightness level (PWM duty cycle) will be interpolated
from these values. 0 means a 0% duty cycle (darkest/off), while the
last value in the array represents a 100% duty cycle (brightest).
- default-brightness-level: the default brightness level (index into the
array defined by the "brightness-levels" property)
- power-supply: regulator for supply voltage
- label: name of the backlight device. If not specified, node name will be
be used as device name.
The following "max-brightness" and "default-brightness" are mutually exclusive
with "brightness-levels" and "default-brightness-level".
It is used in case where levels are not available on the backlight device
and the device can interpolate values.
In this case the minimum value that is considered is 0.
- max-brightness: the maximum brighness value that is allowed by the
backlight device.
- default-brightness: the default brighness value that is allowed by the
backlight device.
Optional properties:
- pwm-names: a list of names for the PWM devices specified in the
"pwms" property (see PWM binding[0])
- enable-gpios: contains a single GPIO specifier for the GPIO which enables
and disables the backlight (see GPIO binding[1])
It is possible for backlight node to have child backlight node.
- Child node represents one of multiple backlight settings nodes, which are pwm-backlight based.
In this case, "lth-brightness", "pwm-gpio", "bl-measured", "brightness-levels",
"default-brightness-level", "max-brightness" and "default-brightness" properties
need to be prepared underneath each child node, instead of backlight parent node.
1.A) child backlight node
Child backlight node must be contained in backlight parent node.
It is possible to have multiple backlight nodes. Additionally, child backlight node
should have its own compatible property.
- compatible: Can be arbitrary, but each child backlight node should have unique name.
- pwms: OF device-tree PWM specification (see PWM binding[0]). If pwms is not searched
underneath backlight node, then, search pwm device in this node.
[0]: Documentation/devicetree/bindings/pwm/pwm.txt
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
Examples:
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 5000000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
power-supply = <&vdd_bl_reg>;
enable-gpios = <&gpio 58 0>;
};
or
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 1 1000000>;
max-brightness = <255>;
default-brightness = <224>;
};
or
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 1 5000000>;
bl-device {
status = "okay";
compatible = "a,wuxga-8-0-bl";
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
};
};
or
backlight {
compatible = "pwm-backlight";
pwms = <&pwm 1 40161>;
bl-device {
status = "okay";
compatible = "a,wuxga-8-0-bl";
max-brightness = <255>;
default-brightness = <191>;
bl-measured = < 0 1 2 4 5 6 7 8
10 11 12 13 14 15 16 18
19 20 21 22 23 24 25 26
27 29 30 31 32 33 34 35
36 38 39 40 41 42 44 45
46 47 48 49 50 52 53 54
55 56 57 58 59 61 62 63
64 65 67 68 69 70 71 72
73 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89
90 91 92 93 94 96 97 98
99 100 101 102 103 104 105 106
107 108 109 110 111 112 112 113
114 115 115 116 117 117 118 119
120 122 123 124 125 126 128 129
130 131 132 133 134 135 135 136
137 138 139 140 141 142 143 145
146 147 148 149 150 151 152 153
154 155 156 157 158 159 160 161
161 162 163 164 164 165 166 166
167 168 169 170 171 173 174 175
176 177 178 179 180 181 182 183
183 184 185 186 187 188 189 189
190 191 192 193 193 194 195 196
197 198 199 200 200 201 202 203
204 205 206 207 208 209 210 211
212 213 214 216 217 218 219 220
221 222 223 224 225 226 227 228
229 230 231 232 233 234 235 235
236 237 238 239 240 241 242 243
244 245 247 248 249 250 251 251
252 252 253 253 254 254 255 255 >;
};
};