build/patch/kernel/archive/sunxi-6.5/patches.megous/arm64-dts-sun50i-a64-pinephone-Set-minimum-backlight-duty-cycle.patch

74 lines
2.6 KiB
Diff

From 187d3bd42506a268dc7572298c9bce075b40ad42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Mon, 7 Jun 2021 20:23:52 +0200
Subject: [PATCH 103/464] arm64: dts: sun50i-a64-pinephone: Set minimum
backlight duty cycle to 10%
Instead of creating our own table, use existing lth_brightness
functionality in the pwm_bl driver.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
.../dts/allwinner/sun50i-a64-pinephone-1.1.dts | 16 +---------------
.../dts/allwinner/sun50i-a64-pinephone-1.2.dts | 17 +----------------
2 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
index d67f31ef529e..63ceae07a0e0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
@@ -26,21 +26,7 @@ &axp803 {
&backlight {
power-supply = <&reg_ldo_io0>;
- /*
- * PWM backlight circuit on this PinePhone revision was changed since
- * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight
- * being off is around 20%. Duty cycle for the lowest brightness level
- * also varries quite a bit between individual boards, so the lowest
- * value here was chosen as a safe default.
- */
- brightness-levels = <
- 774 793 814 842
- 882 935 1003 1088
- 1192 1316 1462 1633
- 1830 2054 2309 2596
- 2916 3271 3664 4096>;
- num-interpolated-steps = <50>;
- default-brightness-level = <400>;
+ lth-brightness = <10>;
};
&codec_analog {
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
index 5e988230e6e4..d28a23e98232 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
@@ -17,22 +17,7 @@ wifi_pwrseq: wifi-pwrseq {
&backlight {
power-supply = <&reg_ldo_io0>;
- /*
- * PWM backlight circuit on this PinePhone revision was changed since 1.0,
- * and the lowest PWM duty cycle that doesn't lead to backlight being off
- * is around 10%. Duty cycle for the lowest brightness level also varries
- * quite a bit between individual boards, so the lowest value here was
- * chosen as a safe default.
- */
- brightness-levels = <
- 5000 5248 5506 5858 6345
- 6987 7805 8823 10062 11543
- 13287 15317 17654 20319 23336
- 26724 30505 34702 39335 44427
- 50000
- >;
- num-interpolated-steps = <50>;
- default-brightness-level = <500>;
+ lth-brightness = <10>;
};
&lis3mdl {
--
2.34.1