Commit Graph

1280735 Commits

Author SHA1 Message Date
Jason Zhu
240d040e41 ASoC: rockchip: pdm_v2: support new features for rv1126b pdm
1.Support data shift.
2.Move the hpf after cic filter.
3.Separate the gain control.

Change-Id: I092360fad0945084c3b44f3a31be6ee67371755a
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2025-03-27 18:43:41 +08:00
Sugar Zhang
e0d4c336d2 ASoC: rockchip: sai: Add support for slot mask cfg
e.g. mask the right channel for play and rec

dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
dai-tdm-slot-tx-mask = <0 1>;
dai-tdm-slot-rx-mask = <0 1>;

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id359876f47916417ee6be9e607b05b79665cd9bf
2025-03-27 18:43:41 +08:00
Elaine Zhang
6c3b5ec765 rtc: rockchip: add rv1126b rtc
Change-Id: I455581ac1e2d933dd470d081f975ab22741b4e29
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-03-27 18:43:41 +08:00
Sugar Zhang
a5efaae962 dmaengine: rockchip-dma: Use clk_bulk API
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: If69dc1a0df9b4001d7501d9f19e93efdcb7bfb5c
2025-03-27 18:43:41 +08:00
Sugar Zhang
dded1124fe dmaengine: rockchip-dma: Use BIT_ULL helper for dma chan
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ied6b7ea214642ba74c0e39d0a6d37de0739a1105
2025-03-27 18:43:40 +08:00
Sugar Zhang
8eaaad2158 dmaengine: rockchip-dma: Limit the maxburst per buf-depth
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8a6e9f24cd6effc5345a74d698f1c7e92f8becd2
2025-03-27 18:43:40 +08:00
Sugar Zhang
003ad51ebb dmaengine: rockchip-dma: Add support desc addressed in sram
&dmac {
    sram = <&system_sram>;
    iram = <&system_sram>;
};

property 'sram' for desc addressed in sram.
property 'iram' for audio buf in sram.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I0021d971da663cd90c05622f07039bd87725a55b
2025-03-27 18:43:40 +08:00
Sugar Zhang
adeea7a684 dmaengine: rockchip-dma: Add support for RV1126B
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ibb9eae158c6c86ac65a4509b8e86640ffbe06d07
2025-03-27 18:43:40 +08:00
Sugar Zhang
80e7b5d620 ASoC: rockchip: sai: Add support for RV1126B
* Enhance Frame Integrity Robustness
* Support FIFO Interleaved Cfg
* Support Data Debug

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1cff642007e3421b49e602ea900832a0d94c58d1
2025-03-27 18:43:40 +08:00
Elaine Zhang
f5ab8f61cc net: can: rockchip: support canfd for rv1126b
Change-Id: I23925f6199686e7184abb5802cd819b0d6c4b090
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-03-27 18:34:23 +08:00
Finley Xiao
56f63ccba4 thermal: rockchip: Add phy init for rv1126b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I57287dd94425dcb65133033fc02d19404beac609
2025-03-27 16:40:22 +08:00
Ye Zhang
05a960a2c2 thermal: rockchip: Support RV1126B SoC in the thermal driver
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2c21b7a8c4fd7062e43e74445cb9c8b0cd8c6494
2025-03-27 16:40:22 +08:00
Ye Zhang
98abacc735 gpio: rockchip: support GPIO_TYPE_V2_6
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: Iaea19d3c1ee0b53138a2913fcd2b51a58159e732
2025-03-27 16:40:22 +08:00
Ye Zhang
5c4bc56605 pinctrl: rockchip: add rv1126b support
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: Ibb75f7b8f6b9ec72dd73b533e4d1cb0b49bccace
2025-03-27 16:40:22 +08:00
Elaine Zhang
c8d6e2b552 clk: rockchip: Add clock controller for the RV1126B
Add the clock tree definition for the new RV1126B SoC.

Change-Id: Id03fb5d02c59fc2f4a55e0a9b7a98692a049d6bf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-03-27 16:40:22 +08:00
Elaine Zhang
a3d5c8d005 clk: rockchip: add dt-binding header for rv1126b
Add the dt-bindings header for the rv1126b, that gets shared between
the clock controller and the clock references in the dts.
Add softreset ID for rv1126b.

Change-Id: I565399bb3a338453c6f2f3ac5d79775ad2be9481
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-03-27 16:40:22 +08:00
Sugar Zhang
697f6fb846 soc: rockchip: Add RV1126B config
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I95bb691a862f641d1cdeac929e6ec5c94c84e9d8
2025-03-27 14:21:49 +08:00
Algea Cao
fabdf68c81 drm/rockchip: drv: Support parse allm capbility in scds
Change-Id: I3d6e4ccecffe99bfcf4e5ca5e62225dd7210c3dd
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 10:46:25 +00:00
Algea Cao
944abbb10a drm/rockchip: drv: Add struct rockchip_drm_hdmi21_data
All hdmi 2.1 contents in the edid are saved in this
struct.

Change-Id: I2400fb9fe77163667419677ca3f55e88d795d2be
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 10:46:09 +00:00
Algea Cao
7915220fed drm/rockchip: drv: Remove parse_edid_forum_vsdb
The HDMI spec 10.3.2 talks about SCDS, Sink Capability Data
Structure, exposed via HF-VSDB or HF-SCDB. The actual content
of the them is same. So it needs only one parse function.

Change-Id: I61459b6d21d7e0666c1561bb2ad41729e0d00a49
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-26 18:44:38 +08:00
Yu Qiaowei
5f5900c350 video: rockchip: rga3: add RGA3 sys_reg debug log
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I4260ad0729bfdfaaaa0a0844cf8c84b61bf4635b
2025-03-26 10:29:18 +00:00
Yu Qiaowei
3b0e000a6f video: rockchip: rga3: print debug log before check param
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8bcc8f0b79b354e60076d1d1b9991c60e7581dc2
2025-03-26 10:29:07 +00:00
Yu Qiaowei
455fbd6ef9 video: rockchip: rga3: fix typo in win1_param check during RGA3 rotation
Fixes: 0b97d73d8e ("video: rockchip: rga3: fix the wrong check of resolution in RGA3 rotating")

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I27fd66c5ad2aa9ea9ea4495647c6c8aae1e21264
2025-03-26 10:28:59 +00:00
Zefa Chen
9bd09ac33f media: rockchip: vicap: fixes error data type of rgb888 for rk3576
Change-Id: I3fe6c6a4a35247494085d70bb2ab7dfdd1f8fc03
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-03-26 15:08:39 +08:00
Mark Huang
aaa8aa56db arm64: dts: rockchip: rk3576-evb1-v10-projector: add rk628 hdmi2csi config
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: Ib37212736f0a61b0db958b3f56add296dfb1e7bb
2025-03-26 11:54:18 +08:00
Mark Huang
53854c082b arm64: dts: rockchip: Add rk3576 evb1 v10 projector board
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I108c84755ce4ce9f1472d9e86ca2c771e5f857c4
(cherry picked from commit ca6f21b740)
2025-03-26 10:23:05 +08:00
Shunhua Lan
f4718c6fd1 ASoC: codecs: Add driver for codec es8390
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Ibac594e504b82a515f355f37ca9dd3e8d308b630
2025-03-25 11:36:02 +00:00
Shunhua Lan
1136fd6608 media: i2c: rk628: fix g_volatile_ctrl return value
g_volatile_ctrl should return 0 if no error

Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I8f9d338a0a0421ba65940a0275d1f4378bc31504
2025-03-25 11:34:21 +00:00
Zhang Yubing
fc8a056676 drm/rockchip: vop2: get the real dclk parent
When assign the vp dclk parent as hdmi phy pll in dts. The
vp dclk parent should get by clk_get_parent. The vp.dclk_parent
is not the real parent.

Change-Id: I4b1ba1e1b46e2f5db323069402c4b322ba4a836f
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-03-25 06:52:25 +00:00
Algea Cao
f9e84f307a drm/bridge: synopsys: dw-hdmi-qp: Enable dsc according to actual situation
1.Determine whether to enable dsc based on the current resolution
and color format.

2.Determine the dsc format of the output according to the
capability of sink.

Change-Id: If7a1c88ea1b6ec0208c9dc9d91a56376ff656707
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-24 17:37:25 +08:00
Algea Cao
d1f66b40c0 drm/rockchip: vop2: Support hdmi dsc bpp below 9
When the dsc bpp is less than 9, hdmi output will flash on TV.
It is speculated that the reason is that pixel rate of sink
decoding is not enough.

Taking 8bpp as an example, dsc clk needs to be 1/3 of the input
clk.the theoretical calculation of DEN compression 1/3, at this
time, the clk of vop dsc to hdmi tx can be reduced to about 260M
to meet the 8bpp transmission.

RK3588 dsc clk only supports 1/2 frequency division, so dsc clk
is 1/2 input clk, which needs to increase blank, which is
equivalent to compressing the absolute DEN time. TV is likely to
decode at a decoding rate of around 260M. DEN absolute time
shortening results in abnormal TV decoding.

So the value of hblank needs to be reduced when bpp is below 9.
The measurement can be displayed normally on TV, but reducing
the hblank will result in non-standard timing of the hdmi output.
This may cause compatibility issues and hdmi cts certification
may fail.

Change-Id: I6cd7890c62980c29322c437b20fb048fe0acbae3
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-03-24 17:37:25 +08:00
Damon Ding
131fb30229 drm/rockchip: rgb: update the check for clearing old output_if
In order to cover more application scenarios, when the crtc changes,
the old output_if should be cleared, rather than when the flag
&drm_crtc_state.active_changed is set to 1.

In addition, it would be more reasonable to name new crtc to 'new_crtc'
rather than 'crtc'.

Change-Id: I6821e85b0b6f1152cea3057ebb6f3ec9b821ebee
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Damon Ding
f486e2b73d drm/rockchip: analogix_dp: update the check for clearing old output_if
In order to cover more application scenarios, when the crtc changes,
the old output_if should be cleared, rather than when the flag
&drm_crtc_state.active_changed is set to 1.

In addition, it would be more reasonable to name new crtc to 'new_crtc'
rather than 'crtc'.

Change-Id: I5376c44eb5deab75acdbae95782cc5de2e2757d5
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Damon Ding
f897ad4b39 drm/rockchip: analogix_dp: use the unified function to get new crtc from encoder
Replace the rockchip_dp_drm_get_new_crtc() by the existing function
drm_atomic_get_new_crtc_for_encoder(), which defined in common Rockchip
DRM driver file 'drivers/gpu/drm/rockchip/rockchip_drm_drv.c'.

Change-Id: I011dc70b5e7e927a201c80cc8ecb15dbef446631
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-24 09:12:55 +00:00
Sandy Huang
d02a383e7c drm/rockchip: drv: remove unused commit_lock
struct mutex commit_lock is only used by kernel 4.19,
use ovl_lock now.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id7eb81fac31026956eeb9b8799b7d8281e4de4c2
2025-03-24 09:00:21 +00:00
Damon Ding
b0d79ebe70 drm/rockchip: logo: support to use the win scale to configure overscan parameters
For some platforms, such as RK3576, use the win scale instead
of the post scale to configure overscan parameters, because the
sharp/post scale/split functions are mutually exclusice.

Change-Id: If422749ed8defc553924f14f24ab173913b2dcad
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-21 18:39:35 +08:00
XiaoDong Huang
703b39bceb soc: rockchip: pm_debug: support to dump common registers
Change-Id: If1a731248fb332f6e22a9a9c8708cec53d52216f
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2025-03-21 17:43:05 +08:00
Liang Chen
6e62a23828 arm64: dts: rockchip: rk3576s: enable usb30 port1
Change-Id: I72b325103b67414f24af2177374a217d4ac8f7df
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-03-21 08:41:34 +00:00
Sandy Huang
1c2dcc6d2b arm64: dts: rockchip: rk3576-vehicle-evb-v20-serdes-mfd-display-maxim: remove assigned VPLL clk rate
VPLL is initialized at uboot for dclk, If kernel assigned VPLL clk rate
and different with uboot set rate, this will lead to VPLL reinitialized
and lead to splash screen.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I501bf982b6016841ea046325d692aee73618357b
2025-03-21 08:41:03 +00:00
Damon Ding
635a7a4081 drm/rockchip: vop2: fix the default one display policy for RK3588
If only one VP is enabled and the plane mask is not assigned in DTS, all
main windows will be assigned to the enabled VPx, and all splice windows
will be assigned to the VPx+1, in order to ensure that the splice mode
work well.

Fixes: a3d2c5d99a ("drm/rockchip: vop2: fix the default plane_make configurations for RK3588")
Change-Id: I37905fb2d2f186f0da503e0cd410a7f620e34bb1
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
e5ce22e75e drm/rockchip: vop2: add support for primary plane check
If the plane mask and primary plane both are assigned in DTS, the
primary plane should be included in the plane mask of VPx.

Change-Id: Ie282782aa6f71a177fd61b507893b256261d4dc3
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
c8de2ce6ad drm/rockchip: vop2: set default primary plane id to ROCKCHIP_VOP2_PHY_ID_INVALID
If the property 'rockchip,plane-mask' exists but the
property 'rockchip,primary-plane' is not set in DTS, the
default &vop2_video_port.primary_plane_phy_id should be
ROCKCHIP_VOP2_PHY_ID_INVALID to avoid unexpected logs.

For RK3576 as example, if the plane_mask is configured as
follows:

&vp0 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
};

&vp1 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
};

&vp2 {
	rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_ESMART3 | 1 << ROCKCHIP_VOP2_ESMART2)>;
};

The unexpected logs may appear:
......
[    2.457617][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp0 assign plane mask: Cluster0 | Esmart0[0x5], primary plane phy id: Cluster0[0]
[    2.457652][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp1 assign plane mask: Cluster1 | Esmart1[0xa], primary plane phy id: Cluster0[0]
[    2.457666][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp2 assign plane mask: Esmart2 | Esmart3[0x300], primary plane phy id: Cluster0[0]
......

It is better to be like:
[    2.473158][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp0 assign plane mask: Cluster0 | Esmart0[0x5], primary plane phy id: INVALID[-1]
[    2.473189][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp1 assign plane mask: Cluster1 | Esmart1[0xa], primary plane phy id: INVALID[-1]
[    2.473204][   T80] rockchip-vop2 27d00000.vop: [drm:vop2_bind] vp2 assign plane mask: Esmart2 | Esmart3[0x300], primary plane phy id: INVALID[-1]

Change-Id: I28d221cce9baa6c1f73e6d73acdd030e92cc88bc
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
63eaeee18e drm/rockchip: vop2: add possible_crtcs check for cursor plane initialization
It makes sense to check whether the assigned cursor plane can be
attached to a specific VP, as there may be an invalid DTS assignment
for 'cursor-win-id'.

The logs may be like:
......
[    2.178737][   T81] rockchip-vop2 27d00000.vop: [drm:vop2_create_crtc] *ERROR* Assigned cursor plane: Esmart3 can not attach to VP0
[    2.178753][   T81] [drm] failed to init cursor plane for vp0
[    2.178823][   T81] rockchip-vop2 27d00000.vop: [drm:vop2_create_crtc] *ERROR* Assigned cursor plane: Esmart2 can not attach to VP1
[    2.178838][   T81] [drm] failed to init cursor plane for vp1
......

Change-Id: If18c4db1e8b295e72dae0c23bd0dd41203c4e3ac
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Damon Ding
708010d987 drm/rockchip: vop2: add support to assign plane_mask for RK3528/RK3562/RK3576
RK3528/RK3562/RK3576 use the VOP3 architecture, which supports
flexible switching of planes between different VP. User can switch
planes between different CRTCs based on the &drm_plane.possible_crtcs
in userspace, and the plane-mask does not need to be assigned by
default in DTS.

However, for some Linux systems, there may still be scenarios where
it is necessary to specify the primary and cursor planes specifically
used on a VP.

Therefore, the valid plane-mask assignment will change the
&drm_plane.possible_crtcs and establish a fixed binding relationship
between planes and CRTCs, which means that the flexible switching of
planes is not available in the case.

Change-Id: I156f71ceb238c5945a92f48c0024f398711ea811
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-03-20 11:38:34 +00:00
Ye Zhang
5043d1a786 soc: rockchip: pm_debug: Fix rk3506_table
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I4afb7a9f051d400ce59a833dbddb4a363f8a9b66
2025-03-20 08:55:41 +00:00
Wesley Yao
70ddbe74d3 iio: dac: rockchip-flexbus-dac: Add resume
Add resume for rockchip-flexbus-dac.

Change-Id: Iee7095fb626f8a759d353958bcb74151482adaea
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Wesley Yao
c9b483027e iio: adc: rockchip-flexbus-adc: Add resume
Add resume for rockchip-flexbus-adc.

Change-Id: Ieac70ecffa68bbb940f6a837cdbb3b7d5e4a4637
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Wesley Yao
ba1c3b949b mfd: rockchip-flexbus: Add resume
Add resume for rockchip-flexbus.

Change-Id: I2a87064e4267839f2daccbcc2e28b9d5786bf6f4
Signed-off-by: Wesley Yao <wesley.yao@rock-chips.com>
2025-03-20 03:41:19 +00:00
Tao Huang
a26e159e16 usb: gadget: uvc: Add MODULE_IMPORT_NS(DMA_BUF)
Adds the proper MODULE_IMPORT_NS(DMA_BUF) line to the file to get it to
build properly.

Fixes: 5452a06eed ("usb: gadget: uvc: support zero copy with rockchip encoder")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iab7fe8977389cd7b3e624a231011ea07d7b6d936
2025-03-20 10:15:40 +08:00
Sandy Huang
2de761a61d drm/rockchip: drv: Constify struct drm_driver
Add const qualifier to rockchip_drm_driver for immutability and safety.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9d461c702432cf976a0c1413ae1c257faf405f10
2025-03-19 11:30:53 +00:00