Commit Graph

861863 Commits

Author SHA1 Message Date
Xu Hongfei
4331ba1b1d media: rockchip: isp: set lgmean related regs for tmo in hdr isr
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: I36442cf617c8ddbf54ae659071fe1f057bc9830b
2021-02-08 17:19:57 +08:00
Liang Chen
a8bfdf7855 nvmem: rockchip-otp: enable ecc and ecc-check for rk3568
Change-Id: I1bc8880d7ba8c3236d51d6982bf3689063d907b9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-02-08 17:19:57 +08:00
Liang Chen
c95de52509 soc: rockchip: cpuinfo: fix bug: check efuse_buf before use it
Change-Id: I6318eba4e0281d54fe0d429425fce4ab6822eb46
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-02-08 17:19:57 +08:00
shengfei Xu
b05b22f9e8 mfd: rk808: config sleep pin polarity active need delay 2ms
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I404265384c2bc49274646cf749aa8ccf37b0899f
2021-02-08 11:40:02 +08:00
Yandong Lin
fdc069542d video: rockchip: mpp: iep2: remove reduce_req function
1. Because of hw problems before, there will be problems with
high-frequency reset. So the frequency must be reduced before reset.
But this operation is unnecessary for now.
2. Iep share clk with rga on rk356x, so frequency reduction may affect rga.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I469d2d6ba2671560acd9eaf6b86d57411c7e3de5
2021-02-08 11:40:02 +08:00
Andy Yan
d913031608 drm/rockchip: vop2: Cleanup wb connector when unbind
Change-Id: Ia07909f423ee4479633b8c3b3c677300d12c0995
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-02-08 11:40:01 +08:00
Jianqun Xu
7b61d4b92d iommu/rockchip: fix error define for v2 iommu
Correct mapping is like following:
page table desc bit           phys address bit
             [ 7:4]                    [39:36]
             [11:8]                    [35:32]

Fixes: a4318b7d29 ("iommu: rockchip: Add support iommu v2")
Change-Id: I2ebbd2ec37111f44960a7ba0e5b90a9102448e23
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-02-08 11:40:01 +08:00
Tao Huang
3be30bd08d ASoC: es7202: Add missing sentinel to es7202_dt_ids
BUG: KASAN: global-out-of-bounds in of_match_node+0x70/0xc0
Read of size 1 at addr ffffff900a0f06f0 by task swapper/0/1

CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.161 #54
Hardware name: Rockchip RK3566 EVB1 DDR4 V10 Board (DT)
Call trace:
 dump_backtrace+0x0/0x1bc
 show_stack+0x14/0x1c
 dump_stack+0xd8/0x118
 print_address_description+0x80/0x2e4
 __kasan_report+0x164/0x1c4
 kasan_report+0x10/0x18
 __asan_load1+0x4c/0x54
 of_match_node+0x70/0xc0
 of_match_device+0x30/0x44
 i2c_of_match_device+0x30/0xb8
 i2c_device_match+0x48/0xc0
 __driver_attach+0x44/0x1b0
 bus_for_each_dev+0xa0/0xe8
 driver_attach+0x30/0x3c
 bus_add_driver+0x198/0x2a0
 driver_register+0xf0/0x1c4
 i2c_register_driver+0x6c/0xd0
 es7202_modinit+0x1c/0x48
 do_one_initcall+0xb0/0x344
 do_initcall_level+0xec/0x1fc
 do_basic_setup+0x68/0x80
 kernel_init_freeable+0x108/0x194
 kernel_init+0x14/0x2a0
 ret_from_fork+0x10/0x18

The buggy address belongs to the variable:
 es7202_dt_ids+0x190/0x200

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic41116912bc323005787878ab29318ad38efd07e
2021-02-08 11:40:01 +08:00
Jon Lin
a7cc0e6bee drivers: rkflash: Remove cache bitflip detect 2
Part of spinand sram maybe change after read status register

Fixes: cf69491c97 ("drivers: rkflash: Add spinand program cache recheck")
Change-Id: Ia8f902fe51562d71a5b8e78a80e63eb26257df38
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-02-08 11:40:01 +08:00
shengfei Xu
9f3a45ac0c arm64: dts: rockchip: rk3566-rk817-tablet: add gate_function_disable
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I261c2cd92d913ed411649858b7c20b9645084d93
2021-02-08 11:40:01 +08:00
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