Skip to content

Commit f13502e

Browse files
Gadgetoidpelwell
authored andcommitted
dtoverlays: hyperpixel2r: Add PWM backlight support.
Signed-off-by: Phil Howard <github@gadgetoid.com>
1 parent 5fe081e commit f13502e

1 file changed

Lines changed: 59 additions & 6 deletions

File tree

arch/arm/boot/dts/overlays/vc4-kms-dpi-hyperpixel2r-overlay.dts

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
reg = <0>;
3232
/* 100 kHz */
3333
spi-max-frequency = <100000>;
34-
backlight = <&backlight>;
3534
rotation = <0>;
3635

3736
port {
@@ -41,11 +40,6 @@
4140
};
4241
};
4342
};
44-
45-
backlight: backlight {
46-
compatible = "gpio-backlight";
47-
gpios = <&gpio 19 0>;
48-
};
4943
};
5044
};
5145

@@ -103,12 +97,71 @@
10397
};
10498
};
10599

100+
fragment@4 {
101+
target = <&panel>;
102+
__overlay__ {
103+
backlight = <&backlight>;
104+
};
105+
};
106+
107+
fragment@5 {
108+
target-path = "/";
109+
__overlay__ {
110+
backlight: backlight {
111+
compatible = "gpio-backlight";
112+
gpios = <&gpio 19 0>;
113+
};
114+
};
115+
};
116+
117+
fragment@6 {
118+
target = <&panel>;
119+
__dormant__ {
120+
backlight = <&backlight_pwm>;
121+
};
122+
};
123+
124+
fragment@7 {
125+
target-path = "/";
126+
__dormant__ {
127+
backlight_pwm: backlight_pwm {
128+
compatible = "pwm-backlight";
129+
pwms = <&pwm 1 200000 0>;
130+
brightness-levels = <0 255>;
131+
num-interpolated-steps = <255>;
132+
default-brightness-level = <1>;
133+
};
134+
135+
};
136+
};
137+
138+
fragment@8 {
139+
target = <&pwm>;
140+
__dormant__ {
141+
pinctrl-names = "default";
142+
pinctrl-0 = <&pwm_pins>;
143+
assigned-clock-rates = <1000000>;
144+
status = "okay";
145+
};
146+
};
147+
148+
fragment@9 {
149+
target = <&gpio>;
150+
__dormant__ {
151+
pwm_pins: pwm_pins {
152+
brcm,pins = <19>;
153+
brcm,function = <2>; /* Alt5 */
154+
};
155+
};
156+
};
157+
106158
__overrides__ {
107159
disable-touch = <0>,"-3";
108160
touchscreen-inverted-x = <&polytouch>,"touchscreen-inverted-x?";
109161
touchscreen-inverted-y = <&polytouch>,"touchscreen-inverted-y!";
110162
touchscreen-swapped-x-y = <&polytouch>,"touchscreen-swapped-x-y!";
111163
rotate = <&panel>, "rotation:0";
164+
backlight-pwm = <0>,"-4-5+6+7+8+9";
112165
};
113166

114167
};

0 commit comments

Comments
 (0)