summaryrefslogtreecommitdiff
path: root/driver/led/lm3630a.h
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-09-18 08:16:10 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-19 12:18:17 -0700
commit5a09049c5cc9a30ddfbe69e11b833146d8f5f04f (patch)
tree32f37c1f715aab9ba8acb12c483bb3c649a6bfc1 /driver/led/lm3630a.h
parent4984591b02c5e3e4d3c2d7bda2d7129dff20fafc (diff)
downloadchrome-ec-5a09049c5cc9a30ddfbe69e11b833146d8f5f04f.tar.gz
driver/led/lm3630a: Configure 261ms startup ramp time
It appears that, on startup, LM3630A starts by assuming some high input PWM value, so when the brightness is set to 0xff, it first drives the output, and slowly dims it as the PWM input LPF takes effect (takes about 50ms). We workaround this issue by adding a 261ms start-up ramp, to prevent LM3630A from driving backlight right after the brightness value is set. AFAICT, this has no effect on the user, even when transitioning from off to on backlight, as the ramp only applies when the brightness is first set. BRANCH=nocturne BUG=b:111010124 TEST=Connect whiskers, no backlight blip Change-Id: Ia4dafe9a54aa40a4eae865581a06670e94eb6364 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1230973 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/led/lm3630a.h')
-rw-r--r--driver/led/lm3630a.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/driver/led/lm3630a.h b/driver/led/lm3630a.h
index 38fc52e111..f01f682aab 100644
--- a/driver/led/lm3630a.h
+++ b/driver/led/lm3630a.h
@@ -59,6 +59,19 @@
#define LM3630A_FMODE_500KHZ (0 << 0)
#define LM3630A_FMODE_1000KHZ (1 << 0)
+/* Ramp register settings */
+#define LM3630A_RAMP_START_SHIFT 3
+#define LM3630A_RAMP_STOP_SHIFT 3
+
+#define LM3630A_RAMP_MINIMUM 0x0
+#define LM3630A_RAMP_261_MS 0x1
+#define LM3630A_RAMP_522_MS 0x2
+#define LM3630A_RAMP_1045_MS 0x3
+#define LM3630A_RAMP_2091_MS 0x4
+#define LM3630A_RAMP_4182_MS 0x5
+#define LM3630A_RAMP_8364_MS 0x6
+#define LM3630A_RAMP_16730_MS 0x7
+
/* Power on and initialize LM3630A. */
int lm3630a_poweron(void);