Commit Graph

1073404 Commits

Author SHA1 Message Date
Tao Huang
0e1976c067 arm64: rockchip_defconfig: Disable erratum do not affects rk3588
RK3588 Cortex-A76 version is r4p0.
1188873 Fixed in r3p0.
1165522 Fixed in r3p0.
1286807 Fixed in r3p1.
1463225 Fixed in r4p0.
2054223 Cortex-A710
2067961 Neoverse-N2

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I02b3f71d6b276c6bd1bdce35d8da0838748b954a
2023-01-10 16:47:27 +08:00
David Wu
0ef7394930 arm64: configs: rockchip: Enable RK630PHY config
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I7a1270bd40f5026d064543b52c08e7586a25e28d
2023-01-10 16:47:27 +08:00
David Wu
77f8a69780 net: phy: rk630phy: Fix the compile error
drivers/net/phy/rk630phy.c:97:37: error: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
                efuse_buf = nvmem_cell_read(cell, &len);
                                                  ^~~~
./include/linux/nvmem-consumer.h:62:56: note: passing argument to parameter 'len' here
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Iee69c589b532b067b57290bcb3e39f3402ea83e7
2023-01-10 16:47:27 +08:00
Jason Zhu
cac328dcac arm64: configs: rockchip: enable SND_SOC_RK3528
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I95a7d906069968898ba0146301d467fef5c12cc6
2023-01-10 15:07:54 +08:00
Jason Zhu
0c0c7f4d85 ASoC: codecs: support rk3528 acodec
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ie789864edde7aec69b5906868a76f6ba60a53d7a
2023-01-10 15:07:16 +08:00
Zhen Chen
b77f682d3c MALI: bifrost: fix a compilation error when DEBUG_FS and MALI_CSF_SUPPORT are disabled
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I8f4228ccc6a8ef5d9bb9f3cb43a10fd091bbc5c5
2023-01-10 11:12:17 +08:00
Caesar Wang
daf6b63482 drm/rockchip: inno_hdmi: support the aclk_vio clock for rk3036
The aclk_vio is the vio noc, the HDMI accessed the register
need this clock enabled first. If not, VOP iommu errors will
also occur.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ib3073b73020e46c7d31b09225dd2bd39a289a4cc
2023-01-10 10:49:55 +08:00
Damon Ding
588df8ccd6 dt-bindings: display: inno_hdmi: add aclk assignment in hdmi node
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I8be6bcac5de9d3a1ae03e35c09ef4c925f5a1ef4
2023-01-10 10:49:55 +08:00
Jon Lin
d8c3ffb8d6 mtd: spi-nor: xtx: Support xt25f256b
Change-Id: Id6b61e57c2ca81388a7312b07481afd1a9c52945
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-10 10:38:52 +08:00
Zefa Chen
38da82854c media: rockchip: vicap add mutex lock for get dev stream cnt
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I33aba35e029a02b4b8dfb5016f44943358565b8f
2023-01-09 19:48:50 +08:00
Shaohan Yao
1e244fb37e thermal: rockchip: Support the rk3528 SoC in thermal driver
There are one Temperature Sensor on rk3528, channel 0 is for chip.

Signed-off-by: Shaohan Yao <shaohan.yao@rock-chips.com>
Change-Id: Ib5bbb81615fe9fab80f26cdd2098cfb56746ca15
2023-01-09 19:33:47 +08:00
Zefa Chen
bd548c0a79 media: rockchip: vicap: add mutex lock for v4l2 pipeline get/put
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia989121b9320a33f94bb51b7692ac56dbbae3d36
2023-01-09 19:24:16 +08:00
Zefa Chen
66eaffb030 media: rockchip: vicap disable capture and dma enable bit in fs intr
when app stop stream

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I9187b2f3ffa061bc30fb76f9dbfda5cacabfb920
2023-01-09 19:23:58 +08:00
Zefa Chen
860506945e media: rockchip: vicap write stop dma and capture enable register earlier
to make sure it take effect in next frame start

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4e57ccba704abb9c9a6700f27d5786cb694215dc
2023-01-09 19:23:31 +08:00
Jon Lin
17e8848752 PCI: rockchip: dw: Add mask for the irq handler DMA interrupt status
When the DMA interrupt masked, the conresbonding DMA interrupt stastus
should be ignored in the interrupt handler.

Change-Id: I76a2b8bef08e024f76792c765150c3e5a0ff804e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-09 15:25:23 +08:00
Cai YiWei
2e8cb1629d media: rockchip: isp: fix output stream sync for readback mode
Change-Id: I189c64139a2ebf44f3e0c5f091fd4bc776e2047c
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-01-09 14:59:13 +08:00
Chi Wu
973a5a0522 UPSTREAM: mm/page-writeback: Fix performance when BDI's share of ratio is 0.
Fix performance when BDI's share of ratio is 0.

The issue is similar to commit 74d3694433 ("writeback: Fix
performance regression in wb_over_bg_thresh()").

Balance_dirty_pages and the writeback worker will also disagree on
whether writeback when a BDI uses BDI_CAP_STRICTLIMIT and BDI's share
of the thresh ratio is zero.

For example, A thread on cpu0 writes 32 pages and then
balance_dirty_pages, it will wake up background writeback and pauses
because wb_dirty > wb->wb_thresh = 0 (share of thresh ratio is zero).
A thread may runs on cpu0 again because scheduler prefers pre_cpu.
Then writeback worker may runs on other cpus(1,2..) which causes the
value of wb_stat(wb, WB_RECLAIMABLE) in wb_over_bg_thresh is 0 and does
not writeback and returns.

Thus, balance_dirty_pages keeps looping, sleeping and then waking up the
worker who will do nothing. It remains stuck in this state until the
writeback worker hit the right dirty cpu or the dirty pages expire.

The fix that we should get the wb_stat_sum radically when thresh is low.

Link: https://lkml.kernel.org/r/20210428225046.16301-1-wuchi.zero@gmail.com
Change-Id: I920e60cd938049641eda70885b069e36200fe153
Signed-off-by: Chi Wu <wuchi.zero@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ab19939a6a)
2023-01-08 15:01:36 +08:00
Xing Zheng
a0ae2bdfc0 Revert "ASoC: codecs: rv1106_codec: use interface set_sysclk to set clk"
This reverts commit 59f45fdccd.

The reason for revert this patch is that mclk_acodec_tx usually keeps
div1 and follows the same value as mclk_i2s0_8ch_tx.

If the DUT is just powered on, the current acodec clk is usually an
uninitialized value (such as 12MHz). At this time, an audio with a
sampling rate of 16kHz needs to be played, and mclk needs 4.096MHz.
The codec set_sysclk() is configured before cpu i2s_sysclk(), set a
div 3 based on target freq 4.096MHz, and then set cpu i2s_sysclk() to
correct the frequency division ratio of parent clock according to
target freq 4.096MHz, and getting the wrong results:

- mclk_i2s0_8ch_tx = 4096000kHz
- mclk_acodec_tx = 1365334kHz

Before:
    pll_gpll                          1        1        0  1188000000          0     0  50000
       gpll                          11       11        0  1188000000          0     0  50000
          clk_i2s0_8ch_tx_src         1        1        0   594000000          0     0  50000
             clk_i2s0_8ch_tx_frac     1        1        0     4096000          0     0  50000
                clk_i2s0_8ch_tx       1        1        0     4096000          0     0  50000
                   mclk_i2s0_8ch_tx   2        2        0     4096000          0     0  50000
                      mclk_sai        0        0        0     4096000          0     0  50000
                      mclk_dsm        0        0        0     4096000          0     0  50000
                      mclk_acodec_tx  1        1        0     1365334          0     0  50000

Fixed:
    pll_gpll                          1        1        0  1188000000          0     0  50000
       gpll                          11       11        0  1188000000          0     0  50000
          clk_i2s0_8ch_tx_src         1        1        0   594000000          0     0  50000
             clk_i2s0_8ch_tx_frac     1        1        0     4096000          0     0  50000
                clk_i2s0_8ch_tx       1        1        0     4096000          0     0  50000
                   mclk_i2s0_8ch_tx   2        2        0     4096000          0     0  50000
                      mclk_sai        0        0        0     4096000          0     0  50000
                      mclk_dsm        0        0        0     4096000          0     0  50000
                      mclk_acodec_tx  1        1        0     4096000          0     0  50000

Therefore, we only need to set_sysclk() once on the rockchip i2s driver.

Change-Id: I8e3d32ec1061166faa8188e6288934867880ab48
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2023-01-06 16:01:51 +08:00
Xing Zheng
683a2c4e02 Revert "ARM: dts: rockchip: rv1106: delete unused clk info of acodec"
This reverts commit 7fdefc3445.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I5c14327b0de0408af5e16a30891189982dc2bc31
2023-01-06 16:01:51 +08:00
Tao Huang
57aa44569b arm64: dts: rockchip: rk3308: remove g-use-dma from rockchip usb nodes
According to upstream commit e9b6044dce ("arm64: dts: remove g-use-dma
from rockchip usb nodes").

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iffe9e52c68507b7bea2ab86306519910a2db9d16
2023-01-06 15:12:38 +08:00
Sandy Huang
2fbb7c26ec drm/rockchip: vop2: memset tv state when disable crtc
before this commit, the bcsh config is incorrect at the following case:
vp1 -> hdmi plug in -> 1080p -> config bcsh(vp1 bcsh r2y/r2y enable)
  -> vp1 -> hdmi plug out
    -> vp0 -> hdmi plug in -> 8k(vp0 bcsh r2y/yr2 disable, vp1 bcsh r2y/r2y enable)

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Icd794a3a8b5f896bd65bd243d977106117bdaac4
2023-01-06 11:18:39 +08:00
Shawn Lin
5d7a1b0128 BACKPORT: FROMLIST: PCI: dwc: Round up num_ctrls if num_vectors is less than MAX_MSI_IRQS_PER_CTRL
Some SoCs may only support 1 RC with a few MSIs support that the total number of
MSIs is less than MAX_MSI_IRQS_PER_CTRL. In this case, num_ctrls will be zero which
fails setting up MSI support. Fix it by rounding up num_ctrls to at least one.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://lore.kernel.org/all/1669014996-177686-1-git-send-email-shawn.lin@rock-chips.com/
Change-Id: I88b69dd4eeed4464a8e48ca8bbe519aea1cafe6e
2023-01-06 11:08:54 +08:00
Jon Lin
afb85c759c PCI: rockchip: dw: Support rockchip,rk3528-pcie
RK3528 can only support up to 8 MSI vectors, add a limitation
for that.

Change-Id: I62297711053253b8548cf61d69fbd9bcf690114d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2023-01-06 11:08:54 +08:00
Shawn Lin
c06ee9ef38 PCIe: dw: rockchip: Init and free msi whenever needed
Change-Id: Ic7bc74c1a05b06c45f83bdb7056a8c4b206dd4dd
[Shawn: squash commit fa7b48efe743 ("PCIe: dw: rockchip: Do not free msi in PM ops")]
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2023-01-06 11:08:54 +08:00
Jon Lin
d2f0b3cb58 dt-bindings: spi: spi-rockchip: Add description for csm property
Change-Id: Ic429540db16a4085149c9399c3daf11e31993b7a
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-06 10:44:11 +08:00
Jon Lin
c51783b5f7 spi: rockchip: Support csm
ss_n be high for half or one sclk_out cycle after every frame data
is transferred

Change-Id: I08aa4e0b76dd2bf5695608740b0cb0989f75eaed
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-06 10:44:11 +08:00
Liang Chen
76d8b3172b ARM: dts: rockchip: rk312x: adjust leakage-voltage-sel for cpu opp-table
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Iaabc2665f4ac6e3746458fe8996b2f246772e33d
2023-01-06 10:42:15 +08:00
Zefa Chen
459894ecca media: rockchip: vicap fixes error of output format to yuv packet with rk3588 and newer chips
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iced177b298443c13b1c4fb735a0bc4ac84bc1633
2023-01-06 10:41:07 +08:00
Jianwei Fan
63102a47e5 media: i2c: lt6911uxe: add more timing support
Change-Id: I118f3160502f302c449d13a3a9b477897e9eb5c3
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2023-01-06 10:07:40 +08:00
Simon Xue
d12661c5b6 iio: adc: rockchip_saradc: add rk3528
Change-Id: Ib3a50efcd1c1cc3253e0316a42a2948d57a6ac07
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2023-01-06 09:03:22 +08:00
Tao Huang
56f68094fd arm64: rockchip_defconfig: update by savedefconfig
-# CONFIG_AUDITSYSCALL is not set
-# CONFIG_ROCKCHIP_ONE_INITRD is not set
-CONFIG_RTL8723CS=m
-CONFIG_RTL8821CS=m
-CONFIG_RTL8822BS=m
-CONFIG_LTE=y
-CONFIG_LTE_RM310=y
-CONFIG_RK3368_THERMAL=y
-CONFIG_REGULATOR_DIO5632=y
-CONFIG_VIDEO_GC0312=y
-CONFIG_VIDEO_OV5648=y
-CONFIG_VIDEO_VM149C=y
-CONFIG_SND_SOC_ROCKCHIP_RT5651=y
-CONFIG_SDIO_KEEPALIVE=y
-CONFIG_POWERVR_ROGUE_N=y
-CONFIG_RK3368_MBOX=y
-CONFIG_RK3368_SCPI_PROTOCOL=y
-CONFIG_SDCARD_FS=y

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9ad2e626d1d7125830fca09791158ad6cd8910fc
2023-01-05 19:17:18 +08:00
Tao Huang
7d30c5c61a Revert "Revert "ANDROID: sdcardfs: remove sdcardfs from system""
This reverts commit b4befcdd6a.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id3864ea0f33f558ee618b85cc734eb1980b3ac9a
2023-01-05 18:38:26 +08:00
Finley Xiao
799f7c7d26 nvmem: rockchip-otp: Add support for rk3528 otp
This adds the necessary data for handling otp on the rk3528.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I1ffe83be9f5497e7503876b9b3916a880811ed9d
2023-01-05 18:08:25 +08:00
Tao Huang
9c80e23d19 Revert "Revert "Revert "switch: switch class and GPIO drivers."""
This reverts commit ce1181f629.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iedf7291940058c039985806d58ad10a0990bea44
2023-01-05 16:58:23 +08:00
Tao Huang
75f1eefe9b media: rockchip: move rockchip-tsp to rockchip/tsp
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3b3b166a25d0cc65eb28f8fd155a437f999a9a41
2023-01-05 16:49:33 +08:00
Cai YiWei
dba08d8cbc media: rockchip: isp: dump two isp reg for unite mode
Change-Id: I3fe698cf06a2825ba9b346a73b2a04c80c785671
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-01-05 16:46:47 +08:00
Zhang Yubing
7d048d6dac drm/rockchip: dw-dp: Add HDCP function support
Adding HDCP1.3 and HDCP2.2 function support. For support
HDCP2.2, It also need prepare hdcp controller driver and
userspace host library.

Considering that HDCP2.2 is more secure than HDCP1.4, It
preferred to use HDCP2.2 if HDCP2.2 capable is be setup.
Only when the HDCP2.2 is not supported(or HDCP2.2 is failed)
and Content Type is Type0, HDCP1.3 will work.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Icb6e371b5b798cc2fe2233656ad31e3850ea9d2a
2023-01-05 16:45:37 +08:00
Zhang Yubing
951bc345ef drm/rockchip: add rockchip hdcp drm property define
Add a hdcp drm property for userspace to get hdcp encrypted
status.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I9ce516215ff51b389f2ebc72e4939e722aa1aede
2023-01-05 16:45:37 +08:00
Zhang Yubing
c6f76adba0 arm64: dts: rockchip: rk3588: add hdcp clk for dw-dp
clk_dp0 and clk_dp1 need enable when dp controller
enable the hdcp 2.2 function.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I9a61f187c1132b10d55bc62a3f7624705eafbca3
2023-01-05 16:45:37 +08:00
Lin Jinhan
7169e1d0dc crypto: rockchip: cryptodev_linux: drop ksys_close for gki
ksys_close depends on __close_fd which is disabled in ABI.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I6ce61664f827699012ec16f19abb8461bb8f1acf
2023-01-05 16:44:39 +08:00
Wang Xiaobin
5eca92cc05 ARM: configs: rv1103-rmsl311: disable THUNDER_BOOT_ISP
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
Change-Id: I3861676dd0431fe6e765f0fadca576c248e035b5
2023-01-05 15:36:00 +08:00
Su Yuefu
2b753e214a media: i2c: add sc501ai sensor driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I2171c6fc4f70e8c1b7bfc6585e7237d9e908219c
2023-01-05 15:34:20 +08:00
Tao Huang
5ca2003868 Revert "staging: android: add timed gpio driver to present vibrator control interface to userspace"
This reverts commit ecf86d4385.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib7be27e8320fa5d7ca3df7c0d2a211352c56b92c
2023-01-05 10:15:39 +08:00
Jianlong Wang
2e1a6b62b4 ARM: dts: rockchip: rk3128-evb-ddr3-v10-linux: add wakeup-source in hym8563
Change-Id: Id6072b175636ac67252d2122db8dd59d6d3927a8
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2023-01-05 10:15:21 +08:00
Jon Lin
2197cd5684 spi: rockchip: Modify interrupt status register for error application
Fixes: 8c3cf7cb12 ("spi: rockchip: Stop spi slave dma receiver when cs inactive")
Change-Id: I3c277beb82341d8fd756c3830db21b8ec0ec86b7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-01-05 09:39:01 +08:00
Tao Huang
48df20e1d4 Partially revert "PM / devfreq: rk3399_dmc: rename driver to 'rockchip_dmc'"
This partially reverts commit 990b7b2229.

Restore
Documentation/devicetree/bindings/devfreq/rk3399_dmc.txt
drivers/devfreq/rk3399_dmc.c
to avoid merge conflict.

Change-Id: I608b36423b2d21108f4d86b3f8e29db46a497165
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2023-01-04 19:06:12 +08:00
Yifeng Zhao
b4220ed159 mmc: sdhci-of-dwcmshc: fix some config for rk3528 to support hs400
1. set DLL_CMDOUT_BOTH_CLK_EDGE.
2. Set RK_RXCLK_NO_INVERTER for hs200 and hs400.
3. Set the default cmd dll tap value to 05 for hs400.
4. Set strbin tap to 3 for hs400.
5. add execute_tuning api.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I911d0bbfd8e9c35cb35bd47f4b3abc1bede60c55
2023-01-04 10:52:05 +08:00
Yandong Lin
9c3c16d63d video: rockchip: mpp: rkvdec2: increase timeout threshold to 2s
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ia78ff0a56bbb496f6ae6860390b8775b158d4a6f
2023-01-04 09:29:04 +08:00
Sandy Huang
a394b23253 drm/rockchip: vop3: delete pre_scan_max_dly for rk3528
Fixes: 10e7cc72b7 ("drm/rockchip: vop3: add support rk3528")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I5dd2a58cff14c12805255d8e045f22868dcad55c
2023-01-03 19:23:10 +08:00
Wangqiang Guo
3d5af63b92 input: touchscreen: elan: Avoid using filep_open to upgrade firmware.
elan_5515 support three methods to get fwdata.
	1.FROM_SYS_ETC_FIRMWARE :/vendor/etc/firmware/elants_i2c.ekt
	2.FROM_SDCARD_FIRMWARE: /data/local/tmp/elants_i2c.ekt
	3.FROM_DRIVER_FIRMWARE: in driver code directory *.i
choose NO.1.

Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I9beada23a1abde4995df243f9cce9423f23ab69c
2023-01-03 18:28:30 +08:00