Commit Graph

1087184 Commits

Author SHA1 Message Date
Cai YiWei
e0a6d5fa86 media: rockchip: isp: support 8k for isp32 lite
Change-Id: I2ebd5bff4be4b646564a874ce801cc8c9bf261e1
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-21 12:13:39 +08:00
Cai YiWei
6c66737840 media: rockchip: isp: fix isp32 lite frame buffer data read
Change-Id: I1e8e19185bce2800a0aee2a1623b204adb07355d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-21 10:25:17 +08:00
Cai YiWei
e84d9bd50a media: rockchip: isp: add ioctl to get bay3d buf
Change-Id: Id65390eab9f1dc2d64405def56e854078ceba037
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-21 10:25:17 +08:00
Cai YiWei
c4c06227b0 media: rockchip: isp: add RKISP_CMD_SET_TB_HEAD_V32 API
Change-Id: I07ae10d69ae977ff5932c377e24eefbd48387946
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-21 10:25:17 +08:00
Liang Chen
25c456719d clk: rockchip: rv1106: optimize calibrate step for cru pvtpll
The frequency of pvtpll may unstable when calibrate, if the step
is too small, it will stride a too big length and adjust back
again, that is bad.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I96227b37cde45ae86df68777da8f32467f8926e6
2024-02-21 10:19:27 +08:00
Liang Chen
f3fcf22888 ARM: rockchip: rv1106_pm: optimize pvtpll save/restore process flow
Pvtpll length must configure before enable pvtpll, otherwise pvtpll
may output wrong frequency.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I432d10b53bf5853c724fb9e4e54256a3dd3e146b
2024-02-21 10:19:16 +08:00
Samuel Holland
8d3794f358 UPSTREAM: gpio: rockchip: Reset int_bothedge when changing trigger
With v2 hardware, an IRQ can be configured to trigger on both edges via
a bit in the int_bothedge register. Currently, the driver sets this bit
when changing the trigger type to IRQ_TYPE_EDGE_BOTH, but fails to reset
this bit if the trigger type is later changed to something else. This
causes spurious IRQs, and when using gpio-keys with wakeup-event-action
set to EV_ACT_(DE)ASSERTED, those IRQs translate into spurious wakeups.

Fixes: 3bcbd1a85b ("gpio/rockchip: support next version gpio controller")
Reported-by: Guillaume Savaton <guillaume@baierouge.fr>
Tested-by: Guillaume Savaton <guillaume@baierouge.fr>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
(cherry picked from commit 7920af5c82)
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I8b4645a81e553957a77cca84e4152f1e38dd1852
2024-02-20 15:16:59 +08:00
Zhihua Wang
d55e030c51 ARM: dts: rockchip: rv1106-evb-dual-cam add sc530ai
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: Ia073eb82e135466844e6474883f4b0f70aeacbf0
2024-02-19 09:28:11 +08:00
Cai YiWei
f938361535 media: rockchip: isp: fix mp wrap buf from rockit no output
Change-Id: I88fa7707ce8a67846951c0fc6287f81d8c3719ee
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-18 14:07:29 +08:00
wei.luo
4122e58de9 mfd: display-serdes: fix building error
Fixes: c60873aaf6 ("mfd: display-serdes: add error detection and recovery function")
Signed-off-by: Luo wei <lw@rock-chips.com>
Change-Id: Idcafd226b6e338f6c6180f61212ac7a09d8081b7
2024-02-18 10:07:13 +08:00
Huang zhibao
5fe35955d7 input: rockchip_pwm_remotectl: add pwm v4 support
Change-Id: I40d1571c3285165683845df8c48fe45d7fcac01d
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
2024-02-07 16:00:59 +08:00
Zhibin Huang
ae97b71b7a misc: rk628: optimize input and output mode information
1. Fixed the issue where the log displays input and output mode
information abnormally in some scenarios.
2. The input and output mode information of log and summary are
obtained from the same function to facilitate later maintenance.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: dmesg | grep "rk628.*input_mode.*output_mode"
      cat /sys/kernel/debug/rk628/2-0050/summary

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I9c4549d1673417701dc929432b96fa802632e63c
2024-02-07 15:23:21 +08:00
Zhibin Huang
379dfa4350 ARM: dts: rockchip: rk3036-evb1-ddr3-v10: unify the rk628 node name of interface in dts
Type: Fix
Redmine ID: N/A
Associated modifications: https://10.10.10.29/c/rk/kernel/+/210058
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: Ic650b9ddda9f9202e430f7459ee86f0b73fac479
2024-02-07 15:22:25 +08:00
Zhibin Huang
25aeddc516 arm64: dts: rockchip: rk3568-evb-rk628: unify the node name of interface in dts
Type: N/A
Redmine ID: N/A
Associated modifications: https://10.10.10.29/c/rk/kernel/+/210058
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I6e11cb752ca57f3a34678cbf44379d3be3b47985
2024-02-07 15:20:58 +08:00
Zhibin Huang
a8d4e9553d misc: rk628: unify the node name of interface in dts
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I59a56b3def8f20121cb9bf53b65fc5ef3bdad6e7
2024-02-07 15:19:45 +08:00
Jianwei Fan
edbfad5e86 media: i2c: rk628: add suspend and resume support
Change-Id: I8da6815fe9f95d7e29e7dd0fad186e2dbbc35b42
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-02-07 10:20:32 +08:00
Yandong Lin
bed6817b76 video: rockchip: mpp: fix get drv data type err
Fix issue that he drvdata obtained through dev_get_drvdata
does not match the converted type.

Change-Id: I4f5835c2fed609714ac6cb94197ca84a489a3d23
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-02-07 09:48:25 +08:00
Finley Xiao
079fa67494 soc: rockchip: ipa: Avoid NULL pointer when get static power
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5804b89c205d1d31cd933769bf4e41081d7625c5
2024-02-06 18:56:52 +08:00
Jianwei Fan
cd80332fad media: rockchip: vicap update frame buffer with real frame phase when work with multi_dev combine to one
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ice0b4671955ceeede83c3496b741ae81d73602d9
2024-02-06 18:09:25 +08:00
Felix Zeng
4a35fccb35 driver: rknpu: Update rknpu driver, version: 0.9.4
Signed-off-by: Felix Zeng <felix.zeng@rock-chips.com>
Change-Id: Ibeaacee69a264b716e636c6397aa9a49068bd8cf
2024-02-06 16:51:20 +08:00
Yandong Lin
caeb85ae6f video: rockchip: mpp: fix rockchip_ipa_get_static_power crash
When echo userspace > /sys/class/devfreq/ffbb0000.rkvenc/governor,the
devfreq->data will be reassign to userspace data.
So cannot get struct rkvenc_dev *enc by devfreq->data.

[<b040f41c>] (rockchip_ipa_get_static_power) from [<b078fbdc>] (devfreq_cooling_get_requested_power+0x140/0x150)
[<b078fbdc>] (devfreq_cooling_get_requested_power) from [<b078e578>] (power_allocator_throttle+0x224/0x8b0)
[<b078e578>] (power_allocator_throttle) from [<b078a5ac>] (handle_thermal_trip+0xb0/0x1c8)
[<b078a5ac>] (handle_thermal_trip) from [<b078a738>] (thermal_zone_device_update.part.3+0x70/0xc4)
[<b078a738>] (thermal_zone_device_update.part.3) from [<b013d2b4>] (process_one_work+0x1f0/0x408)
[<b013d2b4>] (process_one_work) from [<b013df8c>] (worker_thread+0x30/0x564)
[<b013df8c>] (worker_thread) from [<b0142f04>] (kthread+0x160/0x190)
[<b0142f04>] (kthread) from [<b01010d8>] (ret_from_fork+0x14/0x3c)

Change-Id: I46977c8dd23d2fc286afa0ae8b87aea1cb0be0d7
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-02-06 15:34:27 +08:00
Liang Chen
02685e262a clk: rockchip: rv1106: use system_freezable_wq for pvtpll_calibrate_work
1. Do not freeze pvtpll_calibrate_work when calibration is processing,
otherwise the rate of pvtpll maybe wrong.
2. Set the delay to 300ms.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I67bef5663d4cc5bf838f5db0d02b643105d25be6
2024-02-06 15:29:20 +08:00
Weiwen Chen
3b699aa2b7 ARM: configs: rockchip: Update rv1106-recovery.config
Update by:
    make ARCH=arm rv1106_defconfig
    cp .config rv1106.config
    make ARCH=arm rv1106_defconfig rv1106-recovery.config
    ./scripts/diffconfig -m rv1106.config .config > arch/arm/configs/rv1106-recovery.config

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I09929ea0c47ef543cbdfd74bee240699989b7eae
2024-02-06 15:23:20 +08:00
Yandong Lin
6d575115ec video: rockchip: mpp: fix last slice fifo with 0 slice len issue
Change-Id: Ibfdc65d43dddba86374e5c44a2e6fc3ddcca6283
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-02-06 09:26:45 +08:00
Wangqiang Guo
b65bb3bb00 media: i2c: rk628: add private interface, compatible with hdmirx.
Change-Id: I737dcb068bc830baccb932d985bdbede56b5d490
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2024-02-05 18:28:07 +08:00
Chen Shunqing
f1132b51ff media: i2c: rk628: fix display error caused by read resolution error
Type: Fix
Redmine ID: #461216
Associated modifications: N/A
Test: plugin and plugout the HDMI cable.

Change-Id: Id2be68bc74aa22e8f731f4800c5f22fc6fc8f342
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-02-05 17:45:23 +08:00
Chen Shunqing
fb7e8f94dc media: i2c: rk628: fix display error in plugout
Type: Fix
Redmine ID: #461174
Associated modifications: N/A
Test: plugin and plugout the HDMI cable.

Change-Id: Ib4c23b2cb98f782cafe0704e9e9ad22a3448dbfa
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-02-05 17:11:32 +08:00
Luo Wei
c60873aaf6 mfd: display-serdes: add error detection and recovery function
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I5cf255819541e296e23834e4dc1f5b1fa204c0e6
2024-02-05 09:37:19 +08:00
Damon Ding
4a94d0c5a9 arm64: dts: rockchip: rk3568-evb: add edp display board
One eDP panel module, which named 7.86'' Mercury, supports
1536x2048p60 with 4 lanes.

Change-Id: I2e46d5dce2f18d7be905ba35549132a086587109
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-02-04 20:27:51 +08:00
Jianwei Fan
18b5807697 media: i2c: lt6911c: add lt6911c HDMI to MIPI-CSI2 bridge driver
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I1cce568db23a791291d06fcad096ece9e75047d4
2024-02-04 20:26:25 +08:00
Wangqiang Guo
28d832ed84 arm64: dts: rockchip: rk3588-evb: reserve more CMA memory for HDMIRX.
HDMI-IN app require up to 5 buffers, about 118M.
The system may borrows some CMA memory cause errors.
Add more CMA memory to avoid problems.

Change-Id: Ifa03edef13604fc8ca1d26cd00f7fe4fce81b6da
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2024-02-04 20:19:52 +08:00
Ye Zhang
2db9f54300 thermal: rockchip: Round up code in rk_tsadcv2_temp_to_code
rk_tsadcv2_temp_to_code rounds down, so the temperature that triggers the
high temperature interrupt may be lower than the temperature we configured
in dts. Therefore, it may not be possible to update the trip when the high
temperature interrupt occurs, resulting in continuous interruptions.

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I84511a612421b42a130c938b4573bddb6156dff6
2024-02-04 20:07:11 +08:00
Jianwei Fan
270a72866c media: i2c: rk628: add signal lost event report
Change-Id: I0cc2f643486ef3eebd3503d71e1aa5fdadaef0c2
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-02-04 20:03:33 +08:00
Jianwei Fan
ecb7340491 video: rockchip: vehicle: fix errors of get cif rst and irq
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ib84dbf242bb6611ed1ccbacf1b66e7ba23861cca
2024-02-04 20:02:29 +08:00
Cai YiWei
b2cdfdd52a media: rockchip: isp: fix isp32 bp min output
Change-Id: Ic711a9b668cc6f832d4752700e63db54a50ed594
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-02-04 20:00:53 +08:00
Lin Jinhan
ad8ec7ddd0 crypto: rockchip: cryptodev: cipher support multithreading
Only HASH multithreading is restricted by the hardware. Therefore,
cipher removes the restriction on multithreading.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I8ec0cb31cd51e6acfa5582cd7778d6482674f1de
2024-02-04 19:40:09 +08:00
Lin Jinhan
3258128cd9 crypto: rockchip: cryptodev: add akcipher_request_set_callback for rsa
Missing akcipher_request_set_callback will cause a process exception
 when rsa works in asynchronous mode.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I99d3ffde471269528f42869d052004a25a6c14b0
2024-02-04 19:40:09 +08:00
Zefa Chen
497d03d9a2 media: rockchip: vicap fixes dma_en logic err with constrant electricity and readback mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I39c407234d07803f5880ed378f05814e510b528b
2024-02-04 17:18:58 +08:00
Zheng Zhiqi
f792fcee7d ASoC: rockchip-spi-codec: fix kctonrol mute case crash
fix kcontrol mute case crash, tested by `dumpsys car_service inject-vhal-event 289475072 1,0`.

[  136.260357][  T632] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
[  136.262328][  T632] Mem abort info:
[  136.264924][  T632]   ESR = 0x96000005
[  136.265362][  T632]   EC = 0x25: DABT (current EL), IL = 32 bits
[  136.266072][  T632]   SET = 0, FnV = 0
[  136.266406][  T632]   EA = 0, S1PTW = 0
[  136.266772][  T632] Data abort info:
[  136.267094][  T632]   ISV = 0, ISS = 0x00000005
[  136.267518][  T632]   CM = 0, WnR = 0
[  136.267853][  T632] user pgtable: 4k pages, 39-bit VAs, pgdp=000000012871b000
[  136.268492][  T632] [0000000000000010] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[  136.269342][  T632] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[  136.269899][  T632] Modules linked in: ahci_platform libahci_platform himax_mmi ohci_platform ili210x ohci_hcd
[  136.270788][  T632] CPU: 2 PID: 632 Comm: android.hardwar Not tainted 5.10.198 #46
[  136.271453][  T632] Hardware name: Rockchip RK3588 VEHICLE EVB V22 Board (DT)
[  136.272077][  T632] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
[  136.272673][  T632] pc : spi_codec_ext_ch_mute_put+0x14/0x40
[  136.273178][  T632] lr : snd_ctl_elem_write+0x128/0x16c
[  136.273636][  T632] sp : ffffffc00e44bc10
[  136.273987][  T632] x29: ffffffc00e44bc10 x28: ffffff811e293900
[  136.274514][  T632] x27: 0000000000000000 x26: 0000000000000000
[  136.275040][  T632] x25: 0000000000000000 x24: ffffff81006024a0
[  136.275566][  T632] x23: ffffff8100602000 x22: 00000000c4c85513
[  136.276092][  T632] x21: ffffff8110838b00 x20: ffffff811cf0f000
[  136.276618][  T632] x19: ffffff8100602000 x18: ffffffc00dc45040
[  136.277144][  T632] x17: 0000000020000000 x16: 0000000000000001
[  136.277669][  T632] x15: 0000000000000000 x14: 000000020000001a
[  136.278195][  T632] x13: 754d206b63616279 x12: 0000000000000000
[  136.278722][  T632] x11: 0000000000006574 x10: 0000000000000000
[  136.279249][  T632] x9 : 0000000000000004 x8 : ffffff81038eb000
[  136.279781][  T632] x7 : 0000000000000000 x6 : ffffff811cf0f4c8
[  136.280311][  T632] x5 : ffffff811cf0f4c8 x4 : 0000000000000000
[  136.280840][  T632] x3 : 0000000000000000 x2 : ffffff811cf0f000
[  136.281367][  T632] x1 : ffffff811cf0f000 x0 : ffffff8107260c00
[  136.281894][  T632] Call trace:
[  136.282184][  T632]  spi_codec_ext_ch_mute_put+0x14/0x40
[  136.282655][  T632]  snd_ctl_elem_write+0x128/0x16c
[  136.283083][  T632]  snd_ctl_ioctl+0x7dc/0xb48
[  136.283479][  T632]  __arm64_sys_ioctl+0x90/0xc8
[  136.283888][  T632]  el0_svc_common+0xac/0x1ac
[  136.284283][  T632]  do_el0_svc+0x1c/0x28
[  136.284637][  T632]  el0_svc+0x10/0x1c
[  136.284968][  T632]  el0_sync_handler+0x68/0xac
[  136.285374][  T632]  el0_sync+0x164/0x180

Change-Id: I35ec1fb0974b8dd9b58bd6d8b2b362a414cb4cd7
Signed-off-by: Zheng Zhiqi <looper.zheng@rock-chips.com>
2024-02-04 14:38:46 +08:00
Wu Liangqing
f4895714f4 arm64: dts: rockchip: rk3588-evb7-v11-imx415: remove cam_ircut0
cam_ircut0 ircut-open-gpios reused by typec

Change-Id: Iac2f8f104175df7ff5c12b31c8215df837ce1aa2
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2024-02-04 01:46:51 +00:00
Jon Lin
d611ab7d40 mtd: spinand: skyhigh: Fix devices information
1.The wrong QE bits will make a redundant write in status register.
2.The EBH dummy is 8 bytes, but we use 6BH cmd only.

Change-Id: I6a19500340ab299f22f6e394e59a28430c6493a5
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-02-01 18:28:38 +08:00
Zefa Chen
661fb29e15 media: rockchip: vicap distinguish different interlace mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I38ed270d9b063df3c5f572f2fba268c8f7d84091
2024-02-01 16:52:22 +08:00
Zefa Chen
1fc0f88577 media: rockchip: vicap: mipi interlaced capture support correct frame sequence
correct by frame num witch get from mipi fs/fe short packet,
this function need rk356x and later chips to support

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I62d0dda18dbde45c7a161fdf7a85fd6219c90a31
2024-02-01 16:52:22 +08:00
Finley Xiao
d12fe16c94 clk: rockchip: px30: Make usb480m critical
Gpu 480M is from usb480m and the source clocks should be always on
if change gpu frequency after power off pd.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I1e02ca7d0408a42f65240cf0b33d11eaeb6f85b6
2024-02-01 16:51:59 +08:00
Cai YiWei
0d60f4f738 media: rockchip: isp: fix isp32 mp buf cfg
fix commit e601ffeb04 ("media: rockchip: isp: dvbm buf support from rockit")

Change-Id: I0ff6f7842cd7ac4dc75245bf72866d94f106f34c
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-01-31 16:12:04 +08:00
Xiao Ya peng
68e806406c arm64: configs: add rk3308_rkpartybox.config
Change-Id: I99a98e338466abfaf98e80b52b36f4772676d420
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
2024-01-30 19:03:50 +08:00
Lan Honglin
28a7162d47 media: i2c: add sc831ai sensor driver
Change-Id: Ia2ceeb8fcc7f15f9b610583714e3dc03b5e3c8ce
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
2024-01-30 19:02:08 +08:00
Sandy Huang
8ed148210d drm/rockchip: lvds: register sub dev at rockchip lvds driver
At lvds to other display output type product, the connector maybe
register at third party drivers, the sub dev register often be forgot, so we add
sub dev register at rockchip lvds driver.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If075041df8ddb1b269c903d092a6263160eff1db
2024-01-30 18:53:01 +08:00
Sandy Huang
1ebaed6daf drm/rockchip: rgb: register sub dev at rockchip rgb driver
At rgb to other display output type product, the connector maybe register at
third party drivers, the sub dev register often be forgot, so we add sub
dev register at rockchip rgb driver.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3baa051712ac30b63dffa9658df470c12bcb91dc
2024-01-30 18:52:53 +08:00
Finley Xiao
91ce62dbce soc: rockchip: power-domain: Update gate mask for rk3562
The vepu biu clk depends on vi biu clk, add vi gate mask for pd vepu.
The rga biu clk depends on vo biu clk, add vo gate mask for pd rga.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ieaa62a053369e570eb0a11d132fa472c6bd246f4
2024-01-30 18:41:30 +08:00