summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2019-05-30 14:14:32 +0800
committerCommit Bot <commit-bot@chromium.org>2019-06-17 04:57:55 +0000
commit35afaa622676de0b72b727e9ed602bf0820934e7 (patch)
tree92634c76fb5a52f53b0c45b7844a78b2f057c83f
parent4c69831f59ad7fd335c9c8e0dc3dc5bb5f5eebda (diff)
downloadchrome-ec-35afaa622676de0b72b727e9ed602bf0820934e7.tar.gz
krane: Limit backlight LED max current.
High display current results to a broken display on Krane rev3. Karne rev3 can only support up to 90mA current to backlight LED. We should limit this value from 120mA(maximun) to 90mA. TEST=i2cxfer r 0 0x68 0xa4; see 0x07 i2cxfer r 0 0x68 0xa5; see 0xbf combine these two value we have 0x5ff which is 0x7ff * 90/120; BUG=b:133655155 BRANCH=None Change-Id: I809628fcc71145801f9fb82815ae40f77a91e2e9 Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1635138 Tested-by: Yilun Lin <yllin@chromium.org> Commit-Queue: Yilun Lin <yllin@chromium.org> Auto-Submit: Yilun Lin <yllin@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
-rw-r--r--board/kukui/board.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/board/kukui/board.c b/board/kukui/board.c
index 6192b4481b..6fb2ad4dc5 100644
--- a/board/kukui/board.c
+++ b/board/kukui/board.c
@@ -483,20 +483,29 @@ struct motion_sensor_t motion_sensors[] = {
};
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
+#endif /* SECTION_IS_RW */
+
#ifdef BOARD_KRANE
-static void fix_krane_ref(void)
+static void fix_krane(void)
{
if (board_get_version() != 3)
return;
+ /*
+ * Fix backlight led maximum current: tolerance 120mA * 0.75 = 90mA.
+ * (b/133655155)
+ */
+ mt6370_backlight_set_dim(MT6370_BLDIM_DEFAULT * 3 / 4);
+
+#ifdef SECTION_IS_RW
+ /* Fix reference point */
motion_sensors[LID_ACCEL].rot_standard_ref = &lid_standard_ref_rev3;
motion_sensors[LID_GYRO].rot_standard_ref = &lid_standard_ref_rev3;
+#endif /* SECTION_IS_RW */
}
-DECLARE_HOOK(HOOK_INIT, fix_krane_ref, HOOK_PRIO_INIT_ADC + 1);
+DECLARE_HOOK(HOOK_INIT, fix_krane, HOOK_PRIO_INIT_ADC + 1);
#endif /* BOARD_KRANE */
-#endif /* SECTION_IS_RW */
-
int board_allow_i2c_passthru(int port)
{
return (port == I2C_PORT_VIRTUAL_BATTERY);