Commit Graph

1380972 Commits

Author SHA1 Message Date
Shawn Lin
bb6d30a1ed Revert "mmc: porting legacy tactices into 5.10"
This reverts commit 22ddcf4e49.

Change-Id: Icb1a6afa33f395f86ba34a4eb6d5a680b9834b62
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-24 19:39:40 +08:00
Huibin Hong
255b38adfc soc: rockchip: fiq_debugger: Fix compilation errors on kernel 6.6
Change-Id: I01039aa1162e8f9c9e3362e16ef6ee65dc85a196
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2025-07-24 19:39:40 +08:00
Sandy Huang
f9e20cee61 Revert "drm/rockchip: support backlight device"
This reverts commit 9589a39989.

remove unused rockchip drm backlight drv.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6ac1d79abfebf96f8e4bb310452ddb58ad7b649f
2025-07-24 19:39:40 +08:00
Sandy Huang
24756f11a9 drm/rockchip: drv: fix compile error
according to the forllowing commit:
  Commit: 80ed86d4b6 ("drm/connector: Rename drm_mode_create_tv_properties")

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3af51cabf50c5970684f7a8e198d376841731b9e
2025-07-24 19:39:40 +08:00
Sandy Huang
c0827879e8 drm/rockchip: fbdev: fix compile error
according to the following commit:
  Commit: 6f0f694162 ("fbdev: Add fb_ops init macros for framebuffers in DMA-able memory")
  Commit: 7fd50bc39d ("drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix")
  Commit: 6c80a93be6 ("drm/fb-helper: Initialize fb-helper's preferred BPP in prepare function")

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ibdb052bf09f95dbf664dd78fb00aa260142bdda4
2025-07-24 19:39:40 +08:00
Tao Huang
e6339bca95 gpio: rockchip: Add explicit include for cpuhotplug.h
Fixes: 7b561549e4 ("gpio: rockchip: binding thread to specified cpu")
Change-Id: I133331ec34184731d3194423074b41531e5f3200
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-24 19:39:40 +08:00
Tao Huang
72101c82b8 Merge commit '3a8b94c5be2ca4a2a9dd5916074e2f466ebcc57f'
* commit '3a8b94c5be2ca4a2a9dd5916074e2f466ebcc57f': (873 commits)
  arm64: dts: rockchip: rv1126b: Remove dma for i2c0, i2c4 and i2c5
  dt-bindings: i2c: rockchip: add rockchip,rv1126b-i2c
  i2c: rk3x: Add dma feature
  arm64: dts: rockchip: rv1126b-evb: Change clock rates to 24M for fephy
  ethernet: stmmac: dwmac-rk: Correct clock input/output sel for RV1126B
  net: phy: rockchip-fephy: Add param to access group registers
  net: phy: rockchip-fephy: Fix for the correct names
  net: phy: rockchip-fephy: Add 24M clock rate setting
  net: phy: rockchip-fephy: Change off-energy level0 threshold between link up/down
  power: supply: rk817_battery: Supports battery aging calibration
  power: supply: rk817_battery: Supporting battery charging with JEITA standards‌
  drm/rockchip: vop2: update cluster fbc xoffset check rule
  arm64: dts: rockchip: rk3576: Add customer demand nvmem cell for opp table
  driver: rknpu: Add opp data for rk3576s
  MALI: bifrost: Add opp data for rk3576s
  cpufreq: rockchip: Add opp data for rk3576s
  media: rockchip: isp: support wrap stream latter for isp35
  arm64: dts: rockchip: rv1126b-pinctrl: update i2c config
  arm64: dts: rockchip: rk3588: Adjust the HDMITX1 DDC M0 IO driver strength
  media: rockchip: vicap add soft reset before start stream
  ...

Change-Id: I6973bf32974c14f06231e1e87f7da24a321efa22
2025-07-24 19:38:29 +08:00
Tao Huang
e5cfe280bc ARM: dts: rockchip: Move rk3128.dtsi to rockchip subdirectory
Change-Id: Icf41123c28406fe4b00b98fbce41215cfc9bb53b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-23 19:39:12 +08:00
Tao Huang
2daab06426 ARM: dts: rockchip: rk312x: Sync with upstream v6.12 rk3128.dtsi
Change-Id: Ida6c45b56245fdd900568ca42249d757853d1082
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-23 19:39:12 +08:00
Tao Huang
f516221c76 ARM: dts: rockchip: Move rv1126.dtsi to rockchip subdirectory
Change-Id: Ic7cbdf82c2a6be405100a85fe396bf2dfe9f9d9a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-23 19:39:12 +08:00
Tao Huang
9897e5e073 ARM: dts: rockchip: Move rv1126-pinctrl.dtsi to rockchip subdirectory
Change-Id: I03deb44732e8b224dbd253fd1d93aa21043f2962
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-23 19:39:12 +08:00
Tao Huang
ad57250f94 ARM: dts: rockchip: Move .dts files to rockchip subdirectory
According to commit 724ba67515 ("ARM: dts: Move .dts files to vendor sub-directories").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3a8da8240526c0f0d8114b591a5143d851ffac5b
2025-07-23 19:39:12 +08:00
Tao Huang
85f9ade141 drm/rockchip: vkms: Explicitly include correct DT includes
Change-Id: I211e98cf1b624df9338c3396f3a5cec103bd1609
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-23 11:38:46 +00:00
Tao Huang
ec27a2cbcf Revert "arm64: dts: rockchip: remove hclk from dsi node on rk356x"
This reverts commit cadda00596.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If585a2a7f91d51b70dd8b142afeb6381ca109acf
2025-07-23 11:38:46 +00:00
Sandy Huang
dfd62f4617 drm/rockchip: drv: remove unused drm_atomic_get_old/new_crtc_for_encoder
The upstream commit has been merge in linux kernel 6.4 and the
commit info as follow:
Commit: 7b9a9e35e4 ("drm: add helper functions to retrieve old and new
crtc")

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I16f74306edf8acb1a475056debf8fe9a81aee16f
2025-07-23 11:38:46 +00:00
Sandy Huang
04819ef407 drm/rockchip: vop2: fix some error after merge kernel 6.6
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I3e36bbf7b09d1c4f8660fb5c7fe1bfed60623fab
2025-07-23 11:38:46 +00:00
Sandy Huang
c19856a370 Revert "drm: rockchip: remove rockchip_drm_framebuffer_init() function"
This reverts commit 4016379301.

This is introduced by the following commit, but it's missed after merge.

commit 684a1e0966 ("drm/rockchip: fbdev: reintroduction rockchip drm fbdev")

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I99b6bba5aa9cd072e4abb0ce720d72f8c1132941
2025-07-23 11:38:46 +00:00
Sandy Huang
e1308ecec7 drm/rockchip: drv: sync with drm_gem_prime_import_dev
rockchip_drm_gem_prime_import_dev() is base on
drm_gem_prime_import_dev() for dma buf import to drm.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Id7fdea51af68cf27ccc19a9d3be03753bcf1d18c
2025-07-23 11:38:46 +00:00
Ye Zhang
8741b1c001 thermal: rockchip: Fix compilation errors
1. Fix duplicate definition of rk3588_code_table
2. Resolve missing header dependency
3. Remove redundant chn_id

Change-Id: I1962af3f7fe862bdff8f2ac26b389bd75fab8a92
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
2025-07-23 11:38:46 +00:00
Shengfei Xu
bf3eb1b21a pinctrl: rk806: Fix compilation errors
Change-Id: Ib984e43d519230c2f5b9a1d9f1a6c3856e8f4af3
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-07-23 11:38:46 +00:00
Tao Huang
113064c024 mfd: rk8xx: Hide MFD_RK8XX_I2C and MFD_RK8XX_SPI config
Only use MFD_RK808.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I75f8b49d89272b6086d5811da0635a342ee00896
2025-07-23 11:38:46 +00:00
Tao Huang
a7950dffb4 clk: rk808: Fix compilation errors
drivers/clk/clk-rk808.c:184:35: error: 'node' undeclared (first use in this function)

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I57cff6098e270e1ff9e48d8c84b170b81f53ee6b
2025-07-23 11:38:46 +00:00
Shengfei Xu
ace99f9f35 rtc: rk808: Fix compilation errors
drivers/rtc/rtc-rk808.c:252:28: error: 'rk808' undeclared (first use in this function)

Change-Id: I63cda8508c95a6f6449e293f75edd6855cab6000
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-07-23 11:38:46 +00:00
Tao Huang
73eb363b61 regulator: fan53555: Disable support for RK860X when CONFIG_REGULATOR_RK860X is enabled
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I141164cf634551398128215cdcc35d5eab3131a1
2025-07-23 11:38:46 +00:00
Jon Lin
0a110e2b25 spi: rockchip-sfc: Rename master to modern name host
Change-Id: Icb1cb9f1e9502bce46f6fa5cbb789f853adea161
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-07-23 11:38:46 +00:00
Xuhui Lin
f5ce8ddccc spi: rockchip: replace vma->vm_flags direct modifications with modifier calls
Change-Id: Ifb566b291f966cb7a6fbb2ea9d10707926706f26
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
2025-07-23 11:38:46 +00:00
Simon Xue
89cab48b47 iio: adc: rockchip: Fix clock initialization sequence
clock_set_rate should be executed after devm_clk_get_enabled.

Fixes: 97ad10bb29 ("iio: adc: rockchip_saradc: Make use of devm_clk_get_enabled")
Change-Id: Ie79726ee3d65c9be8d1c66ec39ab791851f7056c
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-07-23 11:38:46 +00:00
Elaine Zhang
fc76ab1e22 clk: fractional-divider: Fix compilation errors
drivers/clk/clk-fractional-divider.c: In function ‘clk_fd_set_rate’:
drivers/clk/clk-fractional-divider.c:217:13: error: ‘struct
clk_fractional_divider’ has no member named ‘nmask’
   if (n > fd->nmask) {
             ^~
drivers/clk/clk-fractional-divider.c:220:10: error: ‘struct
clk_fractional_divider’ has no member named ‘nmask’
    n = fd->nmask;

Change-Id: Ia114e7f7d00e966a496fca2c144e6cc382082b27
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-07-23 11:38:46 +00:00
Elaine Zhang
e815c4f0a6 clk: rockchip: rk3568: Fixed pll parameters for 108M
Change-Id: Idab3b9ea6d4340a6d65ed291b4cde24e4c441256
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2025-07-23 11:38:46 +00:00
Simon Xue
f64b4f4677 soc: rockchip: minidump: adapts to new MAX_ORDER definition
Reference: 23baf831a3 ("mm, treewide: redefine MAX_ORDER sanely")

Change-Id: I3e1797eb85664b862d0f39860742f9071fffd02d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-07-23 11:34:19 +00:00
Simon Xue
c13e431c2b soc: rockchip: rk_zoneinfo_procfs: adapts to new MAX_ORDER definition
Reference: 23baf831a3 ("mm, treewide: redefine MAX_ORDER sanely")

Change-Id: I8b1c35ee4c3f9300a1a293daa28a558c80b5cb2a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-07-23 11:34:19 +00:00
Simon Xue
112d4f79ea ARM: configs: rk3506_defconfig: adapts to new MAX_ORDER definition
Reference: 23baf831a3 ("mm, treewide: redefine MAX_ORDER sanely")

Change-Id: I77486239b57338d4ad17c9194b90b24ffd44acf8
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2025-07-23 11:34:19 +00:00
Yu Qiaowei
0e7abd67ec video: rockchip: rga3: "reg" debug log add iommu readback register printing
Update driver version to 1.3.10

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I79b641e8b41d43c451988f278596f229e9e0fd2c
2025-07-23 10:02:41 +00:00
Yu Qiaowei
8bfa454c23 video: rockchip: rga3: restore iommu status on soft-reset
Avoid auto_gating/int_mask register state loss after reset

Change-Id: Ie341f0f58f398476daacffdd90565d39c68faa54
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2025-07-23 10:02:41 +00:00
Yu Qiaowei
6a03ec9cb5 video: rockchip: rga3: modify the reset method to replace auto_rst on RK3576
1. Resetting only core_clk will cause abnormal src1 status in blend
scenarios, so both aclk and core_clk must be reset.
2. Avoid the issue by shielding the wrong interrupt.

Fixes: a2a7ce0bf0 ("video: rockchip: rga3: add fix for hardware issuewith RK3576")

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I3cb0034f6c3090faca19cea2c2f5b375388271f8
2025-07-23 10:02:41 +00:00
William Wu
d86fac4c44 phy: rockchip: inno-usb2: Destroy chg_worker on probe failure
Fixes: a78b174c2f ("phy: rockchip: inno-usb2: Fix DEBUG_LOCKS_WARN_ON in chg work")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1f200c7597418d9c174bc68d9a5fea0703cd9cc5
2025-07-23 04:30:40 +00:00
Leo Sun
253e11f01f ARM: dts: rockchip: add rv1126b-evb2-v12-aov-dual-cam.dts
Signed-off-by: Leo Sun <leo.sun@rock-chips.com>
Change-Id: I4a734cb199c7a1781b3a44b389e092790d7d69af
2025-07-23 03:56:39 +00:00
David Wu
7338ae1052 ethernet: stmmac: stmmac_uio: Fixes compilation errors
Change-Id: Ic460bcc5f11b6fb0e6961c5e58c63dfc1b318b3c
Signed-off-by: David Wu <david.wu@rock-chips.com>
2025-07-23 10:31:06 +08:00
lin longjian
f8dee2cf65 arm64: dts: rockchip: add bt_port for wireless_bluetooth
Signed-off-by: lin longjian <llj@rock-chips.com>
Change-Id: I893a0dae669a410e646df46926ed54fa693894f9
2025-07-22 10:37:40 +00:00
Joseph Chen
3664a5d88f ARM: dts: rockchip: rk3506{g-demo-display-control,b-test2-v10}: Add "pmic-reset" for rk801
Reset pmic and output NPOR signal 5ms when system reboot.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8c59ed22342617cf555e54c3fb43821203aae70c
2025-07-22 10:12:39 +00:00
Guochun Huang
e5a4867edf misc: rk628: Fix compilation errors on 32-bit soc platforms.
Change-Id: I961b2f33ef3707795eddd701ec8765dbe0a0c4f7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2025-07-22 10:06:27 +00:00
William Wu
a78b174c2f phy: rockchip: inno-usb2: Fix DEBUG_LOCKS_WARN_ON in chg work
The following trace can be seen if usb is connecting to
Host while do rockchip_chg_detect_work.

 DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current)
 WARNING: CPU: 6 PID: 512 at kernel/locking/rtmutex-debug.c:47 debug_rt_mutex_unlock+0x58/0x64
 Modules linked in:
 CPU: 6 PID: 512 Comm: kworker/6:3 Not tainted 5.10.226-rt89 #186
 Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
 Workqueue: events rockchip_chg_detect_work
 pstate: 60c00089 (nZCv daIf +PAN +UAO -TCO BTYPE=--)
 pc : debug_rt_mutex_unlock+0x58/0x64
 lr : debug_rt_mutex_unlock+0x58/0x64
 ......
 Call trace:
  debug_rt_mutex_unlock+0x58/0x64
  __rt_mutex_unlock+0x48/0xf8
  _mutex_unlock+0xc/0x14
  rockchip_chg_detect_work+0x44c/0x6f0
  process_one_work+0x1bc/0x27c
  worker_thread+0x268/0x488
  kthread+0x170/0x210
  ret_from_fork+0x10/0x18

This issue can cause the preempt-rt Linux kernel to crash.
The reason is that all mutexes in preempt-rt have been replaced
with rt_mutexes. An rt_mutex has a PI (Priority Inversion) feature,
which means that when a high-priority task waits for a lock held
by a low-priority task, the priority of the low-priority task is
elevated. A linked list is established on p->pi_waiters. This
requires that lock/unlock operations be handled by the same task.
If unlock is performed and pi_waiters is released by another task,
the task that holds the lock will encounter an exception when
accessing pi_waiters. When executing rockchip_chg_detect_work,
a schedule_delayed_work operation is performed while holding the
mutex lock, causing the mutex lock to be released by a different
worker task, which triggers a kernel panic.

This patch use kthread_work instead of delayed_work to avoid
long-running chg work affecting other tasks in the system workqueue.
And also avoid chg work to be scheduled while hold a mutex lock.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1e49a22f002b0dfcf0e04d243d99624d34c9a701
2025-07-18 14:24:16 +08:00
Jianwei Zheng
8a89d480cd usb: dwc2: drd: Fix compilation errors
Change-Id: Ic62c1aeecc585ecee530f75a5a2b4d558a3381b4
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2025-07-17 17:22:29 +08:00
Jon Lin
54ecf988da mtd: spinand: UNIM: Optimize UM19A0HISW and UM19A0LISW ECC strategy
1.Former ECC code 0b011, return ecc status ok. Currently ECC code
0b011, return data refreshment recommend as what spec defined.Although
both solutions are acceptable, the more robust solution is recommended
by default.
2.Remove redundancy flash info.

Change-Id: I1e8d0e6e134046433e29a74de86f805cd15a4643
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2025-07-17 17:18:35 +08:00
Tao Huang
7fb19dd671 video: rockchip: mpp: Add a gfp parameter to iommu_map()
Change-Id: Id686b5395f6147c17e44859b5fbc5d8422e84959
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2025-07-17 17:14:22 +08:00
Tao Huang
7991e36525 drm/rockchip: logo: Add a gfp parameter to iommu_map()
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I835a2558cb10c957940cfaf1b4e3d0264f8d473f
2025-07-17 17:14:22 +08:00
Tao Huang
3c74ffd365 drm/rockchip: drv: Add a gfp parameter to iommu_map()
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iaf9be2344ff06cc33e2bd081e36e17d715b70f00
2025-07-17 17:14:22 +08:00
Tao Huang
76ccd92883 ASoC: rockchip: spdifrx: use helper function
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iff5e51861cf6e0761175428e096b81679acfcd32
2025-07-17 17:14:11 +08:00
Tao Huang
8a3607a551 ASoC: rockchip: pdm_v2: use helper function
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1a66cffc0a2a42bde970b32a1f69e729421b2b57
2025-07-17 17:14:11 +08:00
Tao Huang
68d5093ec7 ASoC: rockchip: audio_pwm: use helper function
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2e2b28d0d7f809d98e23a3aefe92a10e795f8de4
2025-07-17 17:14:11 +08:00