Commit Graph

1274513 Commits

Author SHA1 Message Date
Shawn Lin
4ca55c87f9 PCI: rockchip: dw: Add retrain link support
Speed change is set via dw_pcie_setup_rc(), so if both of links
support gen2 or gen3, auto speed change will happen. However, if
it's not, provide a manual speed change for EP function driver.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ib0dc765452aef0723968c5d48b5b44de24ca141e
2024-09-25 15:41:56 +08:00
Jon Lin
b28ccdbd6d PCI: dw: rockchip: Fully reset controller in initial process
Change-Id: Iee871db366695539a92f86da7ea5971780bf52fe
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-09-25 15:41:48 +08:00
Zefa Chen
8ad666171f arm64: dts: rockchip: rk3576-test5-v10 modify pwdn-gpio of camera
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I117b9608f2247a8401f0bf978019e81e4ad906d0
2024-09-25 15:22:08 +08:00
Damon Ding
2f7fe7a5cc ARM: dts: rockchip: rk3506g-evb1: enable rockchip,vbus-always-on for bt1120/bt656/mcu/rgb display board
The GPIO1_C5 is multiplexed by VO_LCDC_D6, which needed by
bt1120/bt656/mcu/rgb, and USB20_OTG0_VBUSDET.

Enabling rockchip,vbus-always-on can make ADB work well without
the vbus detection pin.

Change-Id: I7fa705436cf8a1e41f0f61f4941c24f3d9f433b0
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-09-25 15:21:25 +08:00
Jianwei Zheng
5aa0cd7143 ARM: dts: rockchip: rk3506g-iotest: add vbus-always-on for u2phy
The default hardware design of rk3506g-iotest does not support
USB VBUS detect, so add vbus-always-on property for u2phy.

Change-Id: I9a1a130333a1843335cf2e28c6b705197f086456
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2024-09-25 15:17:50 +08:00
Jon Lin
9bd53f1e79 net: wireless: rockchip_wlan: bcmdhd: Calling ROCKCHIP_PCIE_PM_CTRL_RESET when wifi on
Change-Id: I07fef33044087354e2ed667121307e54fadbee63
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-09-25 15:13:58 +08:00
Jon Lin
d2f3a5b3ee PCI: rockchip: dw: Optimize the pm process L1SS workflow
Change-Id: I81166253e515ffac1ac1c6de44f40c8f11e04758
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-09-25 15:13:58 +08:00
Jon Lin
c15a51132c spi: rockchip: The cs-high function of the controller is only valid for function io
Change-Id: Ic4af757b625d3a2278f79664097c6394fcb2d7a2
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-09-25 14:57:21 +08:00
Damon Ding
8aa60946d7 ARM: dts: rockchip: rk3506g-evb1: update cma size for bt1120/bt656/mcu/rgb display boards
Sync the cma size with mipi display board. It is needed to allocate
22MB cma to meet the rockit application requirements for rk3506.

Change-Id: I94005a69e17f9d0d6aaedee271ba507cc9596ea8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-09-25 14:52:52 +08:00
Ye Zhang
a7ec1b0ba1 thermal: rockchip: Add trim temperature for rk3506
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I8fd6ae6931c01d285e340670807b68564eb6ffcf
2024-09-25 11:24:57 +08:00
Ye Zhang
97d61e62ad ARM: dts: rockchip: rk3506: Add trim configure for tsadc
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I0c77178696780d160ed52034d80c2e0e2bb1772c
2024-09-25 11:24:57 +08:00
Mingwei Yan
3386aca09d media: rockchip: isp: update iqtool video
1 diff isp version iqtool copy buffer use the same function
2 iqtool before memcpy sync src_buf cache

Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: I969481c3a59fbff6ec621402e4b19d1647345fde
2024-09-25 10:09:10 +08:00
Finley Xiao
d52cfbba89 soc: rockchip: system_monitor: Add support to adjust volt before online first cpu
Change-Id: I66dd0c6c8f4bd05100b41f7e7a98c4d4cf8fe9f3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-24 20:38:00 +08:00
Finley Xiao
300db31c73 cpufreq: dt: Fix crash when cpu offline at low temperature
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic7d363581468990993369a999a7157e6bd10817e
2024-09-24 20:38:00 +08:00
Finley Xiao
7b36fddab7 cpufreq: rockchip: Implement rockchip_cpufreq_online/offline()
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: If6dfb5114a28e46aaad0f77ecb37f9029b607ee2
2024-09-24 20:38:00 +08:00
Wenping Zhang
20e277459e net: wireless: rockchip_wlan: Add missing BH locking around __napi_schdule()
The following errors are seen when wifi is running:
NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!

Fix this problem by adding the BH locking around __napi_schedule, in the same way
it was done in commit e63052a5dd ("mlx5e: add add missing BH locking around napi_schdule()").

Change-Id: I25544b52460639ba95d3cbdd9644ab95f01a2654
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2024-09-24 20:37:18 +08:00
Zhong Shengquan
b0ca1b7b89 ASoC: rockchip: asrc: Fix asrc get parent clock error
Fix the if condition logic in the rockchip_asrc_get_clk_parent
function by replacing the third "&&" with "||".

Change-Id: Ib5c00812bb72c0443ea9565e8d669f7a7fafd156
Signed-off-by: Zhong Shengquan <shengquan.zhong@rock-chips.com>
2024-09-24 18:35:00 +08:00
Finley Xiao
38724c75e9 clk: rockchip: rk3506: Remove CLK_IS_CRITICAL flag for v1pll
Change-Id: I3e4074cbcb15e7ff43238bbd22727109b32b1005
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-24 17:51:36 +08:00
Finley Xiao
3ffefedf76 clk: rockchip: rk3506: Make clk_ddrc critical
Change-Id: I88cd8b72e6667bd95193363b26c9d1d31e9295ea
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-24 17:51:36 +08:00
Zheng zhiqi
db84683134 arm64: dts: rockchip: rk3576-vehicle-evb-v20: enable saiX
1. enable sai1 for TDM card
2. enable sai2 for BT card
3. enable sai4 for FA caard
4. enable spidev0.0 for audio control

Change-Id: Ib9a20936164d5ce5d82ba1736001c66eeaaa8b68
Signed-off-by: Zheng zhiqi <looper.zheng@rock-chips.com>
2024-09-24 16:48:39 +08:00
Algea Cao
cb42b8db86 drm/bridge: synopsys: dw-hdmi-qp: Check that necessary hdmi clock is on when hdmi bind
Check whether ipi/link/vid clk is enabled in
uboot to determine whether the uboot logo is
enabled.

Change-Id: I6da4b0694a3df5a48136c96fa21d5f98dcc8d7c7
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-09-24 14:08:38 +08:00
Finley Xiao
a5e94c5ae1 ARM: dts: rockchip: rv1106: Remove otp arb and pmc clock
Change-Id: I679f1de9961c19f3d8726b4c709d231e46d26838
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 19:51:23 +08:00
Finley Xiao
cb2e07986b arm64: dts: rockchip: rk3562: Remove otp arb clock
Change-Id: I3d9e5a72c5fe218bd5d16499b301d112f8f7d133
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 19:51:23 +08:00
Finley Xiao
e4366b6b62 arm64: dts: rockchip: rk3588s: Remove otp arb clock
Change-Id: If557c82d9a51190670cd873a18cd435e84878128
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 19:51:14 +08:00
Finley Xiao
9afefeba8a clk: rockchip: rv1106: Remove clk_pmc_otp and clk_otpc_arb
Fixes: 73d255eb3b ("nvmem: rockchip-otp: do not close common clk")
Change-Id: I7b73ac1e87bcdab04471eb8805f58fc6a438d7a4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 18:20:37 +08:00
Finley Xiao
993c9c6625 clk: rockchip: rk3562: remove clk_otpc_arb
Fixes: 73d255eb3b ("nvmem: rockchip-otp: do not close common clk")
Change-Id: I719526a754bebbc705c6e283d014e8a7000de3ca
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 18:20:37 +08:00
Finley Xiao
353ab48958 clk: rockchip: rk3588: Removd clk_otpc_arb
Fixes: 73d255eb3b ("nvmem: rockchip-otp: do not close common clk")
Change-Id: I470ec453b67aca985dc04f31897ccab86f12d8ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-23 17:34:36 +08:00
Jianwei Zheng
4849e6cab6 usb: dwc2: fix dwc2 resume failed when device is connected
Current code if the device is connected and do _dwc2_hcd_resume(),
it will goto unlock and exit this function, cause some dwc2
controllers that does not support Partial Power Down mode resume
failed and perform the following error log:

    usb 2-1: reset high-speed USB device number 2 using dwc2
    usb 2-1: device descriptor read/64, error -110
    usb 2-1: device descriptor read/64, error -110

Fixes: c74c26f6e3 ("usb: dwc2: Fix partial power down exiting by
system resume")
Change-Id: I34d449f1286c8122883aedcd830f2744f1a2267d
Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
2024-09-23 16:57:00 +08:00
Guochun Huang
8dd21a945d phy: rockchip: mipi-dcphy: limit the maximum addr according to DC-PHY register map
Fix the issue where the system will reboot when exporting the PHY
registers from user space through the following command:

cat /d/regmap/feda0000.phy-dcphy/registers

or

cat /d/regmap/fedb0000.phy-dcphy/registers

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I46f90a04d15a4e583238e966953bc70fb9c3c150
2024-09-23 16:56:16 +08:00
Cai YiWei
353a8c61a1 media: rockchip: isp: fix isp39 unite stats frame id
Change-Id: I18b6b0109098576f898e07de29df24f797faf9d2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-09-23 09:36:52 +08:00
Yifeng Zhao
63d2f83cdc soc: rockchip: sdmmc_vendor_storage: fix the issue of inaccurate calculation of free size
When the amount of data written increases, more space is allocated,
but when the amount of data written decreases, the allocated space
is reclaimed without updating the value of free_size.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Iecf2af482c1e8af35b9fa3227bcbb597d75f770d
2024-09-20 19:56:32 +08:00
Frank Wang
f4fdb8d83f usb: typec: tcpci: husb311: fix tx failure
Since the hardware bug of HUSB311, its TX fifo become abnormal
when plug in a PD charger after plug out the cable from the PC.

As a workaround, we do ResetTransmitBuffer after each TX packet
is finished to prepare for the next.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ieebd090879a45ee2b5a1720e3debf860712e162c
2024-09-20 14:08:46 +08:00
Zheng zhiqi
f1a9ea8906 arm64: dts: rockchip: rk3576-vehicle-evb-v20: open spi dev
Open spi0:0 dev for audio, control adsp

Change-Id: Ib7c3e3de33b0567b15a43899c43ed637b54aabca
Signed-off-by: Zheng zhiqi <looper.zheng@rock-chips.com>
2024-09-20 09:19:40 +08:00
Sandy Huang
44ccff798b drm/bridge: synopsys: dw-hdmi-qp: add mode covert at dual_connector_split
At split mode or dual connector split, the mode of horizontal direction
must x2.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4583cb575c6714796b63c3dc312eb3c23319b116
2024-09-19 11:03:20 +08:00
Finley Xiao
885afdcd0e PM / devfreq: rockchip_dmc: Fix dev_pm_opp_get_opp_table() return value
Change-Id: I8a3f293bdfc17574735365e5049bdf47ce321770
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-09-19 10:55:47 +08:00
Finley Xiao
8ceb525d09 soc: rockchip: opp_select: Fix dev_pm_opp_get_opp_table() return value
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2f3b2bb6ccf359574a0b8d503f3491d9fa7e2299
2024-09-19 10:33:24 +08:00
Finley Xiao
b6c6cd2b3a soc: rockchip: system_monitor: Fix dev_pm_opp_get_opp_table() return value
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia1db3e6087f57c4d804da779059584c56610e9ef
2024-09-19 10:31:56 +08:00
Ye Zhang
faaec9bb5d ARM: dts: rockchip: rk3506: set DS of pwm pins to level1
According to SI report, the default driver strength should be level1.

Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I2d10de82d9b836a479b38b782732a95f79079deb
2024-09-18 17:30:32 +08:00
Ye Zhang
87108d5ab4 ARM: dts: rockchip: rk3506-pinctrl: Fix driver strengths of some SPI IOs
Fixes: 68cf3d9c46 ("ARM: dts: rockchip: rk3506-pinctrl: Increase driver strengths of some SPI IOs")
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I0e0d75ab72b0a80853437cb9c2dde53bc87c8dd3
2024-09-18 17:30:21 +08:00
Zain Wang
38049431f3 ARM: configs: rk3506: Separate modules configs from defconfig
Separate modules:
1. rk3506-display.config
2. rk3506-ethernet.config
3. rk3506-wifibt.config
4. rk3506-usb-host.config
5. rk3506-usb-peripheral.config
6. rk3506-usb-otg.config

Keep 'm' value to these modules in rk3506_defconfig.

Change-Id: I74d77a29ed6e133e45f1a8cf1c7e9ca46509fe21
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2024-09-18 17:16:44 +08:00
Zain Wang
b3b9046ec5 usb: dwc2: fix compile error in USB_DWC2_HOST mode
If enabled CONFIG_USB_DWC2_HOST, we will get error:

drivers/usb/dwc2/platform.c: In function ‘dwc2_resume’:
drivers/usb/dwc2/platform.c:825:12: error: ‘struct dwc2_hsotg’ has no member named ‘driver’
  825 |   if (!dwc2->driver)
    |            ^~

This is the code for periperal mode, add a macro to
remove them from CONFIG_USB_DWC2_HOST.

Change-Id: Ib2b9622d5cfe5e4c9329030fa10e0635b1aa7fb8
Signed-off-by: Zain Wang <wzz@rock-chips.com>
2024-09-18 17:12:07 +08:00
Guochun Huang
db4eb2bcf1 drm/rockchip: dp: extcon sync for audio in .loader_protect helper
Type: Fix
Redmine ID: #506052
Associated modifications: gerrit links
 Test: test method

Change-Id: I114679d477f33f0a6d8b13d0f72d9c36c41fc40c
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-09-18 14:05:13 +08:00
Guochun Huang
0e7febeb4a drm/rockchip: drv: mv show logo after drm_dev registered
execution of extcon_set_state_sync() within the DP driver’s
.loader_protect helper failed due to dp->audio->extcon not
being allocated in dw_dp_single_audio_init() yet, which resulted
in the audio not work when the power-on logo feature is enabled.
so mv drm_dev_register() before rockchip_drm_show_logo().

Call trace:

  dw_dp_single_audio_init+0xc8/0x194
    dw_dp_encoder_late_register+0x28/0xa8
      drm_encoder_register_all+0x40/0x5c
	drm_modeset_register_all+0x38/0x7c
	  drm_dev_register+0x264/0x2e0
	    rockchip_drm_bind+0x1ec/0x2c8

Type: Fix
Redmine ID: #506052
Associated modifications: gerrit links
Test: test method

Change-Id: I1109a5ed90ac1c36028e050c41349c316d74e859
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2024-09-18 14:04:51 +08:00
Damon Ding
b6270dfe78 drm/rockchip: rgb: add dclk delayline configs for rk3506
Remove redundant parameter passing for 'dclk_delayline', and dclk
delayline configs may be different between bt1120/bt656 and rgb
display interface.

Change-Id: I77b78665a1403ad9d39929b39811069f0ecc130e
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-09-18 10:16:58 +08:00
Yandong Lin
22c5e525ac video: rockchip: mpp: add devices load statistics
1.The default statistical time is 0, means the load statistics function
is disabled.
If want to enable the function, need echo a valid value to
load_interval.
e.g. 1000ms:
$echo 1000 > /proc/mpp_service/load_interval

2.show load info:
rk3588_t_evb7:/ # cat /proc/mpp_service/load
fdb51000.avsd-plus        load:   0.00% utilization:   0.00%
fdb50400.vdpu             load:   0.00% utilization:   0.00%
fdb50000.vepu             load:   0.00% utilization:   0.00%
fdb90000.jpegd            load:   0.00% utilization:   0.00%
fdba0000.jpege-core       load:   0.00% utilization:   0.00%
fdba4000.jpege-core       load:   0.00% utilization:   0.00%
fdba8000.jpege-core       load:   0.00% utilization:   0.00%
fdbac000.jpege-core       load:   0.00% utilization:   0.00%
fdbb0000.iep              load:   0.00% utilization:   0.00%
fdbd0000.rkvenc-core      load:  97.56% utilization:  93.45%
fdbe0000.rkvenc-core      load:  97.33% utilization:  92.51%
fdc38100.rkvdec-core      load:   0.00% utilization:   0.00%
fdc48100.rkvdec-core      load:   0.00% utilization:   0.00%
av1d-master               load:   0.00% utilization:   0.00%

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0b1c6d3efc7cd7708e7f367ad917b865db67a08a
2024-09-14 14:47:21 +08:00
Damon Ding
14dac2f903 ARM: dts: rockchip: rk3506g-evb1: fix pinctrl of rgb for mcu display board
Fix the pinctrl of rgb to 'mcu_rgb565_pins', because the driver
strength configs of rgb and mcu are different for rk3506.

Change-Id: I488cdfd13e42c862be0f8ecd10bab215e87e87b8
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-09-13 15:49:55 +08:00
Damon Ding
af73c672cb ARM: dts: rockchip: rk3506: modify default DS level for vop pinctrl configs
According to SI report, default drive strength of vop pinctrl
configs should be improved as described below:

bt1120/bt656:
CLK              level4
DATA             level2

mcu:
RS/WEN/CS/REN    level2
DATA             level0

rgb:
CLK              level3
HSYNC/VSYNC/DEN  level2
DATA             level2

Add a set of pinctrl configs which named "mcu_*", because the
driver strength configs of rgb and mcu are different for rk3506.

Change-Id: Ide4dd04531d8760194ab745d2fb348c644f27c4f
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-09-13 15:49:55 +08:00
Ye Zhang
4dc35e3247 thermal: rockchip: Add trim temperature for rk3576
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I6ba9a60fb389b12a6d63ea3b19e271cf9d5ecad5
2024-09-12 19:41:01 +08:00
Ye Zhang
3e7349667d arm64: dts: rockchip: rk3576: Fix trim configure for tsadc
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: Id7399f84a7d3f75213528c89151efe1862b1b02e
2024-09-12 19:40:42 +08:00
Sugar Zhang
2b6899e2d0 ASoC: rockchip: sai: Fix mclk check
Before:
rockchip-sai ff810000,sai: mismatch mclk: 12287999, expected 0 (+/- 5Hz)

After:
rockchip-sai ff810000,sai: mismatch mclk: 12287999, at least 24576000

Fixes: 1831ca1cdc ("ASoC: rockchip: sai: Fix mclk rate check")

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I7addcf70104515c50463a42fc9fd7fe46a9456fd
2024-09-12 18:08:29 +08:00