Commit Graph

861823 Commits

Author SHA1 Message Date
Zhen Chen
bb479cfe84 arm64: dts: rockchip: px30: gpu: only use "arm,mali-bifrost" in 'compatible'
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I347ea39a91288ef5c3c70d703a86b622b00bcb9d
2021-02-02 11:37:46 +08:00
Zhen Chen
a400cac168 arm64: dts: rockchip: rk3568: gpu: only use "arm,mali-bifrost" in 'compatible'
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Idd3e21ecc3d53d97200bd46b849a22e4f7777333
2021-02-02 11:35:26 +08:00
Zhen Chen
15a5ee10cc Mali: utgard: actually use rk_context::is_powered
Fix the following warning reported
in https://redmine.rock-chips.com/issues/230655 :

[   76.900395] ------------[ cut here ]------------
[   76.900404] aclk_gpu already disabled
[   76.900503] WARNING: CPU: 3 PID: 1674 at drivers/clk/clk.c:829 clk_core_disable+0x250/0x268
...

Change-Id: Iaf26ce07574b9909188cde99142a13e98a9a93de
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-02-01 18:16:04 +08:00
Wu Liangqing
480eb468dc arm64: dts: rockchip: rk3566-tablet: panel remove power-supply
Change-Id: I64929372a2d374b9f3cb5fac4ae5596d810548e5
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-02-01 17:26:48 +08:00
Wu Liangqing
52c0325bd6 arm64: dts: rockchip: rk3566-evb2: cif_dvp disabled
Change-Id: Ifeccf11f5ac0abe2f6ac2e979e7433e31a958e95
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-02-01 17:26:22 +08:00
Allon Huang
21640649a5 media: rockchip: cif: fix rk356x iommu err
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I249cfb2bd8023e6ae498fb0ee9dc168fe3c0f534
2021-02-01 17:23:49 +08:00
Allon Huang
8d48061d70 arm64: dts: rockchip: rk3568: rkcif mmu uses version 2
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I1f861c6786c6bf7e9a41e4226f6ccb0587836cf6
2021-02-01 17:23:29 +08:00
Shunqing Chen
77b09cc635 UPSTREAM: drm/bridge: dw-hdmi: fix SCDC configuration for ddc-i2c-bus
When ddc-i2c-bus property is used, a NULL pointer dereference is reported:

[   31.041669] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[   31.041671] pgd = 4d3c16f6
[   31.041673] [00000008] *pgd=00000000
[   31.041678] Internal error: Oops: 5 [#1] SMP ARM

[   31.041711] Hardware name: Rockchip (Device Tree)
[   31.041718] PC is at i2c_transfer+0x8/0xe4
[   31.041721] LR is at drm_scdc_read+0x54/0x84
[   31.041723] pc : [<c073273c>]    lr : [<c05926c4>]    psr: 280f0013
[   31.041725] sp : edffdad0  ip : 5ccb5511  fp : 00000058
[   31.041727] r10: 00000780  r9 : edf91608  r8 : c11b0f48
[   31.041728] r7 : 00000438  r6 : 00000000  r5 : 00000000  r4 : 00000000
[   31.041730] r3 : edffdae7  r2 : 00000002  r1 : edffdaec  r0 : 00000000

[   31.041908] [<c073273c>] (i2c_transfer) from [<c05926c4>] (drm_scdc_read+0x54/0x84)
[   31.041913] [<c05926c4>] (drm_scdc_read) from [<c0592858>] (drm_scdc_set_scrambling+0x30/0xbc)
[   31.041919] [<c0592858>] (drm_scdc_set_scrambling) from [<c05cc0f4>] (dw_hdmi_update_power+0x1440/0x1610)
[   31.041926] [<c05cc0f4>] (dw_hdmi_update_power) from [<c05cc574>] (dw_hdmi_bridge_enable+0x2c/0x70)
[   31.041932] [<c05cc574>] (dw_hdmi_bridge_enable) from [<c05aed48>] (drm_bridge_enable+0x24/0x34)
[   31.041938] [<c05aed48>] (drm_bridge_enable) from [<c0591060>] (drm_atomic_helper_commit_modeset_enables+0x114/0x220)
[   31.041943] [<c0591060>] (drm_atomic_helper_commit_modeset_enables) from [<c05c3fe0>] (rockchip_atomic_helper_commit_tail_rpm+0x28/0x64)

hdmi->i2c may not be set when ddc-i2c-bus property is used in device tree.
Fix this by using hdmi->ddc as the i2c adapter when calling drm_scdc_*().
Also report that SCDC is not supported when there is no DDC bus.

Fixes: 264fce6cc2 ("drm/bridge: dw-hdmi: Add SCDC and TMDS Scrambling support")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/VE1PR03MB59031814B5BCAB2152923BDAAC210@VE1PR03MB5903.eurprd03.prod.outlook.com

Change-Id: I5b2cbb57848e51bcba5266a40f4bd509e0cba3bb
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2021-02-01 09:44:02 +08:00
Wu Liangqing
68f29bdbc5 arm64: dts: rockchip: rk3326-evb: add rk3326-evb-lp3-v11 board
Change-Id: Ib80e35b3489686fb24a0d61a2e7645a2d7c937f1
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-01-30 16:53:51 +08:00
Ding Wei
3ee975a1cf video: rockchip: mpp: control the log, when task is null
tips:
    in rk3328, avsd and vdpu share the same interrupt number,
    so, when each one hardware done, avsd and vdpu irq will response.
    this is a normal log when meet the case.

Change-Id: I9fea220a64d7310805194d9f71c24db0cef1491e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-30 15:09:24 +08:00
Vicent Chi
5120ed3b52 media: i2c: nvp6188: Improve more interfaces to adapt to 8 channels
Change-Id: I3e18b68967e5c17b1e7a1cdd9167062965239c49
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2021-01-30 15:09:01 +08:00
Frank Liu
e3d4f2aec9 driver: media: i2c: add os02g10 driver
Signed-off-by: Frank Liu <frank.liu@rock-chips.com>
Change-Id: I538512282db79cc7ed226b64d6848a329808843a
2021-01-30 14:12:24 +08:00
Zefa Chen
262595ff25 media: i2c: imx327 fixed linear mode exposure calculation
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia5a64608872e480138b0b65fafed388c91004437
2021-01-30 14:10:25 +08:00
Andy Yan
5dbfb27c04 drm/rockchip: vop2: set config done critical time to lase 1/8 frame
According to test, 1/4 frame will cost a wait for 4ms, 1/8 frame
cost a wait for 1~2ms, I think 1~2ms is enough for a config done
write.

Change-Id: I6ba46a8a2cb97434998376e85e5b5fc7a53a9616
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-30 14:09:31 +08:00
Andy Yan
71c908a825 drm/rockchip: vop2: Fix wait frame start condition check
When system boot with boot logo on, drm_crtc_atomit_enable
won't be called, so vcstate->vdisplay can't be initialized.

So we get vdisplay/vtotatal by crtc.state->adjusted_mode.

Fixes: bd11b0fed8 ("drm/rockchip: vop2: wait for frame start by vcnt")

Change-Id: I39a1d62095347fe6e5d3c48ff7b1e08a20366f9c
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-30 14:09:31 +08:00
Cai YiWei
6700f30703 media: rockchip: isp: fix extend line with isp input crop case
Change-Id: If92cb8e8960374b56ca37013dc4b0af8f6857990
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-30 14:05:53 +08:00
Andy Yan
d1790746aa drm/rockchip: debugfs: Count header size when dump a afbc buffer
Change-Id: Id021680fac5b9010797e970fbd005ba2082a2b1b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-29 18:13:57 +08:00
Andy Yan
a612c861dd drm/rockchip: gem: Convert sg to page
This make cpu can dump fb data allocated by ION.

Change-Id: I639e7cbbe6957d2bb02e4577805343cdbf5f5bf7
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-29 17:58:33 +08:00
Longjian Lin
6a44f0d785 arm64: dts: rockchip: add BT pinctrl for rk3399-mid-818 and rk3399-tve1030g
Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: Ic8c3cd7b178489e6e590fa9b7bd13f8253eff7aa
2021-01-29 17:23:57 +08:00
Zhen Chen
fb4e66e115 android: ion: pass in DMA_ATTR_SKIP_CPU_SYNC when calling dma_(un)map_sg_attrs()
Imitate the behaviors of drm_gem_map_detach() and drm_gem_map_dma_buf().
Graphics performance of rk3399 device using ion without this modification,
was quite poor.

Change-Id: Ia0b8e2f3026a61ee4addee9c1715291886fa1c99
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-01-29 16:20:50 +08:00
Andy Yan
8c59d20b75 drm/rockchip: vop2: Add color key support
Change-Id: Id32fc90b353f08cf575be57b1bcef137990bb183
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-29 11:09:29 +08:00
Ren Jianing
ec70606fce phy: phy-core: remove mutex lock for rockchip rv1126-usb2phy calibrate
For RV1126, phy_calibrate will run in dwc3 reset irq function and lead
to dead lock. Besides, there is no critical area resources. So we should
remove mutex lock in phy calibrate for Rockchip platform.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ic205959d96e7a6831aa9426738c1fd06deee1a22
2021-01-28 20:23:51 +08:00
Allon Huang
66605ab268 arm64: dts: rockchip: rk356x evb: enable csi2 dphy hw
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Ia5afe5729e09273123f35c36429f0aef498304cd
2021-01-28 19:12:38 +08:00
Yandong Lin
d4795f4b66 video: rockchip: mpp: Fix rk3368 page fault
Workaround patch for rk3368:
Need to reset iommu for rk3368, when grf changed.

[   64.542569] rk_iommu ff9a0440.iommu: Page fault at 0x00000000fcbdd800
of type write
[   64.542586] rk_iommu ff9a0440.iommu: iova = 0x00000000fcbdd800:
dte_index: 0x3f2 pte_index: 0x3dd page_offset: 0x800
[   64.542599] rk_iommu ff9a0440.iommu: mmu_dte_addr: 0x000000007ad53000
dte@0x000000007ad53fc8: 0x367c9001 valid: 1 pte@0x00000000367c9f74:
0x2a93c007 valid: 1 page@0x000000002a93c800 flags: 0x6
[   64.542627] mpp_rkvdec ff9a0000.hevc_service: fault addr 0xfcbdd800
status 6b

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I52f3cff4f8a55c2fac3d33f6468024b46eabde41
2021-01-28 19:12:01 +08:00
Finley Xiao
a1564ca541 arm64: dts: rockchip: rk1808: fix syntax error for npu pvtm
Fixes: da913c30e2 ("soc: rockchip: pvtm: Update driver to use clk_bulk and reset array APIs")

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4ac693d3debe6828ce24d35ff6a202bffc2dd9e1
2021-01-28 18:52:20 +08:00
shengfei Xu
14c585cae3 regulator: fan53555: support reboot
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I216f931fd6a3bc0ccfbad876239d2b0eb25420ea
2021-01-28 18:47:41 +08:00
Weixin Zhou
60b3c1ee24 arm64: dts: rockchip: rk3566-eink: add gate_function_disable
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ie2dc6f405d5c186e041c0e08608a259a579e8c0b
2021-01-28 16:12:50 +08:00
Weixin Zhou
8238cd4ec1 power: rk817_charger: fix shutdown invalid by long press key
if the GATE pin does not control the external PMOS to reduce the conduction
resistance, the VCC_SYS can be shutdown int power off mode.

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I7312d19d608f7e7a015fca6f2b954d2b851af47d
2021-01-28 15:57:44 +08:00
Jon Lin
56b17ffce5 drivers: rkflash: Fix error in mtd spinor chip erase
Change-Id: I2ada96181a24ef4d450250d9ca6a089d4833e312
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-01-28 14:27:10 +08:00
Yu Qiaowei
955dba8428 video/rockchip: rga2: Fix the memory leak in rga2 driver.
1. Fix that when fd is used in A+B->C mode, the fd of
   pat is not release.
2. Modify that the pat import from the application is
   only copy to pat or src1.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I360459ba85fdaad5536a3317b5f415298be87d6b
2021-01-28 14:23:20 +08:00
Andy Yan
c31072e3c3 drm/rockchip: vop2: Change wb RGB888 to BGR888
The actually writeback format of 24bit RGB(without alpha)
is BGR888, the TRM description is wrong.

Change-Id: I7897eba9024efc7f95bda57743ff6c4d8533eeb0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-28 14:11:52 +08:00
Allon Huang
dd29de10cd Revert "phy: rockchip: mipi-rx: support rk3568 mipi dphy rx"
This reverts commit 9cb5128ee0.

Replaced by commit 118103 and 118606:
e0e682453e ("phy: rockchip: add rk3568 mipi dphy hw driver")
a9e17370bb ("phy: rockchip: csi2-dphy: add mipi dphy dual mode driver for rk3568")

Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I3a8f70860c859724199197b9aa10d75565cb6c5e
2021-01-28 14:10:49 +08:00
Allon Huang
26e6c34da6 arm64: dts: rockchip: rk3568: add csi2 dphy for dual mode
replace csi_dphy with csi2_dphy0, csi2_dphy1 and csi2_dphy2
for rk356x csi2 dphy dual mode

Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I53f5edcf36bcf3cdf84174d44cb6c99703940ea3
2021-01-28 10:40:54 +08:00
Wang Panzhenzhuan
e7030eb33c arm64: configs: rockchip_defconfig: enable ov5648
This is needed for rk3566-rk817-eink-w6

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I4362a200b7eada146b387d08a5d2bcc58c69f47f
2021-01-28 09:36:47 +08:00
Wang Panzhenzhuan
b8599ea508 arm64: dts: rockchip: rk3566-rk817-eink-w6: adjust camera config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I64196132d765397170babdb5c56da01270d5a623
2021-01-28 09:36:30 +08:00
Zorro Liu
dfaa34c764 arm64: dts: rockchip: add npu config and update battery capacity for rk3566-rk817-eink-w103 board
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I1269e41b910a8b8997b655a2d8d025475e59b654
2021-01-27 17:46:47 +08:00
Zorro Liu
37bfc5ea16 arm64: dts: rockchip: rk3566 eink: delete no use panel,direct_mode defined
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I292f7258db938c7761c4c23a46693dceced0e8d6
2021-01-27 17:41:51 +08:00
Zorro Liu
668fc59a25 drm/rockchip: ebc_dev: release version v1.02
1.improve first overlay frame
2.add ebc on/off notify
3.overlay use osd buf

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I33e9f9ed9d4eb78148ebb5c2ad178eb95c28ee63
2021-01-27 17:41:44 +08:00
Weixin Zhou
eb27d7ba43 arm64: dts: rockchip: rk3566-rk817-eink-w103: add charge led
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I7ffbbadef1aa9df8d8234a318ef5043418db73d1
2021-01-27 17:34:23 +08:00
Weixin Zhou
3bd6077b1d arm64: dts: rockchip: rk3566-rk817-eink-w6: adjust some configs
1.sync some configs for sleep from w103 board
2.remove unuse touch virtual key
3.fix leds configs

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I74d043d02d58c3127efb6382096125970098d797
2021-01-27 15:56:32 +08:00
David Wu
0dc5b4e01c i2c: i2c-rk3x: Clean wakeup warning form i2c restart
This patch fixs the following warning:
[   41.482651] WARNING: CPU: 0 PID: 1 at kernel/sched/core.c:1763 set_task_cpu+0x1c0/0x220
[   41.589204] Call trace:
[   41.589441]  set_task_cpu+0x1c0/0x220
[   41.589776]  try_to_wake_up+0x2a8/0x408
[   41.590124]  default_wake_function+0x14/0x1c
[   41.590511]  autoremove_wake_function+0x18/0x58
[   41.590920]  __wake_up_common+0xbc/0x138
[   41.591280]  __wake_up_common_lock+0x74/0xc4
[   41.591662]  __wake_up+0x14/0x1c
[   41.591966]  rk3x_i2c_irq+0x43c/0x620
[   41.592300]  rk3x_i2c_restart_notify+0x3c/0xe4
[   41.592708]  atomic_notifier_call_chain+0x4c/0x84
[   41.593139]  do_kernel_pre_restart+0x20/0x28
[   41.593525]  machine_restart+0x20/0x58
[   41.593864]  kernel_restart+0xf4/0x100
[   41.594200]  __arm64_sys_reboot+0x140/0x20c
[   41.594585]  el0_svc_common+0x98/0x160
[   41.594921]  el0_svc_compat_handler+0x18/0x20
[   41.595315]  el0_svc_compat+0x8/0x34
[   41.595638] ---[ end trace 8a090dd86c5af601 ]---

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I075d2189ece5f54822ac6515ee3d390aa46e8708
2021-01-27 15:05:49 +08:00
Zorro Liu
a6584f838e input: touchscreen: cyttsp5: suspend support eink idle mode
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I263381c76541808ef51858ae20480059e93f2ac2
2021-01-27 14:42:06 +08:00
XiaoDong Huang
6023eb7d3e arm64: dts: rockchip: support ultra mode for rk3566-rk817-eink-w103.dts
Change-Id: I9583461ae87e0e3cdc9d637cfdcbc22369ddad81
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-01-27 14:35:24 +08:00
Wu Liangqing
e8ad38b098 arm64: dts: rockchip: rk3568: add evb4/evb5/evb7
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: Ic50490f650e0de5f78ba1e73c373b0920b0d44bd
2021-01-27 10:09:15 +08:00
Tao Huang
d66813cea8 arm64: dts: rockchip: Fix typo in rk3568 evb compatible
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I922e7b506fbe81f6b537be37cc9d07bdab31a142
2021-01-27 09:55:55 +08:00
Zorro Liu
9b6b975254 drm/rockchip: ebc_dev: tps65185: improve power on/off and temperture read
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Id11b7574fa9125f875a55c9a3823a5ade3d28276
2021-01-27 09:31:53 +08:00
Wenping Zhang
ed6cd522c1 drm/rockchip: ebc_dev: tps68185: optimize the power up sequence.
Only do the i2c configs at the first time or after entering suspend
mode, and add mutex protect during suspend and resume.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Id3e16da88c526332238682421976a43c5974c936
2021-01-27 09:31:30 +08:00
Andy Yan
adafb5ebfb drm/rockchip: vop2: Exit standby after display timing config done
When clear standby bit, the vop post will start scan out
with the old timing immediately(no need config done bit).

Sometime the old timing is verery different with the
current timing we want config(switch from 4K to 720P),
this may cause problems at some point.

So we clear standby after a new timing config done.

Change-Id: Id621bea6a622c151d3e339b102c6791a6244ac08
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-27 09:25:13 +08:00
Andy Yan
bd11b0fed8 drm/rockchip: vop2: wait for frame start by vcnt
Sometimes isr is disabled, wait for frame start
by poll vcnt is more safe.

Change-Id: I0f3d63e1d51a623d22eedef05920bcff5d63a75d
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-27 09:25:13 +08:00
Andy Yan
2cc91f4dfb drm/rockchip: vop2: No need to wait when config same VP
Just overwrite config done bit for the same VP.

Change-Id: I41931e0fc595b3bfbf4f0fa04e615c5af2326f70
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-27 09:25:13 +08:00