Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 820790f2 authored by Chetan C R's avatar Chetan C R
Browse files

ARM: dts: msm: add device tree support for msm8905



Add device tree support for msm8905. This implementation
is based on snapshot of the msm8905 device tree from msm-3.10
commit 6e9acee32341f ("ASoC: wdsp: Fix VA issue post SSR").

Change-Id: Iaab6b315cd0ca0cddcd256d445016cbd2427c1c5
Signed-off-by: default avatarManjunatha Madana <mamanj@codeaurora.org>
Signed-off-by: default avatarChetan C R <cchinnad@codeaurora.org>
parent d484105d
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
Qualcomm GPIO Flash Leds

Qualcomm GPIO flash LEDs driver is used for
controlling flash LEDs that are connected with 2 GPIOs.  The 2 GPIOs are name
flash_en and flash now.


The flash LEDs has torch mode and flash mode. The flash mode is used for camera.
The torch mode is used for torch.


Required properties for each node:
- compatible        : should be "qcom,leds-gpio-flash"
- qcom,flash-en     : the GPIO pin number of flash-en function
- qcom,flash-now    : the GPIO pin number of flash-now function
- linux,name        : name of the led that is used in led framework
- linux,default-trigger : name of the led trigger event
- qcom,op-seq       : GPIO config name
- clocks            : A list of clk correspondence with the gpio pinfunc,
  it is an optional property, it is needed when the flash need use clk
  waveform to driver, and rcg clk is also optional, it is needed when
  the used clk can't configure the duty cycle, we use the parent clk to
  configure the duty cycle.
- clock-names       : Names of the clocks in 1-1 correspondence with the
  "clocks" property.
- qcom,duty-cycle   : It is used to configure the duty cycle in clk mode.
- qcom,clk-freq     : Frequence of clk
- qcom,torch-seq-val: GPIO config value for torch mode
- qcom,flash-seq-val: GPIO config value for flash mode
- pinctrl-names     : pinctrl name
- pinctrl-0         : default gpio stats

No other optional properties for it.

Example:

	flashlight {
		compatible = "leds-gpio-flash";
		status = "okay";
		pinctrl-names = "flash_default";
		pinctrl-0 = <&flash_default>;
		qcom,flash-en = <&msmgpio 31 0>;
		qcom,flash-now = <&msmgpio 32 0>;
		qcom,op-seq = "flash_en", "flash_now";
		clocks = <&clock_gcc clk_camss_gp0_clk>,
			<&clock_gcc clk_camss_gp0_clk_src>,
			<&clock_gcc clk_camss_gp1_clk>,
			<&clock_gcc clk_camss_gp1_clk_src>;
		clock-names = "flash_en_clk", "flash_en_duty_cycle_clk",
			"flash_now_clk", "flash_now_duty_cycle_clk";
		qcom,duty-cycle = <40 30>;
		qcom,clk-freq = <150000 150000>;
		qcom,torch-seq-val = <1, 0>;
		qcom,flash-seq-val = <0, 1>;
		linux,name = "flashlight";
		linux,default-trigger = "flashlight-trigger";
	};
+8 −0
Original line number Diff line number Diff line
@@ -142,3 +142,11 @@ flash0: qcom,camera-flash {
			"CAM_TORCH";
		status = "ok";
	};

led_flash0: qcom,camera-led-flash {
		cell-index = <0>;
		compatible = "qcom,camera-led-flash";
		qcom,flash-type = <3>;
		qcom,flash-source = <&flash_BC847>;
		qcom,torch-source = <&flash_BC847>;
	};
+2 −2
Original line number Diff line number Diff line
@@ -606,8 +606,8 @@ dtb-$(CONFIG_ARCH_MSM8909) += msm8909-pm8916-mtp.dtb \
	apq8009-lat-v1.0.dtb \
	sdw3100-msm8909w-1gb-wtp.dtb \
	sdw2500-apq8009w-wtp.dtb \
	sdw2500-msm8909w-wtp.dtb

	sdw2500-msm8909w-wtp.dtb \
	msm8905-qrd-skub_qseev4.dtb

dtb-$(CONFIG_ARCH_SDM450) += sdm450-rcm.dtb \
	sdm450-cdp.dtb \
+122 −0
Original line number Diff line number Diff line
/* Copyright (c) 2014, 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.
 */

qcom,qrd-skua-4v35-2000mAh-data {
	qcom,battery-type = "qrd_skua_4v35_2000mAh";
	qcom,batt-id-kohm = <200>;
	qcom,chg-term-ua = <100000>;
	qcom,default-rbatt-mohm = <146>;
	qcom,fcc-mah = <2000>;
	qcom,max-voltage-uv = <4350000>;
	qcom,rbatt-capacitive-mohm = <50>;
	qcom,v-cutoff-uv = <3400000>;
	qcom,flat-ocv-threshold-uv = <3800000>;

	qcom,fcc-temp-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-data = <2064 2067 2067 2066 2063>;
	};

	qcom,ibat-acc-lut {
		qcom,lut-col-legend = <(-20) 0 25>;
		qcom,lut-row-legend = <0 250 500 1000>;
		qcom,lut-data = <2022 2046 2046>,
				<1151 1962 2024>,
				<680 1864 2008>,
				<51 1548 1970>;
	};

	qcom,rbatt-sf-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-row-legend = <100 95 90 85 80>,
					<75 70 65 60 55>,
					<50 45 40 35 30>,
					<25 20 16 13 11>,
					<10 9 8 7 6>,
					<5 4 3 2 1>,
					<0>;
		qcom,lut-data = <1355 273 100 81 74>,
				<1352 273 100 81 74>,
				<1268 280 102 83 75>,
				<1197 286 106 85 76>,
				<1143 285 110 87 78>,
				<1109 281 116 90 79>,
				<1090 272 124 94 82>,
				<1080 269 134 100 85>,
				<1077 267 133 108 91>,
				<1079 266 111 100 90>,
				<1090 266 101 83 76>,
				<1116 267 101 84 77>,
				<1156 268 103 86 79>,
				<1205 270 103 88 83>,
				<1266 274 106 88 82>,
				<1337 276 108 87 78>,
				<1431 276 107 85 79>,
				<1560 284 104 84 78>,
				<1680 293 99 81 75>,
				<2078 306 99 81 77>,
				<2438 318 100 83 78>,
				<2875 333 102 85 80>,
				<3411 354 104 87 81>,
				<4092 392 108 89 84>,
				<5118 448 116 92 86>,
				<6939 551 121 95 85>,
				<10433 791 120 90 81>,
				<17054 1280 121 93 84>,
				<29375 2077 133 101 92>,
				<52518 3457 173 135 133>,
				<230352 176376 150360 117059 92159>;
	};

	qcom,pc-temp-ocv-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-row-legend = <100 95 90 85 80>,
					<75 70 65 60 55>,
					<50 45 40 35 30>,
					<25 20 16 13 11>,
					<10 9 8 7 6>,
					<5 4 3 2 1>,
					<0>;
		qcom,lut-data = <4328 4328 4322 4318 4310>,
				<4234 4252 4252 4250 4245>,
				<4164 4191 4193 4191 4186>,
				<4098 4132 4137 4135 4131>,
				<4036 4074 4084 4082 4078>,
				<3980 4019 4035 4033 4029>,
				<3932 3967 3990 3989 3985>,
				<3891 3923 3950 3950 3945>,
				<3856 3886 3909 3912 3909>,
				<3825 3855 3862 3868 3867>,
				<3800 3828 3829 3829 3826>,
				<3782 3805 3807 3806 3804>,
				<3768 3786 3789 3789 3786>,
				<3753 3770 3775 3774 3772>,
				<3737 3757 3764 3761 3755>,
				<3718 3740 3753 3746 3734>,
				<3695 3719 3733 3725 3712>,
				<3671 3702 3705 3698 3684>,
				<3650 3691 3677 3668 3656>,
				<3630 3681 3670 3662 3651>,
				<3619 3676 3668 3660 3649>,
				<3605 3670 3665 3658 3647>,
				<3590 3664 3662 3655 3644>,
				<3573 3655 3658 3651 3641>,
				<3553 3643 3652 3647 3635>,
				<3529 3622 3639 3632 3618>,
				<3498 3590 3605 3595 3576>,
				<3460 3543 3547 3535 3519>,
				<3401 3476 3467 3455 3443>,
				<3306 3368 3347 3336 3313>,
				<3000 3000 3000 3000 3000>;
	};
};
+118 −0
Original line number Diff line number Diff line
/* Copyright (c) 2017, 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.
 */

qcom,8905-batterydata {
	qcom,battery-type = "qrd_skub_4v2_2000mAh";
	qcom,batt-id-kohm = <0>;
	qcom,chg-term-ua = <100000>;
	qcom,default-rbatt-mohm = <158>;
	qcom,fcc-mah = <2000>;
	qcom,max-voltage-uv = <4200000>;
	qcom,rbatt-capacitive-mohm = <50>;
	qcom,v-cutoff-uv = <3400000>;

	qcom,fcc-temp-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-data = <2017 2014 2015 2013 2007>;
	};

	qcom,ibat-acc-lut {
		qcom,lut-col-legend = <(-20) 0 25>;
		qcom,lut-row-legend = <0 250 500 1000>;
		qcom,lut-data = <1976 1974 1974>,
				<67 1611 1967>,
				<6 1154 1927>,
				<6 630 1804>;
	};

	qcom,pc-temp-ocv-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-row-legend = <100 95 90 85 80>,
					<75 70 65 60 55>,
					<50 45 40 35 30>,
					<25 20 16 13 11>,
					<10 9 8 7 6>,
					<5 4 3 2 1>,
					<0>;
		qcom,lut-data = <4179 4172 4168 4165 4159>,
				<4085 4103 4107 4106 4103>,
				<4015 4059 4062 4060 4057>,
				<3950 4001 4017 4019 4016>,
				<3906 3959 3981 3981 3978>,
				<3864 3922 3948 3947 3945>,
				<3826 3887 3918 3917 3914>,
				<3809 3857 3889 3890 3887>,
				<3798 3830 3847 3857 3856>,
				<3787 3805 3820 3819 3818>,
				<3776 3790 3800 3801 3799>,
				<3766 3780 3787 3787 3785>,
				<3755 3772 3776 3776 3774>,
				<3743 3764 3769 3768 3765>,
				<3732 3754 3762 3758 3751>,
				<3717 3739 3749 3741 3728>,
				<3700 3717 3731 3723 3710>,
				<3680 3702 3707 3700 3688>,
				<3662 3691 3687 3681 3668>,
				<3648 3683 3678 3673 3662>,
				<3639 3678 3676 3671 3661>,
				<3629 3673 3673 3669 3659>,
				<3615 3667 3670 3667 3657>,
				<3600 3659 3666 3663 3652>,
				<3581 3647 3656 3651 3638>,
				<3557 3624 3628 3622 3606>,
				<3525 3587 3582 3575 3558>,
				<3476 3530 3520 3513 3497>,
				<3399 3448 3440 3432 3416>,
				<3271 3320 3319 3311 3292>,
				<3000 3000 3000 3000 3000>;
	};

	qcom,rbatt-sf-lut {
		qcom,lut-col-legend = <(-20) 0 25 40 60>;
		qcom,lut-row-legend = <100 95 90 85 80>,
					<75 70 65 60 55>,
					<50 45 40 35 30>,
					<25 20 16 13 11>,
					<10 9 8 7 6>,
					<5 4 3 2 1>;
		qcom,lut-data = <1274 296 100 79 70>,
				<1274 296 100 79 70>,
				<1195 321 105 81 71>,
				<1134 313 109 84 73>,
				<1117 317 116 87 75>,
				<1108 316 123 90 77>,
				<1102 312 132 96 80>,
				<1131 311 137 104 85>,
				<1172 310 114 103 89>,
				<1215 306 105 81 73>,
				<1257 320 104 81 71>,
				<1304 348 106 83 74>,
				<1352 384 106 85 76>,
				<1406 422 112 88 78>,
				<1471 460 117 88 77>,
				<1546 499 120 84 72>,
				<1645 541 124 86 73>,
				<1790 600 126 87 73>,
				<2091 660 128 87 73>,
				<2167 679 127 86 73>,
				<2329 690 130 87 74>,
				<2623 722 134 89 75>,
				<3022 764 140 93 77>,
				<3564 817 149 96 79>,
				<4335 880 157 98 78>,
				<5564 956 160 97 77>,
				<7560 1065 169 99 79>,
				<11352 1228 192 105 82>,
				<19407 1734 232 116 88>,
				<38753 3324 311 141 104>;
	};
};
Loading