Commit Graph

1271712 Commits

Author SHA1 Message Date
Jon Lin
784edc6ed9 spi: rockchip-test: Add spi_rockchip_test_spi_ids id_table
Change-Id: I9bc509aca655f05e6a91c014da8b6cffbf91853f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-14 10:32:38 +08:00
Liang Chen
1edcb4fdaa arm64: dts: rockchip: rk3568: remove rockchip,max-volt for cpu0_opp_table
The property rockchip,max-volt is not used for cpu0_opp_table, so remove it.

Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: If0493c7029a8c67a790771cadff93e26e0f2df08
2024-05-14 10:31:54 +08:00
Hu Kejun
c135a425bc media: i2c: dw9763: support set max logical pos ioctl
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Id83b55310426b3a526036496b888b559df8f3db6
2024-05-14 10:29:34 +08:00
Hu Kejun
f8f1fb7c3f media: i2c: ov13855: support get otp info
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Idd9f3fe23249ebfbe85d5ea714c0136b53b023ba
2024-05-14 10:28:11 +08:00
Algea Cao
d21de2cd70 drm/bridge: dw-hdmi-qp-hdcp: Fix timeout for ksv list ready
CTS requires a minimum timeout period of 5s.

Change-Id: I6312d3334acb9171a81c13e4eda6900b7fb429da
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-05-14 10:26:11 +08:00
Yandong Lin
b775c13815 arm64: dts: rockchip: rk3576: add rkvdec_sram support
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ibb3b7d6ab0a6950d2ffd897d0bb28885826b725d
2024-05-14 10:22:39 +08:00
Algea Cao
c1dcc6ec1e drm/rockchip: dw_hdmi: Fix hdmi cts hf1-31 failed
Hdmi cts hf1-31 required filtering yuv420 mode that frequency
exceeds the max tmds clock of edid.

Change-Id: I746a9f910444845ab84b7804ebc63bb934363ebe
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-05-13 20:32:19 +08:00
Chen Shunqing
b0186da406 arm64: dts: rockchip: rk628-hdmi2csi: rk628 change the interrupt to high level trigger
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ie1123db45990fe164f06b2c8f40d12d4b54375e8
2024-05-13 20:30:32 +08:00
Chen Shunqing
68693b6b4a arm64: dts: rockchip: rk3576-evb1-v10-rk628-hdmi2csi: enable cec for rk628 hdmirx
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I6efa666debb66ece04be3d4725631de3cd1d0165
2024-05-13 20:29:45 +08:00
Chen Shunqing
ad4f5d739b media: i2c: rk628: fix cec no response when send messages
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: If9c4dbe6a4aafe9117eb12140da632b8b59e5988
2024-05-13 20:25:48 +08:00
Jon Lin
2de9a7b015 spi: spidev-rkslv: Add spidev_rkslv_spi_ids
Change-Id: I1e6109f17a2d113f22f8f0206425aacbd3f12994
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-13 20:21:28 +08:00
Jon Lin
e53d33a889 spi: spidev-rkmst: Add spidev_rkmst_spi_ids
Change-Id: I45db0e79cbddab0a27337a111f20a5228add3489
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-13 20:20:55 +08:00
Jon Lin
49e918deab spi: spidev: Add spidev id_table
Fixes: 4239fdd85b ("spi: spidev: Add rockchip spidev compatible string")
Change-Id: Icb09c853361e987bf7e4d2022fc3b35548a96270
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-05-13 20:18:53 +08:00
Jianwei Fan
7f0bc0de39 media: i2c: rk628: add nosignal process when get_fmt and enable stream
Change-Id: Idead58407889897d1aaddfa395d0c0eb38d7a211
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-05-13 16:51:23 +08:00
Jianwei Fan
10695ebb8e media: i2c: rk628: get_fmt width must align to 8
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I46c48b5e372352b599d44a74ca0ad8505200edd3
2024-05-13 16:51:23 +08:00
Zorro Liu
b661b75c97 arm64: dts: rockchip: rk3576-ebook: remove no use defined
Type: Function
Redmine ID: #N/A
Associated modifications: N/A
Test: N/A

Change-Id: I6aa121b6942976e67913ac52167753e1676fa354
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2024-05-11 18:11:15 +08:00
Sandy Huang
528ca6b886 drm/rockchip: rgb: deinit output_if and output_if_left_panel for rgb output
If less this commit, RGB output will be enabled by mistake when rgb
output is switched between different vp.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I673488ee63aeb18fb511f2d1d46672e83455a940
2024-05-11 16:29:40 +08:00
Tao Huang
b1543b9a25 media: rockchip: ispp: Disable dump_file on GKI
GKI do not export filp_open() and kernel_write().

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I14f0fe1d297632d19ab76c7ed63893b1670da545
2024-05-11 15:15:53 +08:00
Tao Huang
95c90bc02e input: sensors: mc3230: Call filp_open() only when CONFIG_NO_GKI
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic125f35520517ef99b985dc5936ab3b2e7191957
2024-05-11 14:49:02 +08:00
Jason Zhu
320cb810fe ASoC: rockchip: pdm_v2: make the volume TLV to match the units 0.01dB
The volume have a step of 0.375dB, but TLV uses the units 0.01dB. It should
be changed to a step of 0.75dB to match the units of TLV.

Change-Id: Ia7a8b8449b0236f01ade5ba89064f117f5671964
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-05-11 12:13:01 +08:00
Jason Zhu
3ea5c21bd5 ASoC: rockchip: pdm_v2: set the pdm default gain to 24dB
Set the default gain 24dB, this parameter can get better
performance if the voice energy is lower. In other words this
can improve PDM IP SNR.

So the applicable range of this is for sound intensity below 100dB.
If you want to record stronger sound intensity, you must set
PDM gain register but not soft gain-controller.

Change-Id: Ie8883064d124745c8ac2eec2034ccf94dcd362cb
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2024-05-11 12:13:01 +08:00
Caesar Wang
aec1f47efe arm64: dts: rockchip: Add OP-TEE firmware node for rk3576-linux.dtsi
Add a new firmware node for OP-TEE to the rk3576-linux.dtsi file. OP-TEE is a
trusted execution environment that provides secure execution of trusted
applications.

The firmware node includes the following properties:

- compatible: Set to "linaro,optee-tz" to identify the node as an OP-TEE
  firmware node.
- method: Set to "smc" to specify that the OP-TEE firmware is accessed using
  the ARM Secure Monitor Call (SMC) instruction.

This change allows the kernel to properly initialize and use the OP-TEE
firmware on the RK3576 platform, enabling secure execution of trusted
applications and providing additional security features.

Change-Id: Id8c2fcfcb9176c90afe82d12ee9392e20c8446d1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2024-05-11 10:57:21 +08:00
Jianwei Fan
a4c4ab2f3a media: rockchip: vicap fix current files is NULL when release fd
Change-Id: I1a0907bcf2c75518e8998df3d50136008d3a67f7
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-05-10 20:10:59 +08:00
Yu Qiaowei
b911658d78 video: rockchip: rga3: clear 'ret' on reset request
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I1b9b213621f821ab9e5e2ad1148e074de37a3517
2024-05-10 16:50:04 +08:00
Tao Huang
90eeed27ac media: i2c: os04a10: Fix lockdep warning
[    4.433265] WARNING: CPU: 4 PID: 1 at drivers/media/v4l2-core/v4l2-ctrls-api.c:874 __v4l2_ctrl_s_ctrl+0x68/0x8c
...
[    4.443578] Call trace:
[    4.443800]  __v4l2_ctrl_s_ctrl+0x68/0x8c
[    4.444154]  os04a10_probe+0x468/0x8d4
[    4.444488]  i2c_device_probe+0x31c/0x350

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id99cea0ff6a6fed9856a37c0caf2771124882c1c
2024-05-10 11:19:39 +08:00
Tao Huang
ab482114ee media: i2c: imx464: Fix lockdep warning
[    3.369732] WARNING: CPU: 4 PID: 1 at drivers/media/v4l2-core/v4l2-ctrls-api.c:874 __v4l2_ctrl_s_ctrl+0x68/0x8c
...
[    3.380218] Call trace:
[    3.380446]  __v4l2_ctrl_s_ctrl+0x68/0x8c
[    3.380815]  IMX464_probe+0x44c/0x81c
[    3.381165]  i2c_device_probe+0x31c/0x350

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6dd64d981258c2a7031881630cd74748771cc4cc
2024-05-10 11:19:31 +08:00
Algea Cao
ac087a3cab drm/rockchip: vop2: Fix sharp was disabled by mistake
When vp0 and other VPs are enabled at the same time, it is necessary
to restrict only vp0 to operate sharp registers, otherwise sharp will be
turned off by mistake.

Change-Id: I81778262a1b669a2f4b15963cb544849a96e89cf
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-05-10 10:00:18 +08:00
Mingwei Yan
9d581d0ef4 media: rockchip: vpss: fix online use channel assigned to offline
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: Id7dba90c6162ffe05efdc35b23fc5bdfb9b872a5
2024-05-10 09:11:25 +08:00
William Wu
a3c8a03bae usb: gadget: composite: Fix bcdUSB for non-SuperSpeed gadget
This patch set bcdUSB to 0x0200 for non-SuperSpeed gadget
which disable LPM. It can avoid usb bus enter LPM.

Test on RK356X platform, connect USB2.0 ADB to the PC USB
host port, without this patch, the usb bus will enter LPM
dynamically and trigger the USB DWC3 controller suspend
interrupt event frequently (more than 1000 interrupts per
second).

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id0b9d54800e471512a417933868f76181c89e99d
2024-05-09 14:11:24 +08:00
Zhang Yubing
941de7d1c6 drm/rockchip: vop2: print fixed timing when dump vop info
Change-Id: Ia111bb91d5e436fbfa5fee67f6db76a250fc61a4
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-09 10:57:19 +08:00
Zhang Yubing
4663ed8792 drm/rockchip: dw-dp: use mode crtc_* timing for hardware config
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Change-Id: Ibb9564318ea9b14575cc5cb8695495088a4f0c4d
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-05-09 10:57:19 +08:00
Damon Ding
b935b0aa0c drm/rockchip: analogix_dp: use mode crtc_* timing for hardware config
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Change-Id: I14dd9596445d5cac0297fcf6306a82b40b31cdaa
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-05-09 10:57:19 +08:00
Chaoyi Chen
96708c3281 drm/rockchip: lvds: use mode crtc_* timing for hardware config
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I219f440c922847f0b0affaaaa268161213fa5f78
2024-05-09 10:57:19 +08:00
Sandy Huang
a10da2195c drm/rockchip: dsi: use mode crtc_* timing for hardware config
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I2b20b6345149cc96f6d12ccc9d6b41b85d6b9c10
2024-05-09 10:57:19 +08:00
Sandy Huang
a34e2cbc91 drm/rockchip: dsi2: use mode crtc_* timing for hardware config
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie8a3855677606720214e41d99b90b9ff490e1db2
2024-05-09 10:57:19 +08:00
Sandy Huang
9915f0b201 drm/rockchip: vop2: keep mode origin timing and fixup crtc timing
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6dd48ba725673ec0ad33e8f59435a8b90913e149
2024-05-09 10:57:19 +08:00
Sandy Huang
2b31b121d9 drm/rockchip: drv: add mode crtc_* timing covert
The mode contains two copies of timings, first are the plain and
origin timings, this should keep unchanged, the second are copy
from the first timing by add some computed and special fixup, this
is associate with hardware.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ib841af1bbdc970d205d8aec3f83c6238a13bdede
2024-05-09 10:57:19 +08:00
Jianwei Fan
3e568d5f2f phy: rockchip: csi2_dphy: fix digital part reset before set continue mode
Change-Id: I7b6de73e1aa2b1e794633bd33086d640e637c483
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-05-09 10:52:14 +08:00
Zefa Chen
48fab7147a phy: rockchip: csi2-dphy: fixes error point of dcphy logic node for rk3576
This error resulted in the failure to reinitialize dcphy rx when resetting dcphy tx

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I3362505437102fb09585f74ce2cfa362c9a2fe76
2024-05-09 10:50:21 +08:00
Zhibin Huang
ad6b958b4d drm/panel: panel-simple: add connector-type property parse
Type: Function
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I60f9788755a54ba1cd81d62f793ca574e5ab4ddf
2024-05-09 09:41:19 +08:00
Alexey Khoroshilov
4e22fa3f49 UPSTREAM: ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work()
There is a path in rt5645_jack_detect_work(), where rt5645->jd_mutex
is left locked forever. That may lead to deadlock
when rt5645_jack_detect_work() is called for the second time.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Change-Id: I89bc002a8d02614917dd056e0f7ec189f72cd6ad
Fixes: cdba4301adda ("ASoC: rt5650: add mutex to avoid the jack detection failure")
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Link: https://lore.kernel.org/r/1707645514-21196-1-git-send-email-khoroshilov@ispras.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 6ef5d5b92f7117b324efaac72b3db27ae8bb3082)
2024-05-09 09:15:05 +08:00
William Wu
fc50ca8555 usb: dwc3: drd: Avoid host enter runtime suspend during probe
On rockchip platforms, if the dr_mode supports otg, it will
allow dwc3 pm runtime and put the dwc3 in runtime suspend
synchronously at the end of dwc3 probe. It works well in most
scenarios with USB-C or USB-A interface.

However, for USB Micro interface with ID pin, if ID pin is
pull to low by OTG to Host cable during probe, the drd_work
which called from the dwc3_core_init_mode() maybe scheduled
before pm_runtime_put_sync_suspend. In this case, the dwc->
current_dr_role is DWC3_GCTL_PRTCAP_HOST when enter runtime
suspend.

Later in xhci_plat_probe, it try to do pm runtime resume, but
it fail to do dwc3_core_init_for_resume() in the dwc3_resume_common()
because the condition "!PMSG_IS_AUTO(msg)" is not true for the
current_dr_role DWC3_GCTL_PRTCAP_HOST, so it can't initialize
the dwc3 core.

This patch do dwc3_set_mode after pm_runtime_put_sync_suspend
if EXTCON_USB_HOST state is true, it can avoid host enter runtime
suspend during probe.

With this patch, it can fix otg host mode fail to detect device
using a Micro OTG cable at system boot time.

Change-Id: I8b71f8c2490988b51a89bad5c880fe3cdeba2bfa
Signed-off-by: William Wu <william.wu@rock-chips.com>
2024-05-08 19:05:32 +08:00
William Wu
31bf36387a phy: rockchip: usbdp: Select utmi clock for DP 4lanes mode
For Type-C to DP 4xlanes adapter, it is detected as
DP 2xlanes + USB3.0 DFP at the first time, and after
VDM negotiation completed, it can be detected as DP
4xlanes, in this case, the USBDP PHY needs to do mode
change in the udphy_power_on. During the mode change
process, the USBDP PHY will disable the PHY clocks
and assert the PHY reset, this also turn off the PIPE
clock which used for the source clock of the USB
controller. In order to safely disable the USBDP PHY,
it needs to select the UTMI clock instead of the PIPE
clock for the USB controller.

Fixes: 0b1d72b40c ("phy: rockchip: usbdp: Avoid access usb grf during dp phy power on")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I5e055aa466af936a9a7fd1a59bbbe4ac8350a696
2024-05-08 19:05:11 +08:00
Zefa Chen
e6d4dee8cd media: rockchip: vicap fixes err buffer state of buffer init
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I36207f2ba3c1c597e09cba1fe9749bfd0b0ae283
2024-05-08 18:39:40 +08:00
Dingxian Wen
a8a0964ddf arm64: dts: rockchip: rk3568-evb2: add lt6911uxc configuration
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I27e7cd02314fb288a4f553105de1027975b8e9d6
2024-05-08 15:02:25 +08:00
Tao Huang
fce55f8eb2 Merge tag 'v6.1.75'
This is the 6.1.75 stable release

* tag 'v6.1.75': (2623 commits)
  Linux 6.1.75
  Revert "Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d""
  arm64: dts: armada-3720-turris-mox: set irq type for RTC
  Revert "KEYS: encrypted: Add check for strsep"
  riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping
  block: Remove special-casing of compound pages
  i2c: s3c24xx: fix transferring more than one message in polling mode
  i2c: s3c24xx: fix read transfers in polling mode
  ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work
  selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
  mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
  loop: fix the the direct I/O support check when used on top of block devices
  ethtool: netlink: Add missing ethnl_ops_begin/complete
  kdb: Fix a potential buffer overflow in kdb_local()
  ipvs: avoid stat macros calls from preemptible context
  netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
  netfilter: nf_tables: skip dead set elements in netlink dump
  netfilter: nf_tables: do not allow mismatch field size and set key length
  netfilter: bridge: replace physindev with physinif in nf_bridge_info
  netfilter: propagate net to nf_bridge_get_physindev
  ...

Conflicts:
	drivers/clk/rockchip/clk-rk3568.c
	drivers/devfreq/event/rockchip-dfi.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
	drivers/i2c/busses/i2c-rk3x.c
	drivers/i2c/i2c-core-base.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	drivers/nvme/host/nvme.h

Change-Id: I9649ece83925659bca59cced0be24f0bd165822a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-05-08 11:14:32 +08:00
William Wu
0bf324da22 usb: gadget: f_hid: fix zero length packet transfer for ep0
If the hid transfer with size divisible to EP0 max packet
size, it needs to set the req->zero to true, then the usb
controller can transfer a zero length packet at the end
according to the USB 2.0 spec.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Iae8c06966efe49c3a33213f9c36dd752633e8bd1
2024-05-07 20:53:42 +08:00
William Wu
0ca707d005 usb: gadget: f_hid: fix zero length packet transfer
If the hid transfer with size divisible to EPs max packet
size, it needs to set the req->zero to true, then the usb
controller can transfer a zero length packet at the end
according to the USB 2.0 spec.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia63060b4551d30821beaf494c1ccd7dfb3b6ca22
2024-05-07 20:53:42 +08:00
Chen Shunqing
47e0b52d12 media: i2c: rk628: extended hpd pull down time
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I6a1d531f9c37ad4d7873bd86f2d5dc1f6e66e75f
2024-05-07 20:49:40 +08:00
Chen Shunqing
c7111f012d media: i2c: rk628: remove hdmirx ctrl reset for rk628f
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I2941f2269f8ae64fdaf1c1d399eb9b5d68b199db
2024-05-07 20:46:49 +08:00