Commit Graph

861844 Commits

Author SHA1 Message Date
Hu Kejun
51c730a4e4 media: rockchip: isp: use force big mode when auto big mode is incorrect
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Ifbbe86b5571029e76be66aab7bdbf94af012d64e
2021-02-04 16:09:53 +08:00
Andy Yan
04b89d073a drm/rockchip: vop2: Set system status by active video ports
Set SYS_STATUS_DUALVIEW when there are more than one
active video ports.

Change-Id: I7d04f74427f710eef8cd7087b09ebd528587e002
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-04 15:07:49 +08:00
Wu Liangqing
efe597fbcd arm64: dts: rockchip: rk3566-evb1: enable mipi camera ov5695
Change-Id: I953dac7da0b10da8e547c7454d3e97cc919c047c
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-02-04 10:46:22 +08:00
Liang Chen
4e1cecefcb arm64: dts: rockchip: rk3568: adjust opp-talbe when low-temp
Change-Id: I20c0c27f3c4ec2282fbda7b652cc2f9d70a21982
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-02-04 10:27:34 +08:00
Andy Yan
e3c4228717 arm64: dts: rockchip: Add SYS_STATUS_DUALVIEW for rk3566/rk3568
The DDR freq should be fixed in dual display mode.

Change-Id: I2383d415f93a52366f762e9480b54451a75f1ad5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-03 15:40:55 +08:00
Elaine Zhang
96f1b71ccf soc: rockchip: power-domain: support active_wakeup for rv1126 pd_usb
Register gpd_dev_ops.active_wakeup function to support keep power
during suspend state. And add flag to each power domain to
decide whether keep power during suspend or not.

Change-Id: I0ba0985ed2ee976885005c87fcba4c7b910cbb05
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-02-03 15:34:12 +08:00
Elaine Zhang
25e6cd2b32 soc: rockchip: power-domain: support active_wakeup for px30 pd_usb
Register gpd_dev_ops.active_wakeup function to support keep power
during suspend state. And add flag to each power domain to
decide whether keep power during suspend or not.

Change-Id: Ib9f609b851f2eaf1ccca8eb687e232727e989d5c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-02-03 15:33:22 +08:00
Xing Zheng
23830a21b3 ASoC: rockchip: rk817-codec: Fix the 8/16kHz noise dues to incorret configurations
The APLL_CFG3/DDAC_SR_LMT0/DTOP_DIGEN_CLKE should be
correct with different sample rates and clock.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I766879750e640ef8ab31c2ab6776fe96ac65e063
2021-02-03 14:09:59 +08:00
Ding Wei
fc2f74ccdd arm64: dts: rockchip: rk3568-nvr: remove rcb reference properties
Change-Id: I0fc376c7f7cee98a4fbef1c148c704a0adf1f624
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-03 10:41:09 +08:00
Liang Chen
36a8ae5a9e soc: rockchip: cpuinfo: set cpu version for rk356x
Change-Id: I0a9f2c9cc3d160e0eb64058e0c5a0de3b327c43f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-02-02 18:05:23 +08:00
William Wu
02a2f92e90 phy: rockchip: inno-usb2: delay power off phy when unplug otg host
If the OTG work in Host mode, delay power off phy in OTG_STATE_B_IDLE
state when unplug OTG cable, this can fix the xHCI deregistered error
with the following log on RK356x platforms:

[   16.856295] xhci-hcd xhci-hcd.5.auto: remove, state 4
[   16.856340] usb usb8: USB disconnect, device number 1
[   16.857778] xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
[   16.858108] xhci-hcd xhci-hcd.5.auto: remove, state 4
[   16.858146] usb usb7: USB disconnect, device number 1
[   16.878109] xhci-hcd xhci-hcd.5.auto: Host halt failed, -110
[   16.878151] xhci-hcd xhci-hcd.5.auto: Host controller not halted, aborting reset.
[   16.878853] xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered

Change-Id: I4467afdd3fe20839a9ec967624868ce3773e048c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-02-02 17:56:46 +08:00
William Wu
bc2fd405a7 phy: rockchip: inno-usb2: set bvalid and id filter time for rk356x
This patch sets the bvalid and id filter time to 10ms for rk356x
USB 2.0 PHY0 which is used for OTG. The filter count is base on
the USB 2.0 PHY GRF pclk 100MHz.

With this patch, it can avoid trigger the bvalid rising edge irq
when unplug the OTG cable.

Change-Id: I95794510921e6c065f4ec1102ab6c1f35994bf42
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-02-02 17:56:46 +08:00
Huang Jiachai
04d2305960 drm/rockchip: vop2: add more debug message for afbc data
Afbc format data must align as 64 pixel when enable xmirror, rotate_90 or
rotate_270, otherwise will display black screen and trigger post buffer empty.

Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
Change-Id: Ide5c6f667028d188eebf1ae86dcb31c57eb9ebca
2021-02-02 17:44:45 +08:00
Zhenke Fan
deabd31d51 media: i2c: imx378: fix bug for dgain error, 1xdgain is 256
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: Id5953082da47ccf07a86a9b4fc108b957344a55f
2021-02-02 14:44:27 +08:00
Zhenke Fan
c2e20ad987 media: i2c: ov4688: fix the power on timing sequence
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I74a6fdcab6e5e3f3fe57e07024b46c648fd7783a
2021-02-02 14:43:51 +08:00
Ding Wei
32e2880ed5 video: rockchip: mpp: issue when rcb size is invalid
when rcb size is 0, return error directly.

Change-Id: I232e210cc88d0ee382970e6c5548eee5c9b975c4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-02 14:35:49 +08:00
Huang zhibao
25b712aa8f arm64: dts: rockchip: rk3568-nvr: add pcie3.0 support
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I04d6fce4a0a858f6e6738d3c644292350bd7e276
2021-02-02 14:32:12 +08:00
Zhen Chen
7ab4f064cf arm64: configs: rockchip_defconfig: enable MALI_MIDGARD and MALI_BIFROST
Change-Id: Ifb8cf1b36f0a2f14f1b880014ac9beb07a44fc82
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-02-02 11:40:24 +08:00
Zhen Chen
a519839892 MALI: midgard: change kbase_platform_driver.driver.name to "midgard"
To make it possible that the both built-in midgard and bifrost device driver
could be both loaded.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I8271a6d817dda3781d70fc69aaaccf3860354b48
2021-02-02 11:40:24 +08:00
Zhen Chen
a9f72d8212 MALI: bifrost: remove 'of_device_id' instances related to midgard
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I2afba12c2fff75017de22ffb11e4fdb36d9fea73
2021-02-02 11:40:24 +08:00
Zhen Chen
5a1b8a4b4b MALI: midgard: add and include rename.h
rename.h could rename the symbols that have same name in midgard/ and bifrost/,
to make it possible to build in both midgard/ and bifrost/.

Change-Id: Ibca4e2beca8a4d8ea28f712a3e219cb2a403c7e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-02-02 11:40:24 +08:00
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