Commit graph

356 commits

Author SHA1 Message Date
AleX Pelosi
41fcd9e444 gs101: use CPU4 in charger mode
For charging efficiency certification swap CPU6 with CPU4 while in
off-mode charging.

Bug: 194146139
Signed-off-by: AleX Pelosi <apelosi@google.com>
Change-Id: Ib2bee00b952df65d60534342e20f5d331b839e4c
Merged-In: Ib2bee00b952df65d60534342e20f5d331b839e4c
2021-08-19 23:49:43 +00:00
George Chang
957e03aca2 Remove NFC/SE settings from common gs101
Bug: 196825539
Test: build pass
Merged-In: I1833e3206403f1fce30377daaf942e617ed499b7
Change-Id: I1833e3206403f1fce30377daaf942e617ed499b7
2021-08-19 07:22:04 +00:00
George Lee
1fd62f31bf bcl: Put OCP_WARN level back to original level
Bug: 196833426
Test: Boot and confirm proper level set
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I3f46c74f35925ee0b31ec719b93d007e93a5a18f
2021-08-17 16:21:12 +00:00
Tri Vo
7290750087 Start storageproxyd early
And restart it after /data is mounted.

Bug: 187105270
Test: boot raven, secure storage test com.android.storage-unittest.td
Change-Id: I505e315b58c3e0830d9a1f11d2f8afd549186535
2021-08-11 16:02:34 +00:00
Tri Vo
f29084928b Set /dev/sg1 permissions in ueventd.rc
This way we don't need to guess when we need to chown.

Bug: 187105270
Test: boot raven
Change-Id: I36b17d440ef340e558b10ed3fef03435ec63690f
2021-08-11 16:02:34 +00:00
George Lee
ff8a3c60a2 bcl: lower ocp_warn for tpu and gpu
Bug: 181348043
Test: Local test and verify trip point
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I499bcfecf4a0eea7459f8cdd41d4e7c59129ffef
2021-08-11 01:32:04 +00:00
TeYuan Wang
cc9cd89806 thermal: provide permission for user space request TPU throttling
Bug: 188701596
Test: ls -al dev/thermal/cdev-by-name/tpu_cooling/user_vote
Change-Id: I8a53b118b2e8e51603554c5fbb8a085d47422918
2021-08-10 23:18:01 +00:00
Daeho Jeong
bb82be6a2a bfq: set slice_idle to 0
Bug: 191606824
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Change-Id: I6a2e52cdf5a43fb2e74b756eb0f1249761d76b0e
2021-08-09 23:10:42 +00:00
Stephane Lee
75619b9882 Create one-shot clear for Trickle-Defend
Test: Ensure there are no sepolicy/permissions errors
Bug: 194447428
Change-Id: Ie295e33967edc3294e1bf6d2192639d6b0377659
2021-08-03 00:20:07 +00:00
George Lee
433a2566e6 bcl: enable batoilo thermal zone
Enabling batoilo thermal zone.
Reduced soft_ocp_warn per bug 184739333.

Bug: 194240210
Test: Local test: flash and boot
Signed-off-by: George Lee <geolee@google.com>
Change-Id: I4cad70946af1cd8ffd2131df9f505dac49b8c8f8
2021-07-30 20:49:41 +00:00
Lisa Liu
d79a11550b gs101: Start bootanimation explicitly.
Start bootanimation explicitly by name. Let animation start before
surfaceflinger to avoid the condition ctl.start bootanim queued after mount_all command.

Bug: 193726798
Bug: 191910503
Test: boot test
Change-Id: Id0d276ac8bca39c6ac1dae2b2d542107a9522b91
2021-07-30 14:08:15 +08:00
Bart Van Assche
864a08d3a7 init.gs101.rc: Reduce the queue depth for /dev/sda
Use the default chosen by the block layer (64). The purpose of this patch is
to reduce storage latency. Without this patch:

 # grep -aH . /sys/block/sd*/queue/nr_requests
/sys/block/sda/queue/nr_requests:256
/sys/block/sdb/queue/nr_requests:64
/sys/block/sdc/queue/nr_requests:64
/sys/block/sdd/queue/nr_requests:64

With this patch applied:

 # grep -aH . /sys/block/sd*/queue/nr_requests
/sys/block/sda/queue/nr_requests:64
/sys/block/sdb/queue/nr_requests:64
/sys/block/sdc/queue/nr_requests:64
/sys/block/sdd/queue/nr_requests:64

Bug: 194450129
Test: Built Android images and installed these on an Android phone.
Change-Id: I236874f3791d62a2d5faf0d37a149025639f5c4a
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
2021-07-29 13:31:50 -07:00
Rick Yiu
e05964f062 gs101: Disable system group boost in off charger mode
Bug: 193192017
Test: build pass
Change-Id: Ieb5ff22808f22eb5796950d427986f352d748839
2021-07-28 01:24:48 +00:00
Andrew LeCain
20c4f4090c Set owner for mfg_data partiton.
Enable the FP HAL to read from the mfg_data partition chowning to system

Bug: 193549276
Test: sideload cal with valid signature. auth. enroll.
Change-Id: I0897e545dc368782587ae031716012a806d05485
2021-07-27 21:32:11 +00:00
Badhri Jagan Sridharan
a7c0b48fc4 gs101: recovery: Set maxpower to allow charging from SDP port
Leaving maxpower at default i.e. 2mA prevents the phone from
charging from SDP ports. Setting this to 900mA. Kernel would
then set the current limit to 500/900mA based on the configured
speed.

Bug: 194722479
Test: Boot to recovery; Through uart cat maxpower;
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I763c70eb5d19f74e6e846155af69c25ca3e91f85
2021-07-27 20:07:58 +00:00
Minchan Kim
c0f6127a16 gs101: increase swap size
Since we have 8G/12GB ram, increase swap size from 2G to 3G
since 3G swap shows best result.

note: we had used 2G swap for even 4G ram devices.

Bug: 187488125
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: Iea8ab1126c378cd02a89c2ef982262431c894487
2021-07-27 19:08:10 +00:00
Jack Wu
b089995845 add permission for pca charge_stats access
Bug: 194386750
Test: no Permission denied while accessing the file node
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ia399e59a2f7098147522161d5c7458545febfb77
2021-07-24 06:42:51 +00:00
YiHo Cheng
2bb5a796f9 thermal: Update usb_pwr_therm2 emul_temp control
Update usb_pwr_therm2 emul_temp control to allow
vendor.disable.usb.overheat.mitigation.control to disable/enable
usbc-port throttling to prevent device offline during thermal
mitigation test in lab.

Bug: 194252201
Test: setprop vendor.disable.usb.overheat.mitigation.control 0/1 to
check usb_pwr_therm2 temperature reading

Change-Id: Ia522706ce32bee68596b977a3e526f0b951a95ca
2021-07-23 17:45:41 +00:00
Jack Wu
9e5b9c54c0 move permission for WirelessCharger HAL to init
Bug: 194354746
Test: there is no wireless access error
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: I2dcc54047129132c38899d5e4310dc7c1ca7bc80
2021-07-23 12:09:26 +00:00
vincechiu
f3b644db0c Camera: create three new groups for camera threads
high-group is running on CPU 6-7.
mid-group is running on CPU 4-5.
mid-high-gropu is running on CPU 4-7.
Move camera tasks to CPU 4-7 for 1 seconds when AP launch.

Bug: 194271751
Test: GCA
Change-Id: I8e13e9ad0057b8f42f8ed3958bf0c6d58a5a02bc
2021-07-23 09:03:24 +00:00
Lisa Liu
9a20a9faee gs101: tune vendor_sched parameters for boot time
Set uclamp_min and prefer_idle to sys_group to improve 2nd init
stage boot time performance.
* original
boot_progress_start_avg: 4832.3
* with tuning
boot_progress_start_avg: 4028.75

Bug: 193192017
Test: boot test
Change-Id: I8ebd52fddceadbee22e9a8c75969d52047b2acfc
2021-07-23 06:38:38 +00:00
Rick Yiu
4b4ee6e226 gs101: Change uclamp max setting for bg group
Set to 60% or 615.

Bug: 188947181
Test: build pass
Change-Id: I93a423b1c0cb297df709971304f8101b27e46a1d
2021-07-23 01:06:10 +00:00
Petri Gynther
a0b391dd6a Pixel 2021: enable vbmeta_vendor
Bug: 181909612
Test: build + install + boot to home
Test: manual A/B OTA update
Change-Id: Ie27936cc10efd2f6dfbcd982e6855877e3308af2
2021-07-22 21:20:03 +00:00
TeYuan Wang
d0a506b5d9 thermal: Enable thermalHAL in off charging mode
To support USB port overheat protection, we need to launch thermalHAL in
off charging mode.

Bug: 183573049
Test: verified usb port overheat protection in off charging mode with
emul temp

Change-Id: I0b36646d9779c2c1a25f38aafea5ca178bf91be1
2021-07-21 17:09:36 +00:00
TeYuan Wang
cf33914f6c thermal: change permission for usbc related thermal sysfs
Bug: 183573049
Test: check permission for usbc related thermal sysfs
Change-Id: Id5af18d9f0fc5acfe29d9b5be3f3beabaa36f480
2021-07-20 23:53:52 +00:00
Stephane Lee
870465e109 Add cpm/pca9468 logbuffer directories so that bugreports can take a snapshot
Test: adb bugreport; check dumpstate_board.txt
Bug: 193894298
Change-Id: I548a1715fe2ee679fef304fc4da9465c691e70c0
2021-07-19 20:54:38 +00:00
Stephane Lee
88fb5844e5 odpm: Create powerstats vendor data folder on init
Test: Ensure that there are no sepolicy errors for odpm_config
Bug: 192674986
Change-Id: I0c576a823451159c1208b49563649db174533e86
2021-07-16 01:55:33 +00:00
Taeju Park
3dd2b9777f Tuning down_rate_limit and down_rate_limit_scale_pow to improve power consumption
Bug: 170511089
Change-Id: I665b38aa633296c6d8f36efd5b3a49c582d87dc4
Signed-off-by: Taeju Park <taeju@google.com>
2021-07-15 22:05:01 +00:00
Darren Hsu
c3af02a158 Disable USB contaminant detection when the disable flag is true
Bug: 192208389
Test: Manually tested
Change-Id: Iee32ec4175283417eaa8d86d65c2a80757ebc32a
Signed-off-by: Darren Hsu <darrenhsu@google.com>
2021-07-15 16:17:39 +00:00
Wei Wang
ec8345ffbe Fix the right uclamp.min for SF render engine
Bug: 192099706
Test: boot and trace
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ic8d1c65701ae0190988a758a31f0d0baaed54d71
2021-07-14 20:47:16 +00:00
Wei Wang
30393266aa Boost SF when interaction hint is active.
We have seen cases SF main thread running longer occasionally which may
run in danger of missing frames. This CL lifts cpufreq for SF when touch
boost is active to compensate the sudden jump of its cpu demand.

Bug: 192099706
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I49b2d589249f60a38eab907afbadfbcfdd233d1c
2021-07-14 06:18:59 +00:00
Stephane Lee
113bb9059a Add DC Charging/Temp defend clear to server configurable parameters; ensure sysfs node is writable
Test: Ensure there are no errors on logcat | grep google_battery@
Bug: 183772980
Bug: 192921867
Change-Id: Id55a6a1670cc0c46b787baec16efec8c0bb4521d
2021-07-12 13:27:54 -07:00
YiHo Cheng
e90e9f58bf thermal: Update neutral_therm trip point
Allow to thermalhal to update trip points for neutral_therm which is the
triggering sensor of virtual skin sensor for o6 proto.

Bug: 193373779
Test: neutral_therm can be updated to the correct threshold
Change-Id: I16dcd44ce9e69f456df322664756dc74357bf50b
2021-07-12 15:25:37 +00:00
Long Ling
7983b026c6 init: update sysfs early_wake attribute
Allow HWC to modfiy early_wakeup

Bug: 187763532
Change-Id: If3b6e664bf510895aae06ba3cac2620c267d6a60
2021-07-12 15:14:59 +00:00
Kyle Tso
d5fa4a5534 usb: Rename the config to "charger" in charger mode
init.usb.configfs.rc has the same trigger condition of midi function.
Rename the config name to "charger" to avoid triggerring twice of the
midi function.

Bug: 188744218
Test: USB enumerated in charger mode
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: Ica112fb4be66356901f6d5f21b79b9e648d49f35
2021-07-09 10:22:02 +00:00
Maciej Żenczykowski
a24469c9d0 tune usb irq (dwc3) based on usb function
This among other things greatly increases tethering performance.

Bug: 185092876
Test: TreeHugger, built and booted on an oriole, enabled tethering
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic9f0b4bef05250bb38c91dc1e046366098d98dc0
2021-07-07 16:23:12 +00:00
Albert Wang
ed651c86bf Move init.gs101.usb.rc under hw/
Bug: 192498561
Test: boot to home normally
Signed-off-by: Albert Wang <albertccwang@google.com>
Change-Id: I465a668035cf03c6ac9587a6d48d22e2f52133d0
2021-07-07 15:18:17 +00:00
Konstantin Vyshetsky
cf18666812 ufs: set clkgate_enable when in offmode charging
Bug: 190729148
Bug: 190727603
Test: manual R4
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I2f544cc01af18a0a6e85a2abd37d8621f24e286d
2021-07-04 03:56:30 +00:00
Midas Chien
69e6504dec init: allow hwcomposer to write early wake up node
Bug: 189173278
Bug: 191386940
Test: hwcomposer able to write node
Change-Id: Iede3d6121d5157732cfa1f18491bc7a3292ff2f3
2021-07-02 18:36:38 +00:00
Erick Reyes
1c54b52a93 gs101: add compatibility path for TPU
This is to expose a common path to runtime.

Test: Manual. Verified edgetpu_logging works with modified path
Bug: 191193044

Signed-off-by: Erick Reyes <erickreyes@google.com>
Change-Id: I11865108931443d96389640c89b6cc29aee3a634
2021-06-29 23:19:45 +00:00
Kyle Tso
22484eb00d usb: Enable midi function in charger mode
It needs a USB function in charger mode to set the charging current to
500mA/900mA.

Bug: 188744218
Test: charging at 900mA in charger mode
Signed-off-by: Kyle Tso <kyletso@google.com>
Change-Id: I95c98ecec30dd4394228f7290412c303771a3158
2021-06-28 03:46:22 +00:00
Lisa Liu
2261184ed9 Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Bug: 191646246
Test: Boot test
Change-Id: I7e5e12c4422aa516cd9d8c63b1e5be37b6aa80bf
2021-06-25 01:50:01 +00:00
Adam Shih
c7884a192e modularize pktrouter
Bug: 190331212
Test: make sure pktrouter gets initialized
06-23 13:21:19.372  1 1 I init : Parsing file /vendor/etc/init/pktrouter.rc...
06-23 13:21:23.510     1     1 I init    : processing action (vendor.pktrouter=1) from (/vendor/etc/init/pktrouter.rc:7)
06-23 13:21:23.510     1     1 I init    : starting service 'pktrouter'...
Change-Id: I89de2b2dd151bba877dea0bd5db0df1048b2ab6b
2021-06-24 07:24:45 +00:00
TeYuan Wang
4c97453535 thermal: move gs101 thermal permission commands to device folder
Bug: 182970733
Test: check the thermal sysfs permission on O6
Change-Id: I80c0571aca9cbff1881c884350a5ca39e6beef6b
2021-06-23 23:09:44 +00:00
Denny cy Lee
294e58b1b2 init.hardware.rc: add permission for battery eeprom
Bug: 189050725
Test: manually, file mod owner: 644 system
Change-Id: Iff5bb544f9fb76556ef783d04abd363240c6bd3b
Signed-off-by: Denny cy Lee <dennycylee@google.com>
2021-06-23 08:22:41 +00:00
Maciej Żenczykowski
e0ccd8fe6d support both rndis and ncm, but not rndis + ncm
Bug: 172793258
Test: N/A
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6ac656d5eec27fadf76391fc3318b9d29d253a89
2021-06-22 02:53:55 +00:00
vincenttew
4b566654f4 create audio folder to store calibration data
Test: build pass
Bug: 188503612
Signed-off-by: vincenttew <vincenttew@google.com>
Change-Id: I5b3bfbd854d62ea8eddea0017fd8654476ae8a20
2021-06-21 10:04:14 +00:00
Jack Wu
31d5416e15 add permission for wireless charge_stats access
Bug: 176195960
Test: no Permission denied while accessing the file node
Signed-off-by: Jack Wu <wjack@google.com>
Change-Id: Ia70c110de8bc1b6166c57e9c3df3d4f43f23a428
2021-06-19 00:33:13 +00:00
yihsiangpeng
eb215e398b Add permission for WirelessCharger HAL
Bug: 186797309
Signed-off-by: yihsiangpeng <yihsiangpeng@google.com>
Change-Id: I8cd9d8c7e7acb35149a73a8beba8bb4be5a7ce1e
2021-06-18 17:01:00 +00:00
Rick Yiu
3ce37fb4f1 gs101: Modify nnapi uclamp settings
Chaning setting for better benchmark performance.

Bug: 189074148
Test: build pass
Change-Id: I3c33147ec88494ff5b709063d6568add0e17933a
2021-06-18 06:20:30 +00:00