Commit Graph

861853 Commits

Author SHA1 Message Date
Shawn Lin
f28451cf39 phy: rockchip: naneng-combphy: Add ssc enable option from firmware
Change-Id: I0f620b6ff000ff4e7b9bc997ca2c30c14d3f8cde
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-02-08 11:40:01 +08:00
Shawn Lin
179638095d phy: rockchip: naneng-combphy: Adjust 100M refclk parameter for PCIe
Change-Id: I94321c0b6bb64cff279b79c44b54f273ee52c897
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-02-08 11:40:01 +08:00
Yandong Lin
34760af996 video: rockchip: mpp: iep2: fix hw hang caused by OSD_MAX irq
Rootcause:
When hw detect there are more than eight rolling subtitles, it will
trigger a osd max irq but it still running, and that interruption make
the software takes for frame done and disable the clock gate, finally hw
hang when it access the bus.
Solution:
Ignore OSD MAX irq, clean and wait for frame done.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I660cefa013fe1419f7566b984556ea3450fe28e5
2021-02-08 11:40:01 +08:00
Andy Yan
3feb230a5e drm/rockchip: vop2: Fixup soc_id
Change-Id: I29056b26d7917c72fee26b588cf0a990f4d461b6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-08 11:40:01 +08:00
Andy Yan
0f32f17ff0 drm/rockchip: vop2: Add support for rk3566
Change-Id: I6b02237f42de611dc0d77c1f4318f4692eae1bc6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-08 11:40:01 +08:00
Andy Yan
9cae432ce5 drm/rockchip: vop2: Force dsp_w of Esmart/Smart to even when scale down
Odd dsp_w pixel of Esmart/Smart will trigger scale down error.

Change-Id: Ie0fc620043270a387eed69aba8adf200a0d67f24
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-08 11:40:01 +08:00
Jon Lin
d25b24d0cb ubifs: Recovery for cases of unclean reboot
After power lost, spinand may work in a unkonw state and result in
bit flip, including:
1.Write to cache invalid and dirty cache data write to page's array
which result in node CRC error for some pages.
2.One page write fail but the next page write success result in
empty space corruption.

Change-Id: I212c237202b32de0217efc8dd5a4e84174953a3f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-02-05 10:43:56 +08:00
Jon Lin
cf69491c97 drivers: rkflash: Add spinand program cache recheck
Add spinand power lost situation protection to avoid
abnormal data written to flash array(recheck 1) or
just reduce error behavior(recheck 2)

Change-Id: Ic445fd09fd407c225b47310d666b39f095fcfb17
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-02-05 10:43:56 +08:00
XiaoDong Huang
0a01772bd5 arm64: dts: rockchip: rk3568: tsadc: use tsadcm0_shut function
Change-Id: I87a07d069d44ce9463612d3f13424a3d302e3f68
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-02-05 09:07:12 +08:00
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