when rtk(also some others) wifi/bt combo chips suspend, it
disconnect from bt-remote control unit(RCU). when RCU's
powerkey pressed, it will send ble broadcast to rtk bt chip.
As the rtk chips receive the broadcast, it should wake up
the host, but it can't send bt-hid powerkey to host because
it had lost communication with host.
So,it just send a IRQ pulse to host. The host should resume
from suspend.
Because the RCU just send a IRQ pulse, so rk chips just resume
by IRQ and then go to sleep again for no power-key event.
this is not expected. we expect to power up system wholly.
With this path, we try to power up the system. so we add a
power-up key event when BT IRQ received.
We also can control the "/proc/bluetooth/sleep/powerupkey"
node to enable or disable this function.
Change-Id: Ie59b4a2c4cd2f91820d31835df86565003126465
Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
If the hot reset was happening just before the hot_rst_work
was created, NULL pointer dereference was hit.
[ 2.366623] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000100
[ 2.367402] Mem abort info:
...8<...
[ 2.380736] Call trace:
[ 2.380960] __queue_work+0x30/0x5a0
[ 2.381282] queue_work_on+0x88/0xa4
[ 2.381607] rk_pcie_sys_irq_handler+0x1ec/0x280
[ 2.382019] __handle_irq_event_percpu+0x80/0x250
[ 2.382440] handle_irq_event+0x64/0x120
[ 2.382796] handle_fasteoi_irq+0xc8/0x204
[ 2.383162] __handle_domain_irq+0x78/0xe0
[ 2.383528] gic_handle_irq+0xf8/0x364
Fix it by masking all misc interrupts before registering rk_pcie_sys_irq_handler.
And later, they will be unmasked already.
Fixes: 679557456b ("PCIe: dw: rockchip: Delaying the link training after hot reset")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I1667e956526faa046a49323ee57b59fdb7a6451d
Part of the SOC supports FSPI CS1N and supports two external devices
for a single FSPI controller. The software provides targeted support.
Change-Id: I1bedf5864b664e94d280a2bc34e7d07212c774d3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
1. local deserializer and remote devices are associated through i2c-mux
2. remote camera is abstracted as v4l2 subdev
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I8b383651721cc35f7a2f6985ffbb3f0aa6a065a1
1. remote serializer support max9295/max96715/max96717
2. remote serializer provide APIs for remote camera calls
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: Ib9f5fbefdded0f40a9b06f3c490713c4f0a20dfd
1. local deserializer and remote devices are associated through i2c-mux
2. remote camera is abstracted as v4l2 subdev
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: Id827c4a9b13a2280ec6b4b2114fa389b3e31674c
irqs in different cpu will change irq_ends flag, lock to sync.
Change-Id: Ie5467825173a16c796c7ab84c15286af44edc5d9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
In some case, the pll rate will be change to get a target
rate for it's child. we want set the pll rate closest to
the max pll rate. However, It's not all the rate can get
a set of legal paramters to config the pll. So when this
case happen, we try a lower rate as the target pll rate.
Change-Id: I45abec2114f74634904cf3c34655d8df331d171b
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Raise initial voltage of vdd_cpu/vdd_logic when startup to improve stability.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I223a21351424cb3fb47e5b3cae4f8e0324bd9a25
Raise voltage of cpu/dmc when low temperature to improve stability.
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I80321c0454c98c62a237192b46fa00da1b48d336
Use tasklet_hi_schedule for better audio performance,
especially for LLA (Low Latency Audio) situation.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ic5a215a269e718b0e5613132cb9fe9b58940d0e1
Adjustments occur at two cases:
- No linkup within 5s;
- The number of packets received within 10 seconds is less than 3,
or the packet loss rate is greater than 15%.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I8b48bb4377ddb4231fa6f26b4373695fd85cbb26
Fixes: e6c7ea7d4d ("tee: optee: interrupt an RPC when supplicant has been killed")
Change-Id: I33f33af02afb75bda5d68c9731fe636bb97132fe
Signed-off-by: Hisping Lin <hisping.lin@rock-chips.com>
After integrating DDK g21(r46), the driver outputs the following WARNING after waking from sleep:
[ 293.271414][ T209] prev_wp_active_end_time 18446744073605310680 > start_time 1119644647 for aid 1000 active_cnt 0
[ 293.224787][ T375] WARNING: CPU: 3 PID: 375 at drivers/gpu/arm/bifrost/mali_kbase_gpu_metrics.c:84 emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.224825][ T375] Modules linked in: bcmdhd dhd_static_buf r8168
[ 293.224873][ T375] CPU: 3 PID: 375 Comm: kworker/u17:2 Not tainted 5.10.160 #1050
[ 293.224888][ T375] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[ 293.224911][ T375] Workqueue: csf_scheduler_gpu_idle_ gpu_idle_worker
[ 293.224936][ T375] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
[ 293.224955][ T375] pc : emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.224973][ T375] lr : emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
...
[ 293.225343][ T375] Call trace:
[ 293.225364][ T375] emit_tracepoint_for_active_gpu_metrics_ctx+0x138/0x1c4
[ 293.225382][ T375] kbase_gpu_metrics_emit_tracepoint+0x54/0xf4
[ 293.225403][ T375] cleanup_csg_slot+0x20c/0x4f8
[ 293.225423][ T375] wait_csg_slots_suspend+0x320/0x3bc
[ 293.225440][ T375] suspend_active_groups_on_powerdown+0xa8/0x1cc
[ 293.225458][ T375] scheduler_suspend_on_idle+0x24/0x828
[ 293.225474][ T375] gpu_idle_worker+0x384/0x5c4
[ 293.225495][ T375] process_one_work+0x1f0/0x478
[ 293.225511][ T375] worker_thread+0x270/0x4cc
[ 293.225531][ T375] kthread+0x138/0x340
[ 293.225552][ T375] ret_from_fork+0x10/0x18
The WARNING is due to the driver expecting 'gpu_ts' (gpu_timestamp) from the FW
to be monotonically increasing, but here "after waking up, 'gpu_ts' is smaller than before sleep."
'gpu_ts' comes from the GPU's input signal CNTVALUEB.
CNTVALUEB comes from the 'stimer' timer.
derrick.huang@rock-chips.com confirmed that this timer loses power during sleep,
and its count is reset when the system wakes up.
This causes "'gpu_ts' to be smaller after waking up than before sleep."
derrick.huang also mentioned that "for RK3588, it is not possible
to make 'stimer' not lose power in the product."
Here, we are temporarily disabling this WARNING.
It is speculated that sleep-wake cycles
might lead to certain profile features of the GPU not functioning correctly.
Further testing will be conducted to check for other potential issues.
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I9979bff7c7fb946437889561e90440de1037bb35
NOTE:
For RK3588, the mali_csffw.bin used with this driver MUST be from DDK g21p0-01eac0 correspondingly.
Change-Id: Ifab61806a6a350ba53c5dc0296d20628c28d633a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>