From b52f489f7bad31f680d08e50f268a68e4179ce06 Mon Sep 17 00:00:00 2001 From: Nickolay Semendyaev Date: Sat, 14 Jan 2017 18:52:14 +0600 Subject: [PATCH] Update dt configs for leds Support blink and breathing. Change-Id: Iaadea80742df8d0724f56ca09065673bfeb1d088 --- .../dts/qcom/msm8994-kitakami_ivy_common.dtsi | 76 ++++++++++++++++--- .../qcom/msm8994-kitakami_karin_common.dtsi | 61 ++++++++++++++- .../qcom/msm8994-kitakami_satsuki_common.dtsi | 63 ++++++++++++++- .../qcom/msm8994-kitakami_sumire_common.dtsi | 66 ++++++++++++++-- .../qcom/msm8994-kitakami_suzuran_common.dtsi | 65 +++++++++++++++- 5 files changed, 304 insertions(+), 27 deletions(-) diff --git a/arch/arm/boot/dts/qcom/msm8994-kitakami_ivy_common.dtsi b/arch/arm/boot/dts/qcom/msm8994-kitakami_ivy_common.dtsi index c487ceba9a1..fdad4966032 100644 --- a/arch/arm/boot/dts/qcom/msm8994-kitakami_ivy_common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-kitakami_ivy_common.dtsi @@ -485,26 +485,82 @@ qcom,pmi8994@3 { qcom,leds@d000 { status = "okay"; - qcom,rgb_sync = <1>; + qcom,rgb_sync = <0>; qcom,rgb_0 { + label = "rgb"; + qcom,id = <3>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_3 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <0>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "red"; + qcom,use-blink; somc,pwm-channel = <2>; qcom,pwm-max-value = <154>; - linux,name = "led:rgb_red"; linux,default-trigger = "none"; }; + qcom,rgb_1 { - somc,pwm-channel = <1>; - qcom,pwm-max-value = <511>; - linux,name = "led:rgb_green"; - linux,default-trigger = "none"; + label = "rgb"; + qcom,id = <4>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_2 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <8>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "green"; + qcom,use-blink; + somc,pwm-channel = <1>; + qcom,pwm-max-value = <511>; + linux,default-trigger = "none"; }; + qcom,rgb_2 { - somc,pwm-channel = <0>; - qcom,pwm-max-value = <460>; - linux,name = "led:rgb_blue"; - linux,default-trigger = "none"; + label = "rgb"; + qcom,id = <5>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_1 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <16>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "blue"; + qcom,use-blink; + somc,pwm-channel = <0>; + qcom,pwm-max-value = <460>; + linux,default-trigger = "none"; }; + }; qcom,leds@d800 { qcom,fs-curr-ua = <24000>; diff --git a/arch/arm/boot/dts/qcom/msm8994-kitakami_karin_common.dtsi b/arch/arm/boot/dts/qcom/msm8994-kitakami_karin_common.dtsi index 22fab9ff1d2..8bed658b7c1 100644 --- a/arch/arm/boot/dts/qcom/msm8994-kitakami_karin_common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-kitakami_karin_common.dtsi @@ -809,24 +809,77 @@ qcom,pmi8994@3 { qcom,leds@d000 { status = "okay"; - qcom,rgb_sync = <1>; + qcom,rgb_sync = <0>; qcom,rgb_0 { + label = "rgb"; + qcom,id = <3>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_3 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <0>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "red"; + qcom,use-blink; somc,pwm-channel = <2>; qcom,pwm-max-value = <220>; - linux,name = "led:rgb_red"; linux,default-trigger = "none"; }; + qcom,rgb_1 { + label = "rgb"; + qcom,id = <4>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_2 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <8>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "green"; + qcom,use-blink; somc,pwm-channel = <1>; qcom,pwm-max-value = <511>; - linux,name = "led:rgb_green"; linux,default-trigger = "none"; }; + qcom,rgb_2 { + label = "rgb"; + qcom,id = <5>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_1 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <16>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + linux,name = "blue"; + + qcom,use-blink; somc,pwm-channel = <0>; qcom,pwm-max-value = <451>; - linux,name = "led:rgb_blue"; linux,default-trigger = "none"; }; }; diff --git a/arch/arm/boot/dts/qcom/msm8994-kitakami_satsuki_common.dtsi b/arch/arm/boot/dts/qcom/msm8994-kitakami_satsuki_common.dtsi index a79daa4ea2f..db7f5337ea5 100644 --- a/arch/arm/boot/dts/qcom/msm8994-kitakami_satsuki_common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-kitakami_satsuki_common.dtsi @@ -807,24 +807,79 @@ qcom,pmi8994@3 { qcom,leds@d000 { status = "okay"; - qcom,rgb_sync = <1>; + qcom,rgb_sync = <0>; qcom,rgb_0 { + label = "rgb"; + qcom,id = <3>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_3 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <0>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "red"; + qcom,use-blink; somc,pwm-channel = <2>; qcom,pwm-max-value = <154>; - linux,name = "led:rgb_red"; linux,default-trigger = "none"; }; + qcom,rgb_1 { + label = "rgb"; + qcom,id = <4>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_2 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <8>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "green"; + qcom,use-blink; somc,pwm-channel = <1>; qcom,pwm-max-value = <511>; - linux,name = "led:rgb_green"; linux,default-trigger = "none"; }; + qcom,rgb_2 { + label = "rgb"; + qcom,id = <5>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_1 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <16>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "blue"; + qcom,use-blink; somc,pwm-channel = <0>; qcom,pwm-max-value = <460>; - linux,name = "led:rgb_blue"; linux,default-trigger = "none"; }; }; diff --git a/arch/arm/boot/dts/qcom/msm8994-kitakami_sumire_common.dtsi b/arch/arm/boot/dts/qcom/msm8994-kitakami_sumire_common.dtsi index 6cfd940c4ee..f1d534ffb2a 100644 --- a/arch/arm/boot/dts/qcom/msm8994-kitakami_sumire_common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-kitakami_sumire_common.dtsi @@ -782,30 +782,87 @@ status = "disabled"; }; + &spmi_bus { qcom,pmi8994@3 { qcom,leds@d000 { status = "okay"; - qcom,rgb_sync = <1>; + qcom,rgb_sync = <0>; qcom,rgb_0 { + label = "rgb"; + qcom,id = <3>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_3 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <0>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "red"; + qcom,use-blink; somc,pwm-channel = <2>; qcom,pwm-max-value = <154>; - linux,name = "led:rgb_red"; linux,default-trigger = "none"; }; + qcom,rgb_1 { + label = "rgb"; + qcom,id = <4>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_2 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <8>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "green"; + qcom,use-blink; somc,pwm-channel = <1>; qcom,pwm-max-value = <511>; - linux,name = "led:rgb_green"; linux,default-trigger = "none"; }; + qcom,rgb_2 { + label = "rgb"; + qcom,id = <5>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_1 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <16>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "blue"; + qcom,use-blink; somc,pwm-channel = <0>; qcom,pwm-max-value = <460>; - linux,name = "led:rgb_blue"; linux,default-trigger = "none"; }; + }; qcom,leds@d800 { qcom,ilim-ma = <660>; @@ -817,7 +874,6 @@ }; }; }; - &tlmm_pinmux { /* GPIO_9: USB_SHELL_SEL */ msm_gpio_9 { diff --git a/arch/arm/boot/dts/qcom/msm8994-kitakami_suzuran_common.dtsi b/arch/arm/boot/dts/qcom/msm8994-kitakami_suzuran_common.dtsi index 224c6856a3f..2bfea70c199 100644 --- a/arch/arm/boot/dts/qcom/msm8994-kitakami_suzuran_common.dtsi +++ b/arch/arm/boot/dts/qcom/msm8994-kitakami_suzuran_common.dtsi @@ -797,30 +797,87 @@ status = "ok"; }; + &spmi_bus { qcom,pmi8994@3 { qcom,leds@d000 { status = "okay"; - qcom,rgb_sync = <1>; + qcom,rgb_sync = <0>; qcom,rgb_0 { + label = "rgb"; + qcom,id = <3>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_3 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <0>; + qcom,idx-len = <8>; + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "red"; + qcom,use-blink; somc,pwm-channel = <2>; qcom,pwm-max-value = <90>; - linux,name = "led:rgb_red"; linux,default-trigger = "none"; }; + qcom,rgb_1 { + label = "rgb"; + qcom,id = <4>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_2 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <8>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "green"; + qcom,use-blink; somc,pwm-channel = <1>; qcom,pwm-max-value = <150>; - linux,name = "led:rgb_green"; linux,default-trigger = "none"; }; + qcom,rgb_2 { + label = "rgb"; + qcom,id = <5>; + qcom,mode = "pwm"; + pwms = <&pmi8994_pwm_1 0 0>; + qcom,pwm-us = <1000>; + qcom,max-current = <12>; + qcom,default-state = "off"; + qcom,duty-pcts = [00 0c 19 25 32 48 55 64]; + qcom,duty-ms = <50>; + qcom,start-idx = <16>; + qcom,idx-len = <8>; + + qcom,lut-flags = <0x1f>; + qcom,ramp-step-ms = <100>; + qcom,pause-lo = <2000>; + qcom,pause-hi = <1000>; + + linux,name = "blue"; + qcom,use-blink; somc,pwm-channel = <0>; qcom,pwm-max-value = <200>; - linux,name = "led:rgb_blue"; linux,default-trigger = "none"; }; + }; qcom,leds@d800 { qcom,ilim-ma = <660>;