From 21f6344cfee40198c0c6d86e515aca7cc0c4f575 Mon Sep 17 00:00:00 2001 From: cyizhao Date: Tue, 3 Jan 2017 15:42:55 +0800 Subject: [PATCH 1/2] ARM: dts: msm: Add FG battery profile/JEITA property for qrd sdm660 Add battery profile for qrd sdm660 to make sure FG could load it and work as expected. Disable soft hot jeita threshold according to the battery vendor's and hardware team's suggestion to make sure the battery could sustain at 1C charging current longer. CRs-Fixed: 1108198 Change-Id: Ifebeadae1590813ad785d25a399011efb447746d Signed-off-by: cyizhao --- arch/arm/boot/dts/qcom/sdm660-qrd.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi b/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi index 2b53a88f4bf5..54a42ddcc4c1 100644 --- a/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi +++ b/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi @@ -103,3 +103,16 @@ &soc { }; + +/ { + qrd_batterydata: qcom,battery-data { + qcom,batt-id-range-pct = <15>; + + #include "fg-gen3-batterydata-qrd-skuk-4v4-3000mah.dtsi" + }; +}; + +&pm660_fg { + qcom,battery-data = <&qrd_batterydata>; + qcom,fg-jeita-thresholds = <0 5 55 55>; +}; From cadfa62c08f568c9167362ad66bef10aa0d28ad6 Mon Sep 17 00:00:00 2001 From: cyizhao Date: Tue, 3 Jan 2017 15:48:44 +0800 Subject: [PATCH 2/2] ARM: dts: msm: Enable volume up key for qrd sdm660 GPIO7 is used for volume up key on qrd sdm660 device. Configure it to input and pull-up and add gpio-keys device to enable the key detection. CRs-Fixed: 1108198 Change-Id: I9ef323088e478aa2fd35858d256edb041da6f385 Signed-off-by: cyizhao --- arch/arm/boot/dts/qcom/sdm660-qrd.dtsi | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi b/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi index 54a42ddcc4c1..a20ea718b815 100644 --- a/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi +++ b/arch/arm/boot/dts/qcom/sdm660-qrd.dtsi @@ -104,6 +104,35 @@ &soc { }; +&pm660l_gpios { + /* GPIO 7 for VOL_UP */ + gpio@c600 { + status = "ok"; + qcom,mode = <0>; + qcom,pull = <0>; + qcom,vin-sel = <0>; + qcom,src-sel = <0>; + qcom,out-strength = <1>; + }; +}; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + status = "ok"; + + vol_up { + label = "volume_up"; + gpios = <&pm660l_gpios 7 0x1>; + linux,input-type = <1>; + linux,code = <115>; + gpio-key,wakeup; + debounce-interval = <15>; + }; + }; +}; + / { qrd_batterydata: qcom,battery-data { qcom,batt-id-range-pct = <15>;