Commit Graph

1072600 Commits

Author SHA1 Message Date
Frank Wang
11f0df3d9d hwspinlock: rockchip: add compilation support
make an option to compile Rockchip HW Spinlock driver.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I6f51901f1787acd5ea15dcb1a0892a065b16aa98
2022-09-19 10:33:00 +08:00
Jianqun Xu
f78851187e dma-buf: heaps: rk_system_heap free pages to correct pool
All the pages are freed to the system heap page pools, it is a error for
pages came from the dma32 heap pools.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I96e50c6b741e6fdbee7e358b939658809059f421
2022-09-17 12:28:33 +08:00
Jianqun Xu
6148a5867a dma-buf: heaps: Add the rk_system_heap
Copy from system_heap.c.
In order to make a smooth change, CONFIG_DMABUF_HEAPS_SYSTEM
will build rk_system_heap.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I7176b6bfecb483c87128857293be67f3e19a101a
2022-09-17 12:28:33 +08:00
Chen Shunqing
4e01b0c2ea media: rockchip: hdmirx: add debug node
1. sys/class/hdmirx/hdmirx/status show connected or disconnected
2. echo on/off to control hpd

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ib7fecdb7d227158e5278270b166b69ec2beaf8c4
2022-09-17 12:21:45 +08:00
Tao Huang
74c8bbbd67 arm64: dts: rockchip: rk3588-linux: Move ramoops to reserved-memory
Follow Documentation/devicetree/bindings/reserved-memory/ramoops.txt
This is a child-node of "/reserved-memory".

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3f06deb6e3a49edebc03de4684c44d52d13c37e0
2022-09-17 12:11:48 +08:00
Tao Huang
884bd42858 arm64: dts: rockchip: rk3588-android: Move ramoops to reserved-memory
Follow Documentation/devicetree/bindings/reserved-memory/ramoops.txt
This is a child-node of "/reserved-memory".

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I02055d58b2e1f57f07030dbb1e1dbf74e1b37ff6
2022-09-17 12:11:48 +08:00
Lin Jianhua
1a0f4ae36e ARM: dts: rockchip: add rk3308hs-voice-module-board-v10-aarch32.dts
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I3e513c4b22848e969087893db7f397a9089cbe97
2022-09-17 11:59:18 +08:00
Liang Chen
0267ad3b0c arm64: dts: rockchip: remove non-existent vopl on rk3326
Change-Id: I7e3e05d873ddcbe96d90cd4d8dbf39e30cb11761
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-09-17 11:59:00 +08:00
Zefa Chen
720983a82c media: rockchip: vicap fixed error of get_selection
when result of --get-compose is success, but width/height equal 0,
may cause v4l2-ctl unable to save image

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ibe572b53da346aef233a15c70c6050ad2207a21d
2022-09-16 20:02:49 +08:00
Jianwei Fan
4e4348fed0 drm/rockchip: direct_show: fix some parameters
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I5c018d13c52e6946add366ebc46242c9ca78f7ff
2022-09-16 14:32:16 +08:00
Yiqing Zeng
ebf405e9ac arm64: dts: rockchip: rk3566-evb2: compatible with ov5695 and gc5025
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I0587126caa692a9c9faaa9c1566211a54a238d73
2022-09-16 14:07:35 +08:00
Yifeng Zhao
40cb5c370f mmc: sdhci-of-dwcmshc: optimize the clock processing for runtime PM
1. Disable the interface clock output at runtime suspend and
enable it at runtime resume.
2. fix bug:
   [1476.144796][ T1281] mmc0: error -110 doing runtime resume
   [1476.204714][T24230] sdhci-dwcmshc fe2d0000.mmc: error -110 requesting status

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I14ef9f8c723deda6fba81836d1a4c982e3580d54
2022-09-16 11:55:20 +08:00
Chen Shunqing
0d2ccf6058 drm/rockchip: dw_hdcp2: add reset func for ioctl
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I76c30690d5fa36489b930757a8fe749c0c085a66
2022-09-16 11:09:09 +08:00
Dingxian Wen
9e6cf9710f media: rockchip: hdmirx: add private v4l2 event
add private v4l2 event: RK_HDMIRX_V4L2_EVENT_SIGNAL_LOST

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: Iad6f519b36ebb7e18305e211f989795c9ebe3fdc
2022-09-15 20:58:39 +08:00
Dingxian Wen
918a2722e2 media: rockchip: hdmirx: modify the calculation method of pixelclock
In order to be compatible with deep color mode.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I37ccb5d1130d3c30145e6c0a45632bda4542c2ac
2022-09-15 20:58:39 +08:00
Wyon Bi
3cf189f222 drm/bridge: analogix_dp: Fix sync polarity configuration in msa packet
Fixes: 2abd3af02c ("drm/bridge: analogix_dp: Use video format information from register")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia48058d9f4341adaa35fb4311911c557f0b162b8
2022-09-15 20:58:22 +08:00
Lin Jianhua
86f98f048b arm64: dts: rockchip: rk3326-evb-lp3-v10-linux: include rk3326-evb-lp3-v10.dtsi
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I23f9d17ec628660ef997023713c9a72468424d37
2022-09-15 20:49:00 +08:00
Lin Jianhua
70a514ab14 arm64: dts: rockchip: px30-evb: move some configs to common board dtsi files
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I30a74d33f5d865925ddd3d22bb28425295b7f68b
2022-09-15 20:48:47 +08:00
William Wu
60a9171113 arm64: dts: rockchip: rk3588: Add companion for ehci
Add the companion ohci controller for usb_host0_ehci
and usb_host1_ehci. Then we can use device_link to
enforce suspend/resume and shutdown ordering for them.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I8bc7c21b257beed40163178e4a1fced0763dddd9
2022-09-15 20:42:56 +08:00
William Wu
68850661b5 usb: host: ehci-platform: Add device_link between the ehci and companion
Rockchip ehci controller has companion ohci controller,
and the ohci depends on the ehci, if the ehci controller
has been suspend or shutdown, it shouldn't access the ohci
controller, otherwise, the system may hang in ohci_readl
or ohci_writel on Rockchip platforms.

In order to enforce suspend/resume and shutdown ordering,
this commit creates link between the ehci and ohci. This
link avoids to suspend or shutdown ehci before its companion
ohci.

Corresponding, DL_FLAG_AUTOREMOVE_CONSUMER can't be added,
then device_link_removed should be added explicitly.

Meanwhile, the ehci must not be resumed after its companion
if the companion is the consumer device of ehci.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If2935c651341917251c2178a6833357a73b71079
2022-09-15 20:42:56 +08:00
Liang Chen
4e8841e155 sched: cpufreq_schedutil: add attribute for change target_load
Default target_load is 80% and change it by the follow command:

echo 65 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/target_load

Change-Id: Icb02c36eab345a3f2e2d065fba76fdc015f47fa4
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-09-15 19:53:25 +08:00
Algea Cao
1c5d3aa79f drm/bridge: synopsys: dw-hdmi-qp: No need to force maxX/maxY to 9000
The max width and height have been set as default value(16384x16384).
If HDMI sets it to a fixed value, it will cause no output in
Debian's CMD mode.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I2180109b285a9efd562864c6dd3c808b5667232e
2022-09-15 19:10:32 +08:00
Cai YiWei
80c7560709 media: rockchip: isp: fix isp20 mi no work
isp20 mi config no save to cache and reg write to hw

Change-Id: I3cefcf26cbd7df7e63ca8fea903999d70ca34b78
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-09-15 15:21:39 +08:00
Sach Lin
d9d92d7f36 misc: rk803: fix current regs error.
Signed-off-by: Sach Lin <sach.lin@rock-chips.com>
Change-Id: I4d01f9ca8df493763662719db9253bd8887746e8
2022-09-14 21:17:23 +08:00
Lin Jinhan
47e8508582 crypto: rockchip: rk3326/px30 add aes gcm support
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I75949554d4f573c63092841eef76765a69cc6b24
2022-09-14 15:02:28 +08:00
Zhang Yubing
f111173dd3 drm/rockchip: vop2: config vrr when crtc status change
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ie6d0b0c263528fe570c14a4a6e0b23a24316412c
2022-09-14 14:13:12 +08:00
Caesar Wang
e0c7d1b49f arm64/configs: add rk3399_linux.config on rockchip platform
CONFIG_BCMDHD_PCIE and CONFIG_BCMDHD_SDIO can only be selected
from two configurations, since that bcmdhd driver cannot be compatible
with it at present. SDIO interfaces are widely used by default, at least
on our EVB boards.

Tested on RK3399 EVB IND boards:

export CROSS_COMPILE=aarch64-linux-gnu-
make ARCH=arm64 rockchip_linux_defconfig rk3399_linux.config
make ARCH=arm64 rk3399-evb-ind-lpddr4-linux.img -j8

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I7c1c416b58f618e1cee8f76608c24f750437bfa1
2022-09-14 12:15:30 +08:00
Caesar Wang
0b356f8ce8 arm64/configs: add rk3568_linux.config defconfig
CONFIG_MALI_CSF_SUPPORT is not used on RK356X Socs, that will cause
the mali is abnormal with RK356x Socs.

CONFIG_BCMDHD_PCIE and CONFIG_BCMDHD_SDIO can only be selected
from two configurations, since that bcmdhd driver cannot be compatible
with it at present. SDIO interfaces are widely used by default, at least
on our EVB boards.

Tested on RK3568 EVB1 boards:

export CROSS_COMPILE=aarch64-linux-gnu-
make ARCH=arm64 rockchip_linux_defconfig rk3568_linux.config
make ARCH=arm64 rk3568-evb1-ddr4-v10-linux.img -j8

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Iea3c3d70fabe9920b95d6b096028b4d73c5b39f1
2022-09-14 12:15:23 +08:00
Cai YiWei
d4f6aaf7bc media: rockchip: isp: default reg config after reset
Change-Id: Ib1e26819a1abfa74c072925af5dbb1ad7ec451f4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-09-14 11:43:37 +08:00
Cai YiWei
5316507f75 media: rockchip: isp: fix mipi error for isp2x with multi sensor
Change-Id: Icdd6536bed9890c2b856ee28da805ee5f1cbfc17
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-09-14 11:43:37 +08:00
Zhen Chen
cd13ec865c MALI: bifrost: log: not to output "Protected memory allocator not found, Firmware protected mode entry will not be supported" as err log
It's allowed to run without firmware protected mode entry.
While the customer of RK3588 might be troubled by the log.

Change-Id: I9f1b7c795f2095f1851692c93a7f4598acf702fc
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2022-09-14 10:57:17 +08:00
Wu Liangqing
0a754264ac arm64: dts: rockchip: px30/rk3326-evb move include px30-android.dtsi to dts
Change-Id: I338587c1573486aeaee774e8c704f575d64ca059
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2022-09-13 15:25:20 +08:00
Su Yuefu
fea88dfd42 ARM: configs: rv1106-battery-ipc.config: update use sc3338 default
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I3ca8bd001c825ef55b72a22f735fba2faf52140c
2022-09-09 19:56:09 +08:00
Ziyuan Xu
58c3eecac4 ARM: dts: rockchip: rv1106-thunder-boot: export reset and reserved_mem node for tb_service
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie1bc97c536fa2e48331ff9e3fe41b70b8c8f5886
2022-09-09 19:55:20 +08:00
Ziyuan Xu
2ff8d70db7 soc: rockchip: tb_service: clean up mcu's resource after mcu is done
1. make sure mcu is wfi
2. reset the mcu
3. free the reserved memory

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ia1f0db91789f142cfb567ac9f2b777a923c2435b
2022-09-09 19:54:55 +08:00
Weiwen Chen
2df80b27a1 ARM: dts: rockchip: rv1106g-evb2-v10: update memory layout and sensor
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I717fb0217aa8001cd2f2824d0fc0848bef15b7c9
2022-09-09 19:54:55 +08:00
Lin Jinhan
4596f91c3d crypto: rockchip: add async_req NULL check
Change-Id: Ie27402f25e0c0c8440f5e299694d91719514bc32
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-09-09 17:58:52 +08:00
Lin Jinhan
965f3dc100 crypto: rockchip: add procfs info
cat /proc/rkcrypto will show crypto debug info.

Change-Id: I1a295ccf5b8c71036892e866b46d5427d5e53e93
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2022-09-09 17:58:52 +08:00
Lin Jinhan
9a4df920b5 hwrng: rockchip: poll uses a uniform interface to read registers
use rk_rng_readl as uniform interface for read registers.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: If3f4225d10153d469bb56967aa5abcea8f23d572
2022-09-09 17:58:51 +08:00
Lin Jinhan
06e1313973 crypto: rockchip: poll uses a uniform interface to read registers
Use CRYPTO_READ or PKA_READ as uniform interface for poll function.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I47e9e1efd0b4c66efe59eac3253fdaf2723e5c45
2022-09-09 17:58:51 +08:00
Chen Shunqing
1ea2169bc2 drm/bridge: synopsys: dw-hdmi-qp: disabel hpd irq when shutdown or suspend
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: Ib35f11e376758560b7907684e58f31b04261c066
2022-09-09 15:39:42 +08:00
Binyuan Lan
921b6ae03e ASoC: rockchip: rk817-codec: enable mclk when reset
Solve the problem that LRCK level amplitude is not enough

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: Id79df3de70cd525e1d5425d4177d774a514c45da
2022-09-09 15:38:20 +08:00
Binyuan Lan
05446cfe5a ASoC: rockchip: rk817-codec: Add version recognition and set up different PLL configurations
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I0209db73994e428b25e9cba4417f0f3dd98fb3dc
2022-09-09 15:38:06 +08:00
Sugar Zhang
8661e36ef0 ASoC: rk817: Move dbg message into CONFIG_SND_DEBUG
$ ./scripts/bloat-o-meter rk817_codec.o.old rk817_codec.o
add/remove: 5/9 grow/shrink: 1/13 up/down: 221/-1846 (-1625)
Function                                     old     new   delta
__UNIQUE_ID_author400                          -      56     +56
__UNIQUE_ID_file401                            -      50     +50
__UNIQUE_ID_description399                     -      50     +50
__UNIQUE_ID_license402                         -      29     +29
rk817_playback_path_put                      832     860     +28
__UNIQUE_ID___addressable_rk817_codec_driver_init398       -       8      +8
dbg_enable                                     4       -      -4
__UNIQUE_ID___addressable_rk817_codec_driver_init399       8       -      -8
__param_str_dbg_level                         24       -     -24
__UNIQUE_ID_license403                        29       -     -29
__UNIQUE_ID_dbg_leveltype397                  37       -     -37
rk817_remove                                 260     220     -40
rk817_probe                                  344     304     -40
__param_dbg_level                             40       -     -40
rk817_platform_shutdown                      104      56     -48
__UNIQUE_ID_file402                           50       -     -50
__UNIQUE_ID_description400                    50       -     -50
rk817_set_dai_sysclk                          88      32     -56
__UNIQUE_ID_author401                         56       -     -56
rk817_hw_params                              516     456     -60
rk817_set_dai_fmt                            184     116     -68
rk817_playback_path_get                      108      36     -72
rk817_capture_path_get                       108      36     -72
rk817_codec_power_down                       516     424     -92
rk817_capture_path_put                       632     492    -140
rk817_codec_power_up                         756     580    -176
rk817_digital_mute                           756     460    -296
rk817_platform_probe                        1264     876    -388
Total: Before=9850, After=8225, chg -16.50%

Change-Id: I98471c52ea342672e10deb02c4fb38d9fb82f906
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-09-09 15:37:19 +08:00
Binyuan Lan
5f4e2f3859 ASoC: rockchip: rk817-codec: Solve pop problems
DIGEN_CLKE can only be controlled when the amplifier is turned off

Signed-off-by: Binyuan Lan <lby@rock-chips.com>
Change-Id: I5758cab8f20bd2ede008d1ad138cdadcaa55e39d
2022-09-09 15:27:52 +08:00
Cai YiWei
be3f404824 media: rockchip: isp: version v2.0.0
Change-Id: I538c3abb84a338e730c2bd266485ceb4bae6166d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-09-09 15:10:37 +08:00
Weiwen Chen
32154375ea ARM: dts: rockchip: rv1103g-battery-ipc-v10: update meta and rkisp_thunderboot use default value
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Id7e231b7f3142761e1945d0a0f18cf4308ede672
2022-09-09 14:30:54 +08:00
Weiwen Chen
41407a36ac ARM: dts: rockchip: rv1106-thunder-boot: update memory layout
Because of the meta and rkisp_thunderboot memory offset MUST
match with RTOS, so move meta and rkisp_thunderboot to the
top of memory layout.

The memory layout for rv1106 thunder boot feature:

    SPL:       0 ~ 256KB
    RTOS:      256KB ~ 512KB
    SPL S & H: 512KB ~ (2MB - 8KB)
    ATAGS:     (2MB - 8KB) ~ 2MB
    UBOOT:     2MB ~
    KERNEL_R:  (2MB + 0x8000) ~ (8MB - 128KB)
    DTB:       (8MB - 128KB) ~ 8MB
    META:      8MB ~ (8MB + 384KB)
    ISP:       (8MB + 384KB) ~ (8MB + 384KB + ceil(w*10/8/256)*256*h*(buf_num))
    RAMDISK_R: 0x12ec000 ~ (0x12ec000 + 10MB)
    RAMDISK_C: (0x12ec000 + 10MB) ~ (0x12ec000 + 10MB + 5MB)
    KERNEL_C:  (0x12ec000 + 10MB + 5MB) ~ (0x12ec000 + 10MB + 5MB + 5MB)

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I9d18041559ca10c96f5d94a1c0dcf1d535c90db4
2022-09-09 14:30:23 +08:00
Lin Jianhua
d3b3fc7cc5 arm64: dts: rockchip: px30_linux_defconfig: enable multicodecs and remove CIF config
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: I65cce7c3f4646fe2c508350e468f22f212d0b0dd
2022-09-09 10:19:51 +08:00
Jianlong Wang
b545e4bdc0 arm64: dts: rockchip: rk3326: add rk3326-evb-lp3-v12-linux
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
Change-Id: I0615508b407078b2b9be30b162a41ca226b9be06
2022-09-09 10:18:53 +08:00