Compared with RK3288/RK3399, the HBR2 link rate support is the main
improvement of RK3588 eDP TX controller, and there are also two
independent eDP display interfaces on RK3588 Soc.
The newly added 'apb' reset is to ensure the APB bus of eDP controller
works well on the RK3588 SoC.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Change-Id: If3864613762898624ba39ad0395516a4ebb02732
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Link: https://lore.kernel.org/r/20250310104114.2608063-10-damon.ding@rock-chips.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
(cherry picked from commit f855146263b14abadd8d5bd0e280e54fbab3bd18)
If the DSC mode with a compression rate lower than 0.375 is to
be supported, the dclk clock source of the VOP bound to HDMI must
be a CRU PLL that supports fractional frequency division.
However, in most scenarios, HDMI is unable to be assigned such a
PLL. So in this scenario, instead of enabling DSC, we switch to
YUV420 format.
Change-Id: I450cdd5857e4384894651ed063fac152a8d9bb0f
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Only searches rockchip,pvtpll-table when bin-specific property is absent.
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: Ic728e39851cdd8c32970d81249cf295a3b8d6aeb
Avoid auto_gating/int_mask register state loss after reset
Change-Id: Ie341f0f58f398476daacffdd90565d39c68faa54
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
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
Reset pmic and output NPOR signal 5ms when system reboot.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I8c59ed22342617cf555e54c3fb43821203aae70c
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
Panel TPM270WR1 supports 3840x2160p144 with 8lanes and local dimming
through SPI interface.
Change-Id: I0b7e33503d76661510bb99364b041ea18e2d4513
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
The dimming panel driver supports to adjust the backlight brightness
of different zones.
Change-Id: Ieafa865fb9ad5bc184fb148c4a36fb3cbd4e854c
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
When PD_VPU power domain is off, the pin state of ebc is X state.
Set the EBC pin control to GPIO and pull low to ensure that it remains
in low state.
Change-Id: Iafa70622f8fce475c307edfb6d4d4ad9635a43cd
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
As the Table 4-24 in eDP 1.4 spec, the Sink device can only support
Main-Link rate selection via SUPPORTED_LINK_RATES when the value of
DPCD MAX_LINK_RATE is 00h. If MAX_LINK_RATE and SUPPORTED_LINK_RATES
are both non-zero, the Sink device can support both methods.
In practice, if MAX_LINK_RATE is not 00h and SUPPORTED_LINK_RATES
contains non-zero values, sometimes the sink device can only support
to set link rate via LINK_BW_SET. In such case, there will be errors
if set the link rate read from SUPPORTED_LINK_RATES to LINK_RATE_SET.
The panel vendor may explain this is to ensure the same Sink firmware
remains compatible across different versions of the eDP spec. Or the
Main-Link rate selection method has not been fully verified.
In order to avoid these unexpected cases, MAX_LINK_RATE/LINK_BW_SET
method will be selected first if MAX_LINK_RATE is non-zero for eDP
panels that support v1.4 or higher.
Previous patch for link rate table parsing:
commit 31702584f8 ("drm/bridge: analogix_dp: add support to parse link rate for eDP v1.4")
Change-Id: Ic8aedcec2c60584fedddc575b2a91c2eba7c8219
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
set " bt_port = "/dev/ttyS*" " under wireless_bluetooth
Change-Id: I20298c3679d4d66f604e413198f1c7f6c89be46b
Signed-off-by: lin longjian <llj@rock-chips.com>
According to SI test report, BT1120/BT656 drive strength should be
set.
Change-Id: I59aa29fc1c24b0b152fd96a260197fab21790d75
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
According to SI test report, BT1120/BT656 delay line should be set.
Change-Id: Id30655e15daac20ed126683768bab90d7425cb83
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
The RK3506/RV1126B use 7bit signed number to calculate the brightness.
That is [-64, 63].
Fixes: 08fbbdb571 ("drm/rockchip: vop: add support for rk3506")
Change-Id: I64df5bd97e20350e8f3e7db9fe68966f01155dd8
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Since the decom_mmu uses a dedicated clock, its clk must be included
in the decom's clk management to ensure proper operation.
Change-Id: Id95c4563c092dcf1cab09c190fa82d24018b6a1d
Signed-off-by: Simon Xue <xxm@rock-chips.com>