blob: ac06da9decd06ec5d5487347662456d5f0532557 [file] [log] [blame]
Michael Bestas0134c1e2023-08-30 13:51:03 +03001
2# Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
merothh32be6882022-01-03 01:54:57 +05303#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7# * Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# * Redistributions in binary form must reproduce the above
10# copyright notice, this list of conditions and the following
11# disclaimer in the documentation and/or other materials provided
12# with the distribution.
13# * Neither the name of The Linux Foundation nor the names of its
14# contributors may be used to endorse or promote products derived
15# from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29#
30
Michael Bestas0134c1e2023-08-30 13:51:03 +030031import /vendor/etc/init/hw/init.qti.kernel.rc
32
merothh32be6882022-01-03 01:54:57 +053033on early-init
Michael Bestas0134c1e2023-08-30 13:51:03 +030034 exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh
35 exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules q6_pdr_dlkm q6_notifier_dlkm snd_event_dlkm apr_dlkm adsp_loader_dlkm q6_dlkm native_dlkm pinctrl_wcd_dlkm pinctrl_lpi_dlkm swr_dlkm platform_dlkm hdmi_dlkm stub_dlkm wcd_core_dlkm wsa883x_dlkm aw882xx_dlkm bolero_cdc_dlkm wsa_macro_dlkm va_macro_dlkm rx_macro_dlkm tx_macro_dlkm bt_fm_slim wcd938x_dlkm wcd938x_slave_dlkm wcd937x_dlkm wcd937x_slave_dlkm swr_dmic_dlkm swr_haptics_dlkm machine_dlkm radio-i2c-rtc6226-qca cdsprm
merothh32be6882022-01-03 01:54:57 +053036 write /proc/sys/kernel/sched_boost 1
Michael Bestas0134c1e2023-08-30 13:51:03 +030037 wait /sys/devices/soc0/soc_id
merothh32be6882022-01-03 01:54:57 +053038
39on init
Michael Bestas0134c1e2023-08-30 13:51:03 +030040 # Scheduler uclamp
41 mkdir /dev/cpuctl/foreground
42 mkdir /dev/cpuctl/background
43 mkdir /dev/cpuctl/top-app
44 mkdir /dev/cpuctl/rt
45 chown system system /dev/cpuctl
46 chown system system /dev/cpuctl/foreground
47 chown system system /dev/cpuctl/background
48 chown system system /dev/cpuctl/top-app
49 chown system system /dev/cpuctl/rt
50 chown system system /dev/cpuctl/tasks
51 chown system system /dev/cpuctl/foreground/tasks
52 chown system system /dev/cpuctl/background/tasks
53 chown system system /dev/cpuctl/top-app/tasks
54 chown system system /dev/cpuctl/rt/tasks
55 chmod 0664 /dev/cpuctl/tasks
56 chmod 0664 /dev/cpuctl/foreground/tasks
57 chmod 0664 /dev/cpuctl/background/tasks
58 chmod 0664 /dev/cpuctl/top-app/tasks
59 chmod 0664 /dev/cpuctl/rt/tasks
60 write /dev/cpuctl/foreground/cpu.rt_runtime_us 950000
61 write /dev/cpuctl/background/cpu.rt_runtime_us 950000
62 write /dev/cpuctl/top-app/cpu.rt_runtime_us 950000
63 write /dev/cpuctl/rt/cpu.rt_runtime_us 950000
64
merothh32be6882022-01-03 01:54:57 +053065 wait /dev/block/platform/soc/${ro.boot.bootdevice}
66 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
Michael Bestas0134c1e2023-08-30 13:51:03 +030067 chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
68 chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
69 start logd
merothh32be6882022-01-03 01:54:57 +053070
Michael Bestas0134c1e2023-08-30 13:51:03 +030071 chown system system /sys/class/leds/vibrator_1/trigger
72 chown system system /sys/class/leds/vibrator_1/activate
73 chown system system /sys/class/leds/vibrator_1/brightness
74 chown system system /sys/class/leds/vibrator_1/duration
75 chown system system /sys/class/leds/vibrator_1/state
76 chown system system /sys/class/leds/vibrator_1/loop
77 chown system system /sys/class/leds/vibrator_1/seq
78 chown system system /sys/class/leds/vibrator_1/index
79 chown system system /sys/class/leds/vibrator_1/enable
80 chown system system /sys/class/leds/vibrator_1/rtp
81 chown system system /sys/class/leds/vibrator_1/activate_mode
82
83 # add sensor sysfs node
84 chmod 0666 /sys/emkit/info/proximity
85 chown system system /sys/emkit/info/proximity
86
87 chmod 0666 /sys/emkit/info/acceleration
88 chown system system /sys/emkit/info/acceleration
89
90 chmod 0666 /sys/emkit/info/gyroscope
91 chown system system /sys/emkit/info/gyroscope
92
93 chmod 0666 /sys/emkit/info/magnetic
94 chown system system /sys/emkit/info/magnetic
95
96 chmod 0666 /sys/emkit/info/light
97 chown system system /sys/emkit/info/light
98
99 chmod 0666 /sys/emkit/info/pressure
100 chown system system /sys/emkit/info/pressure
101 # add sensor sysfs node
merothh32be6882022-01-03 01:54:57 +0530102on early-fs
103 start vold
104
105on fs
106 start hwservicemanager
Michael Bestas0134c1e2023-08-30 13:51:03 +0300107 mkdir /mnt/vendor/spunvm 0660 system system
merothh32be6882022-01-03 01:54:57 +0530108 mount_all --early
109 chown root system /mnt/vendor/persist
110 chmod 0771 /mnt/vendor/persist
111 restorecon_recursive /mnt/vendor/persist
112 mkdir /mnt/vendor/persist/data 0700 system system
Michael Bestas0134c1e2023-08-30 13:51:03 +0300113 mkdir /mnt/vendor/persist/factory 0771 root system
114 mkdir /mnt/vendor/persist/factory/audio 0771 root system
115 chown root system /mnt/vendor/persist/factory/audio/aw_cali.bin
116 chmod 0664 /mnt/vendor/persist/factory/audio/aw_cali.bin
117
118on fs && property:ro.boot.product.vendor.sku=lahaina
119 mkdir /mnt/vendor/spunvm 0660 system system
120 wait /dev/block/bootdevice/by-name/spunvm
121 mount vfat /dev/block/bootdevice/by-name/spunvm /mnt/vendor/spunvm rw noatime shortname=lower,uid=1000,gid=1000,dmask=007,fmask=007,context=u:object_r:vendor_spunvm_file:s0
merothh32be6882022-01-03 01:54:57 +0530122
123on post-fs
124 # set RLIMIT_MEMLOCK to 64MB
125 setrlimit 8 67108864 67108864
126
127on late-fs
merothh32be6882022-01-03 01:54:57 +0530128 mount_all --late
129
130on post-fs-data
131 mkdir /vendor/data/tombstones 0771 system system
Michael Bestas0134c1e2023-08-30 13:51:03 +0300132 # Enable WLAN cold boot calibration
133 write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1
134
135 mkdir /data/vendor/focaltech 0760 system system
136 restorecon /data/vendor/focaltech
merothh32be6882022-01-03 01:54:57 +0530137
138on early-boot
139 start vendor.sensors
140
141on boot
142 write /dev/cpuset/audio-app/cpus 1-2
Michael Bestas0134c1e2023-08-30 13:51:03 +0300143 chmod 0666 /dev/aw882xx_smartpa
144 chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable
145 chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable
146 chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
147 chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
148 chown system /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable
149 chmod 0660 /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable
150 chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event
151 chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event
152 chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_event
153 chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_event
154 chown system /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_event
155 chmod 0660 /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_event
156 chown system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_enable
157 chmod 0660 /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_enable
158 chown system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_event
159 chmod 0660 /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_event
160 chown system /sys/devices/system/cpu/hyp_core_ctl/enable
161 chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
162 #USB controller configuration
merothh32be6882022-01-03 01:54:57 +0530163 setprop vendor.usb.rndis.func.name "gsi"
164 setprop vendor.usb.rmnet.func.name "gsi"
165 setprop vendor.usb.rmnet.inst.name "rmnet"
166 setprop vendor.usb.dpl.inst.name "dpl"
167 setprop vendor.usb.qdss.inst.name "qdss_mdm"
168 setprop vendor.usb.controller a600000.dwc3
Michael Bestas0134c1e2023-08-30 13:51:03 +0300169 #Load WLAN driver
170 exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ qca_cld3_wlan qca_cld3_qca6750 qca_cld3_qca6390
171 exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/5.4-gki qca_cld3_wlan qca_cld3_qca6750 qca_cld3_qca6390
172 #Allow access to memory hotplug device attributes
173 chown system system /sys/kernel/mem-offline/anon_migrate
174
175 chown system system /dev/focaltech_fp
176 chmod 0660 /dev/focaltech_fp
Michael Bestas9ab144c2024-05-19 00:51:00 +0300177 # double tap
178 chown system system /sys/devices/platform/goodix_ts.0/gesture/double_en
179 chmod 0660 /sys/devices/platform/goodix_ts.0/gesture/double_en
Michael Bestas0134c1e2023-08-30 13:51:03 +0300180 # charging enable
181 chmod 0666 /sys/class/power_supply/battery/user_fcc
182 # charge mode fcc
183 chmod 0666 /sys/class/power_supply/battery/chgmode_fcc
merothh32be6882022-01-03 01:54:57 +0530184
185on property:vendor.display.lcd_density=560
186 setprop dalvik.vm.heapgrowthlimit 256m
187
188on property:vendor.display.lcd_density=640
189 setprop dalvik.vm.heapgrowthlimit 512m
190
191on boot && property:persist.vendor.usb.controller.default=*
192 setprop vendor.usb.controller ${persist.vendor.usb.controller.default}
193
Michael Bestas0134c1e2023-08-30 13:51:03 +0300194on init && property:ro.boot.mode=charger
195 mount_all /vendor/etc/charger_fw_fstab.qti --early
196 write /sys/kernel/boot_adsp/boot 1
197 wait /sys/class/power_supply/battery
merothh32be6882022-01-03 01:54:57 +0530198
199on charger
200 start vendor.power_off_alarm
Michael Bestas0134c1e2023-08-30 13:51:03 +0300201 setprop sys.usb.controller a600000.dwc3
merothh32be6882022-01-03 01:54:57 +0530202 setprop sys.usb.configfs 1
203
Michael Bestas0134c1e2023-08-30 13:51:03 +0300204on post-fs
205 mkdir /mnt/vendor/persist/camera 0777 system system
206 chown system system /dev/stmvl53l1_ranging
207 chmod 0666 /dev/stmvl53l1_ranging
208
209service vendor.lowi /vendor/bin/lowirpcd
210 class core
211 user system
212 group system wakelock
213 capabilities BLOCK_SUSPEND
214
merothh32be6882022-01-03 01:54:57 +0530215#pd-mapper
216service vendor.pd_mapper /vendor/bin/pd-mapper
217 class core
218 user system
219 group system
220
221#Peripheral manager
222service vendor.per_mgr /vendor/bin/pm-service
223 class core
224 user system
225 group system
226 ioprio rt 4
227
228service vendor.per_proxy /vendor/bin/pm-proxy
229 class core
230 user system
231 group system
232 disabled
233
Michael Bestas0134c1e2023-08-30 13:51:03 +0300234#service vendor.mdm_helper /vendor/bin/mdm_helper
235# class core
236# group system wakelock
237# disabled
merothh32be6882022-01-03 01:54:57 +0530238
239service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
240 class core
241 oneshot
242
243on property:init.svc.vendor.per_mgr=running
244 start vendor.per_proxy
245
246on property:sys.shutdown.requested=*
247 stop vendor.per_proxy
248
249on property:vold.decrypt=trigger_restart_framework
250 start vendor.cnss_diag
251
252service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
253 class main
254 user system
255 group system wifi inet sdcard_rw media_rw diag
256 oneshot
257
Michael Bestas0134c1e2023-08-30 13:51:03 +0300258#fan-controller
259service fan_control_turn_on /vendor/bin/fan_control 1
merothh32be6882022-01-03 01:54:57 +0530260 class late_start
261 user root
merothh32be6882022-01-03 01:54:57 +0530262 disabled
263 oneshot
264
Michael Bestas0134c1e2023-08-30 13:51:03 +0300265service fan_control_turn_off /vendor/bin/fan_control 0
266 class late_start
267 user root
268 disabled
269 oneshot
270
271#Begin xueling.chen for [Task][10694283] Add sensor info & otp check on 20210129
272#Begin jialiwei add for dual calibration 20230312
273on post-fs-data
274 chmod 0666 /sys/class/deviceinfo/device_info/CamNameB
275 chmod 0666 /sys/class/deviceinfo/device_info/CamNameB2
276 chmod 0666 /sys/class/deviceinfo/device_info/CamNameF
277 chmod 0666 /sys/class/deviceinfo/device_info/CamOTPB
278 chmod 0666 /sys/class/deviceinfo/device_info/CamOTPB2
279 chmod 0666 /sys/class/deviceinfo/device_info/CamOTPF
280 chmod 0666 /sys/devices/platform/soc/ac4a000.qcom,cci0/ac4a000.qcom,cci0:qcom,eeprom0/calibration_data
281 chmod 0666 /sys/devices/platform/soc/ac4a000.qcom,cci0/ac4a000.qcom,cci0:qcom,eeprom0/calibration_flag
282#end jialiwei add for dual calibration 20230312
283#End xueling.chen for [Task][10694283] Add sensor info & otp check on 20210129
284 chmod 0666 /sys/class/debug_ois/accgain
285 chmod 0666 /sys/class/debug_ois/afdrift
286 chmod 0666 /sys/class/debug_ois/oisops
287 chmod 0666 /sys/class/debug_ois/oisreg
288