Commit Graph

1285884 Commits

Author SHA1 Message Date
Sandy Huang
bfbc56cd9b drm/rockchip: vop2: add more color bar mode support
Color bar mode usage instructions:

  Enable horizontal color bar:
      echo 1 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable vertical color bar:
      echo 2 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable horizontal color gradient:
      echo 3 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable vertical color gradient:
      echo 4 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable mutant color:
      echo 5 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable fix black color:
      echo 6 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Enable fix white color:
      echo 7 > /sys/kernel/debug/dri/0/video_port0/color_bar
  Disable color bar:
      echo 0 > /sys/kernel/debug/dri/0/video_port0/color_bar

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I5b1c5b2daf90a009bef4a645bd7ba62503356ddf
2025-09-22 15:57:53 +08:00
Sandy Huang
203c6b02b6 drm/rockchip: vop2: add format covert for cluster
1. The cluster DRM_FORMAT_YUYV refers to fbc YUV422 format, and need
config win data format as h06: YCbCr422;

2. The esamrt DRM_FORMAT_YUYV refers to LINEAR YUYV422 format, and
need config win data format as h08: YVYU422;

3. RK3576 and earlier platforms, for FBC data, only the format
configured in the AFBC register is used. Even if the win format is
incorrectly configured, it does not affect current operations, but
future platforms will rely on this win format, so it must be
configured correctly.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I5b116f226dd2d8f905c79338c03c659156683e20
2025-09-22 15:57:53 +08:00
Sandy Huang
3bc302ffb6 drm/rockchip: vop2: fix null point when win->regs->scl is undefined
some plane can't support scale up/down the win->regs->scl is undefined.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ia103dcd0f2a805cba1ec0acfffe049e617fc5520
2025-09-22 15:57:53 +08:00
Sandy Huang
c1306b1075 drm/rockchip: vop2: add port_extra_en register define
Adding the register definition for port_extra_en can improve compatibility.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0d9dd3ab31662c97e7c7fb870597b192fb2cda75
2025-09-22 15:57:53 +08:00
Sandy Huang
571a6b9a39 drm/rockchip: vop2: add dsp_vcnt register define
Adding the register definition for dsp_vcnt can improve compatibility.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ibd9a181834031fe2fd2d83eb1735b70ec1de3187
2025-09-22 15:57:53 +08:00
Sandy Huang
0d0de0337a drm/rockchip: vop2: get plane max input/output from win data
The win_data structure provides a more accurate way to obtain each
plane’s maximum input and output size.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I11cc40b9886235079d2e03d3a4ef64649bd32659
2025-09-22 15:57:53 +08:00
Sandy Huang
cabb7a51fd drm/rockchip: vop2: split win_alpha_map to alpha_map_en and alpha_map_val
Splitting win_alpha_map into alpha_map_en and alpha_map_val ensures
better compatibility with next SOC.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Idcc62e2201c212bbd4fcb37c6256823301b70af6
2025-09-22 15:57:53 +08:00
Sandy Huang
849999332c drm/rockchip: vop2: move win_alpha_map to vop2_win_regs
It is more reasonable to store win_alpha_map in the vop2_win_regs.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I70979911a3454608f51036322c57bb5b35fe81cb
2025-09-22 15:57:53 +08:00
Sandy Huang
f4f7ebc6d2 drm/rockchip: vop2: add support one esmart layer global alpha for rk3562/rk3528/rk3576
To deal with bottom_layer_global_alpha when only have one esmart layer
at bottom layer. And the cluster global alpha is processed by cluster mix.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I1f5de9774920a37a60d45c77c1f71bc740bbbb7a
2025-09-22 15:57:49 +08:00
Sandy Huang
437e91ca1e drm/rockchip: vop2: add support bg mix for rk3562/rk3528/rk3576
add support layer0 do global or pixel alpha with background layer,
include premulti or nonpremulti pixel alpha.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I67fb6764999098064506de63cddf58e34ab1765f
2025-09-22 15:37:54 +08:00
Sandy Huang
7c2dbdf4cd drm/rockchip: vop2: add support for ARGB1555 alpha map config from userspace
The alpha value is mapped as follows:
    bit[7, 0]: alpha 0 mapping value;
    bit[15,8]: alpha 1 mapping value;
    bit[31]  : alpha map enable.

for example:
    modetest -w 57:alpha_map:2147548928 #0x8000ff00

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib38ee9b578e265cdb7beee66860e21a6dc8598cf
2025-09-22 15:37:53 +08:00
Jianwei Fan
49d4637556 media: i2c: lt8668sx: add signal lost event and stream ctrl
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ib76f757d553f99d6cb0f5a1af66183fe223fb8a2
2025-09-22 06:59:05 +00:00
Jianwei Fan
126dcc1d80 media: i2c: lt7911uxc: add signal lost event report
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I3b73572d1c964365e49bacffbb70f11b26f9e0ec
2025-09-22 06:59:05 +00:00
Jianwei Fan
5057576404 media: i2c: lt6911uxe: fix read timing registers and add int type
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I12e10af455b311c256b3a00de25fdcb081a11e18
2025-09-22 06:59:05 +00:00
Cai YiWei
cce37a2240 media: rockchip: isp: dynamic cropping for isp30 offline
Change-Id: I2e7bd0e52f60e01026270af82356cd277805a432
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-09-22 06:57:16 +00:00
Cai YiWei
f04502af82 media: rockchip: isp: fix 3dlut error for isp39
Change-Id: Ibf42d8817c1fc3fedbae0e170b0d6d2de1106bf5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-09-22 06:57:16 +00:00
Yu Zheng
81341252de media: i2c: imx586 fix link freq err for 3968x2800
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: I524f1879930538934b36702d08a531c75eb3de99
2025-09-22 06:56:44 +00:00
Chen Shunqing
bd94b5aedc media: rockchip: hdmirx: write edid block3_4
Some PC start reading the EDID from block3.

Change-Id: If317bdbd744de44fa5b72bfe6708bb39fae4d1f2
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2025-09-22 14:23:03 +08:00
Yuefu Su
ac0c107b6a ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-400w-spi-nand support
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I9c3b928554f2a83e25c3b135989a4a8770130476
2025-09-19 15:00:42 +08:00
Yuefu Su
31887a1c89 ARM: dts: rockchip: Add rv1126b-thunder-boot-spi-nand support
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I4eb99736e4b5f4cebb5f4033eefec85d1e915437
2025-09-19 15:00:36 +08:00
Xing Zheng
8ee05d07ba soc: rockchip: aoa_middleware: Remove the restriction that DMA count cannot be greater than periods
In AOR mode, the DMA count does not need to correspond
to the AAD frame count, and the maximum DMA count range
can be used, such as 16-bit 0 to 65535 in RV1126B.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Ia5143d788d2c7fb142ffd453e25fbf2aa867348b
2025-09-19 06:06:21 +00:00
Xing Zheng
9c6f4c5898 arm64: dts: rockchip: rv1126b-evb2/4-v10: keeping normal capture order for 4ch capturing
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Id77f790e082327804036497ccdbdcf7f3a0ad822
2025-09-18 12:06:57 +00:00
LongChang Ma
5ae346a6a6 media: i2c: fix sc200ai poweroff issue
Change-Id: I4c7c1871c69a9fb454caae0fd6811a74f5e4ea16
Signed-off-by: LongChang Ma <chad.ma@rock-chips.com>
2025-09-18 08:21:23 +00:00
Zitong Cai
a50711af9b mfd: display-serdes: Add serdes split mode support
Originally, there was no DRM framework to invoke the serdes enablement
process

Change-Id: I5ab31c2f712cf410c1537f5ef2dffbaa015d14ee
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
2025-09-18 08:20:47 +00:00
Yu Zheng
e952ddd906 arm64: configs: add rv1126b-dv.config
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: Ia5604f17469193f18d48c5c05faec269112e8e36
2025-09-18 08:05:39 +00:00
Yandong Lin
d0303d5312 media: rockchip: vpss: Fix chan id for dvbm cfg
Change-Id: I76caa2ddb70d7d6885c823b76b632a75edf636b3
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-09-18 03:33:53 +00:00
shengfei Xu
daec8cfa8e mfd: rk806: adjust the rk806 spi write protocol
To slove the error:
the communication(spi-write) has a half-level problem.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I93af4cb501d9076f5d5d9a0a3605406e2dc4b1c4
2025-09-17 11:48:35 +00:00
Sandy Huang
8683d5aad4 drm/rockchip: gem: remove redundant and unused include
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I01bbc83b3155713a08de2165740d11c33f30d502
2025-09-17 08:33:56 +00:00
Cai YiWei
b373c9a506 media: rockchip: isp: fix isp fast stop no clean state
Change-Id: I131e61e9c13e418ea527e7a5f6bde4b95d1e2ab2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
(cherry picked from commit b76135012db1585faf2c143838b4c67941f15973)
2025-09-17 06:10:10 +00:00
Yuefu Su
3f05ddc63a media: i2c: imx586: fix check sensor id error
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: I124a0134e813ea5a1b725d345ab9dc14cabedad7
2025-09-16 17:38:04 +08:00
Yuefu Su
376f0eeffa media: i2c: camera: Add imx582 sensor driver
Signed-off-by: Yuefu Su <yuefu.su@rock-chips.com>
Change-Id: Iab806c9602c5edfcae7173bcb2d27533a06a4897
2025-09-16 17:38:02 +08:00
Weiwen Chen
70afeb966c arm64: dts: rockchip: rv1126b: enable fiq default
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I96fa6f66b79c7185302038140b594e3ffc4406e9
2025-09-16 09:50:22 +08:00
Leo Sun
9661110e0f ARM: dts: rockchip: add rv1126b-evb2-v12-aov-dual-cam-spi-nor.dts
Change-Id: I2f9f2238f1b703baf2df53957a82c8b7ce63a878
Signed-off-by: Leo Sun <leo.sun@rock-chips.com>
2025-09-15 10:19:10 +00:00
ZhengRong Ruan
777592f614 arm64: dts: rockchip: rv1126b-evb2-v12-fastboot-emmc.dts fixed quote errors
Signed-off-by: ZhengRong Ruan <ryan.ruan@rock-chips.com>
Change-Id: I6f6d87ef77fe0a3421deef0a54dcf1aaf69e49d0
2025-09-15 17:54:48 +08:00
Leo Sun
61bed7a074 ARM: dts: rockchip: update include path for rv1126b-evb2-v12-aov-dual-cam
Change-Id: I9c205e3c63f815ee5a6e41b373aec6e4d0c3cf4a
Signed-off-by: Leo Sun <leo.sun@rock-chips.com>
2025-09-15 08:42:44 +00:00
Leo Sun
337ff49046 arm64: dts: rockchip: rename rv1126b-evb2-v10-aov-dual-cam to rv1126b-evb2-v12-aov-dual-cam-spi-nor
- Deleted the &rockchip_suspend node and all suspend-related GPIO/IO
configurations to clean up the device tree.

- Simplified and consolidated the include statements to only reference
rv1126b-evb2-v10.dts.

Change-Id: Ic0e0afdb58ae6868896fca6544939396d04cd9f7
Signed-off-by: Leo Sun <leo.sun@rock-chips.com>
2025-09-15 08:41:56 +00:00
Leo Sun
da04991f0d arm64: dts: rockchip: add rv1126b-evb2-v12-aov-dual-cam dts
Change-Id: Idf88ab120300911200567a13ead80a9c38658fce
Signed-off-by: Leo Sun <leo.sun@rock-chips.com>
2025-09-15 08:40:59 +00:00
Haoran Han
0db4dfdeff media: i2c: max96756: Remove inappropriate function additions in kernel 5.10 version
Change-Id: I48d18c8ed6833a86798f8e647fb5da735f3b18e0
Signed-off-by: Haoran Han <haoran.han@rock-chips.com>
2025-09-12 11:30:47 +00:00
Sugar Zhang
640c4f6115 ASoC: rockchip: spdif: Add support for non-pcm switch
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iff38282013c02ba312ff5f8093fd762c358bdc37
2025-09-12 11:13:01 +00:00
Liang Chen
9cb4d07e13 arm64: dts: rockchip: rk3568j: add overdrive opps for cpu/npu/gpu
Disable overdrive opps by default, and enable them in board dts if
use overdrive mode.

Change-Id: I6db9bd54b727aa3723a2cf46e1b5bd40bdeca0d9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-09-12 18:59:13 +08:00
Zhang Yubing
87332bdb1a drm/rockchip: dp_aux_client: remove unused debugfs.h
Change-Id: I17898572d9782e5043fa00a74ab96723b50ad5c0
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-09-12 10:55:24 +00:00
Frank Wang
f5281345b1 phy: rockchip: inno-usb2: Fix the controller's failure to set host mode
In USB Type-A ports with non-permanent VBUS power, switching mode from
device to host via debugfs API would cause the controller to briefly
enter host then revert to device. This happens because PHY sends an
extcon message while EXTCON_USB_HOST remains false, so set
EXTCON_USB_HOST to true during the mode-setting process to fix it.

Serial logs show the following when debug is enabled in the PHY driver:

[  110.130678s][  T197]Workqueue: events rockchip_usb2phy_otg_sm_work
[  110.130682s][  T197]Call trace:
[  110.130688s][  T197] dump_backtrace+0x0/0x1dc
[  110.130693s][  T197] show_stack+0x18/0x24
[  110.130698s][  T197] dump_stack_lvl+0xe4/0x12c
[  110.130701s][  T197] dump_stack+0x18/0x3c
[  110.130705s][  T197] rockchip_usb2phy_otg_sm_work+0x40/0x5ec
[  110.130709s][  T197] process_one_work+0x22c/0x510
[  110.130712s][  T197] worker_thread+0x280/0x4ec
[  110.130716s][  T197] kthread+0x138/0x200
[  110.130720s][  T197] ret_from_fork+0x10/0x18
[  110.130727s][  T197]phy phy-fd5d0000.syscon:usb2-phy@0.0: b_peripheral otg sm work
[  110.130731s][  T197]phy phy-fd5d0000.syscon:usb2-phy@0.0: usb otg host connect
[  110.130736s][  T197]phy phy-fd5d0000.syscon:usb2-phy@0.0: extcon set cable(7) as 0
[  110.130817s][  T197]phy phy-fd5d0000.syscon:usb2-phy@0.0: extcon set cable(1) as 0
[  110.130834s][  T197]CPU: 6 PID: 197 Comm: kworker/6:3 VIP: 00 Tainted: G        W         5.10.226 #1
[  110.130837s][  T197]Hardware name: CDC710_SOCA_VA_BOM9_M_001_FACTORY (DT)
[  110.130841s][  T197]Workqueue: events rockchip_usb2phy_otg_sm_work
[  110.130845s][  T197]Call trace:
[  110.130848s][  T197] dump_backtrace+0x0/0x1dc
[  110.130853s][  T197] show_stack+0x18/0x24
[  110.130856s][  T197] dump_stack_lvl+0xe4/0x12c
[  110.130859s][  T197] dump_stack+0x18/0x3c
[  110.130864s][  T197] dwc3_set_mode+0x20/0x7c
[  110.130869s][  T197] dwc3_drd_notifier+0x68/0x7c
[  110.130873s][  T197] raw_notifier_call_chain+0x40/0x6c
[  110.130878s][  T197] extcon_sync+0x124/0x2e0
[  110.130882s][  T197] rockchip_usb2phy_otg_sm_work+0x480/0x5ec
[  110.130886s][  T197] process_one_work+0x22c/0x510
[  110.130889s][  T197] worker_thread+0x280/0x4ec
[  110.130893s][  T197] kthread+0x138/0x200
[  110.130896s][  T197] ret_from_fork+0x10/0x18
[  110.130920s][  T197]CPU: 6 PID: 197 Comm: kworker/6:3 VIP: 00 Tainted: G        W         5.10.226 #1
[  110.130923s][  T197]Hardware name: CDC710_SOCA_VA_BOM9_M_001_FACTORY (DT)
[  110.130926s][  T197]Workqueue: events_freezable __dwc3_set_mode
[  110.130930s][  T197]Call trace:
[  110.130934s][  T197] dump_backtrace+0x0/0x1dc
[  110.130938s][  T197] show_stack+0x18/0x24
[  110.130941s][  T197] dump_stack_lvl+0xe4/0x12c
[  110.130944s][  T197] dump_stack+0x18/0x3c
[  110.130947s][  T197] __dwc3_set_mode+0x2c/0xb54
[  110.130951s][  T197] process_one_work+0x22c/0x510
[  110.130954s][  T197] worker_thread+0x280/0x4ec
[  110.130958s][  T197] kthread+0x138/0x200
[  110.130962s][  T197] ret_from_fork+0x10/0x18
[  110.130971s][  T197]dwc->desired_role_sw_mode = 0
[  110.130974s][  T197]dwc->current_role_sw_mode = 1
[  110.131024s][  T197]xhci-hcd xhci-hcd.10.auto: remove, state 4
[  110.131028s][  T197]xhci-hcd xhci-hcd.10.auto: roothub graceful disconnect
[  110.131035s][  T197]usb usb4: USB disconnect, device number 1

Change-Id: I7b0a2f8161eb52fd145f145f398586526ab1006b
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2025-09-12 18:07:40 +08:00
Chaoyi Chen
fd6109c5f8 drm/rockchip: vop2: Change gt2/gt4 scale rate for rk3576 cluster win
When using the ZME algorithm for scaling, the scaling config needs to
be adjusted to ensure performance:

If plane height >= half of display height:
- Use gt4 when down-scaling ratio > 8×
- Use gt2 when down-scaling ratio > 4×

Otherwise:
- Use gt4 when down-scaling ratio > 6×
- Use gt2 when down-scaling ratio > 3×

Change-Id: I50ce653134dc697d64134ce7aa8f98a2d0e8262b
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-09-12 08:34:42 +00:00
Xiao Yao
0aa0a5e9dc arm64: dts: rockchip: rv1126b-evb1: enable rtc-32k for sdiowifi
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
Change-Id: Ib10fc729d13f63929d266f33087d6f8e48b0ecd0
2025-09-12 02:09:38 +00:00
Zhong Shengquan
89360f8db2 ASoC: rockchip: spdifrx: fix issue where reset causes underrun in app
When sample rate changes, a reset operation is performed, and another
reset occurs after debouncing. This results in less data being read
by upper layer, thus triggering an underrun condition.

Therefore, remove reset operation in rk_spdifrx_trigger. Meanwhile,
when sample rate changes, ​​disable dma enable​​, and after debouncing
completes, notify upper layer via stop_xrun to restart​​, then ​​enable
dma to resume data transfer. ​​

Change-Id: Ie112ed83018722d069bd85d181f609c4bf865027
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
2025-09-12 01:34:41 +00:00
Zhong Shengquan
eae70e5ad3 ASoC: rockchip: spdifrx: Update the dynamic detection feature
Add a debounce timer to prevent continuous reporting of SYNC/NSYNC
information during plug-in and unplug operations.

Add the capability to detect non-linear pcm data and sample bit width,
then notify the application layer of the results.

Add a fifo timer to detect real-time data inflow in the rx fifo,
supporting glitch-free sampling rate transitions.

Add a configuration option for the always-on clock feature.

Change-Id: Ifb7bd55e9eefb6e07d00e16de12abff43d7e4d4e
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
2025-09-12 01:34:41 +00:00
Zhong Shengquan
bb3fd4709b ASoC: rockchip: spdifrx: Add sample rate estimation feature
Obtain the transmitter's sample rate through channel status bits,
and use the CDRST register and MCLK to estimate the sample rate.

Notify sync and sample rate information through controls.The control
names are "RK SPDIFRX SYNC STATUS" and "RK SPDIFRX SAMPLE RATE". The
application layer needs to monitor the controls and read the control
values to obtain the information.

For the sync control, 0 indicates an unlocked state, and 1 indicates
a locked state. The sample rate control has two values, the first
represents the sample rate obtained from the channel status, and the
second represents the estimated sample rate.

Change-Id: Ie3b4f009c55d326c4517996efa46e6e2e31c7d65
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
2025-09-12 01:34:41 +00:00
Zou Dengming
d4f0968254 ASoC: rockchip: spdifrx: support 32bit
Change-Id: I51fcef56456449c7e98a68b3aaa37823c8016ff3
Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
2025-09-12 01:34:41 +00:00
Liang Chen
25910335e7 arm64: dts: rockchip: rv1126bj: add opp-table for cpu/npu
Change-Id: I88861dc0c8a223026b9b480a5219c903c0044db4
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-09-12 01:20:33 +00:00
Liang Chen
7c05575673 clk: rockchip: clk-pvtpll: rv1126bj: add pvtpll table for cpu/npu
Change-Id: I958a938f919e7ccb3f01ccef331dff5325d26e9f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-09-12 01:19:41 +00:00