Skip to contentSkip to conversation

arm64: dts: allwinner: a64: teres-i: enable backlight

PATCH Applied Harald Geyer 2 participants 2 messages Feb 9, 2019 – Feb 12, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 arm64: dts: allwinner: a64: teres-i: enable backlight

Enable pwm and add a pretty standard backlight node.

The regulator is always on, but we include it anyway, because it is required by the binding document.

---
Changes since v3:
* Adjust brightness-levels to follow closer to an exponential law
* Change default value to have a similar brightness to what we had before.

Changes since v2:
* Drop all the other stuff that got merged a year ago.
* Rebased on current sunxi/for-next branch
* Add power-supply property (just to conform to the binding)
* Use slightly different brightness-levels

Actually I tried omitting brightness-levels completely, as it is now optional. However automatic calculation gives unreasonable results (depending on the exact value of pwm period). A report has been sent to the author of the code.

 .../arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +13 -0
index 7b7b14ba58e6..0ec46b969a75 100644
@@ -21,6 +21,15 @@
 		serial0 = &uart0;
 	};
 
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 0 50000 0>;
+		power-supply = <&reg_dcdc1>;
+		brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
+		default-brightness-level = <5>;
+		enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 
@@ -131,6 +140,10 @@
 	status = "okay";
 };
 
+&pwm {
+	status = "okay";
+};
+
 &r_rsb {
 	status = "okay";
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines · Harald Geyer

Enable pwm and add a pretty standard backlight node.

The regulator is always on, but we include it anyway, because it is required by the binding document.

Applied, thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel