Commit Graph

1276823 Commits

Author SHA1 Message Date
Jiajian Wu
c7a128313e ASoC: codecs: rk3506: Check substream direction in hw_params and shutdown
Change-Id: I55f5b14123c443d83577807ccbd38660616bf744
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 15:38:20 +08:00
Jiajian Wu
ff8cc6da8a ARM: dts: rockchip: rk3506g-demo-display-control: Bind loopback to rk730_sound
Change-Id: Ib619e7bd2eab535acba72037722c66bf60f82f59
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 15:38:18 +08:00
Jiajian Wu
da13072958 ARM: dts: rockchip: rk3506g-evb1-v10: Bind loopback to es8388_sound
Change-Id: I3fefd76a41cd9b53e61f2c144a38a77184ddff10
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 15:37:58 +08:00
Jiajian Wu
61bf3015b1 ASoC: dt-bindings: rockchip: add property 'mclk-fs-mapping' for multidais
Change-Id: I0259297f6849ebc86abe5513d95d5a227fa5677f
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 14:31:28 +08:00
Jiajian Wu
5ee0f90b7c ASoC: rockchip: multi-dais: Support set different mclk to dais
Change-Id: I15d8be7980252fa7ac70ff73170c5ae9b812eb63
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 14:31:28 +08:00
Simon Xue
a780a89108 drm/rockchip: gem: try other IOVA if iommu map failed
We get the same IOVA from DRM mm framework at different times which
finally cause iommu map failed. So let's try other IOVA if iommu map
failed time exceeds the limitation to map as a workaround.

Change-Id: Ic539f4a64d5ed0c9d3f5ac01acf3f0922a2fdc1f
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2024-11-29 14:18:20 +08:00
Tao Huang
2b64d93e09 ARM: configs: rk3506-display.config: Disable CONFIG_ROCKCHIP_DW_MIPI_DSI2
This feature is not available for rk3506.

Change-Id: Ic74e03ee687b91f4fe306e8b57689284dbd73d83
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-11-29 14:17:11 +08:00
Jiajian Wu
b89d2d2e66 ASoC: dt-bindings: rockchip: add property 'rockchip,mclk-fs-mapping' for multicodecs
Change-Id: Iffc566092dec8b9fd0391b6ce4327829c67e78c2
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 14:16:02 +08:00
Jiajian Wu
1952452c5b ASoC: rockchip: multicodecs: Support set different mclk to codecs
Change-Id: I305828159da0c5a1bffc6ee832b3c6c71dbd6354
Signed-off-by: Jiajian Wu <jair.wu@rock-chips.com>
2024-11-29 14:14:51 +08:00
Sugar Zhang
76d3b8c82a ARM: dts: rockchip: rk3502-evb1: Add pinctrl-sleep for SAI1
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ibdb38886942e979919d7b1f3eed138379357cb9c
2024-11-29 09:18:48 +08:00
Sugar Zhang
c2f444153a ARM: dts: rockchip: rk3506-pinctrl: Add rm_io_idle pins
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I2d0ed26188932e01342ced7791551bff6ac3bc06
2024-11-29 09:18:16 +08:00
Ye Zhang
766c5f5333 ARM: dts: rockchip: pinconf.dtsi add input enable pull down
Signed-off-by: Ye Zhang <ye.zhang@rock-chips.com>
Change-Id: I584b1d26ad38eff38f2c72ed8d58c4b15c604e7e
2024-11-29 09:17:42 +08:00
Sandy Huang
263ff45dbf drm/rockchip: vop2: Fix compile error on arm32 platform
ld.lld: error: undefined symbol: __udivdi3
>>> referenced by rockchip_drm_vop2.c
>>>
drivers/gpu/drm/rockchip/rockchip_drm_vop2.o:(vop2_plane_atomic_check)
in archive vmlinux.a
>>> did you mean: __udivsi3
>>> defined in: vmlinux.a(arch/arm/lib/lib1funcs.o)

arm-none-linux-gnueabihf-ld: drivers/gpu/drm/rockchip/rockchip_drm_vop2.o: in function
`vop2_calc_dsc_clk':
rockchip_drm_vop2.c:(.text+0x239c): undefined reference to `__aeabi_uldivmod'

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Iac0b61444cd4d33c62bd8994d0ce7ca1bab7bfa4
2024-11-28 19:18:13 +08:00
Zhen Chen
b2a3a28618 Mali: utgard: Replace calls to dma_fence_ops::signaled with dma_fence_is_signaled()
To address the issue in kernel 6.1 that 'dma_fence_ops::signaled'
is NULL for certain signaled fence instances.

Change-Id: Ie5e03e849947a9cd2b02fd057ebb44878aa2d0b0
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2024-11-28 19:18:13 +08:00
Jon Lin
f965b5da7c mtd: spi-nor: Add macro definition constraints
Change-Id: I3b35faaea4fad132be18940328e7df88ebdb0dbd
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-28 18:40:31 +08:00
Wang Panzhenzhuan
7c8198aa9a arm64: dts: rockchip: rk356x evb boards: add vcm config
add vcm config for ov5695 & gc8034 module

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I904cfbf90b5b2aa9ece56df2832a5ef382bfa308
2024-11-28 11:35:47 +08:00
Jon Lin
a104b8efc3 mtd: spinand: Add macro definition constraints
Change-Id: I65e03dd7cc70d1ab279c5bdea0ef8969666d7469
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2024-11-28 10:58:41 +08:00
Guochun Huang
2aa34d8499 drm/rockchip: dsi2: allocate macros for mipi dsi2 drivers
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ie2f712cb1aea522004e84c7d0f4d66fe94427d57
2024-11-28 09:09:15 +08:00
Guochun Huang
59cb08abbf drm/rockchip: dsi2: 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: Ic0f02bee51a6520e48568aecce92acf5d0ae31e4
2024-11-27 18:56:05 +08:00
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