Commit Graph

1064663 Commits

Author SHA1 Message Date
Finley Xiao
f8e4af5776 soc: rockchip_system_monitor: Avoid crash when set rate and read margin
1. only update voltage when low temperature.
2. set memory read margin only when pd is on.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7a0ae4af45b86c7a08c6ffadccb71a0db3fb44e5
2021-12-31 09:25:28 +08:00
XiaoTan Luo
58f5d3c440 drm/bridge: synopsys: dw-hdmi-qp: fixed hdmi no sound
we must wait the video setup ok, and report the plug
event and then startup the audio, if not the vidqpclk
and ipi_clk are off, we can not startup the audio.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ie347d02aef7cd696c054ec2cc1eacc77b6f9ff7f
2021-12-31 08:46:11 +08:00
Guochun Huang
6b0aa0c577 arm64: dts: rockchip: rk3588-evb: fix power on/off sequence time according to panel spec
Change-Id: Ifae15bb912f0e23e888dcd5c85e85ca84b115077
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-12-30 21:20:33 +08:00
Guochun Huang
e7804248fd drm/rockchip: dsi2: reduce time when sending cmd
Change-Id: I8cfc16cff34a2917cc1138e2f3a91f9836ba7caf
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-12-30 21:16:37 +08:00
Guochun Huang
82d02d02c5 phy: rockchip: mipi-dcphy: reduce time when phy power up
Change-Id: I64e6b11c7f68d76ab1bdecb35f618d4033cadbec
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-12-30 20:34:50 +08:00
Guochun Huang
7a5551c6b4 phy: rockchip: mipi-dcphy: reset apb before access registers
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I3d6539549b9d24e1c0d94b86e1c57bf8346b49cc
2021-12-30 20:31:56 +08:00
Frank Wang
f414167ae0 usb: typec: husb311: pm process support
For power consumption saving, disable 12M oscillator in HUSB311 and it
will be enabled automatically when INT occur after system resume. In
addition, if the power of HUSB311 was off in PM suspend, we must reset
the HUSB311 and tcpm port first in PM resume process to ensure the devices
can attach again.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ib845318c5ee2014bd436f21c78e87e17b9433195
2021-12-30 19:48:20 +08:00
Hu Kejun
d974fb7b8e media: rockchip: isp: config aebig by af when aemode is on
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Ibd110edee7a15fa20840de466e5d9e70f142c440
2021-12-30 19:29:52 +08:00
Zhen Chen
3f8c57e4f0 MALI: bifrost: rk: add rk_context::lock and adjust orders of turning on/off vd, clk, pd
Turning on order: vd, clk, pd.
Off order: pd, clk, vd.

Change-Id: Ia932a3b572662a6b30e58cbb45fd1f1800283097
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-12-30 15:44:14 +08:00
Yu Qiaowei
6df752520b video: rockchip: rga3: Add mm_session show in the debugger.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8766a5c7ab7dd6656c96eeee3d3a65d91c60010d
2021-12-30 15:07:03 +08:00
Yu Qiaowei
a959b73e08 video: rockchip: rga3: The import cmd supports virtual/physical addresses.
It will only cache the corresponding address.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I81e110ce382ffe69a42462dd3586931b62eb4190
2021-12-30 15:06:34 +08:00
Yu Qiaowei
4f273fe53c video: rockchip: rga3: Support to verify whether the memory is greater than 4G.
When the memory is greater than 4G, dma_buf does not map the RGA2 device.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I7bf62c7d231fbc2c2e928d1387406281701a6269
2021-12-30 14:54:47 +08:00
Finley Xiao
301c7f8724 driver: rknpu: Add pm ops for npu
The configuration of pvtpll and memory read margin will lose if npu pd
power down, and if the source clock of npu comes from pvtpll it will
fail to power up npu pd. so change the source clock to normal pll before
power down, and restore source clock and read margin after power up.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4a558c51ad061fb99cad384f462065f96ac2f658
2021-12-29 22:10:12 +08:00
Finley Xiao
5226534d73 soc: rockchip_system_monitor: Add support to set init freq
As the scmi clk of npu may come from pvtpll, it should power up npu pd
and enable the pclk of pvtpll before set scmi clk. The "assigned-clocks"
in npu node will be set before npu driver probe, at this time the npu
pd may be down, so add "rockchip,init-freq" in opp table node, make
set scmi clk after npu pd is up and pclk of pvtpll is enabled.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I20fc3b6414601134645fa7f157c8ce5db9569232
2021-12-29 22:07:41 +08:00
Finley Xiao
d80daff1fd driver: rknpu: Implement rk3588_npu_set_read_margin()
Add support to change memory read margin according to voltage.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia1939ad7e1c9feef61390290b77316ac99c0c664
2021-12-29 22:04:33 +08:00
Finley Xiao
6118992709 MALI: rockchip: Add opp info for system monitor
Add support to change memory read margin according to voltage when
register system monitor.

Change-Id: Id1d78432b6a83bbb09b4438146a0197dc914347b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-12-29 22:01:14 +08:00
Finley Xiao
8dbd452849 cpufreq: rockchip: Add opp info for system monitor
Add support to change memory read margin according to voltage when
register system monitor.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I04b6464f5c34aa630803cfdd264487fe1eb6ea32
2021-12-29 21:59:37 +08:00
Herman Chen
61d69a619d arm64: dts: rockchip: rk3588s: Fix jpege clock dependency
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4586266e1ad40c47ff34f8207d2ad9055e821e10
2021-12-29 21:38:08 +08:00
Finley Xiao
0f83f6cfe8 soc: rockchip: opp_select: Add current read margin for rockchip_opp_info
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ifd7434d28943aa32222938961fc00ffab7f320ea
2021-12-29 16:10:16 +08:00
Finley Xiao
e3296f88ff soc: rockchip_system_monitor: Add support to change memory read margin
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I7261fda4d41f66add3d1039f2d655d8790aa0a8b
2021-12-29 16:09:56 +08:00
Yu Qiaowei
6d4d9354f9 video: rockchip: rga3: Add the init of lock and list_head in rga_job.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1115710be7d5b1a57ccb71f5c7cb6a5b136cb660
2021-12-29 15:59:01 +08:00
Finley Xiao
5eea33351b driver: rknpu: Add multiple regulators support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I42fc7255ddd52e4b8ec7a403e9b328661dcb3c77
2021-12-29 15:41:21 +08:00
Felix Zeng
3d588e4c36 driver: rknpu: Update rknpu driver, version: 0.6.4
* Add support for rk3588/rk3588s

Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: I292cca4037367d21e88f05bb8a8b7cac93c2f91e
2021-12-29 14:47:50 +08:00
Jianqun Xu
43d1db61b0 dma-buf: dma-buf-cache: fix error case for attach / detach
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I84ff3ac7c1357416bb12ca61aa7134fc652538d6
2021-12-29 10:59:40 +08:00
Zefa Chen
6bcf31b474 media: rockchip: cif: sditf is not synchronized with isp when no terminal subdev
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7f315e677abeb18e35ae4d2d426929823a5f6978
2021-12-29 10:42:19 +08:00
Sandy Huang
cfa9f744e4 drm/rockchip: vop2: fix dsc attach_vp_id error lead to pd control error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7aa679446a36ca346288b0c347168f26672aab78
2021-12-29 10:35:12 +08:00
Finley Xiao
623dd7ec57 arm64: dts: rockchip: rk3588s: Use scmi clk for cpul
Fix crash when cpufreq init.

[    3.454705][    T1] cpu cpu0: Failed to get cpu_leakage
[    3.455665][    T1] cpu cpu4: Failed to get cpu_leakage
[    3.456765][    T1] cpu cpu6: Failed to get cpu_leakage
[    3.459264][    T1] cpu cpu0: avs=0
[    3.461442][    T1] cpu cpu4: avs=0
[    3.463602][    T1] cpu cpu6: avs=0
[    3.464385][    T1] cpu cpu0: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[    3.465797][    T1] cpu cpu4: l=-2147483648 h=2147483647 hyst=0 l_limit=0 h_limit=0 h_table=0
[    3.466850][    T1] Unable to handle kernel paging request at virtual address ffffff851e69c828
[    3.467607][    T1] Mem abort info:
[    3.467915][    T1]   ESR = 0x96000005
[    3.468248][    T1]   EC = 0x25: DABT (current EL), IL = 32 bits
[    3.468774][    T1]   SET = 0, FnV = 0
[    3.469104][    T1]   EA = 0, S1PTW = 0
[    3.469444][    T1] Data abort info:
[    3.469763][    T1]   ISV = 0, ISS = 0x00000005
[    3.470159][    T1]   CM = 0, WnR = 0
[    3.470481][    T1] swapper pgtable: 4k pages, 39-bit VAs, pgdp=000000000214e000
[    3.471127][    T1] [ffffff851e69c828] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[    3.471956][    T1] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    3.472504][    T1] Modules linked in:
[    3.472838][    T1] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.10.66 #606
[    3.473440][    T1] Hardware name: Rockchip RK3588 EVB2 LP4 V10 Board (DT)
[    3.474044][    T1] pstate: 60800089 (nZCv daIf -PAN +UAO -TCO BTYPE=--)
[    3.474642][    T1] pc : cpudl_find+0x228/0x244
[    3.475038][    T1] lr : cpudl_find+0x1f8/0x244
[    3.475435][    T1] sp : ffffffc0123ab530
[    3.475787][    T1] x29: ffffffc0123ab530 x28: ffffff8402f09230
[    3.476316][    T1] x27: ffffffc011e9a580 x26: ffffffc01233a000
[    3.476843][    T1] x25: ffffff8400328018 x24: ffffffc011e80b00
[    3.477372][    T1] x23: ffffffc011e9a580 x22: 00000000ffffffff
[    3.477902][    T1] x21: ffffff8400f45c80 x20: 0000000000000000
[    3.478431][    T1] x19: ffffff84fe69c830 x18: ffffffc0123a50f8
[    3.478960][    T1] x17: 0000000000000056 x16: 0000000000000000
[    3.479489][    T1] x15: 000000000000001d x14: 0000000000000000
[    3.480017][    T1] x13: 0000000000000000 x12: 0000000000000378
[    3.480545][    T1] x11: 0000000000000007 x10: 00000000ffffffff
[    3.481073][    T1] x9 : 8000000000000000 x8 : ffffff851e69c828
[    3.481601][    T1] x7 : fefefefefefefefe x6 : ffffff8400f463ff
[    3.482131][    T1] x5 : 0000000000000000 x4 : ffffff84fe6b3220
[    3.482659][    T1] x3 : 0000000000000000 x2 : 0000000000000006
[    3.483187][    T1] x1 : 0000000000000008 x0 : 0000000000000008

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie7477c31c9d3ef4fd08235113f9571a86ca62228
2021-12-28 21:33:22 +08:00
Weixin Zhou
94c4a6fae2 input: touchscreen: add focaltech touch
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Idd0d772225ed11a5080649d8e962e5cb4c2b89b7
2021-12-28 18:31:40 +08:00
Andy Yan
284169ebaa drm/rockchip: vop2: Dump registers of Cluster2/3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I13aa84ff72f1c718390168487962d925ad2162dd
2021-12-28 18:29:20 +08:00
Andy Yan
147ba75f49 drm/rockchip: vop2: Fix a mistake value setting of win->layer_id
It's a copy and paste mistake.

Fixes: 314fa96b44d7 ("drm/rockchip: vop2:  Make sure previout zpos update
take effect before change it")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I35e8e9df88fca8ec0169f3c171115ddc1c64e5b9
2021-12-28 18:29:02 +08:00
Ding Wei
ee212c7306 arm64: dts: rockchip: rk3588: Enable rkvdec2 refer nodes for evb/nvr
Change-Id: I80ad52cc975796f79c96f24a2b4958c3427461ec
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-12-28 18:27:56 +08:00
Ding Wei
707f4713a1 arm64: dts: rockchip: rk3588s: Add soft-ccu mode for rkvdec2
Change-Id: I920ab9e63ac99bd82a735c6b18fb1e4781edc592
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-12-28 18:27:12 +08:00
Ding Wei
1f46e58a99 arm64: dts: rockchip: rk3588-nvr-demo-v10-ipc-4x-linux: Remove rkvdec_core1 node
Change-Id: I1846d168cacc67e534fd68d47efe4755b16dfeed
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-12-28 18:24:08 +08:00
Ding Wei
c2f143006f video: rockchip: mpp: rkvdec2: Add soft-ccu mode
soft-ccu mode: CPU assign the tasks to each core.
The principle is:
    1. Which core is free priority.
    2. If all free, then which core finished fewer tasks priority.

Change-Id: If31a5739597196c9c90865247cadcdb871217aad
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-12-28 18:19:45 +08:00
Yu Qiaowei
fdc1ada0ca video: rockchip: rga3: Add rga_mm.c/rga_mm.h.
1. Add improt/release dma-buf interface.
2. Switch to using idr to manage import/release buffer.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I40930f3144037435a7c1b78affba2caf81075882
2021-12-28 14:37:11 +08:00
Wyon bi
d0900b6f0a phy/rockchip: samsung-hdptx: Optimize reset sequence to save power
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: I5438bb7b21ea88c305545c2ac42010cee6cfa639
2021-12-28 09:58:10 +08:00
Wyon bi
ab65fe5bce arm64: dts: rockchip: rk3588: Drop unused reset from hdptxphy
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: Ia9e9c76dcf24f6effd73f7e018d6e65ec1a587fb
2021-12-28 09:53:42 +08:00
David Wu
6bb6bc2dd0 ethernet: stmmac: Reduce resume time
Beofre this patch:
rk_gmac-dwmac fe1b0000.ethernet: rk_gmac_resume+0x0/0x54 returned 0 after 12842 usecs
After this patch:
rk_gmac-dwmac fe1b0000.ethernet: rk_gmac_resume+0x0/0x54 returned 0 after 1494 usecs

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I269d6d7d1898b72f3995e58fb48b963b92ac2dab
2021-12-28 09:31:54 +08:00
Jianqun Xu
9d91ed824a dma-buf: system_heap: fix compile warning
Fix warning: Value stored to 'table' during its initialization is never read

Fixes: 21f2fd663e ("dma-buf: system_heap: support cpu access partial dma-buf")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Icdab3ec6359f776956c02617254e8a98e30f1546
2021-12-27 18:48:36 +08:00
Wu Liangqing
f0c867263a arm64: dts: rockchip: rk3588s-tablet: enabled route-edp
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I4d63f78323f057087f4d8cf6a94efc841fb128f4
2021-12-27 18:43:45 +08:00
Wyon bi
5dd1345e75 drm/bridge: analogix_dp: Correct phy status in loader_protect
Fixes: 48fb554efc ("drm/rockchip: analogix_dp: Protect kernel logo with loader_protect callback")
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: Ia0c62ae6ed411200b539e33c797bc8d0b1c7e14b
2021-12-27 17:04:19 +08:00
Wyon bi
00d2a3e342 phy/rockchip: naneng-edp: Check if PHY need configured during startup
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: Icf5aeb751401d0ab2c2e02443f6316b49b6b23c3
2021-12-27 17:04:19 +08:00
Wyon bi
eb4c42e291 phy/rockchip: samsung-hdptx: Check if PHY need configured during startup
Signed-off-by: Wyon bi <bivvy.bi@rock-chips.com>
Change-Id: Idd91b95ea60cd6240dbc77d4396c9cae4affdba1
2021-12-27 17:00:51 +08:00
Zhen Chen
5efa128dc6 arm64: dts: rockchip: rk3588s: gpu: add default upthreshold and downdifferential
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I7f862ee20f3758b1689d82e233be2c561c8ac69e
2021-12-27 14:49:35 +08:00
Shunhua Lan
b70d0a46ce arm64: dts: rockchip: modify sound device properties for rk3588 evbs
use multicodecs instead of simple-audio-card
set es7202 power-supply to 1v8

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I781a0444a05b783f2fc21277160a71c70b2c75a3
2021-12-27 14:22:13 +08:00
Li Huang
c04287e5ad video: rockchip: rga3: Fixup wrong rb swap on win0/win1
Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I18271e9cdf3338a7b00fbf300d8f6e6f07ef5d9e
2021-12-27 14:19:04 +08:00
Frank Wang
44f07bf4bc usb: typec: fusb302: do reset if the power was off in suspend
For power consumption saving, the power of fusb302 may be off in PM
suspend, so we must reset the tcpm port first in PM resume process
to ensure the devices can attach again.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Id2cde954663c2f8e01cf19f90066dd1b942a216e
2021-12-27 11:14:41 +08:00
Guochun Huang
1799a4d1ef drm/rockchip/rk628: combtxphy: lvds: power up all channel after phy lock
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: If28520a20e73258037c08cb4dd95888a45093d6a
2021-12-27 11:12:02 +08:00
XiaoTan Luo
ffdc12a182 ASoC: rockchip: multicodecs: Fix panic when get adc error
[   30.670500] Internal error: Oops: 96000005 [#1] SMP
[   30.670947] Modules linked in:
[   30.671257] CPU: 0 PID: 105 Comm: kworker/u16:1 Not tainted 5.10.66 #172
[   30.671866] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[   30.672447] Workqueue: events_power_efficient adc_jack_handler
[   30.672989] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
[   30.673548] pc : iio_read_channel_processed+0x28/0xdc
[   30.674023] lr : adc_jack_handler+0xc8/0x188
[   30.674418] sp : ffffffc012783d50
[   30.674731] x29: ffffffc012783d50 x28: 0000000000000000
[   30.675240] x27: ffffffc011cc9960 x26: 0000000000000000
[   30.675735] x25: ffffffc011a17980 x24: 0000000000000000
[   30.676232] x23: ffffff840002e100 x22: ffffffc011cc99a0
[   30.676728] x21: ffffffc012783da4 x20: ffffffffffffffed
[   30.677234] x19: ffffff8402c6c880 x18: 0000000000000000
[   30.677730] x17: 0000000000000000 x16: 0000000000000000
[   30.678236] x15: 0000000000000000 x14: 0000000000000000
[   30.678742] x13: 0000000000000000 x12: 0000000000000000
[   30.679247] x11: 0000000000000000 x10: 0000000000000db0
[   30.679753] x9 : ffffffc010b90a58 x8 : ffffff840098da7c
[   30.680259] x7 : fefefefefefefeff x6 : 0000746e65696369
[   30.680765] x5 : 0000000000000018 x4 : ffffff840098da6c
[   30.681262] x3 : ffffff8400f15000 x2 : 0000000000000000
[   30.681758] x1 : ffffffc012783da4 x0 : ffffffffffffffed
[   31.074520] Call trace:
[   31.074764]  iio_read_channel_processed+0x28/0xdc
[   31.075205]  adc_jack_handler+0xc8/0x188
[   31.075576]  process_one_work+0x1e0/0x298
[   31.075955]  worker_thread+0x1e4/0x27c
[   31.076310]  kthread+0xf8/0x108
[   31.076609]  ret_from_fork+0x10/0x30
[   31.076957] Code: a90153f3 aa0003f4 f90013f5 aa010

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I974d757819c3ffdd801711dc6561753ee2ee455a
2021-12-27 11:10:58 +08:00
Finley Xiao
500092fdf3 arm64: dts: rockchip: rk3588s: Add opp table for npu
Use scmi clk for npu.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id03b5dd5d2f96276afb1b5c22b6ec51454910a88
2021-12-27 11:08:36 +08:00