From 82d31ca6298c3fbae0277aac019d6511c73dae73 Mon Sep 17 00:00:00 2001 From: hujing3 Date: Wed, 8 Jul 2020 12:14:04 +0800 Subject: [PATCH] arm/dts: Cebu ktd3136 backlight IC support Cebu: 2nd backlight ktd3136 IC support add ktd3136 config Change-Id: I8af9fdffabb5e341542b93434bc7585ff2163893 Signed-off-by: hujing3 Reviewed-on: https://gerrit.mot.com/1668611 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- qcom/bengal-cebu-display.dtsi | 1 + qcom/bengal-leds-ktd3136.dtsi | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 qcom/bengal-leds-ktd3136.dtsi diff --git a/qcom/bengal-cebu-display.dtsi b/qcom/bengal-cebu-display.dtsi index 321266b4e83f..a07b7429fd2c 100644 --- a/qcom/bengal-cebu-display.dtsi +++ b/qcom/bengal-cebu-display.dtsi @@ -1,6 +1,7 @@ #include #include "bengal-sde-display.dtsi" #include "bengal-leds-aw99703.dtsi" +#include "bengal-leds-ktd3136.dtsi" #include "dsi-panel-mot-dummy-qhd-video.dtsi" #include "dsi-panel-moto-ft8006s-dsbj-hdplus-video.dtsi" diff --git a/qcom/bengal-leds-ktd3136.dtsi b/qcom/bengal-leds-ktd3136.dtsi new file mode 100644 index 000000000000..f16ed306c936 --- /dev/null +++ b/qcom/bengal-leds-ktd3136.dtsi @@ -0,0 +1,32 @@ +/* Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&qupv3_se1_i2c { + status = "ok"; + ktd3136-bl@36 { + compatible = "ktd,ktd3136"; + reg = <0x37>; + ktd,using-lsb; + ktd,pwm-frequency = <100>; + ktd,bl-fscal-led = <0x99>;/*default 20mA*/ + ktd,turn-on-ramp = <8>; /* Should add ms value, please check datasheet*/ + ktd,turn-off-ramp = <8>; /* Should add ms value, please check datasheet*/ + ktd,pwm-trans-dim = <4>; /* Should add ms value, please check datasheet*/ + ktd,i2c-trans-dim = <256>; /* Should add ms value, please check datasheet*/ + ktd,bl-channel = <3>; + ktd,ovp-level = <32>; /*default 32v*/ + ktd,switching-frequency = <1000>; /*default 1000kHz*/ + ktd,inductor-current = <2600>; /*dfault 2600mA*/ + ktd,flash-timeout = <500>;/*default 500ms*/ + ktd,flash-current = <0xf>;/*default, it depends on full-scale led*/ + }; +};