Commit Graph

1274612 Commits

Author SHA1 Message Date
Shawn Lin
fbdf4ef963 PCI: rockchip: dw: Add remove() support
Add ->remove() support is to meet the requirement of modular
use and test unbind/bind process massively in case we change
the probe() process.

Change-Id: I6267e7e1b55575069179150a10fdfb7b4da5ae52
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-10-21 19:40:52 +08:00
Shawn Lin
e15707617c PCI: rockchip: dw: remove wakeup if attached device is down
device_init_wakeup is used for PD driver to leave power-domain
opened during suspend. This feature was originally designed for
Wi-Fi. Check Wi-Fi's power to see if we need to remove wakeup
support before into suspend.

Change-Id: I468157b1d5f9775e3c961d1d059b167c0bb95395
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-10-21 19:40:52 +08:00
Shawn Lin
666775e30a PCI: rockchip: dw: Add runtime pm support
Currently, the PCIe pd is in unsupported state which fails to power
down it even if not devices attached.This patch is required when the pcie
controller sits on a bus with its own power domain and clocks which are
controlled via a bus driver like simple pm bus.

Change-Id: Ic0fbaec82a25b92e9b874aa3003f0b18451985a6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-10-21 19:40:52 +08:00
Tao Huang
7073ff96a5 drm/rockchip: dw-dp: Include linux/random.h
drivers/gpu/drm/rockchip/dw-dp.c:567:9: error: implicit declaration of function 'get_random_bytes'

Fixes: 7d048d6dac ("drm/rockchip: dw-dp: Add HDCP function support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id1c9fc3570877fb6b9900e0a107cff7efb6a91da
2024-10-21 19:40:52 +08:00
Weixin Zhou
ba11507650 arm64: dts: rockchip: rk3576-eink: adjust dmc freq threshold
In order to reduce the power consumption

Change-Id: I251d142bf22526889f7bd7afe3d8a96db2c5dcac
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2024-10-21 19:40:52 +08:00
Liang Chen
6ddfd0766a arm64: dts: rockchip: rk3562j: add opp-table for overdrive mode
Change-Id: I4c39b4e252ec445c080ed0a165853e76c9d1b25c
Signed-off-by: Liang Chen <cl@rock-chips.com>
2024-10-21 10:38:08 +08:00
Elaine Zhang
c4d496df3b arm64: dts: rockchip: rk3562j: remove duplicate can node
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7396ebf0e9a02b395a222a7bedb2d6a353faa544
2024-10-21 10:38:08 +08:00
Shunqian Zheng
f9a997e8c0 ARM: configs: rk3502: use standalone recovery config
Becuase recovery kernel needs initramfs and much smaller than
normal boot kernel, to split them to save disk size and memory usage.

The rk3502-recovery.config and rk3502-robot.config are both based on
rk3506_defconfig.

Change-Id: Id236fe486037aaa958d51ad0a0f5ac84ccaec8fa
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2024-10-18 14:37:26 +08:00
Damon Ding
8f203c43d9 drm/rockchip: gem: remove unused func rockchip_gem_mmap_buf()
The func can be replaced by drm_gem_mmap_obj().

Change-Id: I8a0687ee6f6df70129b8978e993d22158c2c3d64
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-10-18 14:36:37 +08:00
Damon Ding
cab061d263 drm/rockchip: fbdev: replace rockchip_gem_mmap_buf() by drm_gem_mmap_obj() in .fb_mmp()
The rockchip_gem_mmap_buf() will call .mmap() of struct
drm_gem_object_funcs twice;

One is:
rockchip_gem_mmap_buf() -> drm_gem_mmap_obj() ->
rockchip_gem_object_funcs.mmap() -> rockchip_drm_gem_object_mmap()

The other is:
rockchip_gem_mmap_buf()-> rockchip_drm_gem_object_mmap()

This will cause the -EBUSY return of vm_map_pages() ultimately.

Change-Id: I3de9eb23f81afa437087e2276d16dd8fb4c003d6
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-10-18 14:36:37 +08:00
Joseph Chen
d883deb664 ARM: configs: rk3506: Add rk801 regulator
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Iae40ae4b73cde8b1449b53d329b5db5bc1d91a19
2024-10-18 09:37:06 +08:00
Joseph Chen
ef4c4aba2a regulator: rk801: Add driver and fix voltage scale issue
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I0fc66ed8e4279a3fbe1ed9d791de745ffaa30891
2024-10-18 09:35:31 +08:00
Joseph Chen
7db526d176 ARM: dts: rockchip: rk3506-rk801: Add pwrctrl-gpios and vcc_3v3 state mem
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I575a3eaff34e52de4828d80137c87ac6087f5f0e
2024-10-18 09:35:31 +08:00
Tao Huang
c8b3b90ca8 media: i2c: rk628: select CEC_CORE
Fix build error for !CEC_CORE:
drivers/media/i2c/rk628/rk628_hdmirx.c:1235:17: error: implicit declaration of function 'cec_transmit_attempt_done' [-Werror=implicit-function-declaration]
drivers/media/i2c/rk628/rk628_hdmirx.c:1239:17: error: implicit declaration of function 'cec_received_msg' [-Werror=implicit-function-declaration]
drivers/media/i2c/rk628/rk628_hdmirx.c:1252:9: error: implicit declaration of function 'cec_queue_pin_hpd_event' [-Werror=implicit-function-declaration]
drivers/media/i2c/rk628/rk628_hdmirx.c:1284:21: error: implicit declaration of function 'cec_allocate_adapter'; did you mean 'cec_delete_adapter'? [-Werror=implicit-function-declaration]
drivers/media/i2c/rk628/rk628_hdmirx.c:1284:19: error: assignment to 'struct cec_adapter *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib395ed380926d93121ba233b1ce5ce273024de36
2024-10-17 20:10:36 +08:00
Zhibin Huang
efb2e22117 phy: rockchip: mipi-dcphy: optimize pll and ssc calculation
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: If77c1e6526041fdeae07bdc174cddf01bbee4f49
2024-10-17 19:29:27 +08:00
ZiHan Huang
918d45834b ARM: dts: rockchip: rk3506g-demo-display-control disabled uart4 rtsn
Change-Id: Ied346b71a376863d3de204c3195d02233038674c
Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
2024-10-17 19:03:40 +08:00
Cai YiWei
a60fdb9e9d media: rockchip: isp: fix dhaz unite for isp39
Change-Id: If7e3587494f454acae74d207c6941c2577439f4b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-10-17 14:37:16 +08:00
Tao Huang
df0794fc58 spi: rockchip-flexbus-spi: Fix build warning for !PM_SLEEP
drivers/spi/spi-rockchip-flexbus-spi.c:367:12: error: 'rk_flexbus_spi_resume' defined but not used [-Werror=unused-function]

Change-Id: I1a8cf00bc51260501847f9797001bf4e10243240
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 19:50:13 +08:00
Algea Cao
bf1992513c drm/rockchip: Fix post csc rgb2rgb matrix
Fixes: 9ce43aae96 ("drm/rockchip: fix some csc parameters error")

Change-Id: I2baaff2c3f9acda2e48c8c6a1cc9cfae1ed232b4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-10-16 19:48:05 +08:00
Elaine Zhang
42f75109e5 arm64: dts: rockchip: add can nodes for rk3562
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I5cf2df3256e6d3140017766feeacc212930b0f97
2024-10-16 17:47:20 +08:00
Elaine Zhang
ee262b3382 net: can: rockchip: add rk3562 can driver
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ib65f067992701eb73608cc2964b4fc62d792d3f7
2024-10-16 17:47:20 +08:00
Tao Huang
72bf53173b input: touchscreen: parade: Fix build error for !PM_SLEEP
drivers/input/touchscreen/parade/pt_core.c:10591:28: error: 'pt_core_rt_suspend' undeclared here (not in a function)
drivers/input/touchscreen/parade/pt_core.c:10591:48: error: 'pt_core_rt_resume' undeclared here (not in a function)
drivers/input/touchscreen/parade/pt_core.c:17046:28: error: 'pt_core_ebc_resume' undeclared (first use in this function)
drivers/input/touchscreen/parade/pt_core.c:17047:29: error: 'pt_core_ebc_suspend' undeclared (first use in this function); did you mean 'pt_early_suspend'?

Change-Id: Id9594b26941f80d16d13195cf0d8c0e9d5187f9b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:38:37 +08:00
Tao Huang
0dc19d1b5f input: touchscreen: ft5726: Fix build warning for !PM_SLEEP
drivers/input/touchscreen/focaltech_touch_ft5726/focaltech_core.c:2096:12: error: 'fts_core_pm_resume' defined but not used [-Werror=unused-function]
drivers/input/touchscreen/focaltech_touch_ft5726/focaltech_core.c:2081:12: error: 'fts_core_pm_suspend' defined but not used [-Werror=unused-function]

Change-Id: Iad119c9a603205e7fd393e28a5c4aff512f57603
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:38:33 +08:00
Tao Huang
d93b6deaf2 input: touchscreen: cyttsp5: Fix build error for !PM_SLEEP
drivers/input/touchscreen/cyttsp5/cyttsp5_core.c:6212:28: error: 'cyttsp5_core_late_resume' undeclared (first use in this function); did you mean 'cyttsp5_core_rt_resume'?
drivers/input/touchscreen/cyttsp5/cyttsp5_core.c:6213:29: error: 'cyttsp5_core_early_suspend' undeclared (first use in this function); did you mean 'cyttsp5_core_rt_suspend'?

Change-Id: I820b2bd29f8e3db7c7e8b4af81943b5a6d879a47
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:38:29 +08:00
Tao Huang
e6a2a95fb8 drm/rockchip: dw-dp: Fix build warning for !PM_SLEEP
drivers/gpu/drm/rockchip/dw-dp.c:5980:12: error: 'dw_dp_resume' defined but not used [-Werror=unused-function]
drivers/gpu/drm/rockchip/dw-dp.c:5970:12: error: 'dw_dp_suspend' defined but not used [-Werror=unused-function]
drivers/gpu/drm/rockchip/dw-dp.c:5959:12: error: 'dw_dp_resume_noirq' defined but not used [-Werror=unused-function]
drivers/gpu/drm/rockchip/dw-dp.c:5948:12: error: 'dw_dp_suspend_noirq' defined but not used [-Werror=unused-function]

Change-Id: Id49b85c3aaee3da324753b089f5c9617cc581113
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:38:19 +08:00
Tao Huang
443adc0c67 drm/rockchip: dw_hdmi: Fix build warning for !PM_SLEEP
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:4592:12: error: 'dw_hdmi_rockchip_resume' defined but not used [-Werror=unused-function]
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c:4574:12: error: 'dw_hdmi_rockchip_suspend' defined but not used [-Werror=unused-function]

Change-Id: I664da3e2e0df5991aa7f8ffe20487a04dded9e82
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:38:07 +08:00
Tao Huang
41fd8bec7d mmc: sdhci-of-dwcmshc: Fix build warning for !PM_SLEEP
drivers/mmc/host/sdhci-of-dwcmshc.c:1115:28: error: 'dwcmshc_runtime_suspend' undeclared here (not in a function); did you mean 'pm_runtime_suspend'?
drivers/mmc/host/sdhci-of-dwcmshc.c:1115:53: error: 'dwcmshc_runtime_resume' undeclared here (not in a function); did you mean 'pm_runtime_resume'?

Change-Id: Icb0b18860e3c0bda2a22645cf98bf4bfbbade426
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:37:48 +08:00
Tao Huang
10226e07a5 power: supply: rk817_battery: Fix build warning for !PM_SLEEP
drivers/power/supply/rk817_battery.c:630:13: error: 'rk817_bat_resume_work' used but never defined [-Werror]
drivers/power/supply/rk817_battery.c:3090:17: error: 'rk817_get_rtc_sec' defined but not used [-Werror=unused-function]

Change-Id: Ief6fdc006d8489e6452de762c1f8be989ecd45d1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:37:30 +08:00
Tao Huang
f3f27d30ba soc: rockchip: pm_config: ROCKCHIP_SUSPEND_MODE depends on SUSPEND
Fixes the following warning when !SUSPEND:
drivers/soc/rockchip/rockchip_pm_config.c:258:34: error: use of undeclared identifier 'mem_sleep_current'
drivers/soc/rockchip/rockchip_pm_config.c:551:34: error: use of undeclared identifier 'mem_sleep_current'

Change-Id: I9c6c215094444937d58fc877d8841669b54ee63d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-16 11:37:10 +08:00
Algea Cao
6843b32862 drm/bridge: synopsys: dw-hdmi-qp: Get max ffe level from dts
RK3588/RK3576 support max ffe level up to 3, but some TVS
such as samsung Q700T only support level 0. The max ffe
level is optional according to the hdmi specification.
Therefore, the default max ffe level is set to 0 and can
be configured via dts.

Change-Id: I94d56559c2fe38f8dade63c24c7bcdd13a9aefc9
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-10-15 19:34:01 +08:00
Zhen Chen
67ecb97a3b MALI: bifrost: Enlarge csffw_gpu_metrics_buf to 32 pages
To eliminate the following err log when running test_offscreen_glmark2.sh on the 3588 Linux device:
[  157.846768] mali fb000000.gpu: Invalid activity state transition. (prev_act = 1, cur_act = 1)

This change originally comes from ARM's suggested modifications_from_SP_241012.

Change-Id: I5f70d9deaca76cd14dda073160f2836c6dc83c47
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2024-10-15 19:31:53 +08:00
Chris Zhong
1428e6bc5a ARM: configs: add rk3502-robot.config
Base on rk3506_defconfig, the rk3502-robot.config difference are
- remove display/ethernet
- add media/v4l2 subsystem and gc2145 sensor
- enable zram swap
- remove no-in-use configs to shrink Image size, about 4.4MB

The other rk3502 boards can use rk3506_defconfig and it's fragments.

Change-Id: I3517aec9c5c4f5368724e648615a5553cc7ac19b
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2024-10-15 17:59:11 +08:00
Xu Xuehui
ffbb4c027a net: phy: motorcomm: YT8011AN VDDIO voltage init from DTS
motorcomm 8011AN PHY is not capable of automatically detecting
the VDDIO voltage; therefore, it necessitates initialization
configurations that correspond to actual VDDIO voltage levels.

vddio property designates the PHY's IO voltage.

If the vddio property is not specified in the DTS,
the default 3V3 IO hardware initialization settings will be applied.

Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
Change-Id: Iea056f30d8ad47e5970101b4543cfda6f5c843a9
2024-10-15 17:07:26 +08:00
Xu Xuehui
2351410fd8 arm64: dts: rockchip: rk3588-vehicle-evb-v23: change phy property name
Signed-off-by: Xu Xuehui <xxh@rock-chips.com>
Change-Id: I63a43b26afffb59f552e93ab46a90c9e9a53db4f
2024-10-15 16:39:01 +08:00
Shawn Lin
10cf4c97fd PCI: dw: rockchip: Fix rk_pcie_init_dma_trx
If dma_object is not used, NULL pointer dereference was found.

Fixes: 52729bfaff ("PCI: rockchip: dw: Move dma_obj initialization into rk_pcie_init_dma_trx()")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I5fe8ec539af1188b5da806026f164a493a577c46
2024-10-15 09:37:26 +08:00
Shawn Lin
5ef6efa7e5 mmc: sdhci-of-dwcmshc: Fix unblanced runtime calls
echo 2a330000.mmc > /sys/bus/platform/drivers/sdhci-dwcmshc/unbind
echo 2a330000.mmc > /sys/bus/platform/drivers/sdhci-dwcmshc/bind

[  386.150651] mmc2: CQHCI version 5.10
[  386.183313] mmc2: SDHCI controller on 2a330000.mmc [2a330000.mmc] using ADMA 64-bit
[  386.183385] sdhci-dwcmshc 2a330000.mmc: Unbalanced pm_runtime_enable!

Change-Id: I8926029274656f5f9820658325edec0449c8ac5f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-10-14 18:55:24 +08:00
Zhibin Huang
04db30fe21 misc: rk628: rgb/bt1120: modify decoder dclk delay
The original configuration will lead to some screen display screen offset,
adjust the dclk delay again to make the compatibility higher

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I732556b429b49418123fd889b67e26885e9b25f8
2024-10-14 18:55:07 +08:00
Yandong Lin
0308f07933 video: rockchip: mpp: iep2: fix err log false print
Change-Id: I032a7a038839b6b5ff83d79f5880955608f90a62
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-10-14 18:54:50 +08:00
Chris Zhong
5aca25fd6f ARM: dts: rockchip: add evb1 dts for rk3502
Change-Id: Ib1b2d3be3914960c5e17d0195cf67be696074755
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2024-10-14 18:21:51 +08:00
Huibin Hong
e208817780 ARM: dts: rockchip: add dtsi for rk3502
Change-Id: Icf8d08d7154ec21d4a0852aed7fe99826fd3091f
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2024-10-14 16:05:59 +08:00
Tao Huang
838172a6b2 ARM: keep .vectors on CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
When CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y and
CONFIG_VMAP_STACK=n, .vectors sections will disappear.
Use KEEP to keep.

Fixes: cf50c9c2e4 ("BACKPORT: ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION")
Link: https://lore.kernel.org/all/20240307151231.654025-1-liuyuntao12@huawei.com/
Change-Id: I6c7e90a3e035980e6cdbd7b830fbd30abea5b157
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-10-14 14:55:10 +08:00
Shawn Lin
53ee20ccf2 scsi: ufs: rockchip: Fix compile error if not define CONFIG_PM
Change-Id: Ic2c6dc5fed2aa8daca375eb8884ec809c0e89193
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2024-10-14 11:16:25 +08:00
Finley Xiao
29918d51d6 clk: rockchip: rk3506: Add ROCKCHIP_PLL_ALLOW_POWER_DOWN flag for v1pll
Change-Id: Ieb991acf5497aefd4ad041f415bd27f19af4b10d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-10-12 14:27:00 +08:00
Finley Xiao
c4c905472f clk: rockchip: rk3506: Add 750MHz for cpu
Change-Id: Id0b93c64aa51376bf16ea5604f356a7509e337d0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-10-12 14:27:00 +08:00
Algea Cao
36f4f47e78 drm/bridge: synopsys: dw-hdmi-qp: Fixed ddc write heap corruption
Change-Id: Ief41e4e71be8ccc0cb5cb4f9b1e7d0a496a60704
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-10-12 14:26:41 +08:00
Damon Ding
9e3dd92878 drm/rockchip: vop2: enable rb swap for MEDIA_BUS_FMT_BGR888_1X24
It is needed to enable rb swap to support MEDIA_BUS_FMT_BGR888_1X24,
because the default 24bpp rgb output is MEDIA_BUS_FMT_RGB888_1X24.

Change-Id: Ifb55f0e97f3a914b9f66b6de49e85697fdc7aeae
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-10-11 16:50:57 +08:00
Damon Ding
c715781b9e drm/rockchip: vop: set dclk inverted by default for bt1120/bt656/rgb on rk3506
According to rk3506 SI report, dclk of bt1120/bt656/rgb need to
be inverted by default, in order to ensure that the data is sampled
along the rising edge.

Change-Id: I734f146b5cb33ac6f7f069509a8bb16adefe12d4
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
2024-10-11 16:50:25 +08:00
Algea Cao
7244492f8f drm/rockchip: vop2: Support enable both hdr and dci
When enable dci, dci output color format is yuv full
range. So plane csc input is full range.
If hdr is enable plane overlay is rgb so post-csc
input is full range.

Change-Id: I7f98f48ff1ce129aecefb03c587d629b4aca1a0d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2024-10-11 14:44:30 +08:00
Binyuan Lan
d888a2b066 arm64: dts: rockchip: add Tablet Board devicetree for RK3576S SoC
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I3c7edd40253df8629f12ce93e8f014bc0cd0807c
2024-10-11 09:10:58 +08:00
Cody Xie
3175f92f5e arm64: dts: rockchip: rk3588-vehicle-evb-v23: Modify the vehicle-dummy to fit the new hardware.
Change-Id: I89497a0c5fe715e12e2917d54a8546e7d9383e36
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
2024-10-10 16:33:12 +08:00