Commit Graph

1279948 Commits

Author SHA1 Message Date
Damon Ding
61fc6ee91f ARM: dts: rockchip: rk3506g-iotest: add wave clk_pwm_rc mode for pwm test
Change-Id: I20a2719e79fc978e42d42d119de0429f5bcc6458
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-20 11:22:23 +08:00
Damon Ding
7fe6e5c902 pwm: rockchip-test: set the default configurations for clk_src and mem_clk_src
In addition, adjust the initialization order of struct
rockchip_pwm_wave_config members to correspond with their
declaration order within the struct.

Change-Id: I869f1a670f23f726b2fd983af364d3bdd6a9f321
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-20 11:17:19 +08:00
Jon Lin
ef369922f4 spi: rockchip_slave: Remove redundant dma_map behavior
The driver itself has implemented DMA buffer, and does not require
the map/unmap behavior of the spi framework.

Change-Id: I00abd65233bf5b3112337c8da623bc8afe586bb6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-20 02:40:50 +00:00
Damon Ding
a16c42163b pwm: rockchip: use existing enum definitions for width_mode and updata_mode settings
Change-Id: I3a1957e96b3f695849e6afffd3348a4a80635ad9
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-20 02:39:57 +00:00
Damon Ding
a3b5a02391 pwm: rockchip: add support to select clk_src and mem_clk_src for wave generator mode
In wave generator mode, the clk_src is used as dclk to generate the
wave, and the mem_clk_src is used to write/read the wave table.

Change-Id: I7d1948a5bb11715ac632c424ef01d6022d15899b
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-20 02:39:57 +00:00
Joseph Chen
c790e2f91a regulator: rk801: Fix ramp_delay value error
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id35502968d0c3bf2b9a15b1008c2bc47e3ba8bcb
2025-01-20 02:31:42 +00:00
Elaine Zhang
9f8868d7b3 arm64: dts: rockchip: rk3576: remove dma for can
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I4bb0152a2742fa9ca7cc2d7330f4f4200d4672e6
2025-01-17 04:32:00 +00:00
Jianwei Fan
8da0472f8c arm64: dts: rockchip: rk3588-vehicle-evb: image reverse move xvclk to sensor
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I54a50c63fa1c3ef062eaba6098d7fe2e4a310698
2025-01-17 04:29:54 +00:00
Jianwei Fan
4a555cd7f1 arm64: dts: rockchip: rk3576-evb1: image reverse move xvclk to sensor node
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Id6873da7d8da262ff138beb560eb608c2c6baf0a
2025-01-17 12:28:50 +08:00
Jianwei Fan
76f1a34c4e video: rockchip: vehicle: move xvclk ctrl to generic sensor
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: If2b0e2e9ace5ef1835807471d8488e05cd2b8652
2025-01-17 11:50:44 +08:00
Jon Lin
af9ab5cb58 mtd: spi-nor: xmc: Support XM25QU256C
Change-Id: I2ad00d784627f2ca69c6bec46d97ab1415facc42
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-17 00:09:54 +08:00
Jon Lin
ba3c36d8c2 mtd: spinand: UNIM: Support new device UM19A0XISW
UM19A0HISW, UM19A0LISW.

Change-Id: I29baad2badf95ce2bd6daeb8819e99efb7e1d3fd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-16 23:53:43 +08:00
Jon Lin
e625024f13 mtd: spinand: xtx: Support new devices
XT26G12DWSIGA, XT26Q12DWSIGA, XT26G11DWSIGA, XT26Q14DWSIGA.

Change-Id: I733172ed78a95f4d2129c98c9d2c6b92525bde4c
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-01-16 23:53:43 +08:00
William Wu
b58bf56d91 arm64: dts: rockchip: rk3576s: Delete u2phy1 node
Change-Id: Ifb7c3f22c4caa75093daab77347e907b15870095
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-16 11:37:10 +00:00
William Wu
6dc017e3b3 arm64: dts: rockchip: rk3576s-evb: Remove u2phy1
Change-Id: If003ebf9d2a28709416686f8454db81f4e5a5106
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-16 11:37:10 +00:00
Damon Ding
40da609ada pwm: rockchip: disable unused interrupt function for wave generator
In order to avoid unnecessary interrupt handing behaviors, disable the
interrupt for the wave generator.

Change-Id: Ib397c9814775ca968b77c435db57a5b1ed5df7c6
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-16 11:36:36 +00:00
Damon Ding
dfaa59878d pwm: rockchip: fix the scaler calculation in &rockchip_pwm_funcs.set_wave()
If the pc->clk_rate is the same as config->clk_rate, the scaler should
be set to 0. However, using the previous calculation method, the result
would incorrectly be 1.

Fixes: 1504b8ffcf ("pwm: rockchip: add dclk scale config for wave generator mode")
Change-Id: I876f7f530ab841b485b8d7f139adcf825955a160
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-16 11:36:36 +00:00
Damon Ding
b125e2d8c7 pwm: rockchip: add mask check for 'v' in macro HIWORD_UPDATE(v, l, h)
Change-Id: Iaeb5f6f070914f208fe30929a638a92145a5164c
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-16 11:36:36 +00:00
Liang Chen
6757ebf6a8 clk: rockchip: clk-pvtpll: calibrate pvtpll init frequency for rv1103b
Change-Id: Ic15b4645a2c4caadce9b870bd2d8a7960688b66d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-01-16 11:34:29 +00:00
Liang Chen
14752da8e7 clk: rockchip: clk-pvtpll: update pvtpll config for rv1103b
Change-Id: Ie4512b8dad3279eed059f4bd5bbfe5c450d00351
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-01-16 11:34:29 +00:00
Liang Chen
5bb84d62da clk: rockchip: add enc/isp pvtpll clk for rv1103b
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: If2d8e1674e4eb1a9ac0c771561187a0177289572
2025-01-16 11:34:29 +00:00
Yandong Lin
6c47657a38 video: rockchip: mpp: Fix missing enable_irq in timeout work
Fixes: 4938e4ee1b ("video: rockchip: mpp: optimize the schedule of enc/dec")
Change-Id: I0942d94ba92b972e557301d83d1e7962a1b8ea13
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-16 08:39:40 +00:00
Caesar Wang
bd9c642504 arm64: dts: rockchip: add rk3576s-evb1-v10-linux.dts
Change-Id: I63f1308a6b2011607f672f15718453d65fed74bf
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2025-01-15 19:11:16 +08:00
Damon Ding
31af9d4fe5 drm/bridge: analogix_dp: use existing drm dp helper function to check enhanced frame support
The analogix_dp_is_enhanced_mode_available() can be replaced by drm
helper function drm_dp_enhanced_frame_cap().

Change-Id: I18d6faba78c92832d0087b42139e73c9190cbfd3
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2025-01-15 11:10:19 +00:00
Zefa Chen
da102a3eee media: i2c: add imx386 driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I8527b68f9c95774c487e28921608619a02cf135e
2025-01-15 11:09:40 +00:00
Zitong Cai
67e0f227ef arm64: dts: rockchip: rk3588-vehicle-serdes-mfd-display-maxim.dtsi: Fix the configuration error of transparent ID
Change-Id: I2a56ab4c996519bb7d32ceb6e1dbc746feb1dbb9
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
2025-01-15 11:07:19 +00:00
Zitong Cai
4add0132d7 arm64: dts: rockchip: add dtsi for nca9539 io expander on rk3588 vehicle EVBV23
Change-Id: Ib6d1b8ffc61cef383bce235dca2320170309ce8a
Signed-off-by: Zitong Cai <zitong.cai@rock-chips.com>
2025-01-15 11:07:07 +00:00
Simon Xue
808c54ab7b iio: adc: rockchip_saradc: avoid ack pending irq when initialization
To prevent responding to pending interrupts during initialization.
Soft reset must precede interrupt registration.

Change-Id: I265c52fd509cb0935ca218ed43bbee84e7881d94
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-01-15 11:05:29 +00:00
Zefa Chen
6b4ed2fa4f media: rockchip: vicap fixes error of buffer init
in the case, qbuf once before start stream, than start stream and qbuf other buffers

error info
WARNING: CPU: 2 PID: 2811 at drivers/media/common/videobuf2/videobuf2-core.c:2035 __vb2_queue_cancel+0x1f8/0x260
Modules linked in: bcmdhd(O) r8168
CPU: 2 PID: 2811 Comm: PPThread Tainted: G        W  O       6.1.99 #520
Hardware name: Rockchip RK3576 EVB1 V10 Board + Rockchip RK628 HDMI to MIPI Extboard (DT)
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __vb2_queue_cancel+0x1f8/0x260
lr : __vb2_queue_cancel+0x38/0x260
sp : ffffffc00d3d3aa0
x29: ffffffc00d3d3aa0 x28: 00000000400004d8 x27: ffffff80eaa3c520
x26: ffffff80c7886e80 x25: 0000000000000009 x24: 00000000000e001b
x23: ffffff80c6179880 x22: 0000000000000000 x21: ffffff80c4ae0a18
x20: ffffff80c4ae09f8 x19: ffffff80c4ae06a0 x18: ffffffc00a491070
x17: 696e696620676e69 x16: ffffffffffffffff x15: 0000000000000004
x14: ffffffc009fbbf80 x13: 0000000000003fff x12: 0000000000000003
x11: 0000000000000000 x10: 0000000000000000 x9 : 80d7bbf14371e500
x8 : 0000000000000001 x7 : 205b5d3937333231 x6 : 392e32393431205b
x5 : ffffffc00a3d9617 x4 : ffffffc00d3d3707 x3 : 0000000000000000
x2 : 0000000000000000 x1 : ffffff80eaa3bd00 x0 : ffffff80eaa3bd00
Call trace:
 __vb2_queue_cancel+0x1f8/0x260
 vb2_core_queue_release+0x20/0x50
 vb2_fop_release+0x98/0xb0
 rkcif_fh_release+0x30/0xb0
 v4l2_release+0x94/0xf0
 __fput+0x80/0x25c
 ____fput+0x10/0x1c
 task_work_run+0xb4/0xd8
 do_exit+0x294/0x9bc
 do_group_exit+0x70/0x98
 get_signal+0x72c/0x828
 do_notify_resume+0x134/0x2140
 el0_svc+0x4c/0x68
 el0t_64_sync_handler+0x68/0xb4
 el0t_64_sync+0x164/0x168

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I891866ffa8a3d14eddd2c03a693b39f392afb035
2025-01-15 10:26:28 +00:00
Joseph Chen
fc85b5039f regulator: rk808: Remove legacy rk801
rk801 regulator is rk801-regulator.c.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I6a794e734ec2c74277c0b2f43c8a8530a11184d9
2025-01-15 10:26:03 +00:00
Lin Jinhan
71790b7b61 crypto: rockchip: move the code for v1/v2/v3/v4 to the rkcrypto directory
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ic15c482b71bd6c11afa5baff66b990eb9a936116
2025-01-15 10:18:23 +00:00
Joseph Chen
dcc75c0edd dt-bindings: suspend: rk3506: Add more configurations
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I760e116e3f21d81c043563e9ab2c81448338f231
2025-01-15 07:02:44 +00:00
Wang Panzhenzhuan
136c9e13ce media: rockchip: isp: fix android sts CVE_2019_14104 failed issue
fix test android.security.sts.Poc20_01#testPocCVE_2019_14104 cause
 kernel panic issue

 The issue was reported in https://redmine.rock-chips.com/issues/531294
 The kernel crash log:
 [ T7364] Unable to handle kernel paging request at virtual address
 0000001800000100
 ...
 pc : __pi_strlen+0x124/0x150
 lr : strstr+0x34/0x84
 ...

 Call trace:
 __pi_strlen+0x124/0x150
 sditf_ioctl+0x570/0x810 [video_rkcif]
 subdev_do_ioctl_lock+0xcb0/0xf44
 video_usercopy+0x44c/0x98c
 subdev_ioctl+0x18/0x28
 v4l2_ioctl+0x6c/0x84
 __arm64_sys_ioctl+0xa8/0xe4
 invoke_syscall+0x58/0x11c
 el0_svc_common+0xb4/0xf4
 do_el0_svc+0x2c/0xb0
 el0_svc+0x2c/0x90
 el0t_64_sync_handler+0x68/0xb4
 el0t_64_sync+0x1a4/0x1a8
 Code: fa4008a0 54fffde0 17ffffe6 927cec01 (a9400c22)
 ---[ end trace 0000000000000000 ]---

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I26f2da26d9aec7b2f1dfa93c1165d7579b89f3ba
2025-01-15 06:56:34 +00:00
Sugar Zhang
ab71175dd0 ARM: dts: rockchip: rk3506-test11-v10: Change ubi.mtd id to 5
Refs: 870fe4496a ("ARM: dts: rockchip: rk3506-evb1-v10: Change ubi.mtd id to 5")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ia8b4d0414d17e87cdcb86e49a58faf41ec6e67b2
2025-01-15 06:44:22 +00:00
Sandy Huang
aeda6a1feb drm/rockchip: vop2: move devm_request_irq to the end of vop2_bind
At MOS environment, the irq handle may be triggered immediately
after request irq, the irq handle maybe access vop2 memory, e.g.,
vop3_vp_isr() -> vop2_wb_handler() access vop2->wb->regs, so move
devm_request_irq() to the end of this function to make sure vop2 is
initialized.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3df1cc08069ffcffefa91a523db75fb67cd47de3
2025-01-15 06:43:42 +00:00
Cai YiWei
0520bd5114 media: rockchip: isp: fix CTRL_SWS_CFG config error
Change-Id: Idc84e44ce5064d1c91579c0f4ef9891a476f2e79
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2025-01-15 11:40:01 +08:00
William Wu
9541ea94fb Revert "usb: dwc3: add a new glue layer for rockchip SoCs with INNO PHY"
This reverts commit 0cbdc8c1da.

The legacy glue layer driver dwc3-rockchip-inno.c is only
used for RK3328/RK3228H platforms, and now they use the
dwc3 core driver instead of the legacy driver, so let's
discard the legacy driver.

Change-Id: Ib1f43aacddea0e0155aa75b0efb58452b0514860
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-14 11:54:11 +00:00
William Wu
00baab7edf ARM: configs: rv1126-tb.config: Remove unused CONFIG_USB_DWC3_ROCKCHIP_INNO
Change-Id: I5fb6b42f0d04885df5934465ab8cc57726089a4e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2025-01-14 19:03:11 +08:00
Xing Zheng
8a89e948a2 ARM: dts: rockchip: rk3506g-demo-display-control: fix noise dues to mclk and coeffs without matched
The requirements of rk3506 codec are mainly divided into three
sampling rate groups: 48/44.1/32kHz.

And, the rk3506 codec has internal frequency division, the driver
limits these three mclk inputs:
 #define MCLK_REFERENCE_8000 32768000
 #define MCLK_REFERENCE_11025 45158400
 #define MCLK_REFERENCE_12000 49152000

Therefore, it is necessary to add the "rockchip,mclk-no-set" property
to the SAI4 to avoid switching the mclk frequency in the function of
rockchip_sai_set_sysclk() after the codec configures mclk, causing
the codec filter to work abnormally.

Change-Id: Ic6cd0688287eb4c92c3b27bba4f60c46610c9006
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 08:19:53 +00:00
Xing Zheng
c48bb00056 ASoC: rockchip: sai: add support "rockchip,mclk-no-set" property
Sometimes the mclk frequency needs to be set by the external codec
according to the sampling rate, rather than just keeping a fixed
multiple of the sampling rate. In this case, through the property
of "rockchip,mclk-no-set", the SAI will not modify the mclk frequency
again after the codec sets it.

Change-Id: I9bacebb397b9219b773b9953afabd1c5156c8a19
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 08:19:53 +00:00
Xing Zheng
4036781b83 ASoC: codecs: rk730: fix and update some clock configurations
This patch removes the two uncommon sampling rates of 12000 and 24000Hz,
because they are not in the definition of SNDRV_PCM_RATE_8000_192000 in
the sound framework:
...
 #define SNDRV_PCM_RATE_11025 (1U<<2) /* 11025Hz */
 #define SNDRV_PCM_RATE_16000 (1U<<3) /* 16000Hz */
 #define SNDRV_PCM_RATE_22050 (1U<<4) /* 22050Hz */
 #define SNDRV_PCM_RATE_32000 (1U<<5) /* 32000Hz */
...

According to the configuration of the sampling rate group clock, the
configuration of 11025 and 22050Hz is added. And, it is changed to
select the appropriate mclk in the coeff_clk array according to the
sampling by the codec by default. If you need to use the previous
fixed FS method, you need to specify the property "rockchip,mclk-fs-fixed"
in the dts node.

Change-Id: Iae4478b807f4e6eb88bf6cc9f431ce2f725a5b36
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2025-01-14 06:23:22 +00:00
Zhang Yubing
fdcec7349c drm/rockchip: vop2: reset dclk after config stream output
In RK3576, DP0 attach to VP1 or VP2 will cause vertical stripe. It
need reset dclk after config stream output to avoid this issue.

Change-Id: I00112e8541828ed53a2ea91e7d79f8d148a7b3df
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zhang Yubing
cd51e4eb73 drm/bridge: synopsys: dw-hdmi-qp: support pre disable/post enable crtc
Change-Id: If11faf7c1ca6079f2f6fef4c8b914b07615b65b3
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zhang Yubing
a3ad373b3f arm64: dts: rockchip: rk3576: support vop dclk reset
Change-Id: I93552e3d8e5c20dabc5061b8cb8071846ce3b27a
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2025-01-14 06:21:20 +00:00
Zefa Chen
61397641fb media: rockchip: vicap fixes warning of compile
drivers/media/platform/rockchip/cif/dev.c:1461:6: warning: no previous prototype for ‘rkcif_set_sensor_streamon_in_sync_mode’ [-Wmissing-prototypes]
drivers/media/platform/rockchip/cif/dev.c:2477:6: warning: no previous prototype for ‘rkcif_set_sensor_stream’ [-Wmissing-prototypes]

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I7df0b1505e763b51e277f70f7a46d4eb163a82d6
2025-01-14 06:14:37 +00:00
Zefa Chen
e0747a9113 media: rockchip: vicap fixes error of thunderboot change to online in hdr mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I90f4f82d5f380961a3c61634f4233e35973f64c6
2025-01-14 06:14:37 +00:00
Zefa Chen
f61210ec08 media: rockchip: vicap clean crop mask after stop stream
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I16eba981614ca49d8e4dbc5bb011d3237835c6ad
2025-01-14 06:14:37 +00:00
Zefa Chen
0d7d8acd16 media: rockchip: vicap fixes error fps print of proc when work in online
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I257f5df24fb5adc9ab9ddd3321ef3ff21ea88034
2025-01-14 06:14:37 +00:00
Zefa Chen
baef3a2632 phy: rockchip: csi2-dphy: mipi csi2 dphy dual init host_sel when work dual camera mode
only valid for rk3566/rk3568

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2c808fcccf201a84097acac3399b412eb251b28e
2025-01-14 06:14:11 +00:00
LiuDiMing Lin
7566b06bc2 iio: imu: inv_icm42670: add drive-open-drain setting
Signed-off-by: LiuDiMing Lin <fenrir.lin@rock-chips.com>
Change-Id: I78727be0f7554afc4bc884bf0df27d31127c6c7a
2025-01-13 09:54:08 +00:00