Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kaechele/06e22ff8177f64e44924aea90feb654b to your computer and use it in GitHub Desktop.
Save kaechele/06e22ff8177f64e44924aea90feb654b to your computer and use it in GitHub Desktop.
diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
index 588774d933940..3880612498448 100644
--- a/arch/arm/boot/dts/qcom/Makefile
+++ b/arch/arm/boot/dts/qcom/Makefile
@@ -238,33 +238,35 @@ dtb-$(CONFIG_ARCH_MSM8940) += msm8940-pmi8937-cdp.dtb \
msm8940-pmi8940-rcm.dtb \
msm8940-pmi8940-qrd-sku7.dtb
-dtb-$(CONFIG_ARCH_MSM8953) += msm8953-sim.dtb \
- msm8953-rumi.dtb \
- msm8953-cdp.dtb \
- msm8953-mtp.dtb \
- msm8953-ext-codec-mtp.dtb \
- msm8953-qrd-sku3.dtb \
- msm8953-rcm.dtb \
- apq8053-rcm.dtb \
- msm8953-ext-codec-rcm.dtb \
- apq8053-cdp.dtb \
- apq8053-ipc.dtb \
- msm8953-ipc.dtb \
- apq8053-mtp.dtb \
- apq8053-ext-audio-mtp.dtb \
- apq8053-ext-codec-rcm.dtb \
- apq8053-lite-dragon-v1.0.dtb \
- apq8053-lite-dragon-v2.0.dtb \
- apq8053-lite-ext-codec-dragon-v2.0.dtb \
- msm8953-cdp-1200p.dtb \
- msm8953-iot-mtp.dtb \
- apq8053-iot-mtp.dtb \
- msm8953-pmi8940-cdp.dtb \
- msm8953-pmi8940-mtp.dtb \
- msm8953-pmi8937-cdp.dtb \
- msm8953-pmi8937-mtp.dtb \
- msm8953-pmi8940-ext-codec-mtp.dtb \
- msm8953-pmi8937-ext-codec-mtp.dtb
+#dtb-$(CONFIG_ARCH_MSM8953) += msm8953-sim.dtb \
+# msm8953-rumi.dtb \
+# msm8953-cdp.dtb \
+# msm8953-mtp.dtb \
+# msm8953-ext-codec-mtp.dtb \
+# msm8953-qrd-sku3.dtb \
+# msm8953-rcm.dtb \
+# apq8053-rcm.dtb \
+# msm8953-ext-codec-rcm.dtb \
+# apq8053-cdp.dtb \
+# apq8053-ipc.dtb \
+# msm8953-ipc.dtb \
+# apq8053-mtp.dtb \
+# apq8053-ext-audio-mtp.dtb \
+# apq8053-ext-codec-rcm.dtb \
+# apq8053-lite-dragon-v1.0.dtb \
+# apq8053-lite-dragon-v2.0.dtb \
+# apq8053-lite-ext-codec-dragon-v2.0.dtb \
+# msm8953-cdp-1200p.dtb \
+# msm8953-iot-mtp.dtb \
+# apq8053-iot-mtp.dtb \
+# msm8953-pmi8940-cdp.dtb \
+# msm8953-pmi8940-mtp.dtb \
+# msm8953-pmi8937-cdp.dtb \
+# msm8953-pmi8937-mtp.dtb \
+# msm8953-pmi8940-ext-codec-mtp.dtb \
+# msm8953-pmi8937-ext-codec-mtp.dtb
+
+dtb-$(CONFIG_ARCH_MSM8953) += apq8053-lite-dragon-v2.0.dtb
dtb-$(CONFIG_ARCH_SDM450) += sdm450-rcm.dtb \
sdm450-cdp.dtb \
diff --git a/arch/arm/boot/dts/qcom/apq8053-camera-sensor-dragon.dtsi b/arch/arm/boot/dts/qcom/apq8053-camera-sensor-dragon.dtsi
index 8230eab26da21..4316eda635e59 100644
--- a/arch/arm/boot/dts/qcom/apq8053-camera-sensor-dragon.dtsi
+++ b/arch/arm/boot/dts/qcom/apq8053-camera-sensor-dragon.dtsi
@@ -173,7 +173,7 @@
qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
"CAM_RESET0",
"CAM_STANDBY0";
- qcom,sensor-position = <0>;
+ qcom,sensor-position = <1>;
qcom,sensor-mode = <0>;
qcom,cci-master = <0>;
status = "ok";
@@ -218,7 +218,7 @@
qcom,sensor-position = <1>;
qcom,sensor-mode = <0>;
qcom,cci-master = <0>;
- status = "ok";
+ status = "disabled";
clocks = <&clock_gcc clk_mclk1_clk_src>,
<&clock_gcc clk_gcc_camss_mclk1_clk>;
clock-names = "cam_src_clk", "cam_clk";
diff --git a/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dts b/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dts
index 7e38cc40c8e14..1a035ed0018f4 100644
--- a/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dts
+++ b/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dts
@@ -20,7 +20,7 @@
model = "Qualcomm Technologies, Inc. APQ8053 Lite DragonBoard V2.0";
compatible = "qcom,apq8053-lite-dragonboard",
"qcom,apq8053", "qcom,dragonboard";
- qcom,board-id = <0x0103000A 0>;
+ qcom,board-id = <0x01010520 0>;
};
&blsp2_uart0 {
diff --git a/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dtsi b/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dtsi
index c062b20d94425..551c47218a3f8 100644
--- a/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dtsi
+++ b/arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dtsi
@@ -13,6 +13,18 @@
#include "apq8053-lite-dragon.dtsi"
+&rpm_bus {
+ rpm-regulator-ldoa10 {
+ status = "okay";
+ pm8953_l10: regulator-l10 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ qcom,init-voltage = <3300000>;
+ status = "okay";
+ };
+ };
+};
+
&i2c_3 {
status = "okay";
himax_ts@48 {
@@ -35,24 +47,142 @@
};
};
+&i2c_1 {
+/* tas5805m: tas5805m@2c {
+ compatible = "ti,tas5805m";
+ reg = <0x2c>;
+ //vio-supply = <&pm8953_l6>;
+ pinctrl-names = "audio_enable_default";
+ pinctrl-0 = <&audio_enable_gpio>;
+ qcom,audio_enable_gpio = <&tlmm 44 0x0>;
+ };
+*/
+ tas5782m: tas5782m@49 {
+ compatible = "ti,tas5782m";
+ reg = <0x49>;
+ //vio-supply = <&pm8953_l6>;
+ pinctrl-names = "audio_enable_default_gpio";
+ pinctrl-0 = <&audio_enable_gpio68>;
+ qcom,audio_enable_gpio68 = <&tlmm 68 0x0>;
+ };
+};
+
+&i2c_3 {
+ status = "okay";
+ focaltech@38 {
+ compatible = "focaltech,fts";
+ reg = <0x38>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <65 0x02>;
+ focaltech,reset-gpio = <&tlmm 64 0x01>;
+ focaltech,irq-gpio = <&tlmm 65 0x02>;
+ focaltech,max-touch-number = <5>;
+ focaltech,display-coords = <0 0 800 1280>;
+
+ pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release";
+ pinctrl-0 = <&ts_int_active &ts_reset_active>;
+ pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
+ pinctrl-2 = <&ts_release>;
+ };
+ gt9xx-i2c@14 {
+ compatible = "goodix,gt9xx";
+ reg = <0x14>;
+ status = "okay";
+ vdd_ana-supply = <&pm8953_l10>;
+ vcc_i2c-supply = <&pm8953_l6>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <65 0x2008>;
+ pinctrl-names = "gdix_ts_int_default", "gdix_ts_int_output_low", "gdix_ts_int_output_high", "gdix_ts_int_input",
+ "gdix_ts_rst_default", "gdix_ts_rst_output_low", "gdix_ts_rst_output_high", "gdix_ts_rst_input";
+ pinctrl-0 = <&ts_int_default>;
+ pinctrl-1 = <&ts_int_output_low>;
+ pinctrl-2 = <&ts_int_output_high>;
+ pinctrl-3 = <&ts_int_input>;
+ pinctrl-4 = <&ts_rst_default>;
+ pinctrl-5 = <&ts_rst_output_low>;
+ pinctrl-6 = <&ts_rst_output_high>;
+ pinctrl-7 = <&ts_rst_input>;
+
+ reset-gpios = <&tlmm 64 0x00>;
+ irq-gpios = <&tlmm 65 0x2008>;
+ irq-flags = <2>;
+
+ touchscreen-max-id = <11>;
+ touchscreen-size-x = <1200>;
+ touchscreen-size-y = <1920>;
+ touchscreen-max-w = <1024>;
+ touchscreen-max-p = <1024>;
+
+ goodix,type-a-report = <0>;
+ goodix,driver-send-cfg = <1>;
+ goodix,wakeup-with-reset = <0>;
+ goodix,resume-in-workqueue = <0>;
+ goodix,int-sync = <1>;
+ goodix,swap-x2y = <0>;
+ goodix,esd-protect = <1>;
+ goodix,pen-suppress-finger = <0>;
+ goodix,auto-update = <1>;
+ goodix,auto-update-cfg = <0>;
+ goodix,power-off-sleep = <0>;
+
+ goodix,cfg-group0 = [
+ 5A B0 04 80 07 0A 35 10 22 08 32 0D 50 3C 0A 04
+ 01 01 00 B4 11 11 44 15 19 1B 14 95 35 FF 3A 3C
+ 39 13 00 00 00 98 03 1C 00 00 00 00 03 00 00 00
+ 00 80 0A 37 46 40 E5 52 23 28 00 04 81 38 00 7F
+ 3B 00 7D 3E 00 7C 41 00 7A 44 0C 7A 00 50 33 50
+ 0B 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 55 00 01 00 00 02 00 00 00
+ 1D 1C 1B 1A 19 18 17 16 15 14 13 12 11 10 0F 0E
+ 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00 2A 29
+ 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 19 18
+ 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 08
+ 07 06 05 04 03 02 01 00 08 01
+ ];
+
+ goodix,cfg-group2 = [
+ 5A B0 04 80 07 0A 35 10 22 08 32 0D 50 3C 0A 04
+ 01 01 00 B4 11 11 44 15 19 1B 14 95 35 FF 3A 3C
+ 39 13 00 00 00 98 03 1C 00 00 00 00 03 00 00 00
+ 00 80 0A 37 46 40 E5 52 23 28 00 04 81 38 00 7F
+ 3B 00 7D 3E 00 7B 41 00 7A 44 0C 7A 00 50 33 50
+ 0B 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 55 00 01 00 00 02 00 00 00
+ 1D 1C 1B 1A 19 18 17 16 15 14 13 12 11 10 0F 0E
+ 0D 0C 0B 0A 09 08 07 06 05 04 03 02 01 00 2A 29
+ 28 27 26 25 24 23 22 21 20 1F 1E 1D 1C 1B 19 18
+ 17 16 15 14 13 12 11 10 0F 0E 0D 0C 0B 0A 09 08
+ 07 06 05 04 03 02 01 00 09 01
+ ];
+ };
+};
+
+
&mdss_dsi {
hw-config = "single_dsi";
};
&mdss_dsi0 {
- qcom,dsi-pref-prim-pan = <&dsi_boyi_hx83100a_800p_video>;
+ qcom,dsi-pref-prim-pan = <&dsi_hx83100a_800p_video>;
pinctrl-names = "mdss_default", "mdss_sleep";
- pinctrl-0 = <&mdss_dsi_active &mdss_te_active &mdss_dsi_gpio>;
- pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend &mdss_dsi_gpio>;
-
- vdd-supply = <&pm8953_l10>;
+ pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
+ pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
+
+ /delete-property/ vdd-supply;
vddio-supply = <&pm8953_l6>;
lab-supply = <&lab_regulator>;
ibb-supply = <&ibb_regulator>;
-
qcom,platform-te-gpio = <&tlmm 24 0>;
qcom,platform-reset-gpio = <&tlmm 61 0>;
- qcom,platform-bklight-en-gpio = <&tlmm 100 0>;
+ /*qcom,platform-enable-gpio = <&tlmm 100 0>;*/
+ qcom,ext_vdd-gpio = <&tlmm 100 0>;
+ qcom,platform-bklight-en-gpio = <&tlmm 95 0>;
+
+ qcom,platform-lane-config = [00 00 ff 0f
+ 00 00 ff 0f
+ 00 00 ff 0f
+ 00 00 ff 0f
+ 00 00 ff 8f];
};
&mdss_dsi1 {
@@ -74,3 +204,46 @@
status = "okay";
regulator-always-on;
};
+
+&eeprom0 {
+ gpios = <&tlmm 26 0>,
+ <&tlmm 40 0>,
+ <&tlmm 118 0>,
+ <&tlmm 119 0>,
+ <&tlmm 39 0>;
+ qcom,gpio-vdig = <3>;
+ qcom,gpio-vana = <4>;
+ qcom,gpio-req-tbl-num = <0 1 2 3 4>;
+ qcom,gpio-req-tbl-flags = <1 0 0 0 0>;
+ qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
+ "CAM_RESET0",
+ "CAM_VDIG",
+ "CAM_VANA",
+ "CAM_STANDBY0";
+};
+
+&camera0 {
+ qcom,mount-angle = <270>;
+ gpios = <&tlmm 26 0>,
+ <&tlmm 40 0>,
+ <&tlmm 39 0>,
+ <&tlmm 118 0>,
+ <&tlmm 119 0>;
+ qcom,gpio-vdig = <3>;
+ qcom,gpio-vana = <4>;
+ qcom,gpio-req-tbl-num = <0 1 2 3 4>;
+ qcom,gpio-req-tbl-flags = <1 0 0 0 0>;
+ qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
+ "CAM_RESET0",
+ "CAM_STANDBY0",
+ "CAM_VDIG",
+ "CAM_VANA";
+};
+
+&camera1 {
+ qcom,mount-angle = <270>;
+};
+
+&camera2{
+ qcom,mount-angle = <270>;
+};
diff --git a/arch/arm/boot/dts/qcom/apq8053-lite-dragon.dtsi b/arch/arm/boot/dts/qcom/apq8053-lite-dragon.dtsi
index 0cf97ceb1ca76..d292ea8b793b1 100644
--- a/arch/arm/boot/dts/qcom/apq8053-lite-dragon.dtsi
+++ b/arch/arm/boot/dts/qcom/apq8053-lite-dragon.dtsi
@@ -72,19 +72,19 @@
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
- camera_focus {
- label = "camera_focus";
+ camera_switch {
+ label = "camera_switch";
gpios = <&tlmm 87 0x1>;
linux,input-type = <1>;
- linux,code = <0x210>;
+ linux,code = <87>;
debounce-interval = <15>;
};
- camera_snapshot {
- label = "camera_snapshot";
+ mute {
+ label = "mute";
gpios = <&tlmm 86 0x1>;
linux,input-type = <1>;
- linux,code = <0x2fe>;
+ linux,code = <91>;
debounce-interval = <15>;
};
@@ -150,6 +150,7 @@
/delete-property/ qcom,cdc-us-euro-gpios;
qcom,msm-hs-micbias-type = "internal";
+ qcom,msm-mbhc-hphl-swh = <1>;
qcom,audio-routing =
"RX_BIAS", "MCLK",
@@ -166,6 +167,37 @@
"DMIC2", "MIC BIAS Internal1",
"DMIC2", "Digital Mic2";
+ qcom,msm-gpios =
+ "pri_i2s",
+ "quat_i2s",
+ "quin_i2s";
+ qcom,pinctrl-names =
+ "all_off",
+ "pri_i2s_act",
+ "quat_i2s_act",
+ "pri_i2s_act_quat_i2s_act",
+ "quin_i2s_act",
+ "pri_i2s_act_quin_i2s_act",
+ "quat_i2s_act_quin_i2s_act",
+ "pri_i2s_act_quat_i2s_act_quin_i2s_act";
+ pinctrl-names =
+ "all_off",
+ "pri_i2s_act",
+ "quat_i2s_act",
+ "pri_i2s_act_quat_i2s_act",
+ "quin_i2s_act",
+ "pri_i2s_act_quin_i2s_act",
+ "quat_i2s_act_quin_i2s_act",
+ "pri_i2s_act_quat_i2s_act_quin_i2s_act";
+ pinctrl-0 = <&cdc_dmic0_clk_sus &cdc_dmic0_data_sus &sec_tlmm_lines_sus &pri_tlmm_lines_sus &pri_tlmm_ws_sus>;
+ pinctrl-1 = <&cdc_dmic0_clk_act &cdc_dmic0_data_act &sec_tlmm_lines_sus &pri_tlmm_lines_sus &pri_tlmm_ws_sus>;
+ pinctrl-2 = <&cdc_dmic0_clk_sus &cdc_dmic0_data_sus &sec_tlmm_lines_act &pri_tlmm_lines_sus &pri_tlmm_ws_sus>;
+ pinctrl-3 = <&cdc_dmic0_clk_act &cdc_dmic0_data_act &sec_tlmm_lines_act &pri_tlmm_lines_sus &pri_tlmm_ws_sus>;
+ pinctrl-4 = <&cdc_dmic0_clk_sus &cdc_dmic0_data_sus &sec_tlmm_lines_sus &pri_tlmm_lines_act &pri_tlmm_ws_act>;
+ pinctrl-5 = <&cdc_dmic0_clk_act &cdc_dmic0_data_act &sec_tlmm_lines_sus &pri_tlmm_lines_act &pri_tlmm_ws_act>;
+ pinctrl-6 = <&cdc_dmic0_clk_sus &cdc_dmic0_data_sus &sec_tlmm_lines_act &pri_tlmm_lines_act &pri_tlmm_ws_act>;
+ pinctrl-7 = <&cdc_dmic0_clk_act &cdc_dmic0_data_act &sec_tlmm_lines_act &pri_tlmm_lines_act &pri_tlmm_ws_act>;
+
/delete-property/ asoc-wsa-codec-names;
/delete-property/ asoc-wsa-codec-prefixes;
/delete-property/ msm-vdd-wsa-switch-supply;
@@ -478,6 +510,7 @@
qcom,chg-led-support;
qcom,external-typec;
qcom,typec-psy-name = "typec";
+ qcom,charging-disabled;
status = "ok";
};
@@ -493,10 +526,10 @@
qcom,lra-res-cal-period = <0>;
qcom,wave-play-rate-us = <4165>;
};
-
+/*
&wled {
status = "disabled";
-};
+};*/
&flash_led {
status = "disabled";
diff --git a/arch/arm/boot/dts/qcom/dsi-panel-hx83100a-800p-video.dtsi b/arch/arm/boot/dts/qcom/dsi-panel-hx83100a-800p-video.dtsi
index c5b7575ef4384..bc9080866b4a6 100644
--- a/arch/arm/boot/dts/qcom/dsi-panel-hx83100a-800p-video.dtsi
+++ b/arch/arm/boot/dts/qcom/dsi-panel-hx83100a-800p-video.dtsi
@@ -11,11 +11,11 @@
*/
&mdss_mdp {
- dsi_boyi_hx83100a_800p_video: qcom,mdss_dsi_boyi_hx83100a_800p_video {
+ dsi_hx83100a_800p_video: qcom,mdss_dsi_hx83100a_800p_video {
qcom,mdss-dsi-panel-name = "hx83100a 800p video mode dsi panel";
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
qcom,mdss-dsi-panel-type = "dsi_video_mode";
- qcom,mdss-dsi-panel-destination = "display_2";
+ qcom,mdss-dsi-panel-destination = "display_1";
qcom,mdss-dsi-panel-framerate = <60>;
qcom,mdss-dsi-virtual-channel-id = <0>;
qcom,mdss-dsi-stream = <0>;
@@ -37,13 +37,19 @@
qcom,mdss-dsi-underflow-color = <0xff>;
qcom,mdss-dsi-border-color = <0>;
qcom,mdss-dsi-on-command = [
- 39 01 00 00 78 00 02 11 00
- 39 01 00 00 14 00 02 29 00
+ 39 01 00 00 78 00 02 11 00 //exit sleep mode and delay 120ms
+ 39 01 00 00 14 00 02 29 00 //set display on and delay 20ms
+ 39 01 00 00 05 00 04 B9 83 10 0A //enable extended command set
+ 39 01 00 00 05 00 08 C9 1F 00 08 1E 81 1E 00 //32KHZ PWM
+ 39 01 00 00 05 00 02 53 24 //backlight enable
+ 39 01 00 00 05 00 02 55 02 //still picture and delay 5ms
+ 39 01 00 00 05 00 0A CA 40 3C 38 34 33 32 30 2C 28 //about 80% duty ratio
];
qcom,mdss-dsi-off-command = [05 01 00 00 96 00 02 28 00
05 01 00 00 00 00 02 10 00];
qcom,mdss-dsi-on-command-state = "dsi_hs_mode";
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
+ qcom,cont-splash-enabled;
qcom,mdss-dsi-h-sync-pulse = <1>;
qcom,mdss-dsi-traffic-mode = "burst_mode";
qcom,mdss-dsi-lane-map = "lane_map_0123";
@@ -53,11 +59,9 @@
qcom,mdss-dsi-lane-1-state;
qcom,mdss-dsi-lane-2-state;
qcom,mdss-dsi-lane-3-state;
- qcom,mdss-dsi-panel-timings = [
- 9B 22 18 00 4A 4E 1C 26 1D 03 04 00
- ];
- qcom,mdss-dsi-t-clk-post = <0x04>;
- qcom,mdss-dsi-t-clk-pre = <0x1f>;
+ qcom,mdss-dsi-panel-timings = [9B 22 18 00 4A 4E 1C 26 1D 03 04 00];
+ qcom,mdss-dsi-t-clk-post = <0x11>;
+ qcom,mdss-dsi-t-clk-pre = <0x35>;
qcom,mdss-dsi-bl-min-level = <2>;
qcom,mdss-dsi-bl-max-level = <4095>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
diff --git a/arch/arm/boot/dts/qcom/msm-audio.dtsi b/arch/arm/boot/dts/qcom/msm-audio.dtsi
index 777fcdf1d27b6..718834c391770 100644
--- a/arch/arm/boot/dts/qcom/msm-audio.dtsi
+++ b/arch/arm/boot/dts/qcom/msm-audio.dtsi
@@ -279,6 +279,19 @@
qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
qcom,msm-auxpcm-interface = "primary";
};
+ dai_sec_auxpcm: qcom,msm-sec-auxpcm {
+ compatible = "qcom,msm-auxpcm-dev";
+ qcom,msm-cpudai-auxpcm-mode = <0>, <0>;
+ qcom,msm-cpudai-auxpcm-sync = <1>, <1>;
+ qcom,msm-cpudai-auxpcm-frame = <5>, <4>;
+ qcom,msm-cpudai-auxpcm-quant = <2>, <2>;
+ qcom,msm-cpudai-auxpcm-num-slots = <1>, <1>;
+ qcom,msm-cpudai-auxpcm-slot-mapping = <1>, <1>;
+ qcom,msm-cpudai-auxpcm-data = <0>, <0>;
+ qcom,msm-cpudai-auxpcm-pcm-clk-rate = <2048000>, <2048000>;
+ qcom,msm-auxpcm-interface = "secondary";
+ qcom,msm-cpudai-afe-clk-ver = <2>;
+ };
hdmi_dba: qcom,msm-hdmi-dba-codec-rx {
compatible = "qcom,msm-hdmi-dba-codec-rx";
@@ -312,10 +325,12 @@
reg = <0xc051000 0x4>,
<0xc051004 0x4>,
<0xc055000 0x4>,
+ <0xc056000 0x4>,
<0xc052000 0x4>;
reg-names = "csr_gp_io_mux_mic_ctl",
"csr_gp_io_mux_spkr_ctl",
"csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel",
+ "csr_gp_io_lpaif_sec_pcm_sec_mode_muxsel",
"csr_gp_io_mux_quin_ctl";
qcom,msm-ext-pa = "primary";
@@ -395,7 +410,7 @@
"msm-compress-dsp", "msm-pcm-hostless",
"msm-pcm-afe", "msm-lsm-client",
"msm-pcm-routing", "msm-pcm-lpa";
- asoc-cpu = <&dai_pri_auxpcm>,
+ asoc-cpu = <&dai_pri_auxpcm>, <&dai_sec_auxpcm>,
<&dai_mi2s0>, <&dai_mi2s1>,
<&dai_mi2s2>, <&dai_mi2s3>,
<&dai_mi2s5>, <&dai_mi2s6>,
@@ -407,7 +422,7 @@
<&afe_proxy_rx>, <&afe_proxy_tx>,
<&incall_record_rx>, <&incall_record_tx>,
<&incall_music_rx>, <&incall_music_2_rx>;
- asoc-cpu-names = "msm-dai-q6-auxpcm.1",
+ asoc-cpu-names = "msm-dai-q6-auxpcm.1","msm-dai-q6-auxpcm.2",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
"msm-dai-q6-mi2s.5", "msm-dai-q6-mi2s.6",
diff --git a/arch/arm/boot/dts/qcom/msm8953-mdss-panels.dtsi b/arch/arm/boot/dts/qcom/msm8953-mdss-panels.dtsi
index a481b684ce5da..73e06b94e7416 100644
--- a/arch/arm/boot/dts/qcom/msm8953-mdss-panels.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8953-mdss-panels.dtsi
@@ -25,6 +25,11 @@
#include "dsi-panel-lt8912-1080p-video.dtsi"
#include "dsi-panel-lgd-incell-sw49106-fhd-video.dtsi"
#include "dsi-panel-hx83100a-800p-video.dtsi"
+#include "dsi-panel-starry-800p-video.dtsi"
+#include "dsi-panel-inxnt51021_1200p_video.dtsi"
+#include "dsi-panel-boent51021-1200p-video.dtsi"
+#include "dsi-panel-boyift8201_800p_video.dtsi"
+
&soc {
dsi_panel_pwr_supply: dsi_panel_pwr_supply {
@@ -48,9 +53,68 @@
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
};
+
+ qcom,panel-supply-entry@2 {
+ reg = <2>;
+ qcom,supply-name = "lab";
+ qcom,supply-min-voltage = <4600000>;
+ qcom,supply-max-voltage = <6000000>;
+ qcom,supply-enable-load = <100000>;
+ qcom,supply-disable-load = <100>;
+ };
+
+ qcom,panel-supply-entry@3 {
+ reg = <3>;
+ qcom,supply-name = "ibb";
+ qcom,supply-min-voltage = <4600000>;
+ qcom,supply-max-voltage = <6000000>;
+ qcom,supply-enable-load = <100000>;
+ qcom,supply-disable-load = <100>;
+ qcom,supply-post-on-sleep = <10>;
+ };
};
};
+&dsi_boyift8201_800p_video {
+ qcom,mdss-dsi-panel-timings-phy-v2 = [20 1D 05 07 03 03 04 a0
+ 20 1D 05 07 03 03 04 a0
+ 20 1D 05 07 03 03 04 a0
+ 20 1D 05 07 03 03 04 a0
+ 20 11 05 06 03 03 04 a0];
+};
+
+&dsi_hx83100a_800p_video {
+ qcom,mdss-dsi-panel-timings-phy-v2 = [1E 1C 04 06 02 03 04 a0
+ 1E 1C 04 06 02 03 04 a0
+ 1E 1C 04 06 02 03 04 a0
+ 1E 1C 04 06 02 03 04 a0
+ 1E 0E 04 05 02 03 04 a0];
+};
+
+&dsi_inxnt51021_1200p_video {
+ qcom,mdss-dsi-panel-timings-phy-v2 = [24 1f 08 09 05 03 04 a0
+ 24 1f 08 09 05 03 04 a0
+ 24 1f 08 09 05 03 04 a0
+ 24 1f 08 09 05 03 04 a0
+ 24 1c 08 09 05 03 04 a0];
+};
+
+&dsi_boent51021_1200p_video {
+ qcom,mdss-dsi-panel-timings-phy-v2 = [25 20 08 0A 06 03 04 a0
+ 25 20 08 0A 06 03 04 a0
+ 25 20 08 0A 06 03 04 a0
+ 25 20 08 0A 06 03 04 a0
+ 25 1D 08 0A 06 03 04 a0];
+};
+
+&dsi_starry_800p_video {
+ qcom,mdss-dsi-panel-timings-phy-v2 = [1E 1B 04 05 02 03 04 a0
+ 1E 1B 04 05 02 03 04 a0
+ 1E 1B 04 05 02 03 04 a0
+ 1E 1B 04 05 02 03 04 a0
+ 1E 1D 03 05 02 03 04 a0];
+};
+
&dsi_truly_1080_vid {
qcom,mdss-dsi-panel-timings-phy-v2 = [23 1e 08 09 05 03 04 a0
23 1e 08 09 05 03 04 a0
@@ -117,10 +181,3 @@
qcom,mdss-dsi-t-clk-pre = <0x30>;
};
-&dsi_boyi_hx83100a_800p_video {
- qcom,mdss-dsi-panel-timings-phy-v2 = [1f 1c 05 06 03 03 04 a0
- 1f 1c 05 06 03 03 04 a0
- 1f 1c 05 06 03 03 04 a0
- 1f 1c 05 06 03 03 04 a0
- 1f 10 05 06 03 03 04 a0];
-};
diff --git a/arch/arm/boot/dts/qcom/msm8953-pinctrl.dtsi b/arch/arm/boot/dts/qcom/msm8953-pinctrl.dtsi
index 4f4324d746079..899d99674a510 100644
--- a/arch/arm/boot/dts/qcom/msm8953-pinctrl.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8953-pinctrl.dtsi
@@ -21,6 +21,103 @@
interrupt-controller;
#interrupt-cells = <2>;
+ /* add pingrp for touchscreen */
+ ts_int_default: ts_int_default {
+ mux {
+ pins = "gpio65";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio65";
+ drive-strength = <16>;
+ /*bias-pull-up;*/
+ input-enable;
+ bias-disable;
+ };
+ };
+
+ ts_int_output_high: ts_int_output_high {
+ mux {
+ pins = "gpio65";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio65";
+ output-high;
+ };
+ };
+
+ ts_int_output_low: ts_int_output_low {
+ mux {
+ pins = "gpio65";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio65";
+ output-low;
+ };
+ };
+
+ ts_int_input: ts_int_input {
+ mux {
+ pins = "gpio65";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio65";
+ input-enable;
+ bias-disable;
+ };
+ };
+
+ ts_rst_default: ts_rst_default {
+ mux {
+ pins = "gpio64";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio64";
+ drive-strength = <16>;
+ /*bias-pull-up;*/
+ input-enable;
+ bias-disable;
+ };
+ };
+
+ ts_rst_output_high: ts_rst_output_high {
+ mux {
+ pins = "gpio64";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio64";
+ output-high;
+ };
+ };
+
+ ts_rst_output_low: ts_rst_output_low {
+ mux {
+ pins = "gpio64";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio64";
+ output-low;
+ };
+ };
+
+ ts_rst_input: ts_rst_input {
+ mux {
+ pins = "gpio64";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio64";
+ input-enable;
+ bias-disable;
+ };
+ };
+
pmx-uartconsole {
uart_console_active: uart_console_active {
mux {
@@ -497,6 +594,83 @@
};
};
+ cdc_dmic0_clk_act: cdc_dmic0_clk_act_default {
+ mux {
+ pins = "gpio89";
+ function = "dmic0_clk";
+ };
+
+ config {
+ pins = "gpio89";
+ drive-strength = <8>;
+ };
+ };
+
+ cdc_dmic0_clk_sus: cdc_dmic0_clk_sus_sleep {
+ mux {
+ pins = "gpio89";
+ function = "gpio";
+ };
+
+ config {
+ pins = "gpio89";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
+ cdc_dmic0_data_act: cdc_dmic0_data_act_default {
+ mux {
+ pins = "gpio90";
+ function = "dmic0_data";
+ };
+
+ config {
+ pins = "gpio90";
+ drive-strength = <8>;
+ };
+ };
+
+ cdc_dmic0_data_sus: cdc_dmic0_data_sus_sleep {
+ mux {
+ pins = "gpio90";
+ function = "gpio";
+ };
+
+ config {
+ pins = "gpio90";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
+ sec-tlmm-lines {
+ sec_tlmm_lines_act: sec_tlmm_lines_act {
+ mux {
+ pins = "gpio135", "gpio136", "gpio137", "gpio138";
+ function = "sec_mi2s";
+ };
+
+ config {
+ pins = "gpio135", "gpio136", "gpio137", "gpio138";
+ drive-strength = <8>;
+ };
+ };
+
+ sec_tlmm_lines_sus: sec_tlmm_lines_sus {
+ mux {
+ pins = "gpio135", "gpio136", "gpio137", "gpio138";
+ function = "sec_mi2s";
+ };
+
+ config {
+ pins = "gpio135", "gpio136", "gpio137", "gpio138";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+ };
+ };
+
hsuart_active: default {
mux {
pins = "gpio12", "gpio13", "gpio14", "gpio15";
@@ -549,6 +723,32 @@
};
};
+ blsp2_uart1_active: blsp2_uart1_active {
+ mux {
+ pins = "gpio20", "gpio21", "gpio22", "gpio23";
+ function = "blsp_uart6";
+ };
+
+ config {
+ pins = "gpio20", "gpio21", "gpio22", "gpio23";
+ drive-strength = <16>;
+ bias-disable;
+ };
+ };
+
+ blsp2_uart1_sleep: blsp2_uart1_sleep {
+ mux {
+ pins = "gpio20", "gpio21", "gpio22", "gpio23";
+ function = "gpio";
+ };
+
+ config {
+ pins = "gpio20", "gpio21", "gpio22", "gpio23";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
/* SDC pin type */
sdc1_clk_on: sdc1_clk_on {
config {
@@ -663,30 +863,58 @@
sdc2_cd_on: cd_on {
mux {
- pins = "gpio133";
+ pins = "gpio77";
function = "gpio";
};
config {
- pins = "gpio133";
+ pins = "gpio77";
drive-strength = <2>;
bias-pull-up;
+ output-high;
};
};
sdc2_cd_off: cd_off {
mux {
- pins = "gpio133";
+ pins = "gpio77";
function = "gpio";
};
config {
- pins = "gpio133";
+ pins = "gpio77";
drive-strength = <2>;
bias-disable;
};
};
+ i2c_1 {
+ i2c_1_active: i2c_1_active {
+ mux {
+ pins = "gpio2", "gpio3";
+ function = "blsp_i2c1";
+ };
+
+ config {
+ pins = "gpio2", "gpio3";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ i2c_1_sleep: i2c_1_sleep {
+ mux {
+ pins = "gpio2", "gpio3";
+ function = "blsp_i2c1";
+ };
+
+ config {
+ pins = "gpio2", "gpio3";
+ drive-strength = <2>;
+ };
+ };
+ };
+
i2c_2 {
i2c_2_active: i2c_2_active {
/* active state */
@@ -1159,24 +1387,24 @@
pri-tlmm-lines {
pri_tlmm_lines_act: pri_tlmm_lines_act {
mux {
- pins = "gpio91", "gpio93";
+ pins = "gpio88", "gpio91", "gpio93";
function = "pri_mi2s";
};
config {
- pins = "gpio91", "gpio93";
+ pins = "gpio88", "gpio91", "gpio93";
drive-strength = <8>;
};
};
pri_tlmm_lines_sus: pri_tlmm_lines_sus {
mux {
- pins = "gpio91", "gpio93";
+ pins = "gpio88", "gpio91", "gpio93";
function = "pri_mi2s";
};
config {
- pins = "gpio91", "gpio93";
+ pins = "gpio88", "gpio91", "gpio93";
drive-strength = <2>;
bias-pull-down;
};
@@ -1345,6 +1573,31 @@
};
};
};
+ /*add gpio for tas5805 */
+ audio_enable_gpio: audio_enable_gpio {
+ mux {
+ pins = "gpio44";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio44";
+ bias-disable; /* No PULL */
+ drive-strength = <8>; /* 8 MA */
+ };
+ };
+
+ /*add gpio for tas5782 */
+ audio_enable_gpio68: audio_enable_gpio68 {
+ mux {
+ pins = "gpio68";
+ function = "gpio";
+ };
+ config {
+ pins = "gpio68";
+ bias-disable; /* No PULL */
+ drive-strength = <8>; /* 8 MA */
+ };
+ };
tlmm_gpio_key {
gpio_key_active: gpio_key_active {
diff --git a/arch/arm/boot/dts/qcom/msm8953.dtsi b/arch/arm/boot/dts/qcom/msm8953.dtsi
index 2c523daaaadf2..a438fb70d200f 100644
--- a/arch/arm/boot/dts/qcom/msm8953.dtsi
+++ b/arch/arm/boot/dts/qcom/msm8953.dtsi
@@ -143,6 +143,7 @@
smd36 = &smdtty_loopback;
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
sdhc2 = &sdhc_2; /* SDC2 for SD card */
+ i2c1 = &i2c_1;
i2c2 = &i2c_2;
i2c3 = &i2c_3;
i2c5 = &i2c_5;
@@ -742,6 +743,30 @@
qcom,master-id = <86>;
};
+ i2c_1: i2c@78b5000 { /* BLSP1 QUP1 */
+ compatible = "qcom,i2c-msm-v2";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg-names = "qup_phys_addr";
+ reg = <0x78b5000 0x600>;
+ interrupt-names = "qup_irq";
+ interrupts = <0 95 0>;
+ qcom,master-id = <86>;
+ qcom,clk-freq-out = <100000>;
+ qcom,clk-freq-in = <19200000>;
+ clock-names = "iface_clk", "core_clk";
+ clocks = <&clock_gcc clk_gcc_blsp1_ahb_clk>,
+ <&clock_gcc clk_gcc_blsp1_qup1_i2c_apps_clk>;
+ pinctrl-names = "i2c_active", "i2c_sleep";
+ pinctrl-0 = <&i2c_1_active>;
+ pinctrl-1 = <&i2c_1_sleep>;
+ qcom,noise-rjct-scl = <0>;
+ qcom,noise-rjct-sda = <0>;
+ qcom,high-time-clk-div = <90>;
+ qcom,fs-clk-div = <96>;
+ status = "okay";
+ };
+
i2c_2: i2c@78b6000 { /* BLSP1 QUP2 */
compatible = "qcom,i2c-msm-v2";
#address-cells = <1>;
diff --git a/arch/arm/boot/dts/qcom/skeleton.dtsi b/arch/arm/boot/dts/qcom/skeleton.dtsi
deleted file mode 120000
index dd20eab71f1aa..0000000000000
--- a/arch/arm/boot/dts/qcom/skeleton.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../skeleton.dtsi
\ No newline at end of file
diff --git a/arch/arm/boot/dts/qcom/skeleton.dtsi b/arch/arm/boot/dts/qcom/skeleton.dtsi
new file mode 100644
index 0000000000000..af7c15b60ef1b
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/skeleton.dtsi
@@ -0,0 +1,15 @@
+/*
+ * Skeleton device tree; the bare minimum needed to boot; just include and
+ * add a compatible value. The bootloader will typically populate the memory
+ * node.
+ */
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ cpus { };
+ soc { };
+ chosen { };
+ aliases { };
+ memory { device_type = "memory"; reg = <0 0>; };
+};
diff --git a/arch/arm/boot/dts/qcom/skeleton64.dtsi b/arch/arm/boot/dts/qcom/skeleton64.dtsi
deleted file mode 120000
index 94a9ef272bc93..0000000000000
--- a/arch/arm/boot/dts/qcom/skeleton64.dtsi
+++ /dev/null
@@ -1 +0,0 @@
-../skeleton64.dtsi
\ No newline at end of file
diff --git a/arch/arm/boot/dts/qcom/skeleton64.dtsi b/arch/arm/boot/dts/qcom/skeleton64.dtsi
new file mode 100644
index 0000000000000..1f8ba28132c4a
--- /dev/null
+++ b/arch/arm/boot/dts/qcom/skeleton64.dtsi
@@ -0,0 +1,15 @@
+/*
+ * Skeleton device tree in the 64 bits version; the bare minimum
+ * needed to boot; just include and add a compatible value. The
+ * bootloader will typically populate the memory node.
+ */
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ cpus { };
+ soc { };
+ chosen { };
+ aliases { };
+ memory { device_type = "memory"; reg = <0 0 0 0>; };
+};
diff --git a/arch/arm/configs/msmcortex-perf_defconfig b/arch/arm/configs/msmcortex-perf_defconfig
index 378119e357a02..63eeb67814278 100644
--- a/arch/arm/configs/msmcortex-perf_defconfig
+++ b/arch/arm/configs/msmcortex-perf_defconfig
@@ -310,6 +310,8 @@ CONFIG_TOUCHSCREEN_MAXIM_STI=y
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
+CONFIG_TOUCHSCREEN_FTS=y
+CONFIG_TOUCHSCREEN_FTS_DIRECTORY=y
CONFIG_HMX_DB=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_HBTP_INPUT=y
@@ -596,6 +598,7 @@ CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
CONFIG_FUSE_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
@@ -639,3 +642,6 @@ CONFIG_CRYPTO_SHA2_ARM_CE=y
CONFIG_CRYPTO_SHA512_ARM_NEON=y
CONFIG_CRYPTO_AES_ARM_BS=y
CONFIG_CRYPTO_AES_ARM_CE=y
+CONFIG_FTRACE=y
+CONFIG_ENABLE_DEFAULT_TRACERS=y
+CONFIG_DEBUG_FS=y
\ No newline at end of file
diff --git a/arch/arm/configs/msmcortex_defconfig b/arch/arm/configs/msmcortex_defconfig
index 94fbc36d8b141..da4dc9940dbfe 100644
--- a/arch/arm/configs/msmcortex_defconfig
+++ b/arch/arm/configs/msmcortex_defconfig
@@ -141,6 +141,7 @@ CONFIG_NETFILTER_XT_TARGET_TEE=y
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
CONFIG_NETFILTER_XT_TARGET_TRACE=y
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
@@ -310,6 +311,8 @@ CONFIG_TOUCHSCREEN_MAXIM_STI=y
CONFIG_TOUCHSCREEN_HIMAX_CHIPSET=y
CONFIG_TOUCHSCREEN_HIMAX_I2C=y
CONFIG_TOUCHSCREEN_HIMAX_DEBUG=y
+CONFIG_TOUCHSCREEN_FTS=y
+CONFIG_TOUCHSCREEN_FTS_DIRECTORY=y
CONFIG_HMX_DB=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_HBTP_INPUT=y
@@ -611,6 +614,7 @@ CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
CONFIG_FUSE_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
@@ -680,3 +684,7 @@ CONFIG_CRYPTO_SHA2_ARM_CE=y
CONFIG_CRYPTO_SHA512_ARM_NEON=y
CONFIG_CRYPTO_AES_ARM_BS=y
CONFIG_CRYPTO_AES_ARM_CE=y
+CONFIG_LOG_BUF_SHIFT=21
+CONFIG_FTRACE=y
+CONFIG_ENABLE_DEFAULT_TRACERS=y
+CONFIG_DEBUG_FS=y
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 0df2fa6146d7c..3ee16cfb30ee6 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -59,6 +59,10 @@ static struct syscore_ops gpio_keys_syscore_pm_ops;
static void gpio_keys_syscore_resume(void);
+//liuluan add for switch of camera&mute key
+struct gpio_keys_button *button_camera;
+struct gpio_keys_button *button_mute;
+
/*
* SYSFS interface for enabling/disabling keys and switches:
*
@@ -278,6 +282,23 @@ ATTR_SHOW_FN(switches, EV_SW, false);
ATTR_SHOW_FN(disabled_keys, EV_KEY, true);
ATTR_SHOW_FN(disabled_switches, EV_SW, true);
+//liuluan add for switch of camera&mute key start
+static ssize_t gpio_keys_show_camera_switches(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ char ret;
+ ret = __gpio_get_value(button_camera->gpio) ? 1 : 0;
+ return sprintf(buf, "%u\n", ret);
+}
+static ssize_t gpio_keys_show_mute_switches(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ char ret;
+ ret = __gpio_get_value(button_mute->gpio) ? 1 : 0;
+ return sprintf(buf, "%u\n", ret);
+}
+//liuluan add for switch of camera&mute key end
+
/*
* ATTRIBUTES:
*
@@ -286,6 +307,9 @@ ATTR_SHOW_FN(disabled_switches, EV_SW, true);
*/
static DEVICE_ATTR(keys, S_IRUGO, gpio_keys_show_keys, NULL);
static DEVICE_ATTR(switches, S_IRUGO, gpio_keys_show_switches, NULL);
+//liuluan add for switch of camera&mute key
+static DEVICE_ATTR(camera_switches, S_IRUGO, gpio_keys_show_camera_switches, NULL);
+static DEVICE_ATTR(mute_switches, S_IRUGO, gpio_keys_show_mute_switches, NULL);
#define ATTR_STORE_FN(name, type) \
static ssize_t gpio_keys_store_##name(struct device *dev, \
@@ -323,6 +347,8 @@ static DEVICE_ATTR(disabled_switches, S_IWUSR | S_IRUGO,
static struct attribute *gpio_keys_attrs[] = {
&dev_attr_keys.attr,
&dev_attr_switches.attr,
+ &dev_attr_camera_switches.attr, //liuluan add for switch of camera key
+ &dev_attr_mute_switches.attr, //liuluan add for switch of mute key
&dev_attr_disabled_keys.attr,
&dev_attr_disabled_switches.attr,
NULL,
@@ -344,8 +370,33 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)
if (type == EV_ABS) {
if (state)
input_event(input, type, button->code, button->value);
- } else {
- input_event(input, type, button->code, !!state);
+ } else{
+ if(button->code == 91){
+ if(state){
+ input_event(input, type, KEY_F3, 1);
+ input_sync(input);
+ input_event(input, type, KEY_F3, 0);
+ }else{
+ input_event(input, type, button->code, 1);
+ input_sync(input);
+ input_event(input, type, button->code, 0);
+ }
+
+ }
+ else if(button->code == 87){
+ if(state){
+ input_event(input, type, KEY_F4, 1);
+ input_sync(input);
+ input_event(input, type, KEY_F4, 0);
+ }else{
+ input_event(input, type, button->code, 1);//open camera
+ input_sync(input);
+ input_event(input, type, button->code, 0);
+ }
+
+ }
+ else
+ input_event(input, type, button->code, !!state);
}
input_sync(input);
}
@@ -376,9 +427,14 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
if (bdata->button->wakeup)
pm_stay_awake(bdata->input->dev.parent);
- if (bdata->timer_debounce)
+ if (bdata->timer_debounce){
+ if ((bdata->button->code == 87) || (bdata->button->code == 91)){
mod_timer(&bdata->timer,
+ jiffies + msecs_to_jiffies(100));
+ }else
+ mod_timer(&bdata->timer,
jiffies + msecs_to_jiffies(bdata->timer_debounce));
+ }
else
schedule_work(&bdata->work);
@@ -518,6 +574,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
}
input_set_capability(input, button->type ?: EV_KEY, button->code);
+ input_set_capability(input, button->type ?: EV_KEY, KEY_F3);
+ input_set_capability(input, button->type ?: EV_KEY, KEY_F4);
/*
* Install custom action to cancel debounce timer and
@@ -706,6 +764,9 @@ gpio_keys_get_devtree_pdata(struct device *dev)
&button->debounce_interval))
button->debounce_interval = 5;
}
+//liuluan add for switch of camera&mute key
+ button_camera = &pdata->buttons[0];
+ button_mute = &pdata->buttons[1];
if (pdata->nbuttons == 0)
return ERR_PTR(-EINVAL);
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 97fcd88d2d54a..90cc7e20910c6 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -1137,6 +1137,18 @@ config TOUCHSCREEN_MAXIM_STI
source "drivers/input/touchscreen/gt9xx/Kconfig"
+config TOUCHSCREEN_FTS
+ bool "Focaltech touchpanel CHIPSET"
+ depends on I2C
+ help
+ Say Y here if you have a Focaltech CHIPSET touchscreen.
+ focaltech controllers are multi touch controllers which can
+ report 10 touches at a time.
+
+ If unsure, say N.
+
+source "drivers/input/touchscreen/focaltech_touch/Kconfig"
+
config TOUCHSCREEN_HIMAX_CHIPSET
bool "Himax touchpanel CHIPSET"
depends on I2C
@@ -1148,5 +1160,7 @@ config TOUCHSCREEN_HIMAX_CHIPSET
If unsure, say N.
source "drivers/input/touchscreen/hxchipset/Kconfig"
+#gt9xx_v2
+source "drivers/input/touchscreen/gt9xx_v2.8/Kconfig"
endif
diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
index 499b8110fe6cc..d31a9b95f3652 100644
--- a/drivers/input/touchscreen/Makefile
+++ b/drivers/input/touchscreen/Makefile
@@ -91,3 +91,5 @@ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI4_DEV) += synaptics_rmi_dev.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE) += synaptics_fw_update.o
obj-$(CONFIG_TOUCHSCREEN_GT9XX) += gt9xx/
obj-$(CONFIG_TOUCHSCREEN_HIMAX_CHIPSET) += hxchipset/
+obj-$(CONFIG_TOUCHSCREEN_GT9XX_v28) += gt9xx_v2.8/
+obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_touch/
diff --git a/drivers/input/touchscreen/hxchipset/himax_common.c b/drivers/input/touchscreen/hxchipset/himax_common.c
index d4bc5beb0203e..d64fe400504ec 100644
--- a/drivers/input/touchscreen/hxchipset/himax_common.c
+++ b/drivers/input/touchscreen/hxchipset/himax_common.c
@@ -46,6 +46,7 @@ static struct himax_config *config_selected;
/*static int iref_number = 11;*/
/*static bool iref_found = false;*/
+int hxbl_flag = 0;
#if defined(CONFIG_FB)
@@ -100,6 +101,8 @@ int himax_input_register(struct himax_ts_data *ts)
set_bit(INPUT_PROP_DIRECT, ts->input_dev->propbit);
+ set_bit(KEY_F1, ts->input_dev->keybit);
+
if (ts->protocol_type == PROTOCOL_TYPE_A) {
/*ts->input_dev->mtsize = ts->nFinger_support;*/
input_set_abs_params(ts->input_dev, ABS_MT_TRACKING_ID,
@@ -1141,202 +1144,209 @@ bypass_checksum_failed_packet:
hx_point_num = buf[HX_TOUCH_INFO_POINT_CNT] & 0x0f;
/* Touch Point information*/
- if ((hx_point_num != 0) && (vk_press == 0x00)) {
- uint16_t old_finger = ts->pre_finger_mask;
-
- ts->pre_finger_mask = 0;
- finger_num = buf[coordInfoSize - 4] & 0x0F;
- finger_on = 1;
- AA_press = 1;
- for (i = 0; i < ts->nFinger_support; i++) {
- int base = i * 4;
- int x = buf[base] << 8 | buf[base + 1];
- int y = (buf[base + 2] << 8 | buf[base + 3]);
- int w = buf[(ts->nFinger_support * 4) + i];
-
- if (x >= 0 && x <= ts->pdata->abs_x_max
- && y >= 0 && y <= ts->pdata->abs_y_max) {
- finger_num--;
- if ((((ts->debug_log_level & BIT(3)) > 0)
- && (old_finger >> i == 0))
- && (ts->useScreenRes)) {
- I("status:Screen:F:%02d", i + 1);
- I("Down,X:%d,Y:%d,W:%d,N:%d\n",
- x * ts->widthFactor >> SHIFTBITS,
- y * ts->heightFactor >> SHIFTBITS,
- w, EN_NoiseFilter);
- } else if ((((ts->debug_log_level & BIT(3)) > 0)
- && (old_finger >> i == 0))
- && !(ts->useScreenRes)) {
- I("status:Raw:F:%02d", i + 1);
- I("Down,X:%d,Y:%d,W:%d,N:%d\n",
- x, y, w, EN_NoiseFilter);
- }
-
- if (ts->protocol_type == PROTOCOL_TYPE_B)
- input_mt_slot(ts->input_dev, i);
-
- input_report_abs(ts->input_dev,
- ABS_MT_TOUCH_MAJOR, w);
- input_report_abs(ts->input_dev,
- ABS_MT_WIDTH_MAJOR, w);
- input_report_abs(ts->input_dev,
- ABS_MT_PRESSURE, w);
- input_report_abs(ts->input_dev,
- ABS_MT_POSITION_X, x);
- input_report_abs(ts->input_dev,
- ABS_MT_POSITION_Y, y);
-
- if (ts->protocol_type == PROTOCOL_TYPE_A) {
+ if(hxbl_flag == 0){
+ if ((hx_point_num != 0) && (vk_press == 0x00)) {
+ uint16_t old_finger = ts->pre_finger_mask;
+
+ ts->pre_finger_mask = 0;
+ finger_num = buf[coordInfoSize - 4] & 0x0F;
+ finger_on = 1;
+ AA_press = 1;
+ for (i = 0; i < ts->nFinger_support; i++) {
+ int base = i * 4;
+ int x = buf[base] << 8 | buf[base + 1];
+ int y = (buf[base + 2] << 8 | buf[base + 3]);
+ int w = buf[(ts->nFinger_support * 4) + i];
+
+ if (x >= 0 && x <= ts->pdata->abs_x_max
+ && y >= 0 && y <= ts->pdata->abs_y_max) {
+ finger_num--;
+ if ((((ts->debug_log_level & BIT(3)) > 0)
+ && (old_finger >> i == 0))
+ && (ts->useScreenRes)) {
+ I("status:Screen:F:%02d", i + 1);
+ I("Down,X:%d,Y:%d,W:%d,N:%d\n",
+ x * ts->widthFactor >> SHIFTBITS,
+ y * ts->heightFactor >> SHIFTBITS,
+ w, EN_NoiseFilter);
+ } else if ((((ts->debug_log_level & BIT(3)) > 0)
+ && (old_finger >> i == 0))
+ && !(ts->useScreenRes)) {
+ I("status:Raw:F:%02d", i + 1);
+ I("Down,X:%d,Y:%d,W:%d,N:%d\n",
+ x, y, w, EN_NoiseFilter);
+ }
+
+ if (ts->protocol_type == PROTOCOL_TYPE_B)
+ input_mt_slot(ts->input_dev, i);
+
input_report_abs(ts->input_dev,
- ABS_MT_TRACKING_ID, i);
- input_mt_sync(ts->input_dev);
+ ABS_MT_TOUCH_MAJOR, w);
+ input_report_abs(ts->input_dev,
+ ABS_MT_WIDTH_MAJOR, w);
+ input_report_abs(ts->input_dev,
+ ABS_MT_PRESSURE, w);
+ input_report_abs(ts->input_dev,
+ ABS_MT_POSITION_X, x);
+ input_report_abs(ts->input_dev,
+ ABS_MT_POSITION_Y, y);
+
+ if (ts->protocol_type == PROTOCOL_TYPE_A) {
+ input_report_abs(ts->input_dev,
+ ABS_MT_TRACKING_ID, i);
+ input_mt_sync(ts->input_dev);
+ } else {
+ ts->last_slot = i;
+ input_mt_report_slot_state
+ (ts->input_dev,
+ MT_TOOL_FINGER, 1);
+ }
+
+ if (!ts->first_pressed) {
+ ts->first_pressed = 1;
+ I("S1@%d, %d\n", x, y);
+ }
+
+ ts->pre_finger_data[i][0] = x;
+ ts->pre_finger_data[i][1] = y;
+
+ if (ts->debug_log_level & BIT(1)) {
+ I("Finger %d=> X:%d,Y:%d,W:%d,",
+ i + 1, x, y, w);
+ I("Z:%d,F:%d,N:%d\n",
+ w, i + 1, EN_NoiseFilter);
+ }
+ ts->pre_finger_mask =
+ ts->pre_finger_mask + (1 << i);
+
} else {
- ts->last_slot = i;
- input_mt_report_slot_state
- (ts->input_dev,
- MT_TOOL_FINGER, 1);
- }
-
- if (!ts->first_pressed) {
- ts->first_pressed = 1;
- I("S1@%d, %d\n", x, y);
- }
-
- ts->pre_finger_data[i][0] = x;
- ts->pre_finger_data[i][1] = y;
-
- if (ts->debug_log_level & BIT(1)) {
- I("Finger %d=> X:%d,Y:%d,W:%d,",
- i + 1, x, y, w);
- I("Z:%d,F:%d,N:%d\n",
- w, i + 1, EN_NoiseFilter);
- }
- ts->pre_finger_mask =
- ts->pre_finger_mask + (1 << i);
-
- } else {
- if (ts->protocol_type == PROTOCOL_TYPE_B) {
- input_mt_slot(ts->input_dev, i);
- input_mt_report_slot_state
- (ts->input_dev, MT_TOOL_FINGER, 0);
- }
- if (i == 0 && ts->first_pressed == 1) {
- ts->first_pressed = 2;
- I("E1@%d, %d\n",
- ts->pre_finger_data[0][0],
- ts->pre_finger_data[0][1]);
- }
- if ((((ts->debug_log_level & BIT(3)) > 0)
- && (old_finger >> i == 1))
- && (ts->useScreenRes)) {
- I("status:Screen:F:%02d,Up,X:%d,Y:%d\n",
- i + 1, ts->pre_finger_data[i][0]
- * ts->widthFactor >> SHIFTBITS,
- ts->pre_finger_data[i][1]
- * ts->heightFactor >> SHIFTBITS);
- } else if ((((ts->debug_log_level & BIT(3)) > 0)
- && (old_finger >> i == 1))
- && !(ts->useScreenRes)) {
- I("status:Raw:F:%02d,Up,X:%d,Y:%d\n",
- i + 1, ts->pre_finger_data[i][0],
- ts->pre_finger_data[i][1]);
- }
- }
- }
- input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
- input_sync(ts->input_dev);
- } else if ((hx_point_num != 0)
- && ((tpd_key_old != 0x00) && (tpd_key == 0x00))) {
- /*temp_x[0] = 0xFFFF;*/
- /*temp_y[0] = 0xFFFF;*/
- /*temp_x[1] = 0xFFFF;*/
- /*temp_y[1] = 0xFFFF;*/
- himax_ts_button_func(tpd_key, ts);
- finger_on = 0;
- input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
- input_sync(ts->input_dev);
- } else if (hx_point_num == 0) {
- if (AA_press) {
- /*leave event*/
- finger_on = 0;
- AA_press = 0;
- if (ts->protocol_type == PROTOCOL_TYPE_A)
- input_mt_sync(ts->input_dev);
-
- for (i = 0 ; i < ts->nFinger_support ; i++) {
- if ((((ts->pre_finger_mask >> i) & 1) == 1)
- && (ts->protocol_type == PROTOCOL_TYPE_B)) {
- input_mt_slot(ts->input_dev, i);
- input_mt_report_slot_state
- (ts->input_dev, MT_TOOL_FINGER, 0);
- }
- }
- if (ts->pre_finger_mask > 0) {
- for (i = 0; i < ts->nFinger_support
- && (ts->debug_log_level & BIT(3)) > 0; i++) {
- if ((((ts->pre_finger_mask
- >> i) & 1) == 1)
+ if (ts->protocol_type == PROTOCOL_TYPE_B) {
+ input_mt_slot(ts->input_dev, i);
+ input_mt_report_slot_state
+ (ts->input_dev, MT_TOOL_FINGER, 0);
+ }
+ if (i == 0 && ts->first_pressed == 1) {
+ ts->first_pressed = 2;
+ I("E1@%d, %d\n",
+ ts->pre_finger_data[0][0],
+ ts->pre_finger_data[0][1]);
+ }
+ if ((((ts->debug_log_level & BIT(3)) > 0)
+ && (old_finger >> i == 1))
&& (ts->useScreenRes)) {
- I("status:%X,", 0);
- I("Screen:F:%02d,", i + 1);
- I("Up,X:%d,Y:%d\n",
- ts->pre_finger_data[i][0]
+ I("status:Screen:F:%02d,Up,X:%d,Y:%d\n",
+ i + 1, ts->pre_finger_data[i][0]
* ts->widthFactor >> SHIFTBITS,
ts->pre_finger_data[i][1]
- * ts->heightFactor >> SHIFTBITS
- );
- } else if ((((ts->pre_finger_mask
- >> i) & 1) == 1)
+ * ts->heightFactor >> SHIFTBITS);
+ } else if ((((ts->debug_log_level & BIT(3)) > 0)
+ && (old_finger >> i == 1))
&& !(ts->useScreenRes)) {
- I("status:%X,", 0);
- I("Screen:F:%02d,", i + 1);
- I("Up,X:%d,Y:%d\n",
- ts->pre_finger_data[i][0],
+ I("status:Raw:F:%02d,Up,X:%d,Y:%d\n",
+ i + 1, ts->pre_finger_data[i][0],
ts->pre_finger_data[i][1]);
}
}
- ts->pre_finger_mask = 0;
}
-
- if (ts->first_pressed == 1) {
- ts->first_pressed = 2;
- I("E1@%d, %d\n", ts->pre_finger_data[0][0],
- ts->pre_finger_data[0][1]);
- }
-
- if (ts->debug_log_level & BIT(1))
- I("All Finger leave\n");
-
-#ifdef HX_TP_PROC_DIAG
- /*coordinate dump start*/
- if (coordinate_dump_enable == 1) {
- do_gettimeofday(&t);
- time_to_tm(t.tv_sec, 0, &broken);
- snprintf(&coordinate_char[0], 15,
- "%2d:%2d:%2d:%lu,", broken.tm_hour,
- broken.tm_min, broken.tm_sec,
- t.tv_usec / 1000);
-
- snprintf(&coordinate_char[15], 10,
- "Touch up!");
-
- coordinate_fn->f_op->write
- (coordinate_fn, &coordinate_char[0],
- 15 + (ic_data->HX_MAX_PT + 5)
- * 2 * sizeof(char) * 5 + 2,
- &coordinate_fn->f_pos);
- }
- /*coordinate dump end*/
-#endif
- } else if (tpd_key != 0x00) {
- himax_ts_button_func(tpd_key, ts);
- finger_on = 1;
- } else if ((tpd_key_old != 0x00) && (tpd_key == 0x00)) {
+ input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
+ input_sync(ts->input_dev);
+ } else if ((hx_point_num != 0)
+ && ((tpd_key_old != 0x00) && (tpd_key == 0x00))) {
+ /*temp_x[0] = 0xFFFF;*/
+ /*temp_y[0] = 0xFFFF;*/
+ /*temp_x[1] = 0xFFFF;*/
+ /*temp_y[1] = 0xFFFF;*/
himax_ts_button_func(tpd_key, ts);
finger_on = 0;
+ input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
+ input_sync(ts->input_dev);
+ } else if (hx_point_num == 0) {
+ if (AA_press) {
+ /*leave event*/
+ finger_on = 0;
+ AA_press = 0;
+ if (ts->protocol_type == PROTOCOL_TYPE_A)
+ input_mt_sync(ts->input_dev);
+
+ for (i = 0 ; i < ts->nFinger_support ; i++) {
+ if ((((ts->pre_finger_mask >> i) & 1) == 1)
+ && (ts->protocol_type == PROTOCOL_TYPE_B)) {
+ input_mt_slot(ts->input_dev, i);
+ input_mt_report_slot_state
+ (ts->input_dev, MT_TOOL_FINGER, 0);
+ }
+ }
+ if (ts->pre_finger_mask > 0) {
+ for (i = 0; i < ts->nFinger_support
+ && (ts->debug_log_level & BIT(3)) > 0; i++) {
+ if ((((ts->pre_finger_mask
+ >> i) & 1) == 1)
+ && (ts->useScreenRes)) {
+ I("status:%X,", 0);
+ I("Screen:F:%02d,", i + 1);
+ I("Up,X:%d,Y:%d\n",
+ ts->pre_finger_data[i][0]
+ * ts->widthFactor >> SHIFTBITS,
+ ts->pre_finger_data[i][1]
+ * ts->heightFactor >> SHIFTBITS
+ );
+ } else if ((((ts->pre_finger_mask
+ >> i) & 1) == 1)
+ && !(ts->useScreenRes)) {
+ I("status:%X,", 0);
+ I("Screen:F:%02d,", i + 1);
+ I("Up,X:%d,Y:%d\n",
+ ts->pre_finger_data[i][0],
+ ts->pre_finger_data[i][1]);
+ }
+ }
+ ts->pre_finger_mask = 0;
+ }
+
+ if (ts->first_pressed == 1) {
+ ts->first_pressed = 2;
+ I("E1@%d, %d\n", ts->pre_finger_data[0][0],
+ ts->pre_finger_data[0][1]);
+ }
+
+ if (ts->debug_log_level & BIT(1))
+ I("All Finger leave\n");
+
+#ifdef HX_TP_PROC_DIAG
+ /*coordinate dump start*/
+ if (coordinate_dump_enable == 1) {
+ do_gettimeofday(&t);
+ time_to_tm(t.tv_sec, 0, &broken);
+ snprintf(&coordinate_char[0], 15,
+ "%2d:%2d:%2d:%lu,", broken.tm_hour,
+ broken.tm_min, broken.tm_sec,
+ t.tv_usec / 1000);
+
+ snprintf(&coordinate_char[15], 10,
+ "Touch up!");
+
+ coordinate_fn->f_op->write
+ (coordinate_fn, &coordinate_char[0],
+ 15 + (ic_data->HX_MAX_PT + 5)
+ * 2 * sizeof(char) * 5 + 2,
+ &coordinate_fn->f_pos);
+ }
+ /*coordinate dump end*/
+#endif
+ } else if (tpd_key != 0x00) {
+ himax_ts_button_func(tpd_key, ts);
+ finger_on = 1;
+ } else if ((tpd_key_old != 0x00) && (tpd_key == 0x00)) {
+ himax_ts_button_func(tpd_key, ts);
+ finger_on = 0;
+ }
+ input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
+ input_sync(ts->input_dev);
}
- input_report_key(ts->input_dev, BTN_TOUCH, finger_on);
+ }else{
+ input_report_key(ts->input_dev, KEY_F1, 1);
+ input_sync(ts->input_dev);
+ input_report_key(ts->input_dev, KEY_F1, 0);
input_sync(ts->input_dev);
}
tpd_key_old = tpd_key;
@@ -1703,6 +1713,21 @@ err_ic_package_failed:
return false;
}
+static ssize_t hxbl_flag_store(
+ struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
+{
+ sscanf(buf,"%d",&hxbl_flag);
+ return count;
+}
+
+static ssize_t hxbl_flag_show(
+ struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ return sprintf(buf, "%d\n", hxbl_flag);
+}
+static DEVICE_ATTR(hxbl_flag, S_IRUGO | S_IWUSR, hxbl_flag_show, hxbl_flag_store);
+
int himax_chip_common_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -1774,6 +1799,14 @@ const struct i2c_device_id *id)
ts->pdata = pdata;
private_ts = ts;
+//add by liujun for test i2c start
+ err = himax_hand_shaking(private_ts->client);
+ if (err == 2){
+ E("%s: test i2c failed\n", __func__);
+ return err;
+ }
+//add by liujun for test i2c end
+
mutex_init(&ts->fb_mutex);
/* ts initialization is deferred till FB_UNBLACK event;
* probe is considered pending till then.*/
@@ -1786,7 +1819,9 @@ const struct i2c_device_id *id)
goto err_fb_notif_wq_create;
}
#endif
-
+ if((err = device_create_file(&client->dev, &dev_attr_hxbl_flag)) != 0)
+ return 0;
+
return 0;
#ifdef CONFIG_FB
diff --git a/drivers/input/touchscreen/hxchipset/himax_debug.c b/drivers/input/touchscreen/hxchipset/himax_debug.c
index 55cc7ca92e4c2..5147afeb0d871 100644
--- a/drivers/input/touchscreen/hxchipset/himax_debug.c
+++ b/drivers/input/touchscreen/hxchipset/himax_debug.c
@@ -73,6 +73,7 @@ const struct file_operations himax_proc_vendor_ops = {
.read = himax_vendor_read,
};
+
static ssize_t himax_attn_read(struct file *file, char *buf,
size_t len, loff_t *pos)
{
diff --git a/drivers/input/touchscreen/hxchipset/himax_debug.h b/drivers/input/touchscreen/hxchipset/himax_debug.h
index 7a24a170eaca9..a67638dbea74e 100644
--- a/drivers/input/touchscreen/hxchipset/himax_debug.h
+++ b/drivers/input/touchscreen/hxchipset/himax_debug.h
@@ -24,6 +24,7 @@
#define HIMAX_PROC_INT_EN_FILE "int_en"
#define HIMAX_PROC_LAYOUT_FILE "layout"
+
static struct proc_dir_entry *himax_touch_proc_dir;
static struct proc_dir_entry *himax_proc_debug_level_file;
static struct proc_dir_entry *himax_proc_vendor_file;
@@ -31,6 +32,7 @@
static struct proc_dir_entry *himax_proc_int_en_file;
static struct proc_dir_entry *himax_proc_layout_file;
+
uint8_t HX_PROC_SEND_FLAG;
extern int himax_touch_proc_init(void);
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index bac22ef4e0835..9476cd600aa06 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -3818,8 +3818,17 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
mmc_send_if_cond(host, host->ocr_avail);
/* Order's important: probe SDIO, then SD, then MMC */
- if (!mmc_attach_sdio(host))
+ if (!mmc_attach_sdio(host)){
return 0;
+ }else{
+ pr_info("again %s: %s: \n", mmc_hostname(host), __func__);
+ if (strcmp(mmc_hostname(host), "mmc1") == 0) {
+ msleep(500);
+ if (!mmc_attach_sdio(host))
+ return 0;
+ }
+ }
+
if (!mmc_attach_sd(host))
return 0;
if (!mmc_attach_mmc(host))
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index b83f03343f200..664c415e129d8 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -4302,6 +4302,15 @@ static int sdhci_msm_probe(struct platform_device *pdev)
}
init_completion(&msm_host->pwr_irq_completion);
+
+ //add by liujun start
+
+ if (strcmp(mmc_hostname(host->mmc), "mmc1") == 0) {
+ dev_err(&pdev->dev, "%s: mmc1 sdhci_msm_setup_pins\n",__func__);
+ sdhci_msm_setup_pins(msm_host->pdata, true);
+ }
+
+ //add by liujun end
if (gpio_is_valid(msm_host->pdata->status_gpio)) {
/*
diff --git a/drivers/net/wireless/cnss/cnss_sdio.c b/drivers/net/wireless/cnss/cnss_sdio.c
index a2ca99f77aa3f..1532fa4394dda 100644
--- a/drivers/net/wireless/cnss/cnss_sdio.c
+++ b/drivers/net/wireless/cnss/cnss_sdio.c
@@ -40,6 +40,7 @@
#endif
#include <linux/gpio.h>
#include <linux/of_gpio.h>
+#include <linux/wakelock.h>
#define WLAN_VREG_NAME "vdd-wlan"
#define WLAN_VREG_DSRC_NAME "vdd-wlan-dsrc"
@@ -64,6 +65,8 @@
#define CNSS_HW_SLEEP 0
#define CNSS_HW_ACTIVE 1
+static struct wake_lock wifi_suspend_lock;
+
struct cnss_sdio_regulator {
struct regulator *wlan_io;
struct regulator *wlan_xtal;
@@ -1496,6 +1499,9 @@ static int cnss_sdio_probe(struct platform_device *pdev)
goto err_bus_bandwidth_init;
}
}
+
+ wake_lock_init(&wifi_suspend_lock, WAKE_LOCK_SUSPEND, "wifi wakelock");
+ wake_lock(&wifi_suspend_lock);
dev_info(&pdev->dev, "CNSS SDIO Driver registered");
return 0;
@@ -1523,7 +1529,8 @@ static int cnss_sdio_remove(struct platform_device *pdev)
if (!cnss_pdata)
return -ENODEV;
-
+
+ wake_lock_destroy(&wifi_suspend_lock);
info = &cnss_pdata->cnss_sdio_info;
tsf_info = &info->cap_tsf_info;
diff --git a/drivers/video/msm/mdss/mdss_dsi.c b/drivers/video/msm/mdss/mdss_dsi.c
index 6813c75697093..82416a35ccff5 100644
--- a/drivers/video/msm/mdss/mdss_dsi.c
+++ b/drivers/video/msm/mdss/mdss_dsi.c
@@ -26,6 +26,7 @@
#include <linux/uaccess.h>
#include <linux/msm-bus.h>
#include <linux/pm_qos.h>
+#include <linux/proc_fs.h>
#include "mdss.h"
#include "mdss_panel.h"
@@ -291,7 +292,14 @@ static int mdss_dsi_panel_power_off(struct mdss_panel_data *pdata)
pr_warn("%s: Panel reset failed. rc=%d\n", __func__, ret);
ret = 0;
}
-
+ if (gpio_is_valid(ctrl_pdata->vdd_ext_gpio)) {
+ ret = gpio_direction_output(
+ ctrl_pdata->vdd_ext_gpio, 0);
+ if (ret) {
+ pr_err("%s: unable to set dir for vdd gpio\n",
+ __func__);
+ }
+ }
if (mdss_dsi_pinctrl_set_state(ctrl_pdata, false))
pr_debug("reset disable: pinctrl not enabled\n");
@@ -319,6 +327,15 @@ static int mdss_dsi_panel_power_on(struct mdss_panel_data *pdata)
ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata,
panel_data);
+ if (gpio_is_valid(ctrl_pdata->vdd_ext_gpio)) {
+ ret = gpio_direction_output(
+ ctrl_pdata->vdd_ext_gpio, 1);
+ mdelay(30);
+ if (ret) {
+ pr_err("%s: unable to set dir for vdd gpio\n",
+ __func__);
+ }
+ }
ret = msm_dss_enable_vreg(
ctrl_pdata->panel_power_data.vreg_config,
ctrl_pdata->panel_power_data.num_vreg, 1);
@@ -4097,6 +4114,11 @@ static int mdss_dsi_parse_gpio_params(struct platform_device *ctrl_pdev,
if (!gpio_is_valid(ctrl_pdata->bklt_en_gpio))
pr_info("%s: bklt_en gpio not specified\n", __func__);
+ ctrl_pdata->vdd_ext_gpio = of_get_named_gpio(ctrl_pdev->dev.of_node,
+ "qcom,ext_vdd-gpio", 0);
+ if (!gpio_is_valid(ctrl_pdata->vdd_ext_gpio))
+ pr_info("%s: ext vdd gpio not specified\n", __func__);
+
ctrl_pdata->rst_gpio = of_get_named_gpio(ctrl_pdev->dev.of_node,
"qcom,platform-reset-gpio", 0);
if (!gpio_is_valid(ctrl_pdata->rst_gpio))
diff --git a/drivers/video/msm/mdss/mdss_dsi.h b/drivers/video/msm/mdss/mdss_dsi.h
index 6d6757ff592eb..4b5e15459810f 100644
--- a/drivers/video/msm/mdss/mdss_dsi.h
+++ b/drivers/video/msm/mdss/mdss_dsi.h
@@ -432,6 +432,7 @@ struct mdss_dsi_ctrl_pdata {
int rst_gpio;
int disp_en_gpio;
int bklt_en_gpio;
+ int vdd_ext_gpio;
int mode_gpio;
int intf_mux_gpio;
int bklt_ctrl; /* backlight ctrl */
diff --git a/drivers/video/msm/mdss/mdss_dsi_panel.c b/drivers/video/msm/mdss/mdss_dsi_panel.c
index 37a4f20cc2af5..691c58e756638 100644
--- a/drivers/video/msm/mdss/mdss_dsi_panel.c
+++ b/drivers/video/msm/mdss/mdss_dsi_panel.c
@@ -317,6 +317,15 @@ static int mdss_dsi_request_gpios(struct mdss_dsi_ctrl_pdata *ctrl_pdata)
goto bklt_en_gpio_err;
}
}
+ if (gpio_is_valid(ctrl_pdata->vdd_ext_gpio)) {
+ rc = gpio_request(ctrl_pdata->vdd_ext_gpio,
+ "vdd_enable");
+ if (rc) {
+ pr_err("request vdd enable gpio failed, rc=%d\n",
+ rc);
+ goto vdd_en_gpio_err;
+ }
+ }
if (gpio_is_valid(ctrl_pdata->mode_gpio)) {
rc = gpio_request(ctrl_pdata->mode_gpio, "panel_mode");
if (rc) {
@@ -332,6 +341,8 @@ mode_gpio_err:
gpio_free(ctrl_pdata->bklt_en_gpio);
bklt_en_gpio_err:
gpio_free(ctrl_pdata->rst_gpio);
+vdd_en_gpio_err:
+ gpio_free(ctrl_pdata->vdd_ext_gpio);
rst_gpio_err:
if (gpio_is_valid(ctrl_pdata->disp_en_gpio))
gpio_free(ctrl_pdata->disp_en_gpio);
diff --git a/include/linux/printk.h b/include/linux/printk.h
index d78125f73ac4f..3d9a59cf5dd7a 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -38,11 +38,11 @@ static inline const char *printk_skip_level(const char *buffer)
/* We show everything that is MORE important than this.. */
#define CONSOLE_LOGLEVEL_SILENT 0 /* Mum's the word */
-#define CONSOLE_LOGLEVEL_MIN 1 /* Minimum loglevel we let people use */
-#define CONSOLE_LOGLEVEL_QUIET 4 /* Shhh ..., when booted with "quiet" */
-#define CONSOLE_LOGLEVEL_DEFAULT 7 /* anything MORE serious than KERN_DEBUG */
-#define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
-#define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
+#define CONSOLE_LOGLEVEL_MIN 0 /* Minimum loglevel we let people use */
+#define CONSOLE_LOGLEVEL_QUIET 1 /* Shhh ..., when booted with "quiet" */
+#define CONSOLE_LOGLEVEL_DEFAULT 2 /* anything MORE serious than KERN_DEBUG */
+#define CONSOLE_LOGLEVEL_DEBUG 3 /* issue debug messages */
+#define CONSOLE_LOGLEVEL_MOTORMOUTH 5 /* You can't shut this one up */
extern int console_printk[];
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 6fdc97ef6023d..dc2b8312d4385 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -53,6 +53,9 @@ else
LINUX_COMPILE_HOST=$KBUILD_BUILD_HOST
fi
+LINUX_COMPILE_BY="Lenovo"
+LINUX_COMPILE_HOST="zoom"
+
UTS_VERSION="#$VERSION"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index aae1b9a86eb6a..fda194167488d 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -576,6 +576,14 @@ config SND_SOC_TAS2552
config SND_SOC_TAS5086
tristate "Texas Instruments TAS5086 speaker amplifier"
depends on I2C
+
+config SND_SOC_TAS5805M
+ tristate "Texas Instruments TAS5805M Mono Audio amplifier"
+ depends on I2C
+
+config SND_SOC_TAS5782M
+ tristate "Texas Instruments TAS5782M Mono Audio amplifier"
+ depends on I2C
config SND_SOC_TLV320AIC23
tristate
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 8c9db9b1a62a7..5b441b1e911b6 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -101,6 +101,8 @@ snd-soc-sta350-objs := sta350.o
snd-soc-sta529-objs := sta529.o
snd-soc-stac9766-objs := stac9766.o
snd-soc-tas5086-objs := tas5086.o
+#snd-soc-tas5805m-objs := tas5805m.o
+snd-soc-tas5782m-objs := tas5782m.o
snd-soc-tlv320aic23-objs := tlv320aic23.o
snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o
@@ -292,6 +294,8 @@ obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o
obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.o
obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.o
obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o
+#obj-$(CONFIG_SND_SOC_TAS5805M) += snd-soc-tas5805m.o
+obj-$(CONFIG_SND_SOC_TAS5782M) += snd-soc-tas5782m.o
obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C) += snd-soc-tlv320aic23-i2c.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI) += snd-soc-tlv320aic23-spi.o
diff --git a/sound/soc/codecs/msm8x16-wcd.c b/sound/soc/codecs/msm8x16-wcd.c
index b047b499c8d33..04ec2d4295600 100644
--- a/sound/soc/codecs/msm8x16-wcd.c
+++ b/sound/soc/codecs/msm8x16-wcd.c
@@ -2056,6 +2056,49 @@ static int msm8x16_wcd_loopback_mode_put(struct snd_kcontrol *kcontrol,
return 0;
}
+static int msm8x16_wcd_loopback_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
+
+ dev_dbg(codec->dev, "%s: ucontrol->value.integer.value[0] = %ld\n",
+ __func__, ucontrol->value.integer.value[0]);
+
+ if(snd_soc_read(codec, MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL) == 0x05)
+ return 1;
+ else if(snd_soc_read(codec, MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL) == 0x0)
+ return 0;
+ else
+ return -EINVAL;
+}
+
+static int msm8x16_wcd_loopback_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
+
+ dev_dbg(codec->dev, "%s: ucontrol->value.integer.value[0] = %ld\n",
+ __func__, ucontrol->value.integer.value[0]);
+
+ switch (ucontrol->value.integer.value[0]) {
+ case 0:
+ snd_soc_update_bits(codec,
+ MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL,
+ 0x05, 0x0);
+ printk("%s(dapm) disable micbias1 and loopback,value of 0x3C8 is 0x%x",__func__,snd_soc_read(codec, MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL));
+ break;
+ case 1:
+ snd_soc_update_bits(codec,
+ MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL,
+ 0x05, 0x05);
+ printk("%s(dapm) enable micbias1 and loopback,value of 0x3C8 is 0x%x",__func__,snd_soc_read(codec, MSM8X16_WCD_A_CDC_CONN_TX_I2S_SD1_CTL));
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return 0;
+}
static int msm8x16_wcd_pa_gain_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
@@ -2603,7 +2646,10 @@ static const struct snd_kcontrol_new msm8x16_wcd_snd_controls[] = {
SOC_ENUM_EXT("LOOPBACK Mode", msm8x16_wcd_loopback_mode_ctl_enum[0],
msm8x16_wcd_loopback_mode_get, msm8x16_wcd_loopback_mode_put),
-
+
+ SOC_ENUM_EXT("LOOPBACK", msm8x16_wcd_loopback_mode_ctl_enum[0],
+ msm8x16_wcd_loopback_get, msm8x16_wcd_loopback_put),
+
SOC_SINGLE_TLV("ADC1 Volume", MSM8X16_WCD_A_ANALOG_TX_1_EN, 3,
8, 0, analog_gain),
SOC_SINGLE_TLV("ADC2 Volume", MSM8X16_WCD_A_ANALOG_TX_2_EN, 3,
diff --git a/sound/soc/codecs/msm8x16-wcd.h b/sound/soc/codecs/msm8x16-wcd.h
index 898b30c7824f9..af285f5ab2624 100644
--- a/sound/soc/codecs/msm8x16-wcd.h
+++ b/sound/soc/codecs/msm8x16-wcd.h
@@ -245,6 +245,7 @@ struct msm8916_asoc_mach_data {
void __iomem *vaddr_gpio_mux_mic_ctl;
void __iomem *vaddr_gpio_mux_quin_ctl;
void __iomem *vaddr_gpio_mux_pcm_ctl;
+ void __iomem *vaddr_gpio_mux_sec_pcm_ctl;
struct on_demand_supply wsa_switch_supply;
};
diff --git a/sound/soc/msm/Kconfig b/sound/soc/msm/Kconfig
index 6e9d3e135d818..e5a47a578547a 100644
--- a/sound/soc/msm/Kconfig
+++ b/sound/soc/msm/Kconfig
@@ -175,6 +175,7 @@ config SND_SOC_MSM8X16
select SND_SOC_MSM8X16_WCD
select SND_SOC_WSA881X_ANALOG
select SND_SOC_WSA881X
+ select SND_SOC_TAS5782M
select MFD_CORE
select QTI_PP
select DTS_SRS_TM
diff --git a/sound/soc/msm/msm8952.c b/sound/soc/msm/msm8952.c
index 24fc90036b513..9e2c7559b344d 100644
--- a/sound/soc/msm/msm8952.c
+++ b/sound/soc/msm/msm8952.c
@@ -75,6 +75,7 @@ static int mi2s_tx_sample_rate = SAMPLING_RATE_48KHZ;
static atomic_t quat_mi2s_clk_ref;
static atomic_t quin_mi2s_clk_ref;
static atomic_t auxpcm_mi2s_clk_ref;
+static atomic_t sec_auxpcm_mi2s_clk_ref;
static int msm8952_enable_dig_cdc_clk(struct snd_soc_codec *codec, int enable,
bool dapm);
@@ -166,7 +167,7 @@ static struct afe_clk_set wsa_ana_clk = {
static char const *bit_format_text[] = {"S16_LE", "S24_LE", "S24_3LE",
"S32_LE"};
-static const char *const mi2s_ch_text[] = {"One", "Two"};
+static const char *const mi2s_ch_text[] = {"One", "Two", "Three", "Four"};
static const char *const loopback_mclk_text[] = {"DISABLE", "ENABLE"};
static const char *const btsco_rate_text[] = {"BTSCO_RATE_8KHZ",
"BTSCO_RATE_16KHZ"};
@@ -378,7 +379,7 @@ static int msm_mi2s_rx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
pr_debug("%s: Num of channels = %d Sample rate = %d\n", __func__,
msm_pri_mi2s_rx_ch, mi2s_rx_sample_rate);
rate->min = rate->max = mi2s_rx_sample_rate;
- channels->min = channels->max = msm_pri_mi2s_rx_ch;
+ channels->min = channels->max = 1;//msm_pri_mi2s_rx_ch;
return 0;
}
@@ -748,7 +749,34 @@ static int msm_btsco_rate_put(struct snd_kcontrol *kcontrol,
pr_debug("%s: msm_btsco_rate = %d\n", __func__, msm_btsco_rate);
return 0;
}
+static int msm_auxpcm_rate_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ pr_debug("%s: msm8952_auxpcm_rate = %d", __func__,
+ msm8952_auxpcm_rate);
+ ucontrol->value.integer.value[0] = msm8952_auxpcm_rate;
+ return 0;
+}
+static int msm_auxpcm_rate_put(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ switch (ucontrol->value.integer.value[0]) {
+ case RATE_8KHZ_ID:
+ msm8952_auxpcm_rate = BTSCO_RATE_8KHZ;
+ break;
+ case RATE_16KHZ_ID:
+ msm8952_auxpcm_rate = BTSCO_RATE_16KHZ;
+ break;
+ default:
+ msm8952_auxpcm_rate = BTSCO_RATE_8KHZ;
+ break;
+ }
+
+ pr_debug("%s: msm8952_auxpcm_rate = %d\n", __func__,
+ msm8952_auxpcm_rate);
+ return 0;
+}
static int mi2s_rx_bit_format_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
@@ -1077,7 +1105,9 @@ static const struct snd_kcontrol_new msm_snd_controls[] = {
SOC_ENUM_EXT("Loopback MCLK", msm_snd_enum[2],
loopback_mclk_get, loopback_mclk_put),
SOC_ENUM_EXT("Internal BTSCO SampleRate", msm_snd_enum[3],
- msm_btsco_rate_get, msm_btsco_rate_put),
+ msm_btsco_rate_get, msm_btsco_rate_put),
+ SOC_ENUM_EXT("AUXPCM SampleRate", msm_snd_enum[3],
+ msm_auxpcm_rate_get, msm_auxpcm_rate_put),
SOC_ENUM_EXT("PROXY_RX Channels", msm_snd_enum[4],
msm_proxy_rx_ch_get, msm_proxy_rx_ch_put),
SOC_ENUM_EXT("VI_FEED_TX Channels", msm_snd_enum[5],
@@ -1381,6 +1411,50 @@ static void msm_prim_auxpcm_shutdown(struct snd_pcm_substream *substream)
__func__, "quat_i2s");
}
+static int msm_sec_auxpcm_startup(struct snd_pcm_substream *substream)
+{
+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ struct snd_soc_card *card = rtd->card;
+ struct msm8916_asoc_mach_data *pdata = snd_soc_card_get_drvdata(card);
+ int ret = 0, val = 0;
+
+ pr_debug("%s(): substream = %s\n",
+ __func__, substream->name);
+
+ if (pdata->vaddr_gpio_mux_quin_ctl) {
+ val = ioread32(pdata->vaddr_gpio_mux_quin_ctl);
+ val = val | 0x1;
+ iowrite32(val, pdata->vaddr_gpio_mux_quin_ctl);
+ }
+ if (pdata->vaddr_gpio_mux_sec_pcm_ctl) {
+ val = ioread32(pdata->vaddr_gpio_mux_sec_pcm_ctl);
+ val = val | 0x1;
+ iowrite32(val, pdata->vaddr_gpio_mux_sec_pcm_ctl);
+ }
+ atomic_inc(&sec_auxpcm_mi2s_clk_ref);
+
+ /* enable the gpio's used for the external AUXPCM interface */
+ ret = msm_gpioset_activate(CLIENT_WCD_INT, "quin_i2s");
+ if (ret < 0)
+ pr_err("%s(): configure gpios failed = %s\n",
+ __func__, "quin_i2s");
+ return ret;
+}
+
+static void msm_sec_auxpcm_shutdown(struct snd_pcm_substream *substream)
+{
+ int ret = 0;
+ pr_debug("%s(): substream = %s\n",
+ __func__, substream->name);
+ if (atomic_read(&sec_auxpcm_mi2s_clk_ref) > 0)
+ atomic_dec(&sec_auxpcm_mi2s_clk_ref);
+ ret = msm_gpioset_suspend(CLIENT_WCD_INT, "quin_i2s");
+ if (ret < 0)
+ pr_err("%s(): configure gpios failed = %s\n",
+ __func__, "quin_i2s");
+}
+
+
static int msm_sec_mi2s_snd_startup(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -1723,6 +1797,11 @@ static struct snd_soc_ops msm_pri_auxpcm_be_ops = {
.shutdown = msm_prim_auxpcm_shutdown,
};
+static struct snd_soc_ops msm_sec_auxpcm_be_ops = {
+ .startup = msm_sec_auxpcm_startup,
+ .shutdown = msm_sec_auxpcm_shutdown,
+};
+
/* Digital audio interface glue - connects codec <---> CPU */
static struct snd_soc_dai_link msm8952_dai[] = {
/* FrontEnd DAI Links */
@@ -2479,8 +2558,8 @@ static struct snd_soc_dai_link msm8952_dai[] = {
.stream_name = "Quaternary MI2S Playback",
.cpu_dai_name = "msm-dai-q6-mi2s.3",
.platform_name = "msm-pcm-routing",
- .codec_dai_name = "snd-soc-dummy-dai",
- .codec_name = "snd-soc-dummy",
+ .codec_dai_name = "tas5782m-i2s",
+ .codec_name = "tas5782m.1-0049",
.no_pcm = 1,
.dpcm_playback = 1,
.be_id = MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
@@ -2533,6 +2612,39 @@ static struct snd_soc_dai_link msm8952_dai[] = {
.ops = &msm_pri_auxpcm_be_ops,
.ignore_suspend = 1,
},
+ /* Secondary AUX PCM Backend DAI Links */
+ {
+ .name = LPASS_BE_SEC_AUXPCM_RX,
+ .stream_name = "Sec AUX PCM Playback",
+ .cpu_dai_name = "msm-dai-q6-auxpcm.2",
+ .platform_name = "msm-pcm-routing",
+ .codec_name = "msm-stub-codec.1",
+ .codec_dai_name = "msm-stub-rx",
+ .no_pcm = 1,
+ .dpcm_playback = 1,
+ .be_id = MSM_BACKEND_DAI_SEC_AUXPCM_RX,
+ .be_hw_params_fixup = msm_auxpcm_be_params_fixup,
+ .ops = &msm_sec_auxpcm_be_ops,
+ .ignore_pmdown_time = 1,
+ .ignore_suspend = 1,
+ /* this dainlink has playback support */
+ },
+
+ {
+ .name = LPASS_BE_SEC_AUXPCM_TX,
+ .stream_name = "Sec AUX PCM Capture",
+ .cpu_dai_name = "msm-dai-q6-auxpcm.2",
+ .platform_name = "msm-pcm-routing",
+ .codec_name = "msm-stub-codec.1",
+ .codec_dai_name = "msm-stub-tx",
+ .no_pcm = 1,
+ .dpcm_capture = 1,
+ .be_id = MSM_BACKEND_DAI_SEC_AUXPCM_TX,
+ .be_hw_params_fixup = msm_auxpcm_be_params_fixup,
+ .ops = &msm_sec_auxpcm_be_ops,
+ .ignore_suspend = 1,
+ },
+
{
.name = LPASS_BE_INT_BT_SCO_RX,
.stream_name = "Internal BT-SCO Playback",
@@ -3128,7 +3240,21 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev)
ret = -ENOMEM;
goto err;
}
-
+ muxsel = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+ "csr_gp_io_lpaif_sec_pcm_sec_mode_muxsel");
+ if (!muxsel) {
+ dev_err(&pdev->dev, "MUX addr invalid for SEC AUXPCM\n");
+ ret = -ENODEV;
+ goto err;
+ }
+ pdata->vaddr_gpio_mux_sec_pcm_ctl =
+ ioremap(muxsel->start, resource_size(muxsel));
+ if (pdata->vaddr_gpio_mux_sec_pcm_ctl == NULL) {
+ pr_err("%s ioremap failure for muxsel virt addr\n",
+ __func__);
+ ret = -ENOMEM;
+ goto err;
+ }
muxsel = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"csr_gp_io_mux_quin_ctl");
if (!muxsel) {
@@ -3334,6 +3460,7 @@ parse_mclk_freq:
atomic_set(&quat_mi2s_clk_ref, 0);
atomic_set(&quin_mi2s_clk_ref, 0);
atomic_set(&auxpcm_mi2s_clk_ref, 0);
+ atomic_set(&sec_auxpcm_mi2s_clk_ref, 0);
ret = snd_soc_of_parse_audio_routing(card,
"qcom,audio-routing");
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
index b1a1ea54a73e7..96a76c3c10a15 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-afe-v2.c
@@ -48,12 +48,15 @@ static struct snd_pcm_hardware msm_afe_hardware_playback = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED),
.formats = SNDRV_PCM_FMTBIT_S16_LE|
- SNDRV_PCM_FMTBIT_S24_LE,
+ SNDRV_PCM_FMTBIT_S24_LE|
+ SNDRV_PCM_FMTBIT_S24_3LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
.rates = (SNDRV_PCM_RATE_8000 |
SNDRV_PCM_RATE_16000 |
- SNDRV_PCM_RATE_48000),
+ SNDRV_PCM_RATE_48000| SNDRV_PCM_RATE_96000 |
+ SNDRV_PCM_RATE_192000),
.rate_min = 8000,
- .rate_max = 48000,
+ .rate_max = 192000,
.channels_min = 1,
.channels_max = 6,
.buffer_bytes_max = MAX_PLAYBACK_PERIOD_SIZE *
@@ -71,12 +74,15 @@ static struct snd_pcm_hardware msm_afe_hardware_capture = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_INTERLEAVED),
.formats = SNDRV_PCM_FMTBIT_S16_LE|
- SNDRV_PCM_FMTBIT_S24_LE,
+ SNDRV_PCM_FMTBIT_S24_LE|
+ SNDRV_PCM_FMTBIT_S24_3LE |
+ SNDRV_PCM_FMTBIT_S32_LE,
.rates = (SNDRV_PCM_RATE_8000 |
SNDRV_PCM_RATE_16000 |
- SNDRV_PCM_RATE_48000),
+ SNDRV_PCM_RATE_48000| SNDRV_PCM_RATE_96000 |
+ SNDRV_PCM_RATE_192000),
.rate_min = 8000,
- .rate_max = 48000,
+ .rate_max = 192000,
.channels_min = 1,
.channels_max = 6,
.buffer_bytes_max = MAX_CAPTURE_PERIOD_SIZE *
@@ -410,7 +416,7 @@ static int msm_afe_capture_prepare(struct snd_pcm_substream *substream)
/* Conventional and unconventional sample rate supported */
static unsigned int supported_sample_rates[] = {
- 8000, 16000, 48000
+ 8000, 16000, 48000, 96000, 192000
};
static struct snd_pcm_hw_constraint_list constraints_sample_rates = {
diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c
index 7b9d01f01c008..ed2f856cb4de5 100644
--- a/sound/soc/msm/qdsp6v2/q6adm.c
+++ b/sound/soc/msm/qdsp6v2/q6adm.c
@@ -2277,7 +2277,7 @@ int adm_arrange_mch_map(struct adm_cmd_device_open_v5 *open, int path,
} else if (channel_mode == 3) {
open->dev_channel_mapping[0] = PCM_CHANNEL_FL;
open->dev_channel_mapping[1] = PCM_CHANNEL_FR;
- open->dev_channel_mapping[2] = PCM_CHANNEL_FC;
+ open->dev_channel_mapping[2] = PCM_CHANNEL_LS;
} else if (channel_mode == 4) {
open->dev_channel_mapping[0] = PCM_CHANNEL_FL;
open->dev_channel_mapping[1] = PCM_CHANNEL_FR;
@@ -2342,7 +2342,7 @@ int adm_arrange_mch_ep2_map(struct adm_cmd_device_open_v6 *open_v6,
} else if (channel_mode == 3) {
open_v6->dev_channel_mapping_eid2[0] = PCM_CHANNEL_FL;
open_v6->dev_channel_mapping_eid2[1] = PCM_CHANNEL_FR;
- open_v6->dev_channel_mapping_eid2[2] = PCM_CHANNEL_FC;
+ open_v6->dev_channel_mapping_eid2[2] = PCM_CHANNEL_LS;
} else if (channel_mode == 4) {
open_v6->dev_channel_mapping_eid2[0] = PCM_CHANNEL_FL;
open_v6->dev_channel_mapping_eid2[1] = PCM_CHANNEL_FR;
diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c
index c986db20c2d15..8def72deecf44 100644
--- a/sound/soc/msm/qdsp6v2/q6asm.c
+++ b/sound/soc/msm/qdsp6v2/q6asm.c
@@ -4201,7 +4201,7 @@ static int q6asm_map_channels(u8 *channel_mapping, uint32_t channels,
} else if (channels == 3) {
lchannel_mapping[0] = PCM_CHANNEL_FL;
lchannel_mapping[1] = PCM_CHANNEL_FR;
- lchannel_mapping[2] = PCM_CHANNEL_FC;
+ lchannel_mapping[2] = PCM_CHANNEL_LS;
} else if (channels == 4) {
lchannel_mapping[0] = PCM_CHANNEL_FL;
lchannel_mapping[1] = PCM_CHANNEL_FR;
diff --git a/sound/soc/msm/qdsp6v2/q6core.c b/sound/soc/msm/qdsp6v2/q6core.c
index 2d9f68a2b47b5..028a321dcf595 100644
--- a/sound/soc/msm/qdsp6v2/q6core.c
+++ b/sound/soc/msm/qdsp6v2/q6core.c
@@ -470,6 +470,7 @@ int core_get_adsp_ver(void)
get_aver_cmd.hdr.token = 0;
get_aver_cmd.hdr.opcode = AVCS_GET_VERSIONS;
+ q6core_lcl.cmd_resp_received_flag &= ~(FLAG_AVCS_GET_VERSIONS_RESULT);
ret = apr_send_pkt(q6core_lcl.core_handle_q,
(uint32_t *) &get_aver_cmd);
if (ret < 0) {
@@ -479,7 +480,6 @@ int core_get_adsp_ver(void)
goto fail_cmd;
}
- q6core_lcl.cmd_resp_received_flag &= ~(FLAG_AVCS_GET_VERSIONS_RESULT);
mutex_unlock(&(q6core_lcl.cmd_lock));
ret = wait_event_timeout(q6core_lcl.cmd_req_wait,
(q6core_lcl.cmd_resp_received_flag ==
@@ -534,7 +534,7 @@ int32_t core_get_license_status(uint32_t module_id)
get_lvr_cmd.hdr.opcode = AVCS_CMD_GET_LICENSE_VALIDATION_RESULT;
get_lvr_cmd.id = module_id;
-
+ q6core_lcl.cmd_resp_received_flag &= ~(FLAG_CMDRSP_LICENSE_RESULT);
ret = apr_send_pkt(q6core_lcl.core_handle_q, (uint32_t *) &get_lvr_cmd);
if (ret < 0) {
pr_err("%s: license_validation request failed, err %d\n",
@@ -543,7 +543,6 @@ int32_t core_get_license_status(uint32_t module_id)
goto fail_cmd;
}
- q6core_lcl.cmd_resp_received_flag &= ~(FLAG_CMDRSP_LICENSE_RESULT);
mutex_unlock(&(q6core_lcl.cmd_lock));
ret = wait_event_timeout(q6core_lcl.cmd_req_wait,
(q6core_lcl.cmd_resp_received_flag ==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment