Commit Graph

1285516 Commits

Author SHA1 Message Date
Damon Ding
aab46d64de drm/rockchip: Add support for dimming panel driver
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>
2025-07-17 09:48:23 +08:00
Chaoyi Chen
12eb0cc413 arm64: dts: rockchip: rk3576-eink: Add sleep pinctrl for ebc
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>
2025-07-15 11:45:47 +00:00
Chaoyi Chen
9e196c8267 arm64: dts: rockchip: rk3576: Add sleep pinctrl for ebc
Change-Id: I991833f0eed695e73b500973bd3b9bfba716db53
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2025-07-15 19:44:37 +08:00
Sandy Huang
c5415d9339 drm/rockchip: vop2: move axi reset to the end of vop deinit
Missing this commit may occasionally appear vop iommu pagefault/post buf
empty/vop pd idle failed during the suspend and resume process.

Fixes: e37ee94490f8 ("drm/rockchip: vop2: reset axi clk before disable vop")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I8a4bc3346f32f6ea6672ff7103f9b3af0de6eecf
2025-07-15 11:37:31 +00:00
Damon Ding
0d42457e7e drm/bridge: analogix_dp: Use LINK_BW_SET to set link rate if MAX_LINK_RATE is non-zero
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>
2025-07-15 11:33:03 +08:00
lin longjian
fd3306bdba net: rfkill: bt: add btport for libbt to get port name
set " bt_port = "/dev/ttyS*" " under wireless_bluetooth

Change-Id: I20298c3679d4d66f604e413198f1c7f6c89be46b
Signed-off-by: lin longjian <llj@rock-chips.com>
2025-07-15 02:56:01 +00:00
Hu Kejun
da44652e18 media: rockchip: aiisp: add ioctl to reduce memory
Change-Id: Ie0bbdf18e6a9e0c2990f505cfdd771fb69497ca3
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2025-07-15 01:43:16 +00:00
Sandy Huang
a930e7e610 drm/rockchip: vop2: delete unused return error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifeac16e82b0a3069811a4d71d7442f663cbb9294
2025-07-15 01:41:28 +00:00
Sandy Huang
fb0132457b drm/rockchip: vop: delete unused return error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2b8c2cc80d7fb083f8c723f4bfa8946b2415891a
2025-07-15 01:41:28 +00:00
Weiwen Chen
61d5a058cd ARM: dts: rockchip: add rv1126b-evb1-v11-fastboot-spi-nor.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I0b7b27bdb2803fdb2ec88d6304968b7f141acc7f
2025-07-15 09:05:48 +08:00
Weiwen Chen
b99f522bf7 arm64: dts: rockchip: add rv1126b-evb1-v11-fastboot-spi-nor.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I8ff6e83cdece005e382076e26ae1613b25237682
2025-07-15 09:05:24 +08:00
Weiwen Chen
6da1a1fe1c ARM: dts: rockchip: add rv1126b-evb1-v11-fastboot-spi-nand.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I6432ff45af9f2fab4cc64f01f3abf08e9b737bad
2025-07-15 09:04:32 +08:00
Weiwen Chen
59b56f57db arm64: dts: rockchip: add rv1126b-evb1-v11-fastboot-spi-nand.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ib2db6844bab1ee0f72d7fbb9ef2a044e4f4580d6
2025-07-15 09:03:17 +08:00
Weiwen Chen
b6ee2762c7 ARM: dts: rockchip: add rv1126b-evb1-v11-fastboot-emmc.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ic537666c4f2870cb56c33c3e04f856e850c8aae0
2025-07-15 09:01:05 +08:00
Weiwen Chen
6ba45fcb5f arm64: dts: rockchip: add rv1126b-evb1-v11-fastboot-emmc.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ie8eea048ef9074c2270ad84477085321a4c2c64d
2025-07-15 09:00:25 +08:00
Chaoyi Chen
7d6ab659b7 arm64: dts: rockchip: rv1126b-pinctrl: Update BT1120/BT656 drive strength
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>
2025-07-14 11:39:43 +00:00
Chaoyi Chen
ff5d56d1f3 drm/rockchip: rgb: Set delay line for RV1126B BT1120/BT656
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>
2025-07-14 11:39:43 +00:00
Weiwen Chen
9e7c8745fe ARM: dts: rockchip: add rv1126b-evb1-v11-spi-nor.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I85660cca2bc5e2116547790bd4a31a9312a57106
2025-07-14 16:46:07 +08:00
Weiwen Chen
c29806c781 arm64: dts: rockchip: add rv1126b-evb1-v11-spi-nor.dts
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I9374464d0f6024f2cb79de96302d4c404e445ae6
2025-07-14 16:44:40 +08:00
Chaoyi Chen
b25696bf69 drm/rockchip: vop: Fix brightness process for RK3506/RV1126B
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>
2025-07-14 02:54:24 +00:00
Simon Xue
3fc5e850f4 arm64: dts: rockchip: rv1126b: Add decom_mmu clk to decom
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>
2025-07-12 11:23:48 +00:00
Chen Shunqing
fe5312f2aa media: rockchip: hdmirx: add RK_HDMIRX_CMD_GET_SCAN_MODE
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I549c04189564cd90698efae73549f15499da0a96
2025-07-12 11:22:27 +00:00
Chen Shunqing
542f74d590 media: i2c: rk628: reconfigure cec state when hdmirx reset
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I22b9f97b0e39874ecc926b618f0f8147209a40e3
2025-07-12 11:22:16 +00:00
Xuhui Lin
dcb85d8d34 spi: rockchip-slave: Support dma cyclic for misc devices
Change-Id: I46ad77c9879f1d89dcc682ac201ff6aac5f46bbe
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
2025-07-12 11:22:01 +00:00
Hu Kejun
2be8f9d5fd media: rockchip: aiisp: support picture width over 4096 in airms algo
Change-Id: I5115494f57fc5a745ba066d32fc9e16b3911eb15
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2025-07-12 16:33:28 +08:00
Hu Kejun
2469020021 media: rockchip: aiisp: update airms algo
Change-Id: I6a1d1b9dd9bc120925da57ea817593bf639c4a80
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2025-07-12 16:32:42 +08:00
Zefa Chen
d5a7bbea0d phy: rockchip: mipi dcphy move apb_rst to runtime resume to avoid break dcphy rx
Change-Id: I097eeb7e3fd7decc4f0d1badd335b2d7176ce223
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2025-07-12 15:21:40 +08:00
Zefa Chen
c348e9697f media: rockchip: vicap fixes error of stream off when one_frame mode
change to mulit_frame mode

Change-Id: I97bc6e891342a78a4079d034876c7ad256abff20
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:17:11 +08:00
Zefa Chen
4ec86e75f7 media: rockchip: vicap fixes error of tool node get raw
Change-Id: Ib0bb1c3266002344b9862844a5d5756478f0ed80
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:16:21 +08:00
Zefa Chen
83f73e5ee5 media: rockchip: vicap fixes error of crop enable state
Change-Id: I7d47f5d40e89198aa3369ad2f1c3ecefb183a331
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 15:10:43 +08:00
Zefa Chen
e66c0f380b media: rockchip: vicap support config complete frame of toisp
Change-Id: I1bea6eb816acbd382f11650e7e736b6a0a65132c
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-12 11:59:25 +08:00
Zefa Chen
9a86c24f4d media: i2c: os12d40 support set wbgain and blc
Change-Id: I9068988f9712dcb47db51416c2906d8a0cfce0a2
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-11 12:13:41 +00:00
Jianwei Zheng
1d2414b4d1 usb: dwc2: platform: Fix dwc2 resume failed for RK3506 OTG1
The utmi iddig signal of RK3506 OTG1 is left floating by default.
Even when the system is suspended and the logic is powered off,
once the system resume and the clock is enabled, the controller's
current mode will be set to Host mode by default, causing dwc2
fail to reinitialize.

To resolve this issue, we found that the ForceHstMode bit in the
GUSBCFG register returns to its default value of 0 after the logic
is powered off. Once the logic power is restored, this bit does not
automatically return to 1. Therefore, we can use this bit to
determine whether the logic has been powered off when dr_mode is
set to Host.

Change-Id: I76c46c9ca7bb9f51f455a6835d3161a3edbeeebb
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2025-07-11 12:04:07 +00:00
Yu Zheng
dce355282d ARM: dts: rockchip: add rv1126b-evb2-v10-dv
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: Ibf7ffb7f1acb6487dfec038d8174211c4f74d7a5
2025-07-11 12:03:17 +00:00
Yu Zheng
39a230accf arm64: dts: rockchip: add rv1126b-evb2-v10-dv
Signed-off-by: Yu Zheng <yu.zheng@rock-chips.com>
Change-Id: I8ef95e04879741ccbf44573fe62020638beb8002
2025-07-11 12:02:46 +00:00
Zefa Chen
383d30e79b media: rockchip: vicap support "cat /proc/rkcif*" to show mipi csi2 error info
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ida097baabb2ab239289c6910ca59ad88203c4fe0
2025-07-11 12:01:01 +00:00
Zefa Chen
87a53f1122 media: rockchip: vicap fixes error triggrer of fs/fe not match when monitor mode enable
Change-Id: I4fa5502064f6a589a87a9e675d00bd0d237a839d
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
2025-07-11 11:59:33 +00:00
Shengfei Xu
02ac4cc230 power: supply: rockchip-charger-manager: Resolving charging anomalies
For devices without a charge pump inserted into a PPS charger,
they must be treated directly as PD chargers.

Change-Id: Ib39dcd5e6842f5cefb00c1a76fbef8ccbee06ab1
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2025-07-11 11:58:11 +00:00
Ziyuan Xu
6eae8a8147 ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-400w-emmc support
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I082c03df1339eb92ce76af5da9534221ca3cf9b2
2025-07-11 07:17:41 +00:00
Ziyuan Xu
327f216065 ARM: dts: rockchip: Add rv1126b-evb2-v10-tb-400w-spi-nor support
Move rv1126b-tb files from arm64 to arm32, and rename
rv1126b-evb2-v10-tb-400w.dts to rv1126b-evb2-v10-tb-400w-spi-nor.dts.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ifa141adf272864de4641b78134798d9501c38f54
2025-07-11 15:10:29 +08:00
Ziyuan Xu
103d8c78c6 arm64: dts: rockchip: remove rv1126b-tb files
AKA rv1126b-thunderboot only support ARM32.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I2775fdbab622b8c90c4b2662ee3f793cd678ddd7
2025-07-11 15:10:07 +08:00
Andrei Kuchynski
26ae45e719 UPSTREAM: usb: typec: displayport: Fix potential deadlock
The deadlock can occur due to a recursive lock acquisition of
`cros_typec_altmode_data::mutex`.
The call chain is as follows:
1. cros_typec_altmode_work() acquires the mutex
2. typec_altmode_vdm() -> dp_altmode_vdm() ->
3. typec_altmode_exit() -> cros_typec_altmode_exit()
4. cros_typec_altmode_exit() attempts to acquire the mutex again

To prevent this, defer the `typec_altmode_exit()` call by scheduling
it rather than calling it directly from within the mutex-protected
context.

Change-Id: I6b97900003c324f5bde6d9ce996871d95f604148
Cc: stable <stable@kernel.org>
Fixes: b4b38ffb38c9 ("usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250624133246.3936737-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frawang.cn@gmail.com>
(cherry picked from commit 099cf1fbb8afc3771f408109f62bdec66f85160e)
2025-07-11 11:22:54 +08:00
Jos Wang
3dc042a43b UPSTREAM: usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode
Although some Type-C DRD devices that do not support the DP Sink
function (such as Huawei Mate 40Pro), the Source Port initiates
Enter Mode CMD, but the device responds to Enter Mode ACK, the
Source port then initiates DP Status Update CMD, and the device
responds to DP Status Update NAK.

As PD2.0 spec ("6.4.4.3.4 Enter Mode Command"),A DR_Swap Message
Shall Not be sent during Modal Operation between the Port Partners.
At this time, the source port initiates DR_Swap message through the
"echo device > /sys/class/typec/port0/data_role" command to switch
the data role from host to device. The device will initiate a Hard
Reset for recovery, resulting in the failure of data role swap.

Therefore, when DP Status Update NAK is received, Exit Mode CMD is
initiated to exit the currently entered DP altmode.

Change-Id: I9dd50aa0df8e0d3f6fd59a35b4da91d4820dd2aa
Signed-off-by: Jos Wang <joswang@lenovo.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250209071926.69625-1-joswang1221@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit b4b38ffb38c91afd4dc387608db26f6fc34ed40b)
2025-07-11 11:02:24 +08:00
Jos Wang
64e8ddbe73 BACKPORT: usb: typec: tcpm: PSSourceOffTimer timeout in PR_Swap enters ERROR_RECOVERY
As PD2.0 spec ("6.5.6.2 PSSourceOffTimer"),the PSSourceOffTimer is
used by the Policy Engine in Dual-Role Power device that is currently
acting as a Sink to timeout on a PS_RDY Message during a Power Role
Swap sequence. This condition leads to a Hard Reset for USB Type-A and
Type-B Plugs and Error Recovery for Type-C plugs and return to USB
Default Operation.

Therefore, after PSSourceOffTimer timeout, the tcpm state machine should
switch from PR_SWAP_SNK_SRC_SINK_OFF to ERROR_RECOVERY. This can also
solve the test items in the USB power delivery compliance test:
TEST.PD.PROT.SNK.12 PR_Swap – PSSourceOffTimer Timeout

[1] https://usb.org/document-library/usb-power-delivery-compliance-test-specification-0/USB_PD3_CTS_Q4_2025_OR.zip

Change-Id: I12947c108a9e8b49b0e9f6f19ce1296415d37d59
Fixes: f0690a25a1 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable <stable@kernel.org>
Signed-off-by: Jos Wang <joswang@lenovo.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Amit Sunil Dhamne <amitsd@google.com>
Link: https://lore.kernel.org/r/20250213134921.3798-1-joswang1221@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 659f5d55feb75782bd46cf130da3c1f240afe9ba)
2025-07-11 10:49:25 +08:00
Liang Chen
b611ab7090 arm64: configs: optimize latency for PREEMPT_RT
Change-Id: I463d66d69d8ab45435511265d0b977040bc26dac
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:30:22 +00:00
Liang Chen
0642495196 ARM: configs: add rockchip_rt.config for PREEMPT_RT
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: If4b3ed245a4f0f4a207409fcb42d3430cbe26dbe
2025-07-11 02:29:55 +00:00
Algea Cao
9b1fbae396 drm/bridge: synopsys: dw-hdmi-qp: Fix hdmi is enabled twice during boot
If hdmi uboot logo is disabled and hdmi resolution is HDMI 2.0
resolution(such as 4k60), hdmi->logo_plug_out will be set to true
and won't be clear before hdmi is enabled. After hdmi is enabled,
hdmi->disabled is set to false, and then mode_changed is set to
true. hdmi will be disabled and enabled again.

hdmi->logo_plug_out is mainly used to determine whether hdmi has
been plugged from the end of uboot to the completion of kernel
driver initialization when the uboot logo is enabled. So when
setting it to true, it is necessary to determine whether the
uboot logo is enabled.

Change-Id: I1256f7d5e531dcb3e3ed8209a7839019aadef32e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2025-07-11 02:27:42 +00:00
Sandy Huang
4924db6630 drm/rockchip: vop2: only esmart/cluster win0 need to manage done bit
The esmart and cluster sub win done bit is controlled by one bit, and we
must use win0 first, so only esmart/cluster win0 need to manage done bit.

Fixes: fc46321d50 ("drm/rockchip: vop2: add support reserved plane display")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I16e16e6b4169f29232dde94c925680e6d44ab3f5
2025-07-11 02:27:16 +00:00
Liang Chen
e91e88fce4 arm64: dts: rockchip: rv1126bp: set init-freq to 600M for npu
Change-Id: I535100d95276518ed4df3afba5fbc50d0f37fb72
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:26:47 +00:00
Liang Chen
b3d69d6c03 arm64: dts: rockchip: rv1126b: adjust opp-supported-hw for npu
Change-Id: Ib151747c2f9f848401ecad9fddea059b4749a4cc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2025-07-11 02:26:47 +00:00