Commit Graph

844401 Commits

Author SHA1 Message Date
David Wu
64d40c4000 pinctrl: rockchip: Add iomux recalculated for rk3328 GPIO2B0~GPIO2B6
The pins from GPIO2B0 to GPIO2B6 are located at GRF_GPIO2BL_IOMUX,
they are recalculated to get correct iomux.

Change-Id: I1e46697c4508c396b5e8140c32c4185925a040ea
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
Jianqun Xu
37f7f42dec pinctrl: rockchip: add calculate slew rate for rk1808
Change-Id: Ia78e6ceda688942b655623d80fe4fe9fc1b349cc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
6bfc507057 pinctrl: rockchip: Add slew rate support for px30
The usage of slew rate is needed to config it at DTS,
such as:
  fast speed: slew-rate = <1>;
  slew speed: slew-rate = <0>;

Change-Id: Iefa9c15a35c6c1e94f716f5d6dd7e30d20a7293f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
74b11898ca pinctrl: rockchip: Disable GPIO_INTEN bit while gpio irq type setting
If the gpio IRQ type changes, it is possible to accidentally trigger
an interrupt, such as when the input is high, changed from level to
rise edge. For now, the best way to do this is to disable the INTEN
bit first, then configure the type to stagger this period of time.

Change-Id: I71351b9ed6f7920958c7451c2e51ab5f699875d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:36 +08:00
David Wu
c063b854bd pinctrl: rockchip: Add IOMUX_WRITABLE_32BIT flag for rk3288 gpio0 iomux
There are writable 32 bits for PMU_GPIO0's iomux, so add the
IOMUX_WRITABLE_32BIT to read iomux register at first, it would
not change others' bits.

Change-Id: I1fb27c60d5d26e5719b6911a78e7cdf144feba26
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:35 +08:00
David Wu
73c45e6cda PM / AVS: rockchip-io: add io selectors and supplies for rk3308
This adds the necessary data for handling io voltage domains on the rk3308.
As interesting tidbit, the rk3308 contains one iodomain area at grf,

Change-Id: Ife72a284a8926d02ef5df7a422d41924494d0300
Signed-off-by: David Wu <david.wu@rock-chips.com>
2019-10-28 18:24:14 +08:00
Lin Jinhan
fe499d0afe arm64: dts: rockchip: rk3368: add rng node
Change-Id: Ibbfbff20192e3bf60a07651a44220379ad7f8043
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2019-10-28 17:24:59 +08:00
Shunhua Lan
67f6b1a1e7 arm64: configs: rockchip_defconfig: enable rt5651
Change-Id: Iee3a5da70533611cecb0b094cd552398fe13697d
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:56:39 +08:00
Tao Huang
cd85a6c1a5 arm64: dts: rockchip: enable rng for rk3328-android
Change-Id: Idca36d07af538102e28ded94dbd481f69e7f2433
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2019-10-28 16:56:23 +08:00
Huang zhibao
d5073cca28 ASoC: rt5651: add prompt text
Change-Id: Id538b6e4abb33fb6c01a5d7e89d1a0f269f29867
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:44:50 +08:00
Wu Liangqing
3bbb5b5aa2 arm64: dts: rockchip: rk3399-evb-ind v11 board
Change-Id: Id9c90403d8639c98f372ba4b89295d63602f8800
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2019-10-28 16:38:13 +08:00
Shunhua Lan
4a4ef4d008 rk_headset: Porting to kernel 4.19
use extcon instead of switch
fix some codes style

Change-Id: I3f1906ddca16b2fedf403c7c88e00ff1dc4edd42
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2019-10-28 16:09:36 +08:00
Alex Zhao
dd7fdbcb04 net: rockchip_wlan: rtl8723cs: enable wowlan
Change-Id: Iadce78000563e91eac21a10cdd82f7dc7da9463c
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2019-10-28 14:14:49 +08:00
Wyon Bi
508931efa6 ARM: rockchip_defconfig: remove CONFIG_ROCKCHIP_CDN_DP
Change-Id: I88591f080d74fc1b3c3d39e9a1694193e241c985
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-28 11:43:25 +08:00
Shengfei Xu
67ad424234 arm: configs: rockchip_defconfig: enable CONFIG_INPUT_RK805_PWRKEY
Change-Id: I3be596cf091e8034bf144629d391f4ad775f4267
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-10-28 10:52:32 +08:00
Wyon Bi
7dcaa64ce1 drm/bridge: analogix_dp: set IRQ_NOAUTOEN to the irq flag
The interrupt is requested before the device is powered on and
it's value in some cases cannot be reliable. It happens on some
devices that an interrupt is generated as soon as requested
before having the chance to disable the irq.

Change-Id: I889c069239d005ab0a3fb4eb36123608ec81d9ab
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-10-28 10:16:16 +08:00
Shixiang Zheng
99294c04e4 video/rockchip: rga2: fix compile err in kernel 3.10
Change-Id: Iccedaf44eadd006bd0ce6270fd6d6a4493c0bcc5
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
7f00098197 video/rockchip: rga2: fix rga_dma_flush_page crash issue
Unable to handle kernel paging request at virtual address
ffffffc000000000
PC is at __dma_flush_range+0x18/0x30
LR is at rga_dma_flush_page+0x40/0x48

Change-Id: I6c15bc60edac042884ad14611485f0380e3bd355
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
0745fcace7 video/rockchip: rga2: open rop_mode for user select
Change-Id: I990973d04f693393046985a46e8cd451b1d024e5
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
a5d2c44af3 video/rockchip: rga2: coding style rm ^M
Change-Id: I3ecaa907c606c6316505fe7ba524c2feba5f2621
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
49c78f7c48 video/rockchip: rga2: fix alpha blend 405 mode not working issue
Change-Id: Ic4857ee0f721bcab9011ee7dab06dbcf09b4be0b
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Shixiang Zheng
f15b108e67 video/rockchip: rga2: alter some print level for debug
Change-Id: I776a07416ddc36d473cd9ed39aa6fbf900facce7
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
04bb8c98db video/rockchip: rga2: fix a page count calc err
the driver has a bug in calc of page num when virtual
    address may not 4k align

Change-Id: Ifc3759d7a0e8954057e238c714de2059b691f17c
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:15 +08:00
Li Huang
e1f6f92d1c video/rockchip: rga2: add YUV packet format support
Change-Id: I3b002b1bc0f06a1480936a66a90e8545402bdb84
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:09 +08:00
Shixiang Zheng
540302b817 video/rockchip: rga2: fix the issue of yuv422p format conversion
Change-Id: I5213a7be831e7a5166231f4e7179ce4a564a14fb
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:55:00 +08:00
Shixiang Zheng
22de8befe8 video/rockchip: rga2: extend timeount err message
Change-Id: Ibf8698fa835ca28850d07b1cd66a4d1e6e0df3be
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
Signed-off-by: Li Huang <putin.li@rock-chips.com>
2019-10-25 17:52:29 +08:00
Nick Desaulniers
eba171dc20 tracing: do not leak kernel addresses
CVE-2017-0630

This likely breaks tracing tools like trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2019-10-25 10:51:54 +08:00
Hu Kejun
3adf64f4d0 media: rockchip: isp1: fix get zero data when execute capture
Change-Id: I37fa740c8b16835e696ad02485dbf4f698ad60b8
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2019-10-25 10:27:52 +08:00
Simon Xue
770dc69cdc PCI: rockchip: make link down in .remove
It's safe to disable the link state after EP driver removed

Change-Id: I36f811ad353b7384a792adf7da904442afbe45d6
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-25 10:17:26 +08:00
Simon Xue
a82a0c27da PCI: rockchip: disable ltssm after link setup
Disable ltssm in case of EP auto relink if EP reboot

Change-Id: I08b3dc4426fa3a90bb74b9e3264221fe528f4526
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-10-25 10:17:26 +08:00
Xiao Feng
ef77f8d634 arm64: dts: rockchip: add cpu dvfs support for rk3368
we only add the property of regulator and clock to cpu0 and cpu4 node,
but if cpu4~cpu7 is down and then we up cpu5~cpu7, they will can not
get their regulator and clock. So we should add the properties to all
cpu node.

Change-Id: Id601fa3d3d05875f7c68f2a5472dc0eefefb6096
Signed-off-by: Feng Xiao <xf@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2019-10-25 10:08:50 +08:00
Finley Xiao
312163c755 arm64: dts: rockchip: rk3399: Add opp-microvolt-L4 for cpub
From the measured data, the voltage can be reduced a little if pvtm
is greater than 161000.

Change-Id: Icac965ff31d4ed37ae1f40204037a57b7cdf8ba1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:59:54 +08:00
Finley Xiao
e6049a7445 arm64: dts: rockchip: rk3399: Change minimum voltage to 825mV
It is better to make the voltage greater than 810mV and it will be more
stable.

Change-Id: I4f9294a0629a8c3b83e930f0dec20d939130070d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-10-25 09:59:49 +08:00
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