Commit Graph

844368 Commits

Author SHA1 Message Date
Finley Xiao
8241ada01d arm64: dts: rockchip: rk3328: Add rockchip,video-4k-freq for cpu
Change-Id: Iec44bbc893fbd41487f109d17f126cba63f5c295
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:59:33 +08:00
Finley Xiao
94069f735f arm64: dts: rockchip: rk3328: Add system monitor node
Change-Id: Idc372ea7abdeca1ba409b3c0add44985c114ca06
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:59:28 +08:00
Finley Xiao
7c00597a4a arm64: dts: rockchip: rk3399pro-npu: Add pvtm table for npu
Change-Id: If02d1c82fe9126ba9ff3e24f5fb2cfd35e9c7249
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:58:29 +08:00
Finley Xiao
1b435a5b77 arm64: dts: rockchip: rk3399pro-npu: Add pvtm node
Change-Id: Ic3044fa2491a38ae8fcb6059b3796186eb15dfe5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:58:19 +08:00
Finley Xiao
494285b57f clk: rockchip: px30: Add pll name for cpuclk
Change-Id: I4302071cfd29148fb33ba096f5f3bc2aeff1406e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 20:19:34 +08:00
Finley Xiao
36ce7bc83c clk: rockchip: Add support for cpu boost
Change-Id: Ie473d60c1076e6b137e2bc7407db73624cd6145f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 20:16:08 +08:00
Wang Panzhenzhuan
993c27dc11 media: i2c: fix gc2145 exposure issues
The gc2145 always rewrite init setting,
when change state from preview to capture.
That will get exposure time again when capture picture,
it causes capture exposure time different with preview.
To fix this issue, following changes introduced:
  - reconfig gc2145 reg_table.
  - add gc2145_aec_ctrl function calculate Capture shutter.

Change-Id: Ie1a4e4cb4a27c826e7485dd551096bfe4ca49ba3
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
2019-10-24 18:18:20 +08:00
Finley Xiao
8459dabb68 MALI: utgard: Add private data for governor
This adds support to get simple_ondemand governor data from devicetree.

Change-Id: Ic897ad6227152c4ce695d6cee8085b4d303339bf
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 17:50:18 +08:00
Finley Xiao
e2f291faa9 MALI: midgard: Fix power coefficient overflow
Change-Id: Ie0ceca32a33a5a8da56d3a32913e819a7e31e45b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 17:49:15 +08:00
Alex Zhao
a6815de5f5 arm64: dts: rockchip: rk3399: enable sdio0 for sapphire board
Change-Id: I573f51c80663591639645e7cb49083846ec77924
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-24 10:58:05 +08:00
Finley Xiao
88738d6110 MALI: bifrost: Fix voltage error when there isn't operating-points-v2-mali
Change-Id: Iad5e75ac6e9529ad79c845599cfe5426a5e03811
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 10:57:13 +08:00
Finley Xiao
e5291ee9cf MALI: bifrost: Make set regulater before initialize OPPs
WARNING: CPU: 3 PID: 35 at drivers/opp/core.c:1406 dev_pm_opp_set_regulators+0x160/0x1f8
Modules linked in:
CPU: 3 PID: 35 Comm: kworker/3:1 Not tainted 4.19.53 #252
Hardware name: Rockchip rk3326 863 rkisp1 board (DT)
Workqueue: events deferred_probe_work_func
pstate: 20400005 (nzCv daif +PAN -UAO)
pc : dev_pm_opp_set_regulators+0x160/0x1f8
lr : dev_pm_opp_set_regulators+0x28/0x1f8
sp : ffffff80097ebb10
x29: ffffff80097ebb10 x28: 0000000000000000
x27: 0000000000000001 x26: ffffffc03b48c0b8
x25: ffffffc03e2a4810 x24: 0000000000000002
x23: ffffff80093d10d8 x22: ffffffc03e2a4800
x21: ffffffc03b48c000 x20: ffffffc03b48b200
x19: ffffffc03b48c000 x18: ffffffffffffffff
x17: 0000000000000000 x16: ffffffc03e26a880
x15: ffffff800933da88 x14: ffffff80894ecdf7
x13: ffffff80094ece05 x12: ffffff80094ed240
x11: 0000000000000004 x10: 0101010101010101
x9 : fffffffffffffffd x8 : 7f7f7f7f7f7f7f7f
x7 : fefefeff646c606d x6 : 0d0d0206ebadf2e1
x5 : 0000000000000007 x4 : 0000000000000006
x3 : ffffff8009427ff8 x2 : 0000000000000000
x1 : ffffffc03b45d180 x0 : ffffffc03b48b250

Call trace:
 dev_pm_opp_set_regulators+0x160/0x1f8
 kbase_platform_device_probe+0x24c/0xd30
 platform_drv_probe+0x50/0xa8
 really_probe+0x1f8/0x288
 driver_probe_device+0x58/0x100
 __device_attach_driver+0x9c/0xf8
 bus_for_each_drv+0x70/0xc8
 __device_attach+0xdc/0x138
 device_initial_probe+0x10/0x18
 bus_probe_device+0x94/0xa0
 deferred_probe_work_func+0x6c/0xa0
 process_one_work+0x1ec/0x450
 worker_thread+0x234/0x428
 kthread+0xfc/0x128
 ret_from_fork+0x10/0x18
---[ end trace 30d550c0a063d9db ]---

Change-Id: I66b1642bc54729bf0bb6d1d015069b7b8e51e02c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-24 10:57:13 +08:00
Finley Xiao
d7e9e2622d regulator: core: Add support to limit min_uV during system startup
Now a regulator device can supply multiple consumers at the same time,
if a consumer starts and set a low voltage, another consumer doesn't
start in kernel but has been set a high frequency in bootloader will
abort.

This patch Adds support to limit min_uV during kernel startup to make
sure the voltage can suit the needs of all consumers.

Change-Id: Ibd16a8e44916798021e2470c90a8e3488df206f4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-23 18:34:16 +08:00
Sandy Huang
66c1d6486a drm/rockchip: vop: fix clock control unbalance
Change-Id: I42b5aa718d9016bc4d30f5d56cae6c91f3ae79b7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-10-23 18:25:56 +08:00
Finley Xiao
d79b5fb21a PM / devfreq: rockchip_bus: Fix deadlock in rockchip_bus_clkfreq_target()
INFO: task cfinteractive:47 blocked for more than 10 seconds.
      Not tainted 4.19.53 #111
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
cfinteractive   D    0    47      2 0x00000028
Call trace:
 __switch_to+0x8c/0xd0
 __schedule+0x2e0/0x908
 schedule+0x38/0xa0
 schedule_preempt_disabled+0x20/0x38
 __mutex_lock.isra.0+0x188/0x6d8
 __mutex_lock_slowpath+0x10/0x18
 mutex_lock+0x38/0x40
 _find_opp_table+0x30/0x88
 dev_pm_opp_find_freq_ceil+0x20/0x88
 devfreq_recommended_opp+0x34/0x60
 rockchip_bus_clkfreq_target.constprop.2+0x44/0xf0
 rockchip_bus_clk_notifier+0x48/0x88
 notifier_call_chain+0x50/0x90
 __srcu_notifier_call_chain+0x54/0x80
 srcu_notifier_call_chain+0x14/0x20
 __clk_notify+0x8c/0xc8
 clk_propagate_rate_change+0xac/0xc0
 clk_propagate_rate_change+0x9c/0xc0
 clk_core_set_rate_nolock+0x154/0x1b8
 clk_set_rate+0x34/0x90
 _generic_set_opp_regulator+0x70/0x1a0
 dev_pm_opp_set_rate+0x2f0/0x3e0
 set_target+0x40/0x70
 __cpufreq_driver_target+0x2c8/0x540
 cpufreq_interactive_speedchange_task+0x1f0/0x330
 kthread+0xfc/0x128
 ret_from_fork+0x10/0x18
INFO: task kworker/2:2:137 blocked for more than 10 seconds.
      Not tainted 4.19.53 #111
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/2:2     D    0   137      2 0x00000028
Workqueue: events deferred_probe_work_func
Call trace:
 __switch_to+0x8c/0xd0
 __schedule+0x2e0/0x908
 schedule+0x38/0xa0
 schedule_preempt_disabled+0x20/0x38
 __mutex_lock.isra.0+0x188/0x6d8
 __mutex_lock_slowpath+0x10/0x18
 mutex_lock+0x38/0x40
 clk_prepare_lock+0x40/0xa0
 clk_hw_create_clk.isra.24+0x64/0xb8
 __clk_create_clk+0x3c/0x58
 __of_clk_get_from_provider+0xec/0x130
 __of_clk_get_by_name+0xa8/0x148
 clk_get+0x30/0x80
 dev_pm_opp_get_opp_table+0xbc/0x130
 dev_pm_opp_set_prop_name+0x14/0x88
 rockchip_set_opp_prop_name+0x5c/0xd8
 rockchip_init_opp_table+0x98/0x108
 kbase_platform_rk_init_opp_table+0x24/0x30
 kbase_platform_device_probe+0x228/0xd30
 platform_drv_probe+0x50/0xa8
 really_probe+0x1f8/0x288
 driver_probe_device+0x58/0x100
 __device_attach_driver+0x9c/0xf8
 bus_for_each_drv+0x70/0xc8
 __device_attach+0xdc/0x138
 device_initial_probe+0x10/0x18
 bus_probe_device+0x94/0xa0
 deferred_probe_work_func+0x6c/0xa0
 process_one_work+0x1ec/0x450
 worker_thread+0x234/0x428
 kthread+0xfc/0x128
 ret_from_fork+0x10/0x18

Change-Id: Ibf37fe60513fcfb517a381a404592859a27ed0ea
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-23 16:18:00 +08:00
Andy Yan
8415000c8f power: wakeup_reason: show total wfi time in suspend get via smcc
Show a accumulation of wfi time of every suspend sate
since system bootup:

$ cat /sys/kernel/wakeup_reasons/total_suspend_wfi_time

Change-Id: I2856faabe2e883a7120931ed49bc0c4f0776600d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-23 16:01:29 +08:00
Shengfei Xu
540b08cd42 power: test_power: add testpower dts-config
Change-Id: Ib2c78602f604d610a648397cbf08c56cdbd77eab
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-23 15:37:37 +08:00
Ziyuan Xu
af506e6ac5 input: touchscreen: gt1x: use dev_pm_ops for linux platform
Generally, the dts file which is used for linux platform, the machine's
compatible contains 'linux' tag. If so, the gt1x driver could claim the
dev_pm_ops for suspend and resume process.

Change-Id: Ib64952148e64161abaff674a51861106b8041ada
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-10-23 09:08:54 +08:00
Caesar Wang
3181ceb5a7 input: touchscreen: gsl3673: fixes the correct way during s2r
The early used the fb for display, the new drm display can't callback
the suspend to resume function in gsl3673 driver.

The Android will callback the fb_bank to notice for the early suspend
and late resume. In order to keep using the pm sleep and fb callback way
with this patch.

Change-Id: I36c7d89edaf4052e614c5a354f7a0a12c9c4275a
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2019-10-23 09:08:38 +08:00
William Wu
4f9d3f2d3f tools: ffs-aio-example: add superspeed descriptors
This patch adds superspeed descriptors in device
applications to support USB 3.0 ffs gadget.

Change-Id: I5a364c935b1d30e2e929791ff16a34cf0d1c87e1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-10-23 09:08:18 +08:00
Sugar Zhang
f15ca45bf0 ASoC: core: Fix panic when two cards register using the same dai
This issue was caused by two cards using the same dai(cpu_dai/codec_dai).
the second one will fail to register as a card, then will release the
same dai resource, leading to the first card crash.

[   79.032274] Unable to handle kernel paging request at virtual address ffffffffffffffe0
[   79.035543] Hardware name: Rockchip RK3399 Excavator Board edp (Android) (DT)
[   79.036171] task: ffffffc0dd126c00 task.stack: ffffffc0d109c000
[   79.036717] PC is at dapm_widget_invalidate_output_paths+0x98/0xe0
[   79.037268] LR is at soc_dapm_dai_stream_event+0x60/0x9c

[   79.184613] Call trace:
[   79.192401] [<ffffff80088e9028>] dapm_widget_invalidate_output_paths+0x98/0xe0
[   79.193044] [<ffffff80088ea0d0>] soc_dapm_dai_stream_event+0x60/0x9c
[   79.193611] [<ffffff80088eeb9c>] snd_soc_dapm_stream_event+0x44/0x94
[   79.194175] [<ffffff80088e515c>] snd_soc_suspend+0x23c/0x2fc
[   79.194686] [<ffffff800852d1f0>] platform_pm_suspend+0x38/0x54
[   79.195208] [<ffffff8008536e88>] dpm_run_callback+0x110/0x1bc
[   79.195726] [<ffffff8008537578>] __device_suspend+0x164/0x2a4
[   79.196242] [<ffffff80085392b0>] dpm_suspend+0x70/0x338
[   79.196713] [<ffffff8008539ab0>] dpm_suspend_start+0x64/0x68
[   79.197226] [<ffffff80080f0b9c>] suspend_devices_and_enter+0x74/0x2d8
[   79.197800] [<ffffff80080f140c>] pm_suspend+0x60c/0x668
[   79.198272] [<ffffff80080ef7b4>] state_store+0x50/0x84
[   79.198734] [<ffffff800839d128>] kobj_attr_store+0x14/0x24
[   79.199234] [<ffffff8008232fd8>] sysfs_kf_write+0x38/0x50
[   79.199718] [<ffffff8008232208>] kernfs_fop_write+0x124/0x180
[   79.200237] [<ffffff80081bf76c>] __vfs_write+0x38/0xfc
[   79.200695] [<ffffff80081bffd4>] vfs_write+0x9c/0x170
[   79.201153] [<ffffff80081c0a18>] SyS_write+0x5c/0xbc
[   79.201604] [<ffffff80080832f0>] el0_svc_naked+0x24/0x28
[   79.202079] Code: 54000081 f9408000 d1040000 17ffffef (39406025)
[   79.202693] ---[ end trace dec5980253348a7f ]---

Change-Id: I6bbbeefaa68a7d5dfccc1bba57d61216b4be1035
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2019-10-23 09:07:35 +08:00
Liang Chen
8440d5b8dd cpufreq: rockchip: add rk3126 and rk3128 projects into blacklist
Change-Id: I8cb8bdce9bb3e19b92a45981abb2d39b0eb7bb66
Signed-off-by: Liang Chen <cl@rock-chips.com>
2019-10-23 08:42:08 +08:00
Tao Huang
ae9ff84432 arm64: rockchip_defconfig: enable INITRD_ASYNC
Save about 60ms of boot time on RK3399 EVB

Change-Id: Id28d4610c00944539956b81f7665fa5b0fc6dd95
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-22 19:18:34 +08:00
Liao Huaping
7dac8756a2 init: support init ramfs async
If enable ramfs function, init ramfs async,
can reduce kernel init time.

Change-Id: I95d8ca6d8b9c4e9c738c635c5ee56391cbbe7c16
Signed-off-by: Liao Huaping <huaping.liao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-22 19:18:34 +08:00
Chris Zhong
c44194873a HACK: get ramdisk correct size with rk bootloader
RK bootloader does not put a correct size to cmdline, hack the initramfs,
directly return when we get a good initrd.

Change-Id: Ia1199a1c47f1c0789268971c9f2c9b55bf81ca05
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2019-10-22 18:14:19 +08:00
Andy Yan
6061f79283 arm64: dts: rockchip: Add boot mode panic for rk3399
Add BOOT_PANIC flag for system reboot from panic.
We can get the boot mode from sys/kernel/boot_mode.

Change-Id: I75ce678eff7b9dc8db80e2d88ea79d888a0a2e2c
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:34:34 +08:00
Andy Yan
081d4e9222 power: reset: reboot-mode: treat unrecognized reboot mode as normal mode
Some bootloader will check the reboot mode to take different action, so
we treat unrecognized reboot mode as normal mode to prevent the system
run into abnormal case.

Change-Id: I88063a5b41e4e645443229fa490b2b55db5ccf27
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:26:46 +08:00
Andy Yan
da7c615bc4 power: reset: reboot-mode: support parse boot mode
Parse boot mode on system bootup, and export it to
userspace by sysfs: sys/kernel/boot_mode

Change-Id: I0158fc28f4dae51c798806006e49cead4ce2e923
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:24:30 +08:00
Andy Yan
b997d1db8c dt-bindings: add BOOT_PANIC and BOOT_WATCHDOG
Change-Id: I66e3d7caa7b8591bd5af8d481ba773f5e38e9471
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2019-10-22 17:24:30 +08:00
Shunhua Lan
3c0fe8ef95 arm64: dts: rockchip: enable rt5651 sound for rk3399 excavator evb
Change-Id: I2cf4fcb10b8342aa8404ceec2b047b533986db7e
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-22 15:27:24 +08:00
Finley Xiao
517ab65e13 cpufreq: Adjust target frequency according to cpu threshold
Change-Id: Idd86ef55aad09860a6dc726c7285ee39b0845a38
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 15:25:11 +08:00
Finley Xiao
dd0fcebd81 thermal: devfreq_cooling: Add support to update stats when get requested power
The power_allocator thermal governor should get utilization of cooling
device to calculate dynamic power, but the powersave, userspace and performance
devfreq governor don't updade stats, so the utilization is inaccurate.

This patch adds support to update status when get requested power, so that
power_allocator can also work properly when use powersave, userspace and
performance devfreq governor.

Change-Id: Ic98fabf46f693a60b0f07094c59e75e4d141e42c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 14:58:00 +08:00
Finley Xiao
481b832d88 cpufreq: governor: userspace: Fix frequency error when suspend and resume
As policy->cur may be changed by thermal and cpufreq_suspend, the setspeed
may be changed after resume.

Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 14:48:09 +08:00
YouMin Chen
c2f9d93c30 clk: rockchip: clk-ddr: fill wait_flag to share_memory
Change-Id: I05b7ca6e7dd7e82758283db2899bf67966d00d29
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2019-10-22 11:30:38 +08:00
Simon Xue
2fb48992f3 ARM: dts: rockchip: rk312x: add rockchip,disable-device-link-resume for vop
vop iommu handled by vop driver, so ignore the iommu operation when vop
call pm_runtime_get_sync/pm_runtime_put_sync

Change-Id: I126661e56f16b1740793dcc49340518094eee514
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 11:03:28 +08:00
Finley Xiao
2505fbdd87 arm64: rk3399pro_npu_defconfig: Enable CONFIG_ROCKCHIP_PVTM
Change-Id: I7be830c32c023a0cc838ce2d30748cfeebb2f899
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-22 10:29:24 +08:00
Simon Xue
76541d4495 iommu/rockchip: ignore device_link for vop
iommu may enabled by pm_runtime_get_sync from vop, this
path is not accept by vop, so ignore device_link for vop

Change-Id: I532a2a964b423e78fadec02c3b4c2952301ebf4b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 10:28:54 +08:00
Hans Yang
833fd5464b input/touchscreen/rockchip_gslX680: add revert_x setting
Change-Id: I2ce5da8730f70b5b62149c6e8c27ca58e20770e0
Signed-off-by: Hans Yang <yhx@rock-chips.com>
2019-10-22 10:20:13 +08:00
Frank Wang
7a02d27145 mailbox: rk3368: add mailbox and scpi function
Add mailbox and scpi protocol function support for rk3368 SoC.

Change-Id: I201c916865eb2729ed135c3f5a77a9dd97007952
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2019-10-22 09:46:38 +08:00
Simon Xue
ede2e03c38 PCI: rockchip: don't access ep if RC driver in .remove progress
In .remove progress, EP and RC driver may access EP via PCIe, don't
do really hardware access, just ignore.

Change-Id: Ide5831c2cdcabea6c289b1eb96d6f80294f94ac8
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-22 09:38:15 +08:00
Alexander Kochetkov
f086ebcfec clocksource/arm_global_timer: reconfigure clockevents after cpufreq change
After a cpufreq transition, update the clockevent's frequency
by fetching the new clock rate from the clock framework and
reprogram the next clock event.

The clock supplying the arm-global-timer on the rk3188 is coming
from the the cpu clock itself and thus changes its rate everytime
cpufreq adjusts the cpu frequency.

Found by code review, real impact not known. Assume what actual
HZ value will be different from expected on platforms using
arm-global-timer as clockevent.

The patch is port of commit 4fd7f9b128 ("ARM: 7212/1: smp_twd:
reconfigure clockevents after cpufreq change") and
commit 2b25d9f64b ("ARM: 7535/1: Reprogram smp_twd based on
new common clk framework notifiers").

Change-Id: I82552f621e30254b9c48f22fb3ebd2866d4476c8
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-10-21 20:30:19 +08:00
Yu YongZhen
5a84f7feef clk/rockchip: rk618: enlarge buffer size for clk name
strlcpy(clkin_name, __clk_get_name(clk), sizeof(clkin_name));
the clkin_name will wrong when clk is clk_i2s0_8ch_tx_out

Change-Id: If5603b5c31d4705289d075b2b375a35f3d4e4178
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2019-10-21 20:24:49 +08:00
Jacob Chen
dfbe9288e9 FROMLIST: ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
The "host1" port (AKA the dwc2 port that isn't the OTG port) on rk3288
has a hardware errata that causes everything to get confused when we get
a remote wakeup.  We'll use the reset that's in the CRU to reset the
port when it's in a bad state.

Note that we add the reset to both dwc2 controllers even though only one
has the errata in case we find some other use for this reset that's
unrelated to the current hardware errata.  Only the host port gets the
quirk property, though.

Change-Id: I472d33fb1db8b1a6b0c4fcea9ab31fd85b61af40
Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9324169/)
2019-10-21 20:13:00 +08:00
Shunqian Zheng
c5246fb319 devfreq_cooling: inline the of_devfreq_cooling_register_power()
Make of_devfreq_cooling_register_power() as static inline.
This fixes the building error when CONFIG_THERMAL is disabled.

Change-Id: I3d88a3679de279a7ee7eadae7243b9661fdddf75
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-10-21 20:08:48 +08:00
Finley Xiao
a75ae2b5d7 thermal: power_allocator: Add support to get PID constant from dt
Change-Id: Ibabdad4ba2df6df26d75483dd35b6c51572befe8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:09:48 +08:00
Finley Xiao
e8ca6ed7ae PM / devfreq: event: Add new Rockchip NoC probe driver
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. For example, RK3399
has multiple NoC probes to monitor traffic statistics for analyzing
the transaction flow.

Change-Id: I66f6708f0d244488ca08f0f1f1cb36b19c7a2d0a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:08:59 +08:00
XiaoDong Huang
8c9d010061 PM / devfreq: rockchip_bus: add support for rk1808
Change-Id: I2be704a4b72fc0c2b6c8c864e2fb605038271ce5
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2019-10-21 19:08:35 +08:00
Finley Xiao
d6d99ba36f clk: rockchip: rk3128: Change SCLK_DDRC to composite
Change-Id: I6aeae7103c1eaed0b4515d8d11863c4b190b6918
Signed-off-by: Liang Chen <cl@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 19:03:21 +08:00
Jianqun Xu
907ef342e1 PM / devfreq: add to show current load of device
Calculate current load with busytime / totaltime from status,
also show the current frequency.

Change-Id: Ic310035db9c5478aa3d0b1e526b47c451fe09d23
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-21 18:58:31 +08:00
Finley Xiao
aea5343525 soc: rockchip: power-domain: Add dmcfreq lock when pd on/off
In order to fix deadlock between dmcfreq and vop on/off,
When change vop status and ddr frequency at the same time,
the following deadlock will happen:

vop no/off                            dmcfreq
vop_crtc_disable                      update_devfreq
->mutex_lock(&vop->vop_lock);         ->mutex_lock(&pd->pmu->mutex);
->pm_runtime_put(vop->dev);           ->mutex_lock(&vop->vop_lock);
  ->mutex_lock(&pd->pmu->mutex);      ...

Change-Id: I56a4ee944200826d2a09e3ae8d2f4837f6f769d6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-21 18:32:18 +08:00