Commit Graph

1274528 Commits

Author SHA1 Message Date
Chandler Chen
e111685605 video: rockchip: mpp: rk3562 use cru reset
Change-Id: Ib37af192325ed685aad5bdf55827382d9de61e2b
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
2024-09-27 15:19:32 +08:00
Cai YiWei
7a96133c00 media: rockchip: isp: add fpn function
Change-Id: Ibe5424a6edcc7cf41859bdd7e51a76d17418cb8e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-09-27 14:08:47 +08:00
Cai YiWei
ea005bee31 media: rockchip: isp: fix lsc switch for isp30
Change-Id: Ib953aadd25cf73f956197e19ccd9155173530fab
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-09-27 09:05:47 +08:00
Mingwei Yan
dd42ee0429 media: rockchip: isp: fix isp32_lite repeat register iqtool video
Signed-off-by: Mingwei Yan <mingwei.yan@rock-chips.com>
Change-Id: Icca9f5f9138384e59e65bca1ed8533e594c4e8ad
2024-09-26 19:02:16 +08:00
Luo Wei
956e3a840a arm64: dts: rockchip: rk3576-vehicle-evb: add serdes register checking support
Change-Id: I2350cb6bb32c29cc5e1e65236ef115ddd68429c8
Signed-off-by: Luo Wei <lw@rock-chips.com>
2024-09-26 18:59:40 +08:00
Luo Wei
e81b96e37a arm64: dts: rockchip: rk3576-vehicle-evb: disable ufs default
Change-Id: I442a745cf444679897feb8ba97c341c10ab0c243
Signed-off-by: Luo Wei <lw@rock-chips.com>
2024-09-26 18:59:28 +08:00
Chaoyi Chen
6d08fe1392 arm64: dts: rockchip: Add fp9931 pmic config for rk3576-ebook-v10
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I436749871368488b5e80f178d1b4302f2f34c17b
2024-09-25 19:06:54 +08:00
Chaoyi Chen
37e6a4d881 arm64: dts: rockchip: Add sy7636a power good pin for rk3576-ebook-v10
Change-Id: I08c20297b17c72e73f161d0d6c2ee8b4ccf2fad9
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-09-25 19:06:54 +08:00
Shawn Lin
50cb3fcd18 PCI: rockchip: dw: Add dwc pmu support for rockchip
Remove thread init if using DWC_PCIE_PMU,
because late pcie bus scanning would miss probing from dwc_pcie_pmu_init().

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ia27ee055aa3e63deeb7fd646411c3542b7019288
2024-09-25 18:51:11 +08:00
Shawn Lin
6cb6a00862 perf/dwc_pcie: Add support for Rockchip vendor devices
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I6fde80440d2fa058b38a7d927eb846f477812b5f
2024-09-25 18:50:01 +08:00
Shuai Xue
dcfa6c8947 BACKPORT: drivers/perf: add DesignWare PCIe PMU driver
This commit adds the PCIe Performance Monitoring Unit (PMU) driver support
for T-Head Yitian SoC chip. Yitian is based on the Synopsys PCI Express
Core controller IP which provides statistics feature. The PMU is a PCIe
configuration space register block provided by each PCIe Root Port in a
Vendor-Specific Extended Capability named RAS D.E.S (Debug, Error
injection, and Statistics).

To facilitate collection of statistics the controller provides the
following two features for each Root Port:

- one 64-bit counter for Time Based Analysis (RX/TX data throughput and
  time spent in each low-power LTSSM state) and
- one 32-bit counter for Event Counting (error and non-error events for
  a specified lane)

Note: There is no interrupt for counter overflow.

This driver adds PMU devices for each PCIe Root Port. And the PMU device is
named based the BDF of Root Port. For example,

    30:03.0 PCI bridge: Device 1ded:8000 (rev 01)

the PMU device name for this Root Port is dwc_rootport_3018.

Example usage of counting PCIe RX TLP data payload (Units of bytes)::

    $# perf stat -a -e dwc_rootport_3018/Rx_PCIe_TLP_Data_Payload/

average RX bandwidth can be calculated like this:

    PCIe TX Bandwidth = Rx_PCIe_TLP_Data_Payload / Measure_Time_Window

Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20231208025652.87192-5-xueshuai@linux.alibaba.com
[will: Fix sparse error due to use of uninitialised 'vsec' symbol in
 dwc_pcie_match_des_cap()]
Signed-off-by: Will Deacon <will@kernel.org>
(cherry-picked from af9597adc2f1e3609c67c9792a2469bb64e43ae9)

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I470f4dc2791168760517c77dd31a4dacd7dab591
2024-09-25 18:42:36 +08:00
Shuai Xue
1b627c690a UPSTREAM: PCI: Add Alibaba Vendor ID to linux/pci_ids.h
The Alibaba Vendor ID (0x1ded) is now used by Alibaba elasticRDMA ("erdma")
and will be shared with the upcoming PCIe PMU ("dwc_pcie_pmu"). Move the
Vendor ID to linux/pci_ids.h so that it can shared by several drivers
later.

Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# pci_ids.h
Tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20231208025652.87192-3-xueshuai@linux.alibaba.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry-picked from ad6534c626fedd818718d76c36d69c7d8e7b61cc)

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I86188f119a42548ab777df0449f7d0a933f34d12
2024-09-25 18:41:58 +08:00
Shuai Xue
0270f32f20 UPSTREAM: PCI: Move pci_clear_and_set_dword() helper to PCI header
The clear and set pattern is commonly used for accessing PCI config,
move the helper pci_clear_and_set_dword() from aspm.c into PCI header.
In addition, rename to pci_clear_and_set_config_dword() to retain the
"config" information and match the other accessors.

No functional change intended.

Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/20231208025652.87192-4-xueshuai@linux.alibaba.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry-picked from ac16087134b837d42b75bb1c741070b6c142f258)

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I35125190a4dd8ba25e6ec14b4712750605c22285
2024-09-25 18:40:59 +08:00
Luo Wei
21b66851f2 arm64: dts: rockchip: rk3576-vehicle-evb: fix evb v20 pwm setting
Change-Id: Ibcfbf87806151b479cc59a979ea8049b30f11258
Signed-off-by: Luo Wei <lw@rock-chips.com>
2024-09-25 17:05:28 +08:00
Jon Lin
3f258a6c3c phy: rockchip-snps-pcie3: Check the mplla_state/mpllb_state
Change-Id: I5463cace81bb79b6024bc0ac9d0d8de5bfb9ebdb
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-09-25 15:42:51 +08:00
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