From de578360d41d166ca75b0624e72c5b14f56c0bdf Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Wed, 19 Aug 2020 13:10:02 +0200
Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: improve brightness values
 on BH/CE

Commit aad90c10 caused a brightness increase with the previous values.
Subsequently, the lowest brightness value would still be fairly bright.

This commit aims at providing a wider range of usable brightness for
1.1+ devices.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
---
 .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 10 +++++-----
 .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 13 ++++++-------
 2 files changed, 11 insertions(+), 12 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 2f993ffc6..c8dcd2291 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
@@ -34,11 +34,11 @@ &backlight {
 	 * 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>;
+		392  413  436  468
+		512  571  647  742
+		857  995  1159 1349
+		1568 1819 2103 2423
+		2779 3176 3614 4096>;
 	num-interpolated-steps = <50>;
 	default-brightness-level = <400>;
 };
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 6c3019933..017104df2 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
@@ -24,14 +24,13 @@ &backlight {
 	 * 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
-	>;
+		392  413  436  468
+		512  571  647  742
+		857  995  1159 1349
+		1568 1819 2103 2423
+		2779 3176 3614 4096>;
 	num-interpolated-steps = <50>;
-	default-brightness-level = <500>;
+	default-brightness-level = <400>;
 };
 
 &lis3mdl {
-- 
2.28.0

