Skip to content

Commit

Permalink
Kernel: Xiaomi kernel changes for Redmi S2
Browse files Browse the repository at this point in the history
 The Patch based on QualComm release TAG:LA.UM.7.6.r1-03900-89xx.0
 The kernel config file used is ysl-perf_defconfig

Change-Id: Icf3201bd434bf1d6324fb39130efef24bea4fde2
Signed-off-by: hehao <hehao@xiaomi.com>
  • Loading branch information
mi-code committed Jun 6, 2019
1 parent ee02b67 commit 09f6450
Show file tree
Hide file tree
Showing 188 changed files with 64,370 additions and 7,134 deletions.
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,15 @@ ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
endif
else
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
stackp-flag := -fstack-protector-strong
ifeq ($(call cc-option, $(stackp-flag)),)
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
-fstack-protector-strong not supported by compiler)
endif
#xiaopei 9102-3-7 HTH-49751 CTS android.security.cts.KernelConfigTest#testConfigStackProtectorStrong
#cheat gcc compiler,if turn on CONFIG_CC_STACKPROTECTOR_STRONG cannt compile successfuly,so block this line to cheat,use -fno-stack-protector
# stackp-flag := -fstack-protector-strong
# ifeq ($(call cc-option, $(stackp-flag)),)
# $(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
# -fstack-protector-strong not supported by compiler)
# endif
stackp-flag := $(call cc-option, -fno-stack-protector)
#xiaopei 9102-3-7 HTH-49751 CTS£ºandroid.security.cts.KernelConfigTest#testConfigStackProtectorStrong
else
# Force off for distro compilers that enable stack protector by default.
stackp-flag := $(call cc-option, -fno-stack-protector)
Expand Down
30 changes: 30 additions & 0 deletions arch/arm/Kconfig
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ config GENERIC_BUG
def_bool y
depends on BUG

config THERMAL_SWITCH
default n
bool "Support themral config switch"
help
Support themral config switch.

source "init/Kconfig"

source "kernel/Kconfig.freezer"
Expand Down Expand Up @@ -1839,6 +1845,13 @@ config UACCESS_WITH_MEMCPY
However, if the CPU data cache is using a write-allocate mode,
this option is unlikely to provide any performance gain.

config BOOT_INFO
bool "Boot information from bootloader"
default y
help
On embedded linux device, we try to collect more information from
bootloader to kernel. eg. powerup reason.

config SECCOMP
bool
prompt "Enable seccomp to safely compute untrusted bytecode"
Expand All @@ -1853,6 +1866,18 @@ config SECCOMP
and the task is only allowed to execute a few safe syscalls
defined by each seccomp mode.

config SPEAKER_EXT_PA
default y
bool "Speaker external PA"
help
Support for external PA.

config SPEAKER_EXT_PA_AW8738
default y
bool "Speaker external PA AW8738"
help
Support for the AW8738.

config SWIOTLB
def_bool y

Expand All @@ -1863,6 +1888,11 @@ config XEN_DOM0
def_bool y
depends on XEN

config YSL
bool "Based on Platform msm8917"
def_bool ARCH_MSM8917
#end zhanghua 20170916

config XEN
bool "Xen guest support on ARM"
depends on ARM && AEABI && OF
Expand Down
26 changes: 2 additions & 24 deletions arch/arm/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,31 +240,9 @@ dtb-$(CONFIG_ARCH_MSM8940) += msm8940-pmi8937-cdp.dtb \

dtb-$(CONFIG_ARCH_MSM8953) += msm8953-sim.dtb \
msm8953-rumi.dtb \
msm8953-cdp.dtb \
msm8953-mtp.dtb \
ysl_msm8953.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
msm8953-qrd-sku3.dtb

dtb-$(CONFIG_ARCH_SDM450) += sdm450-rcm.dtb \
sdm450-cdp.dtb \
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/qcom/apq8053-lite-dragon-v2.0.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
* Copyright (C) 2019 XiaoMi, Inc.
*
* 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
Expand Down Expand Up @@ -40,7 +41,7 @@
};

&mdss_dsi0 {
qcom,dsi-pref-prim-pan = <&dsi_boyi_hx83100a_800p_video>;
//qcom,dsi-pref-prim-pan = <&dsi_boyi_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>;
Expand Down
48 changes: 48 additions & 0 deletions arch/arm/boot/dts/qcom/batterydata-coslight-3000mah.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
qcom,coslight-3000mah {
/* #3213692_Longcheer_BN31cos_3080mAh_averaged_MasterSlave_Dec13th2017*/
qcom,max-voltage-uv = <4400000>;
qcom,nom-batt-capacity-mah = <3080>;
qcom,batt-id-kohm = <100>;
qcom,battery-beta = <3435>;
qcom,battery-type = "coslight_3000mah";
qcom,chg-rslow-comp-c1 = <4018624>;
qcom,chg-rslow-comp-c2 = <7053755>;
qcom,chg-rs-to-rslow = <1096864>;
qcom,chg-rslow-comp-thr = <0xB7>;
qcom,checksum = <0x4288>;
qcom,gui-version = "PMI8950GUI - 2.0.0.16";
qcom,fg-profile-data = [
DE 83 60 7C
75 80 7E 75
3C 83 F2 72
5C 7F 40 80
FF 81 6F 9B
06 BF 87 D0
7B 10 03 88
92 7D 6C 81
88 77 35 83
82 79 2E 87
AE 83 24 82
A7 9B 33 C4
5F D2 70 0E
FE 0B 0B 5A
14 70 A5 FD
24 44 23 45
36 43 00 00
41 4C 41 41
FD 16 00 00
00 00 00 00
00 00 00 00
DD 70 46 6B
67 64 FA 88
43 7C 46 71
13 6D C7 78
23 75 4A 69
48 6F 41 A1
2A 46 60 BA
5D A0 71 0C
28 00 FF 36
F0 11 30 03
00 00 00 0C
];
};
48 changes: 48 additions & 0 deletions arch/arm/boot/dts/qcom/batterydata-share-3000mah.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
qcom,share-3000mah {
/* share shenwei 18.1.8*/
qcom,max-voltage-uv = <4400000>;
qcom,nom-batt-capacity-mah = <3080>;
qcom,batt-id-kohm = <666>;
qcom,battery-beta = <3435>;
qcom,battery-type = "unknown-battery";
qcom,chg-rslow-comp-c1 = <4018624>;
qcom,chg-rslow-comp-c2 = <7053755>;
qcom,chg-rs-to-rslow = <1096864>;
qcom,chg-rslow-comp-thr = <0xB7>;
qcom,checksum = <0x4288>;
qcom,gui-version = "PMI8950GUI - 2.0.0.16";
qcom,fg-profile-data = [
DE 83 60 7C
75 80 7E 75
3C 83 F2 72
5C 7F 40 80
FF 81 6F 9B
06 BF 87 D0
7B 10 03 88
92 7D 6C 81
88 77 35 83
82 79 2E 87
AE 83 24 82
A7 9B 33 C4
5F D2 70 0E
FE 0B 0B 5A
14 70 A5 FD
24 44 23 45
36 43 00 00
41 4C 41 41
FD 16 00 00
00 00 00 00
00 00 00 00
DD 70 46 6B
67 64 FA 88
43 7C 46 71
13 6D C7 78
23 75 4A 69
48 6F 41 A1
2A 46 60 BA
5D A0 71 0C
28 00 FF 36
F0 11 30 03
00 00 00 0C
];
};
47 changes: 47 additions & 0 deletions arch/arm/boot/dts/qcom/batterydata-sunwoda-3000mah.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
qcom,sunwoda-3000mah {
qcom,max-voltage-uv = <4400000>;
qcom,nom-batt-capacity-mah = <3080>;
qcom,batt-id-kohm = <330>;
qcom,battery-beta = <3380>;
qcom,battery-type = "sunwoda_3000mah";
qcom,chg-rslow-comp-c1 = <4217666>;
qcom,chg-rslow-comp-c2 = <7592018>;
qcom,chg-rs-to-rslow = <1365080>;
qcom,chg-rslow-comp-thr = <0xB8>;
qcom,checksum = <0x14E2>;
qcom,gui-version = "PMI8950GUI - 2.0.0.16";
qcom,fg-profile-data = [
13 88 CB 7E
2F 82 57 7C
3E 83 42 72
C8 7D B8 7A
DE 81 39 A0
22 C4 81 D1
8B 10 F5 83
07 7D 20 81
2E 77 32 83
FF 79 17 8C
76 88 24 82
9F 9B 2B C4
51 D2 6A 0E
F3 0B F7 59
14 70 A5 FD
0A 3A 8B 46
1D 3E 00 00
F0 47 54 40
FE 1A 00 00
00 00 00 00
00 00 00 00
23 73 73 70
E8 86 B5 73
D3 7D B2 73
AA 6F F5 72
15 76 53 6A
61 57 D2 9A
3F F8 61 15
64 A0 71 0C
28 00 FF 36
F0 11 30 03
00 00 00 0C
];
};
Loading

1 comment on commit 09f6450

@sumit251
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arch/arm/kconfig

the commit is :
config THERMAL_SWITCH
default n
bool "Support themral config switch"
help
Support themral config switch.

but it should be "thermal" not "themral" :

config THERMAL_SWITCH
default n
bool "Support thermal config switch"
help
Support thermal config switch.

Please sign in to comment.