Skip to content

Instantly share code, notes, and snippets.

@xingrz
Created April 27, 2017 16:09
Show Gist options
  • Save xingrz/03f959f822fa9ad3c4bd2d61409bacec to your computer and use it in GitHub Desktop.
Save xingrz/03f959f822fa9ad3c4bd2d61409bacec to your computer and use it in GitHub Desktop.
qcom,leds@d000 {
compatible = "qcom,leds-qpnp";
reg = <0xd000 0x100>;
label = "rgb";
status = "okay";
red_led: qcom,rgb_0 {
label = "rgb";
pwms = <&pmi8994_pwm_3 0 0>;
linux,name = "nubia_led";
linux,default-trigger = "none";
qcom,id = <3>;
qcom,mode = "lpg";
qcom,pwm-us = <1000>;
qcom,start-idx = <0>;
qcom,idx-len = <63>;
qcom,duty-pcts = [ 02 04 06 08 09 0a 0c 0e
10 11 12 14 16 18 19 1a
1b 1c 1e 20 22 24 26 28
19 2a 2c 2e 2f 30 32 34
36 38 39 3a 3b 3c 3d 3e
40 42 44 46 48 49 4a 4b
4c 4e 50 52 54 56 58 59
5a 5b 5c 5e 60 62 64 ];
qcom,lut-flags = <27>;
qcom,pause-lo = <0>;
qcom,pause-hi = <0>;
qcom,ramp-step-ms = <200>;
qcom,max-current = <12>;
qcom,is_auto_breath = <1>;
qcom,led_channel = <0x10>;
qcom,default-state = "off";
qcom,in-order-command-processing;
nubia,grade_percentage = <100>;
nubia,grade_scale_offset = <10>;
nubia,fade_time = <3>;
nubia,fullon_time = <0>;
nubia,fulloff_time = <4>;
nubia,onceblink_max_grade = <70>;
nubia,autoblink_max_grade = <100>;
};
green_led: qcom,rgb_1 {
label = "rgb";
pwms = <&pmi8994_pwm_2 0 0>;
linux,name = "green";
linux,default-trigger = "none";
qcom,id = <4>;
qcom,mode = "lpg";
qcom,pwm-us = <1000>;
qcom,start-idx = <0>;
qcom,idx-len = <63>;
qcom,duty-pcts = [ 02 04 06 08 09 0a 0c 0e
10 11 12 14 16 18 19 1a
1b 1c 1e 20 22 24 26 28
19 2a 2c 2e 2f 30 32 34
36 38 39 3a 3b 3c 3d 3e
40 42 44 46 48 49 4a 4b
4c 4e 50 52 54 56 58 59
5a 5b 5c 5e 60 62 64 ];
qcom,lut-flags = <27>;
qcom,pause-lo = <0>;
qcom,pause-hi = <0>;
qcom,ramp-step-ms = <200>;
qcom,max-current = <12>;
qcom,is_auto_breath = <0>;
qcom,led_channel = <8>;
qcom,default-state = "off";
nubia,grade_percentage = <30>;
nubia,grade_scale_offset = <0> ;
};
blue_led: qcom,rgb_2 {
label = "rgb";
pwms = <&pmi8994_pwm_1 0 0>;
linux,name = "blue";
linux,default-trigger = "none";
qcom,id = <5>;
qcom,mode = "lpg";
qcom,pwm-us = <1000>;
qcom,start-idx = <0>;
qcom,idx-len = <63>;
qcom,duty-pcts = [ 02 04 06 08 09 0a 0c 0e
10 11 12 14 16 18 19 1a
1b 1c 1e 20 22 24 26 28
19 2a 2c 2e 2f 30 32 34
36 38 39 3a 3b 3c 3d 3e
40 42 44 46 48 49 4a 4b
4c 4e 50 52 54 56 58 59
5a 5b 5c 5e 60 62 64 ];
qcom,lut-flags = <27>;
qcom,pause-lo = <0>;
qcom,pause-hi = <0>;
qcom,ramp-step-ms = <200>;
qcom,default-state = "off";
qcom,max-current = <12>;
qcom,is_auto_breath = <0>;
qcom,led_channel = <8>;
nubia,grade_percentage = <30>;
nubia,grade_scale_offset = <0> ;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment