Age | Commit message (Collapse) | Author |
|
* de-assert dev_wake/pm suspend device from nitrous device node
PROC_BTWRITE operation
* set TX autosleep delay 100 ms and RX autosleep delay 1000 ms
* fix clockwork issues
Bug: 214732521
Bug: 205950058
Bug: 205943675
Test: Manually
Change-Id: I1656008534c3e83de81de7cc054072acb28672e3
|
|
Bug: 192617687
Test: builds
Change-Id: I292ffcd77e0da29ec778e8b0e13e7345248b0a19
|
|
There might be a corner case where host_isr wakes the system from
suspend and UART RTS goes low before nitrous_devcie_resume() gets
executed (since pm_runtime_get puts a work in queue to request the
device resume), but then goes low while a trnasfer is happening
because SICD_STATUS_BUSY was not set yet.
For that, handle SICD BUSY/IDLE through its own Rx index and move away
from pm_runtime routines, as this isn't needed anymore.
Test: Manual
Bug: 193466272
Signed-off-by: mullerf <mullerf@google.com>
Change-Id: I20ca5e865c4c100852166959abe055ddffc23075
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
dev_wake was not always de-asserted properly during short
resume/suspend cycles because of what was returned by
pm_runtime_active(dev). This led to dev_wake staying high, and
therefore preventing the BT chip from going to LPM.
The whole dev_wake flow now is controlled between device_resume and
device_suspend.
Modified the overall pm_runtime flow, so Tx are managed through
pm_runtime_get_sync() and pm_runtime_put_autosuspend().
Rx (through host_wake) are managed with pm_stay_awake() and
pm_wakeup_dev_event() only. Because adding pm_runtime_get() to there
leads to bad beahvior and pm_runtime getting out of sync.
Test: Made sure with logic analyser that dev_wake is de-asserted when
SoC goes to suspend after short cycles of resume/suspend. And also
that no BT crashes occurs after extended amoutn of time stress-testing
BT.
Bug: 187643267
Bug: 189057690
Signed-off-by: mullerf <mullerf@google.com>
Change-Id: Ib5b468d8fa5544dcb1f8ea9aac560bbbc22562f2
Signed-off-by: mullerf <mullerf@google.com>
Change-Id: Ib5b468d8fa5544dcb1f8ea9aac560bbbc22562f2
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
This uses pm_stay_awake/pm_relax/etc. to prevent the device from
suspending when a BT transfer is happening (HOST_WAKE is asserted).
It also allows the device to auto-suspend to pm runtime only when there
are no transfer ongoing as well, meaning when HOST_WAKE is low.
Test: Manual
Bug: 189177739
Bug: 189370529
Signed-off-by: mullerf <mullerf@google.com>
Change-Id: Ia0f99683a08833e33422966e7bcf31c967e43a03
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
* we alreay vote system busy to notify cpupm driver in
nitrous_prepare_uart_tx_locked() function when BT UART TX and
nitrous_host_wake_isr() function when BT UART RX, no need to vote
system busy in nitrous_resume() function be called.
Bug: 187020537
Test: 1.run rock_bottom_p21.sh 2.Turn on the screen and stay at the
home screen
Change-Id: I6172bb7e15fc2768167fe628ca1e64dde99df070
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
is transferring
When BT UART is transferring, to notify cpupm driver "system busy"
in order to block the host CPU enter runtime power mode (SCID).
Bug: 185910799
Bug: 185732896
Bug: 180436653
Test: BT On/Off stress test
Change-Id: Ieaadee56a2c0f2bf62a4dc97664ca595205c6e70
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
Check if timesync feature supported by detecting if timesync GPIO is
defined in device tree with name "timesync-gpio". If supported, create
an irq handler for timesync featture to handle interrupt of timesync
GPIO and add a queue to store system time when there is an interrupt
comes from timesync GPIO. Also, create a file node for user
space to get the timestamp in queue.
Bug: 175836015
Test: make
Change-Id: I9ff3a6aa1d525d0872958458c4dffbd44fdb23c7
|
|
Recording useful debug messages and cache into a logbuffer for the
purpose of dumming the log via device node dev/logbuffer_btlpm once
BtHal detects errors.
Bug: 177794127
Test: BT ON, pair with a BT headset and check collected log from
Bluetooth debuggle HAL
Change-Id: I3e4006b4b4e959719e6cbcaf874264f9ca45ef42
Signed-off-by: jonerlin <jonerlin@google.com>
|
|
partner/android-gs-pixel-5.10-stabilization
* partner/android-gs-pixel-mainline:
Nitrous: Control BTBCM power via rfkill
Nitrous: Apply preferred BT pinctrl state
Nitrous: BCM Bluetooth Power Management for Rx
Nitrous: Export BCM LPM control via proc nodes
Nitrous: Add delay while doing BTBCM power via rfkill
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 157051117
Bug: 168446075
Bug: 172975224
Bug: 172976543
Bug: 172977479
Change-Id: I1a93efc906a825c6ff7ac6ae67b854ad5300f9ec
|
|
Cherry-picked from hci_bcm driver to wait a full 10 ms after the
regulators are enabled to account for signal rising times.
Bug: 172976543
Bug: 172975224
Signed-off-by: Cheney Ni <cheneyni@google.com>
Change-Id: I6736b02ae622fb618cffb52e25ace50ec6c34940
|
|
There are three nodes to control BTBCM LPM.
* lpm - enable or disable BTBCM LPM pins
* btwrite - wake the controller after LPM enabled
* btwake - check LPM information
Bug: 172977479
Bug: 172975224
Signed-off-by: Cheney Ni <cheneyni@google.com>
Change-Id: Id0c7e71b176635adc27113cdab5d4f7f7f0eda4e
|
|
This change brings PM to manage the BTBCM controller power state, and is
able to wake up by Rx interrupt. Please note there is no Tx information,
but it still needs another approach to complete LPM functionality.
Bug: 172977479
Bug: 172975224
Signed-off-by: Cheney Ni <cheneyni@google.com>
Change-Id: I5a726f3e62890987ef6fb9d22fbdec470ae4c16f
|
|
Change BT_REG_ON and DEV_WAKE pin settings to match the IO table.
Bug: 157051117
Bug: 168446075
Signed-off-by: Cheney Ni <cheneyni@google.com>
Change-Id: I390e02c402250f7d52f7dc0188e2eecdf51154ef
|
|
Modify Nitrous driver to be a Kernel 5.10 module, and remove PM
funcitons. It only controls BTBCM power now.
Bug: 172975224
Signed-off-by: Cheney Ni <cheneyni@google.com>
Change-Id: I4598936f936a9960e4387eddd495622bdef0b8db
|
|
Copy from previous kernel. Note this commit will not compile
7804a4c Add Nitrous driver for BT power management.
Change-Id: I43aaad986a24cf7cd3b0bc2f7eea23c410babf2f
Signed-off-by: Cheney Ni <cheneyni@google.com>
|
|
|