Commit Graph

1079702 Commits

Author SHA1 Message Date
Yandong Lin
078b5e4595 video: rockchip: mpp: prevent page order out of bounds
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4c79ee639d0fbc910fbb12525ea0a3c8e7841d1d
2023-04-14 11:27:46 +08:00
Zefa Chen
d98a712cce media: rockchip: vicap optimize print info
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I740632ce0d54bf2e6daaeefa91fe3192eb9420b2
2023-04-14 10:29:45 +08:00
Sandy Huang
5baf552259 drm/rockchip: vop3: update OUTPUT_WIDTH for esmart
At VOP3_ESMART_2K_2K_2K_2K_MODE mode, esmart can support:
4k scale down to 2k or 2k scale up to 4k, but can't support 4k to 4k,
current property[INPUT_WIDTH/INPUT_HEIGHT/OUTPUT_WIDTH/OUTPUT_HEIGHT]
can't accurately describe this feature, so we agreement on rules with hwc:

1. when esmart can support 2k->4k/4k->2k, can't support 4k->4k, the property
value is:
    INPUT_WIDTH:4096
    OUTPUT_WIDTH:2048

2. when esmart can suport 2k->4k/4k->2k/4k->4k, the property value is:
    INPUT_WIDTH:4096
    OUTPUT_WIDTH:4096

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If2067f34a36ba77249174e8369eaaccb0a8f700f
2023-04-14 10:06:52 +08:00
Sandy Huang
94903818f4 drm/rockchip: vop3: fix esmart_lb_mode error
vop2->esmart_lb_mode is correct value according driver default value and
dts config.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I1c242ebbb47cdf2916a56ae729ba65222d31d0d5
2023-04-14 10:06:52 +08:00
Damon Ding
00424a589d drm/rockchip: vop2: add support to assign plane mask by default
If not to enable uboot logo, neither to set plane
mask in dts. For RK3568 and RK3588, it is needed to
assign plane mask by default.

Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9ebbc32b89b503784a225cc482e7cbde15508843
2023-04-13 20:35:50 +08:00
shengfei Xu
594dbffc9e soc: rockchip: support rk3562 pm config
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I27ae8622080656f547166194fedb2ce31f032002
2023-04-13 20:26:20 +08:00
Zhang Yubing
bd29c245e6 phy: rockchip: typec: select TYPEC
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I228cc3c034a0db29ea83c510a74c7a98ce15b534
2023-04-13 20:14:43 +08:00
Jon Lin
0334628275 PCI: rockchip: dw_ep: mmap normal_wc for bar2 mapped memory
Bar2 mapped memory resource do not have outbound configured and
can be used as general memory, using write buffer to improve data
transform rate.

Change-Id: I0b1e86ec47432e1cd13ee10db4895eca071db45d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-04-13 19:56:45 +08:00
Jianlong Wang
3155b043cf ARM: dts: rockchip: rk312x-android: modify cma_region start address
For small capacity RAM, the value of this address is too large

Change-Id: Iccc318e5d97ec1df2e8cfc7a651022b1a33e1010
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-13 19:55:32 +08:00
Zhang Yubing
b06e7b839c drm/rockchip: vop2: fix esmart pd turn off timeout issue
The esmart pd attach to esmart1/esmart2/esmart3, if we want to
turn off esmart pd, a vp attach to esmart1, esmart2 or esmart3
must active.

Now, the esmart pd is turn off when the last vp is disable, if
the last vp is not attach to esmart1, esmart2 or esmart3, the
esmart pd will turn off failed.

To fix this issue, when disable the last vp, we will active the
vp attach emsart1 and turn off the esmart pd.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ide8a367de2c8b7ba027568bc7eacb3fd389c73fe
2023-04-13 19:54:46 +08:00
Cai YiWei
9efeb9d0eb media: rockchip: isp: fix rockit uv offset if switch resolution
Change-Id: Idd48a6770d1668965cb56e44b9d11634aed5471d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-13 19:40:01 +08:00
Wyon Bi
c274625a04 arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: Use link-freuencies property
Change-Id: I26aaf3a90cbdd1ba68e066bddef3a8cde923284a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
876d1bbd23 arm64: dts: rockchip: rk3588s-tablet: Add link-freuencies into dp0_out endpoint
Change-Id: I3b611a86c79adf8ae27f47c8158e01d3702d91fe
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
ec918a2bbb arm64: dts: rockchip: rk3588: Add output endpoint for dp1/edp1
Change-Id: I638f5b69ec30c4ee14b3dd50afa6d889533f7fc9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
a4b83836b1 arm64: dts: rockchip: rk3588s: Add output endpoint for dp0/edp0
Change-Id: I244cfbed12b94b9a730ebf18ab3e2af24a12762d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
f4501b9bc7 drm/rockchip: drv: Ignore no exist remote endpoint in rockchip_drm_of_find_possible_crtcs()
Change-Id: Iceea01c906fb2c269524c1c4d898db222d1d0844
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
c91c1a5fdc drm/rockchip: dw_dp: parse link-frequencies property of output endpoint
Add capability to parse and retrieve max DP link supported rate
from link-frequencies property of output endpoint.

Change-Id: I7fdc0f509eef3043d3940fe2639b3fbbc61fbfec
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Wyon Bi
c8bdf75ed6 drm/bridge: analogix_dp: parse link-frequencies property of output endpoint
Add capability to parse and retrieve max DP link supported rate from
link-frequencies property of output endpoint.

Change-Id: Ie3fbf7baa88503a04309ace6ecf004b23fb0bb78
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-13 19:39:34 +08:00
Yu Qiaowei
23af0fccf5 video: rockchip: rga3: prevent pages order out of bounds
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6ed55d2d7180ae1ba928ca1f8399d4c8eb312e18
2023-04-13 09:48:49 +08:00
Tao Huang
698e99a4a2 rk: scripts/mkimg: Pass '-B 0x200' to mkimage if supported
Pass '-B 0x200' to mkimage to align the FIT structure and data to 512 byte.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I56286064e8db62e4ae236e15a3de6827a577f506
2023-04-12 20:31:15 +08:00
Luo Wei
5f1c322d3b arm64: dts: rockchip: rk3588-vehicle-evb2: add nvp6188 and reverse support
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I71282cafc0767c97c0b051afb3af72ab34d0fa0d
2023-04-12 19:49:30 +08:00
Steven Liu
d2f341b548 arm64: rk3308_linux_defconfig: enable Rockchip AMP
Enable the following macros for AMP system:
CONFIG_ROCKCHIP_AMP=y

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ic8eafe34df524f3713a6894ff1b18dc10b124896
2023-04-12 10:03:55 +08:00
Steven Liu
e7528f3e63 arm64: dts: rockchip: Add RK3308b amp dtsi
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I3f41e7a336812ed345c7382e89e43bc65431c9df
2023-04-12 10:03:55 +08:00
Jon Lin
f03bb81c59 drivers: rkflash: Update to SFTL version: 5.0.58 20220814
Fix V7:
undefined reference to `__stack_chk_guard'

Change-Id: Ie7b7cf74d16fb058acbad63c86c9ad8d9543032e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-04-11 18:48:03 +08:00
Chen Jinsen
fe03134a6c arm64: dts: rockchip: rk3566-tablet: enable iep
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I81f8022ef0819003336a82a7c6ce3ba1b73c929c
2023-04-11 18:33:55 +08:00
Jianlong Wang
e0b16c2ae2 ARM: dts: rockchip: rk312x-evb: add tsadc and earlycon support
Change-Id: If75380c08add4ebefe6778bbde15d85dca5de7c9
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:14:38 +08:00
Jianlong Wang
97d83f7f20 ARM: configs: rk3128: add rk3128_linux_spi_nand.config
Change-Id: I50e9493632d2d164066eeb3e339e7447ed751523
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:12:07 +08:00
Jianlong Wang
8b50192260 ARM: dts: rockchip: add rk3128-evb-ddr3-v10-linux-spi-nand.dts
Change-Id: Icea0ee43563ff03231711ce51483e957dfdf74b4
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-04-11 18:11:53 +08:00
Wyon Bi
52bc9ad095 arm64: dts: rockchip: rk3588-vehicle-maxim-serdes: Fix pin name
Change-Id: Id47d1a1c478afcf49efc1c94bad0bbae940e3274
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Wyon Bi
5ee4b11f60 pinctrl: max96755f: Fix pin name
All GMSL2 devices have multi-function pins (MFP)
that can be used as general-purpose input and output (GPIO)
pins or for other functionality (e.g., I2C, I2S, SPI, etc.).

Change-Id: Idba149389c134d55a1c51c90fc889f859c064e4c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Wyon Bi
386b6568c0 pinctrl: max96745: Fix pin name
All GMSL2 devices have multi-function pins (MFP)
that can be used as general-purpose input and output (GPIO) pins
or for other functionality (e.g., I2C, I2S, SPI, etc.).

Change-Id: I385593e85a0e52cc1500fd74075d524d178784ce
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2023-04-11 18:10:59 +08:00
Tony Xie
12aecdf275 arm64: dts: rockchip: rk3562: support bus-soc node
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia568587fdbb6c280d6da2e02f7213d60b230546a
2023-04-11 18:08:23 +08:00
Caesar Wang
c67ac18c59 arm64: dts: rockchip: update rk3399-sapphire-excavator-linux.dts
1/ update Copyright

2/ The backlight is for the eDP panel and it has the connector on the
excavator baseboard.

3/ remove cdn_dp

Fixes: 5a2a93f1ee ("arm64: dts: rockchip: move backlight from rk3399 sapphire to excavator")

Change-Id: I513fb62c8f8869a5a6151777c86da3dace362ede
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2023-04-11 18:07:31 +08:00
Simon Xue
2d3757bf81 iio: adc: rockchip_saradc: fix test logic
Change-Id: I2bba10bed0f5ad3b49e4a09f28ad90f3acb0d444
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2023-04-11 17:27:26 +08:00
Yu Qiaowei
8b2a823c47 video: rockchip: rga3: fix resource is not freed in rga_mm_map_phys_addr
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8730b5d16ba3d5e6b67e9c174366e9793bbfd070
2023-04-11 17:05:30 +08:00
Sandy Huang
ad404d2920 drm/rockchip: drv: init gem obj for logo memory
less this commit will lead to null pointer, the follwing log is crash at
linux 5.15 version.

[    2.694917] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000030
[    2.697917] Mem abort info:
[    2.698159]   ESR = 0x96000005
[    2.698426]   EC = 0x25: DABT (current EL), IL = 32 bits
[    2.698896]   SET = 0, FnV = 0
[    2.699170]   EA = 0, S1PTW = 0
[    2.699447]   FSC = 0x05: level 1 translation fault
[    2.699877] Data abort info:
[    2.700129]   ISV = 0, ISS = 0x00000005
[    2.700469]   CM = 0, WnR = 0
[    2.700733] [0000000000000030] user address but active_mm is swapper
[    2.701295] Internal error: Oops: 96000005 [#1] SMP
[    2.701724] Modules linked in:
[    2.701992] CPU: 5 PID: 7 Comm: kworker/u16:0 Tainted: G        W
5.15.0 #1
[    2.702664] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    2.703202] Workqueue: events_unbound deferred_probe_work_func
[    2.703711] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS
BTYPE=--)
[    2.704326] pc : drm_gem_plane_helper_prepare_fb+0x34/0x12c
[    2.704821] lr : drm_gem_plane_helper_prepare_fb+0x30/0x12c
[    2.705310] sp : ffffffc011d23710
...
[    2.711873] Call trace:
[    2.712094]  drm_gem_plane_helper_prepare_fb+0x34/0x12c
[    2.712556]  drm_atomic_helper_prepare_planes+0xf8/0x18c
[    2.713021]  drm_atomic_helper_commit+0x70/0x214
[    2.713429]  drm_atomic_commit+0x50/0x5c
[    2.713781]  rockchip_drm_show_logo+0x1580/0x1988
[    2.714201]  rockchip_drm_bind+0x660/0x770
[    2.714563]  try_to_bring_up_master+0x23c/0x2b0
[    2.714959]  __component_add+0xb8/0x18c
[    2.715302]  component_add+0x18/0x20
[    2.715621]  dw_dp_probe+0x654/0x660
[    2.715943]  platform_probe+0xa8/0xd0

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I7e6b162d5fb093c4a1f2551a01401c6cfba423f5
2023-04-10 15:30:21 +08:00
Zhang Yubing
b4b55361d6 phy: rockchip: phy-rockchip-typec: set phy default mode as usb
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Iacc843ea86e1c63c54c85b8949682b1b8c708559
2023-04-10 14:33:56 +08:00
LongChang Ma
065ceb71a8 media: rockchip: isp: fixed framerate ctl invalid issue
When set framerate from small one to big one, will lead to discard
all frame because the is_diacard flag is not reset to "false" in the
change.

Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
Change-Id: I7197d40ec0053c7dad7f2c088d77f7493626ea90
2023-04-10 14:31:57 +08:00
Wang Xiaobin
d8568b8087 ARM: dts: rockchip: rv1106g-evb2-v10: wifi add host_wake_irq
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I99a23e77340f3d51d357ad85a951596e2210392c
2023-04-10 14:31:05 +08:00
Sugar Zhang
eff4833be1 ASoC: hdmi-codec: Fix "ELD Bypass Switch"
CA info should be ignored in the ELD Bypass Situation.

Fixes: c6c61f8679 ("ASoC: hdmi-codec: Add option for ELD bypass")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I02265570ebcf4d17558b604644dcf5e9425f06cb
2023-04-07 19:44:08 +08:00
Zefa Chen
44484c9fcf media: i2c: sensor_adapter fixes error of ioctl miss break
Fixes: 0bd81e611e ("media: i2c: sensor adapter add ioctl RKMODULE_SET_SENSOR_INFOS")
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iba17ca89821dece817b32019ee3e20c1859b6564
2023-04-07 19:42:50 +08:00
Damon Ding
2cd49534fc drm/rockchip: tve: add support for parsing vdac_out_current from otp
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I1bfd7535adc36ff77b510a7e735de0bb0ad16c48
2023-04-07 16:20:31 +08:00
Damon Ding
7a94eacc84 arm64: dts: rockchip: rk3528: add test_version/vdac_out_current in otp node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I7dcc214f457874c540a5f110783557b7e84ded8a
2023-04-07 16:20:26 +08:00
Jianwei Fan
6358a02c0c video: rockchip: vehicle: add rk3562 support
Change-Id: I4e2609244e349f7de802f5de42307d8240edd264
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-07 14:24:43 +08:00
Chandler Chen
4bee1c9a00 video: rockchip: mpp: fix rk3036 vdpu soft reset issue
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I38b3beaf0e6bcc5ef0e63614eb8c5c27fa37a1ca
2023-04-07 14:16:56 +08:00
William Wu
c3239eb297 phy: rockchip: inno-usb2: Fix mismatch id interrupt
Test on RK3588S Tablet, set the power supply of logic on
and set the power supply of usb2 phy off during deep sleep,
then the id falling edge interrupt will be triggered after
system resume, and kernel panic with the following log:

SError Interrupt on CPU0, code 0xbe000011 -- SError
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
pc : _raw_spin_unlock_irqrestore+0x28/0x60
lr : regmap_unlock_spinlock+0x18/0x28
......
Kernel panic - not syncing: Asynchronous SError Interrupt
CPU: 0 PID: 1946 Comm: kworker/0:0 Not tainted 5.10.110 #600
Hardware name: Rockchip RK3588S TABLET RK806 SINGLE Board (DT)
Workqueue: events rockchip_usb2phy_otg_sm_work
Call trace:
 dump_backtrace+0x0/0x1c8
 show_stack+0x1c/0x2c
 dump_stack_lvl+0xdc/0x12c
 dump_stack+0x1c/0x64
 panic+0x150/0x3a4
 test_taint+0x0/0x30
 arm64_serror_panic+0x78/0x84
 do_serror+0xe0/0x100
 el1_error+0x94/0x118
 _raw_spin_unlock_irqrestore+0x28/0x60
 regmap_unlock_spinlock+0x18/0x28
 regmap_write+0x68/0x84
 rockchip_usb2phy_power_on+0x128/0x1f0
 rockchip_usb2phy_otg_sm_work+0x1d0/0x454
 process_one_work+0x1f4/0x490
 worker_thread+0x278/0x4dc
 kthread+0x13c/0x344
 ret_from_fork+0x10/0x30

In fact, there are two issues here.
1. The power of phy id belongs to the usb2 phy power supply.
And the id is pulled up to high level by default. So if we
power off usb2 phy supply during deep sleep, the id status
will fall to low level and trigger the falling edge interrupt.
In the id irq handler rockchip_usb2phy_id_irq(), it send Host
notification only depends the id falling edge irq status, it's
not enough in this case, it needs to check the iddig status
to make sure that the id status is indeed in low level.

2. For RK3588S, the pipe phystatus select register from the
usb grf, and the power domain of usb grf belongs to PD_USB.
So we must make sure the PD_USB is on when operate the pipe
phystatus select register. Originally, we operated the pipe
phystatus register in the phy ops of power_on, because we
expected that the phy ops of power_on called from the dwc3
controller pm runtime resume process which can power on the
PD_USB. However, in this test case, if the id falling edge
interrupt after system resume, the phy ops of power_on can
be called when PD_USB is off.

The call stack:
 rockchip_usb2phy_id_irq()
    -> send Host notification ->
 rockchip_otg_event()
    -> receive notification and schedule otg_sm_work ->
 rockchip_usb2phy_otg_sm_work()
    -> detect EXTCON_USB_HOST is set and call phy power_on ops
 rockchip_usb2phy_power_on()
    -> set the pipe phystatus select register

Change-Id: Ib7e5bc095ab1df2ca4c983d58a9f15720f0cccb9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2023-04-07 14:16:20 +08:00
Chandler Chen
9ea7c790e7 video: rockchip: mpp: rkvdec2_link: modify task isr
fix task timeout not proc issue

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I76c246595ccfcc1d855e4ed3f2043f7a013ad005
2023-04-07 14:15:39 +08:00
Zhichao Yu
4b50d2f038 media: i2c: gc4653: fix image corruption when switch sensor flip/mirror
The configuration of flip/mirror would take effect in the half of frame,
which cause frame corruption. To make sure the flip/mirror configuration
is took effect in the next frame, we should enable register frame buffer
on gc4653.

Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: Ibf85eb46d7c22785a820bcf781bd3e96a3455f00
2023-04-06 21:26:53 +08:00
Jianwei Fan
aaf9c163ea arm64: dts: rockchip: rk3562-evb2: add fast image reverse support
Change-Id: Ic240f2680e221aaadf40303d3367fcf604e03100
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-04-06 18:31:51 +08:00
Cai YiWei
d297b6606c media: rockchip: isp: version to v2.2.1
Change-Id: I0a14c0eb03337658812e63b325b4639105d86db3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-04-06 16:55:13 +08:00