Commit Graph

1276804 Commits

Author SHA1 Message Date
Guochun Huang
dc1407e301 drm/rockchip: dsi: separate the of_device_id array by different SoC
Separate the process of device matching by the different SoC macro
definitions, which can reduce memory usage.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ice50f15e64f7d1ae353ecfe462f7ba3fab017817
2024-11-27 18:56:05 +08:00
Sandy Huang
41f9223a94 arm64: dts: rockchip: rk3576-vehicle-evb-v20-serdes-mfd-display-maxim: fix max96745 bridge port error
The remote end point ports should be at bridge node.

Fixes: 57816781c4 ("arm64: dts: rockchip: rk3576-vehicle-evb: init v20 dts files")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6d01f68e5e5a5a3239d006f60fe97a0014918301
2024-11-27 18:20:52 +08:00
Elaine Zhang
582db606cb soc: rockchip: pm-domain: optimize static memory consume
$ ./scripts/bloat-o-meter pm_domains_old.o pm_domains.o
dd/remove: 0/22 grow/shrink: 0/1 up/down: 0/-9328 (-9328)
Function                                     old     new   delta
rk3568_pmu                                    44       -     -44
rk3399_pmu                                    44       -     -44
rk3368_pmu                                    44       -     -44
rk3366_pmu                                    44       -     -44
rk3328_pmu                                    44       -     -44
rk3288_pmu                                    44       -     -44
rk3228_pmu                                    44       -     -44
rk3128_pmu                                    44       -     -44
rk3036_pmu                                    44       -     -44
rk1808_pmu                                    44       -     -44
px30_pmu                                      44       -     -44
rk3128_pm_domains                            220       -    -220
rk3036_pm_domains                            308       -    -308
rk1808_pm_domains                            396       -    -396
rk3328_pm_domains                            440       -    -440
rk3228_pm_domains                            484       -    -484
rk3366_pm_domains                            528       -    -528
rk3288_pm_domains                            616       -    -616
px30_pm_domains                              660       -    -660
rk3568_pm_domains                            704       -    -704
rk3368_pm_domains                            748       -    -748
rk3399_pm_domains                           1584       -   -1584
rockchip_pm_domain_dt_match                 2548     392   -2156
Total: Before=17357, After=8029, chg -53.74%

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I1b8b307736edc9c02720c11460041e54fc6b98dd
2024-11-27 18:19:20 +08:00
Tao Huang
7a3b0746b1 ARM: configs: rk3506-display.config: Enable CONFIG_DRM_PANEL_SIMPLE_OF_ONLY
Before:
   text	   data	    bss	    dec	    hex	filename
5227569	2360752	 112328	7700649	 7580a9	vmlinux
After:
   text	   data	    bss	    dec	    hex	filename
5227569	2308528	 112328	7648425	 74b4a9	vmlinux

Change-Id: I55e5190b4410c80f8c40deeb631650eaab28f23b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-11-27 18:18:34 +08:00
Tao Huang
d02a15814d drm/panel: simple: Introduce CONFIG_DRM_PANEL_SIMPLE_OF_ONLY
Only support panels which all parameters from device tree.

Save boot time about 2ms on rk3126-bnd-d708 board.

Before:
   text	   data	    bss	    dec	    hex	filename
  59767	    296	     84	  60147	   eaf3	drivers/gpu/drm/panel/panel-simple.o
After:
   text	   data	    bss	    dec	    hex	filename
   7547	    296	     84	   7927	   1ef7	drivers/gpu/drm/panel/panel-simple.o

Change-Id: Ie075ff5c84c1807029873555f58bd13d41350abf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-11-27 18:18:34 +08:00
Shawn Lin
ad9a2b7050 PCI: dw: rockchip: Add rockchip,keep-power-in-suspend support
This property is used to prevent RC from calling devices to enter
D3cold if they need to keep working when system is suspended. The classic
user is wireless device and computing cards which need to work standalone
when system is suspened. Currently wireless devices deal with it by
controlling power and #PERST by themselves because they have rfkill driver
which could did it in front of the wireless driver. But computing cards couldn't.

In ACPI point of view, we could allow users to configure the D3Cold state for
each PCI device through the sysfs attribute 'sys/bus/pci/devices.../d3cold_allowed'.
Then the PCIe driver and firmware could work together to meet the requirement. But
in DT way, we have to invent a new property to cover both of these.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ia755f48d11f84f292a4aede38d2653b73f8d11b8
2024-11-27 18:17:41 +08:00
Elaine Zhang
3debfe232c clk: rockchip: px30: Add protect clocks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I0e54805bf287f57879b0d1fd13c8f111db94b9b8
2024-11-27 18:17:19 +08:00
Elaine Zhang
dd097f5451 clk: rockchip: rk3399: Add protect clocks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I3166b72d94bcb0758bd22ee5dd63419597786606
2024-11-27 18:17:19 +08:00
Elaine Zhang
308515b1d5 clk: rockchip: rk3588: Add protect clocks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I2cee7f522c4c0cfef3d9e62c88d74706e573c0e2
2024-11-27 18:17:19 +08:00
Elaine Zhang
e0c790b129 clk: rockchip: rk3568: protect pwm clks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ie5e2aab61d94d1269fc7a5c369379f3682d092d7
2024-11-27 18:17:19 +08:00
Elaine Zhang
269f106ee6 clk: rockchip: rk3562: protect pwm clks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I994058973c028ba06d8621c39f3fbc76b83ab9f2
2024-11-27 18:17:19 +08:00
Elaine Zhang
ac9eb89ef6 clk: rockchip: rk3576: protect pwm clks
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I1f4fadd5e106bdbd450976e360bcf99be2d2e6b8
2024-11-27 18:17:19 +08:00
Zhang Yubing
d4c36cfc6e dw-dp: enable power domain when load protect stage
If dynamic dptx power domain ctrl is enabled and dptx power
domain not enabled when init dptx controller, the dptx power
domain will be disabled though the uboot logo is enable. this
will cause display issue. To avoid this issue, it need enable
dptx power domain when enable uboot logo.

Change-Id: I3105556de3dee5e592242150935133cce0971551
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-11-27 17:18:38 +08:00
Jianwei Fan
84b8365717 media: i2c: rk628: fix debugfs "rk628" parent directory
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I57955e93c2441e62593c18e8aa5f538ad68f4ee9
2024-11-27 09:43:32 +08:00
William Wu
92988075d4 usb: host: ehci-platform: Fix modpost error "device_is_dependent" undefined
Fix the modpost error "device_is_dependent" undefined by
adding device_link in ehci_platform_priv.

Fixes: 68850661b5 ("usb: host: ehci-platform: Add device_link between the ehci and companion")
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I0552eab4cc45750e0c4ea494880667a29998f6b0
2024-11-27 09:22:29 +08:00
Sugar Zhang
82ac6d206e ASoC: rockchip: i2s-tdm: Add support for FSXN Control
I2STDM acts as SLAVE mode, It requires two GPIO pins
to control DSP-FSXN (rk2118) to output LRCK_TX/RX.

e.g.

&i2s1 {
    fsxn-rx-gpio = <&gpio2 RK_PB4 GPIO_ACTIVE_HIGH>;
    fsxn-tx-gpio = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
    pinctrl-names = "default";
    pinctrl-0 = <&i2s1m0_lrck
                 &i2s1m0_sclk
                 &i2s1m0_sdi0
                 &i2s1m0_sdi1
                 &i2s1m0_sdo0
                 &i2s1m0_sdo1
                 &i2s1m0_sdo2
                 &gpio_fsxn_pins>;
};

&pinctrl {
    fsxn {
        /omit-if-no-ref/
        gpio_fsxn_pins: gpio-fsxn-pins {
            rockchip,pins =
                <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
                <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
        };
    };
};

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1b4d16b51dac4f9ab728fa0889003fc46cd608d3
2024-11-26 19:36:58 +08:00
Yu Qiaowei
b8cbadd8c5 video: rockchip: rga3: using async mode to print log when async is disabled
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If97d123618d0ab406e77002d79bd0780162c9c2b
2024-11-26 19:36:28 +08:00
Yu Qiaowei
e3a10aac75 video: rockchip: rga3: fix RGA3 state has been cleared in IRQ
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iea781894feca6099949232aa2f53a35e3a41eb49
2024-11-26 19:36:28 +08:00
Yu Qiaowei
e44e890e55 video: rockchip: rga3: rga3 support read_status ops
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I870147562888b3b7cc9de7d4f719ed23bca9dae3
2024-11-26 19:36:28 +08:00
Sugar Zhang
3b9ca4cf51 ASoC: rockchip: multi-dais: Add support for TRCM
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I9636480c9995c034f8de4005fc106be5bc9190e3
2024-11-26 19:15:52 +08:00
Sugar Zhang
843bc5523b ASoC: rockchip: i2s-tdm: Fix TRCM panic on Multi Dais
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie0188ea02424f02dab1ff68134f93224da3819b8
2024-11-26 19:15:06 +08:00
William Wu
95a3c34298 phy: rockchip: inno-usb2: Support usb wakeup system for rk3576
1. Select the usb2 phy interrupt logic clock from OSC clock
   to support interrupt detection if VD_LOGIC is powerdown.

2. Set the linestate filter time control register depends
   on the OSC 24MHz clock during suspend.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ib265747013b0a08dc0599df25e40dce306ccb289
2024-11-26 19:09:52 +08:00
Chaoyi Chen
6b4f98d938 drm/rockchip: gem: Fix alloc size setting for IOMMU device
For IOMMU devices, the mapped size may be larger than the requested
alloc size, which may result in inconsistent sizes being used for
unmap.

[   12.286016] iova: 0x0000000000000000 already mapped to 0x000000000c201000 cannot remap to phys: 0x000000001369f000 prot: 0x3
[   12.287163] [drm:rockchip_gem_iommu_map] *ERROR* failed to map buffer: size=-98 request_size=4096
[   12.299439] iova: 0x0000000000000000 already mapped to 0x000000000c201000 cannot remap to phys: 0x000000000c2b8000 prot: 0x3
[   12.300541] [drm:rockchip_gem_iommu_map] *ERROR* failed to map buffer: size=-98 request_size=2785280

Fixes: 2ba5e1d681 ("drm/rockchip: gem: Set size of the allocated object when create gem")
Change-Id: I3496544e5a4eb65dde657f8ed3890f4db933258f
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-11-26 19:09:40 +08:00
Jon Lin
3dca0a0420 PCI: dw: rockchip: Record the rasdes capability offset
Change-Id: Ic85b017fe7de6f679c87dba64cd4221ff2ff9875
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-26 19:08:08 +08:00
Elaine Zhang
941eb09f51 ARM: dts: rockchip: rk3506 boards: Modify can init freq to 300M.
200M is not an integer frequency.
300M is more suitable.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7a6ce23a47691fbdc6180f9cb63b832950bc2f59
2024-11-26 18:13:00 +08:00
Elaine Zhang
48e24d8aca ARM: dts: rockchip: rk3506: assign default clock rate for can
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I6cdcc3f46d85e6293b050ca9875bd5ae78d60177
2024-11-26 18:12:11 +08:00
Wu Liangqing
90f81c1053 arm64: dts: rockchip: rk3576-test1: support camera
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I4161f8931fbce2e40f45c807b2265bd6e02e37d5
2024-11-25 19:55:35 +08:00
Chaoyi Chen
51965ff35a drm/rockchip: vop2: Add color key regs for rk3576 vop cluster win
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I4476b5d4549f1a4999e51acabbf46627eab75d7c
2024-11-25 19:55:24 +08:00
Finley Xiao
0fec33d3f7 ARM: dts: rockchip: rk3502: Add rockchip,temp-ddr-ref-mode for system monitor
Change-Id: I301b74a62285e4b0bbe1c97114f0274e54ec81b0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-11-25 19:51:53 +08:00
Finley Xiao
f5dbc75e46 soc: rockchip: system_monitor: Add support to update ddr trefi
Change-Id: If55fbb1b2a8b44e2744a7ff302eb25c8b1734590
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2024-11-25 19:51:53 +08:00
Sugar Zhang
465e356900 dmaengine: pl330: Fix desc_pool list-add corruption
list_add corruption. prev->next should be next (ffffff8102792618), but was ffffff8102af00a8. (prev=ffffff8101640460).

kernel BUG at lib/list_debug.c:28!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in: bcmdhd dhd_static_buf tiot_driver r8168
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.66-abeng..20241011.190040 #1
Hardware name: Rockchip RK3588S TABLET SU30PRO SSD V12 Board (DT)
pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
pc : __list_add_valid+0x94/0x98
lr : __list_add_valid+0x94/0x98
sp : ffffffc01261bdf0
x29: ffffffc01261bdf0 x28: ffffffc0109f01c0
x27: ffffff8102af14e0 x26: 0000000000000000
x25: ffffff8102792618 x24: ffffff8101640460
x23: ffffff8102f66800 x22: ffffff8101640a80
x21: 0000000000000000 x20: ffffff8102af1428
x19: ffffff8102792480 x18: ffffffc012611048
x17: 0000000000000000 x16: 00000000000000d8
x15: 0000000000000004 x14: 0000000000002d18
x13: ffffffc012060018 x12: 0000000000000003
x11: 0000000100042d18 x10: 0000000000000000
x9 : 9df2689215223100 x8 : 9df2689215223100
x7 : 5f78783338387761 x6 : ffffffc01226f350
x5 : ffffffffffffffff x4 : 0000000000000000
x3 : ffffffc011d08caf x2 : ffffff84f1d098c8
x1 : 0000000000000000 x0 : 0000000000000075
Call trace:
 __list_add_valid+0x94/0x98
 pl330_tasklet+0x204/0x2c4
 tasklet_action_common+0x11c/0x414
 tasklet_action+0x28/0x38
 _stext+0x108/0x408
 __irq_exit_rcu+0xc0/0xc4
 irq_exit+0x14/0x28
 __handle_domain_irq+0x84/0xd0
 gic_handle_irq+0x78/0x154
 el1_irq+0xe4/0x1c0
 cpuidle_enter_state+0x180/0x3b8
 cpuidle_enter+0x3c/0x58
 cpuidle_idle_call+0x158/0x238
 do_idle+0xac/0xfc
 cpu_startup_entry+0x28/0x2c
 rest_init+0xd8/0xec
 arch_call_rest_init+0x14/0x24
 start_kernel+0x3d8/0x500

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5ad862db58262fb9ec39bbfe273dcb0215bb1c9d
2024-11-25 17:19:35 +08:00
Sugar Zhang
0f41390f2f dmaengine: pl330: Report DMA_IN_PROGRESS for infinitely cyclic
The infinitely cyclic without CPU intervention use the single desc,
so, should always return DMA_IN_PROGRESS to match its status.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I1e104d2eadb5ba2c7271a830fa35a047891562c0
2024-11-25 14:07:50 +08:00
Joseph Chen
4b09c335c2 ARM: dts: rockchip: rk3502-evb1-v10: Set SAI1_MCLK sleep pull-down
sai mclk is not controlled by sai controller driver but peri device driver,
so set it here for saving system suspend power.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ibca621eb2975b06a7fd2d805db06b8dd70ec0596
2024-11-25 10:14:04 +08:00
Zheng zhiqi
dba5b1a4ea arm64: dts: rockchip: rk3576-vehicle-evb-v20-audio: sai4 channels
Modify SAI4 to TDM8 8 channels

Change-Id: I07636ff9f8527c7a43654afc1aacaa6b70d5c917
Signed-off-by: Zheng zhiqi <looper.zheng@rock-chips.com>
2024-11-22 11:01:53 +08:00
Jiajian Wu
5264fb8518 ARM: rk3506_defconfig: Enable CONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS
Change-Id: Ie4aed61734961a9b2668c17a630dc6d8f45f7fe9
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-21 19:44:52 +08:00
zorro.liu
0ff6e5745d arm64: dts: rockchip: rk3566-eink: reserved more memory for ebc-dev
Change-Id: I9fee371d8455f571df27e2e66fed3b28fb02be1b
Signed-off-by: zorro.liu <zorro.liu@rock-chips.com>
2024-11-21 18:11:18 +08:00
zorro.liu
fe4f8c7795 arm64: dts: rockchip: rk35xx-eink: add nvmem-cells
Change-Id: Idfb56cc18fa67b42ddf3bda9f65450d787ee656c
Signed-off-by: zorro.liu <zorro.liu@rock-chips.com>
2024-11-21 18:10:56 +08:00
Elaine Zhang
d73d160e36 rtc: rockchip: rv1103b: config D2A_XO_CUR_SEL
Increase the anti-jamming ability of crystal vibration start-up.

Change-Id: I65600d7303cf67b91fee540ad3e0a06c589ba600
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-11-21 16:58:50 +08:00
Elaine Zhang
b21b8b8e93 rtc: rockchip: config D2A_XO_START for rv1106
Increase the anti-jamming ability of crystal vibration start-up.

Change-Id: I9cfeab7d2338cd2a38e6e86b78f6967c2d0bbdd1
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-11-21 16:58:50 +08:00
Elaine Zhang
e57a5a2bb8 rtc: rockchip: remove rtc test and compensation for rv1103b
Change-Id: Id3a2ccd3cb46dd8829c1cba715db6236fb57e22b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-11-21 16:58:50 +08:00
Elaine Zhang
3ae2dd089c rtc: rockchip: support rv1103b rtc
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I418c483d09d041730e44e570c610f3b6286a66a8
2024-11-21 16:58:50 +08:00
Hongming Zou
c6bcd826d3 phy/rockchip: inno-dsidphy: Supports RK3506 to shut down 1.2v ldo when suspend
Change-Id: I951a40e2f7e1c19f6bc86ed9f12d1c25c52395a8
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2024-11-21 16:54:17 +08:00
Hongming Zou
b74d20e428 input: touchscreen: gt1x: set rst-gpio to low level after suspend
Change-Id: I4ebd59e3fa10f13e39ce19dbac8b39f19518061b
Signed-off-by: Hongming Zou <hongming.zou@rock-chips.com>
2024-11-21 16:54:17 +08:00
Cai YiWei
5c0b6b4799 media: rockchip: isp: remove graph_mutex
Change-Id: Iaa0ec728724b5bdcfe84ce4a339e0b3f569d5ab7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-11-21 09:49:23 +08:00
Cai YiWei
f6c952c6df media: rockchip: vpss: remove graph_mutex
Change-Id: I5c0e1ea977da4ab60d25fa32551075cc7005d7e9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2024-11-21 09:48:47 +08:00
Yu Qiaowei
83ecc44c37 video: rockchip: rga3: fix power off in isr-thread when job is running
When the ISR is blocked, it's possible that the original job has already
been released while the scheduler is now running a new job. Therefore,
it is necessary to check whether the current job has already triggered a
hardware interrupt.

Change-Id: If8999b07c76c5217f47419908f20945b6f619e67
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2024-11-20 16:46:26 +08:00
Yu Qiaowei
eb966dcdee video: rockchip: rga3: fix hardware state has been cleared after timeout
Change-Id: I15607f0af364bbb5947aba19024f0d582148016f
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
2024-11-20 16:46:26 +08:00
Jianlong Wang
a3d08fbcc0 arm64: dts: rockchip: add rk3358m automotive board support
Change-Id: I48e6d2748f5d7ab2681a8c13c54a92252d56eb59
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2024-11-20 16:43:29 +08:00
Zain Wang
fd4dfa23f4 ARM: configs: rk3506: Add gzip support for initrd
Signed-off-by: Zain Wang <wzz@rock-chips.com>
Change-Id: Iedf4c04259b7accefb1d0fb7416108e088e8e67a
2024-11-20 14:43:18 +08:00
Chaoyi Chen
2ba5e1d681 drm/rockchip: gem: Set size of the allocated object when create gem
We may want to know how many size of a gem object is allocated, but
this size in rockchip_gem_object for no-IOMMU devices will not be set.

There are two ways to use rockchip GEMs, one is to create GEMs via DRM,
and the other is to import buffer created by other devices via DMA-BUF
and map it. For no-IOMMU devices, neither of them will set the buffer
size.

Let's set the size in rockchip_gem_object when we create a new rockchip
gem.

Fixes: c1c9524d3f ("drm/rockchip: debugfs: optimize dump buffer file name and size")
Change-Id: I396bf60a0d49d6f703044f9d354aa37312c9cc82
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
2024-11-19 15:55:19 +08:00