Commit Graph

1065925 Commits

Author SHA1 Message Date
Kever Yang
c231916b68 arm64: dts: rockchip: rk3588s: Init PPLL to 1.1G
PPLL 1.1G with pcie2 comboPHY TS3 can get better signal.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I6af09906be88e7568b474b806161c3e1d6cd936e
2022-04-24 10:30:44 +08:00
Kever Yang
de7d060208 clk: rockchip: rk3588: add PLL 1.1G parameter
1.1G may used for PPLL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I77b539ca94a5a51efa34ad2ea4b355b27b21ed0b
2022-04-24 10:30:44 +08:00
Kever Yang
b9c18b2b3a phy: rockchip: naneng-combphy: ADD T0_1 for pcie internal 24M clock
This is the best setting for internal clock which enable SSC mode.

Note for use this setting:
- Enable ssc in dts;
- modify to use 24M clock in dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ia6db793dd8bf016985f4771ee1baac14449ae5b1
2022-04-24 10:30:44 +08:00
Kever Yang
2accc53726 phy: rockchip: naneng-combphy: update to use T3 for PCIe TRIM
According to HW signal test, the T3 parameter is the best setting for
non-SSC mode, need to co-work with PPLL and DIV PF10.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I3b701f714bd63e08bb5d47046c37bba6701c4f8a
2022-04-24 10:30:44 +08:00
Cai YiWei
94f439584b media: rockchip: isp: lock for buf alloc and free
Change-Id: I94f01e3d8a24ec11a6b853416421e7f5d6323a8a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-22 17:39:38 +08:00
Wyon Bi
7d88934a96 drm/bridge: analogix_dp: Fix link train adjust request
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I031ecd4747ad3023e5d9cb7bd7519d0f94662d7c
2022-04-22 17:15:38 +08:00
Wyon Bi
c1fa358173 arm64: dts: rockchip: rk3588s-evb1-lp4x: Add custom training table for edp
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I93d5a8c936bc5df6b04fdfba874485fb9b954532
2022-04-22 17:15:00 +08:00
Wyon Bi
298ec87bd0 arm64: dts: rockchip: rk3588s-tablet: Add custom training table for edp
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I3a734a68383f86ffd0a24a34b99bc0f9e3575ec9
2022-04-22 17:14:29 +08:00
Wyon Bi
3b3254cfec phy/rockchip: samsung-hdptx: Support DT specified training table
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I70680470ecc7aecb79cc5d35820cf8c983b542c3
2022-04-22 17:07:34 +08:00
Wyon Bi
50e757f7cb phy/rockchip: samsung-hdptx: Disable TX jitter EQ for power reduction
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia5a0901182deb47b1a8599922efbcf60101ce15c
2022-04-22 16:55:41 +08:00
Finley Xiao
b6b135b2f6 driver: rknpu: Change clock rate and read margin only when pd is on
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I4b4d0c8a79224afe8dbc8cd336c790e782ac6193
2022-04-22 16:12:14 +08:00
Yiqing Zeng
739f8acfec media: i2c: add sc401ai sensor driver
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: Ic8cdd26d811af32eb0ada5ac88630a6a03720bd2
2022-04-22 15:37:38 +08:00
David Wu
bde32557c5 ethernet: stmmac: Dynamically change limit to fit dma size
First, ensure that limit cannot exceed dma size, and rx cannot clear the
over dma_size buffers. Second, ensure that dirty is not equal to 0, if
really need to clean rx at this time.

[  552.964089] Unable to handle kernel paging request at virtual address b8280000
[  552.971316] pgd = d04d5ca4
[  552.974019] [b8280000] *pgd=00000000
[  552.977594] Internal error: Oops - BUG: 5 [#1] THUMB2
[  553.014986] Hardware name: Generic DT based system
[  553.019780] PC is at memcpy+0xd6/0x2dc
[  553.023536] LR is at stmmac_napi_poll_rx+0x32f/0x744
[  553.028492] pc : [<b0185e8e>]    lr : [<b02329f3>]    psr: 6000a833
[  553.034748] sp : b0663e4c  ip : 00000002  fp : b1273900
[  553.039967] r10: 00000010  r9 : b09444e0  r8 : 00000000
[  553.045188] r7 : 00000000  r6 : 000005ea  r5 : b2693600  r4 : b09444e0
[  553.051709] r3 : 4c105000  r2 : 000005e6  r1 : b8280000  r0 : b0dbb7c2

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ie82acf7edf39835ac9bb4f13e599718d03550154
2022-04-22 14:44:29 +08:00
Zhen Chen
5f5ce518ca MALI: bifrost: treat "Could not get a valid AS for group ..." as a debug log not warning
In mail 'RE: <rock-chips>: G610: Valhall Android DDK r36:
Does device driver warning log "Could not get a valid AS for group ..." matter?',
zhigang.yao@arm.com declared that it should not be a warning:

"This is expected behavior.
GPU has a limited present HW address space resource,
max is 16, and is implementation specific, (8 on Odin?).
So if there are more than 16 (8 on Odin) process,
some of it might not get a valid present address space,
and the warning would be printed as you have observed."

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ic8324c37461776672d516b472db66549d91fe552
2022-04-22 14:22:37 +08:00
Cai YiWei
e4fb9c7c15 media: rockchip: isp: api to free mesh buf for user
Change-Id: Ic651fa7655848badb8792a54a01703fc25c839d3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-22 14:21:05 +08:00
Cai YiWei
a1a35216e2 media: rockchip: isp: isp32 fix ae no working with af
should not to clean meas done during working for
af ae mode, if not ae will abnormal.

Change-Id: Id7353409cc8b79b3b3a59fe39df905344afacf7b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-22 14:14:18 +08:00
Tao Huang
8b1cb4e1c4 init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y && CONFIG_SMP=y
It's not benefit on UP system.

Fixes: b6cd53a3a2 ("init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I237208a21dc011695df998d546e4d28141ff41e6
2022-04-22 10:55:24 +08:00
Finley Xiao
c4fc841b36 arm64: dts: rockchip: rk3588s: change gpu opp table for stability
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I84feb93dd7403e57c8c358f07426a8f7886f376f
2022-04-22 10:54:53 +08:00
Lin Jinhan
b71bd8763d crypto: rockchip: v2&v3 add support gcm
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I7e63440c6f652b8939ade56d51957279310bec51
2022-04-22 10:52:53 +08:00
Wang Xiaobin
ba7429f655 crypto: rockchip: cryptodev_linux: add support for aead
Since the origin COP_FLAG_AEAD_*_TYPE are not applied to both
virt and fd API, we add a new type.

Change-Id: I1e896c7de90b2a4cd6053dac14bf20ab8d059ffd
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
2022-04-22 10:52:53 +08:00
Jianwei Fan
afc82929cf media: i2c: jaguar1: add g_frame_interval ops
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: I6b95a23533cf131698000d5a88c07bf524661745
2022-04-22 09:41:06 +08:00
Yu Qiaowei
b44b46489e video: rockchip: rga3: Fix use of wrong dev when virtual address unmap
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I26428b56a897803e11d3c048fba47356d5648ce6
2022-04-22 09:33:28 +08:00
Ziyuan Xu
94704a2ab6 ARM: configs: rockchip: Add rv1106-tb.config
Update by:

make ARCH=arm rv1106_defconfig
cp .config rv1106.config
make ARCH=arm rv1106_defconfig rv1106-tb.config
make ARCH=arm menuconfig
./scripts/diffconfig -m rv1106.config .config > arch/arm/configs/rv1106-tb.config

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I10ed0af2d2189f275defbf1b79de4319ffe6c44a
2022-04-21 16:03:54 +08:00
Damon Ding
8c6227243e drm/rockchip: vop2: add atomic check of vp splice mode
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9cab505bd48267ed64ebf0da52208ec4471c885c
2022-04-21 15:55:00 +08:00
Damon Ding
2cf63af67b drm/rockchip: logo: set support mode limit to 8k
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ife0b8e2a81e5327330e732b5bfc2abf25fdb6797
2022-04-21 15:55:00 +08:00
Sugar Zhang
05cc2b4fba dmaengine: pl330: Fix unbalanced runtime PM
This driver use runtime PM autosuspend mechanism to manager clk.

  pm_runtime_use_autosuspend(&adev->dev);
  pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);

So, after ref count reached to zero, it will enter suspend
after the delay time elapsed.

The unbalanced PM:

* May cause dmac the next start failed.
* May cause dmac read unexpected state.
* May cause dmac stall if power down happen at the middle of the transfer.
  e.g. may lose ack from AXI bus and stall.

Considering the following situation:

      DMA TERMINATE               TASKLET ROUTINE
            |                            |
            |                       issue_pending
            |                            |
            |                     pch->active = true
            |                       pm_runtime_get
  pm_runtime_put(if active)              |
    pch->active = false                  |
            |                      work_list empty
            |                            |
            |                     pm_runtime_put(force)
            |                            |

At this point, it's unbalanced(1 get / 2 put).

After this patch:

      DMA TERMINATE               TASKLET ROUTINE
            |                            |
            |                       issue_pending
            |                            |
            |                     pch->active = true
            |                       pm_runtime_get
  pm_runtime_put(if active)              |
    pch->active = false                  |
            |                      work_list empty
            |                            |
            |                   pm_runtime_put(if active)
            |                            |

Now, it's balanced(1 get / 1 put).

Fixes:
commit 5c9e6c2b2b ("dmaengine: pl330: Fix runtime PM support for terminated transfers")
commit ae43b32891 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")

Change-Id: Ib1feb508c16afb4bc9ced0c3660f2b6b4a19c068
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2022-04-21 15:39:09 +08:00
Ziyuan Xu
c9c4664d3e ARM: dts: rockchip: add camera/isp devices support for RV1106G-EVB2
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I3748cc69d12c1ac81c34148c3ea3f2bcee8ad3c4
2022-04-21 14:55:47 +08:00
Ziyuan Xu
05810138d7 ARM: dts: rockchip: Add thunder support for RV1106G EVB2 Board
The RV1106 EVB2 board is designed for some products that's required
thunder-boot feature, and use spi-nor flash as default.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie0543368c9536d820995313eca4f12529aa4d391
2022-04-21 14:26:04 +08:00
Ziyuan Xu
53374a4268 ARM: dts: rockchip: Add rv1106 thunder boot dtsi
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ia2f2e0f5d915e122ba13431aab152bf70eef929c
2022-04-21 14:22:16 +08:00
Shawn Lin
3954c83af6 mmc: dw_mmc: remove partial thunder boot
In preparation for adding new driver to support starting
decompress ramdisk.

And make the hclk_mmc is available before accessing the registers.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Icbd51f2798367430443bae9af5656891b93ac3bd
2022-04-21 14:21:22 +08:00
David Wu
87f766b53a net: phy: RK630phy: Disable uaps and eee advertised for t22
For some MTK solution routers, there may be link up/down situation,
after disable these two function, the problem can be solved, and the
power consumption is tested, and there is no increase.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I46122188b2fcb67dc02630827b4b631ecfc0ec5e
2022-04-20 17:18:18 +08:00
Wang Xiaobin
f1148033d4 crypto: rockchip: pka: avoid optimizing custom memcpy/memset
SRAM accessed by PKA requires word alignment.
It will crash if optimized to memset/memcpy.

Change-Id: I0122ff7ffab3835c513c39d57aa5441655cd2b03
Signed-off-by: Wang Xiaobin <xb.wang@rock-chips.com>
2022-04-20 16:52:28 +08:00
David Wu
c61e7280aa ARM: dts: rockchip: rv1106: Split TX and RX DMA size
Set rx default size to 16, if not enough, please change board dts.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Iab1812d1eb9b7156b58b39d8199d0b55ae329bd0
2022-04-20 16:10:15 +08:00
David Wu
905e1ec794 ethernet: stmmac: Split TX and RX DMA size
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia576efd1d413c44bb789b67151156ac0f2cf59d1
2022-04-20 16:09:38 +08:00
Wyon Bi
b7cf21f1e0 drm/rockchip: dw-dp: set IRQ_NOAUTOEN to the hpd irq flag
Enable HPD interrupt after the device is powered on.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I6f95c30e4af7fd13b3dc6843cd5fc7c7babdf29f
2022-04-20 16:08:55 +08:00
Tao Huang
3d920a7124 Revert "arm64: rockchip_gki.config: Temporarily disable CONFIG_PCIE_DW_ROCKCHIP"
This reverts commit 112dd88035.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0f74f4caca4f2656c99019711d60b491e0df685c
2022-04-20 16:06:16 +08:00
Tao Huang
0905a4c0bc PCI: rockchip: dw: Fix module building
dw_pcie_write_dbi2() is not export.
irq_set_affinity() is not export before v5.14.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I780ed626c1b99f1bd7af7798582a62235003fbf6
2022-04-20 16:06:08 +08:00
David Wu
b74d7b9698 ethernet: stmmac: Add flag to sync whole allocation to device at rx_buffer init
Compared with rx refill, the buffer at initialization level also needs
to do this action to avoid being flushed into wrong data after rx received
data.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Icad68f5e22c4dc3dc5ee007b2bc0d3120ceefbc9
2022-04-20 16:05:05 +08:00
Lin Jinhan
4388a12992 crypto: rockchip: add multi lli support
256 LLI were pre-allocated for multiple scatter lists
 to complete in one calculation.If sg nents exceeds
 256 in a single calculation, the calculation is
 divided into multiple calculations.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I39282efc5a2743e12bd33daa94c89a2ed83fb400
2022-04-20 15:07:15 +08:00
Lin Jinhan
f7ad86570f crypto: rockchip: move alignment check to rk_crypto_utils
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I5d578417308195eb7167ea09302fc4cce9cc59a1
2022-04-20 15:07:15 +08:00
Lin Jinhan
16e0a89366 crypto: rockchip: remove check_from_dmafd judgment
Unify the process regardless of whether the data comes from DMA buffer.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I140f0e03b39c8d7b37af2cc76e3aa314f29a73c7
2022-04-20 15:07:15 +08:00
Zefa Chen
84b2ca0bd1 arm64: dts: rockchip: rk3588 support config multiple virtual node of vicap
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I650bc628fc930400134647cf727ef7c300ddbc65
2022-04-20 14:48:39 +08:00
Sach Lin
a70a70dc1e media: rockchip: vicap: sditf sub sensor add quick stream and get sync mode.
Signed-off-by: Sach Lin <sach.lin@rock-chips.com>
Change-Id: I558a1f4048b8be2d9aef45ac0d857231bce3764f
2022-04-20 14:39:53 +08:00
Ziyuan Xu
67426129b0 ARM: rockchip: Locate kernel at 0x00208000 for RV1106 when CONFIG_ROCKCHIP_THUNDER_BOOT=y
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) ~ (10MB - 128KB)
DTB:       (10MB - 128KB) ~ 10MB
RAMDISK_R: 10MB ~ 20MB
KERNEL_C:  20MB ~ 25MB
RAMDISK_C: 25MB ~ 30MB

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ib1456c8f399cdeda391ba459b22097b0f5810e53
2022-04-20 09:56:50 +08:00
Zefa Chen
b404b93cfb media: rockchip: vicap: support multiple channels raw combine to one channel
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I9739879aef4ddba260ae9505035248d498ea63ee
2022-04-19 18:28:30 +08:00
Cai YiWei
ef4515e7c8 media: rockchip: isp: to support vicap merge raw
Change-Id: Ifc8a4216399b33106c8d044b70cef008b6a3cb7d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-04-19 18:28:17 +08:00
Yu Qiaowei
98db520196 video: rockchip: rga3: Add check for RGA2_MMU
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I2c4999611056d25dd195c212d2fcba9afd24aca4
2022-04-19 18:25:26 +08:00
Yu Qiaowei
32e08a6ad5 video: rockchip: rga3: Add debug log for rga_mm
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6c95f87a3d16275704a2011b4ef28990484da075
2022-04-19 18:25:26 +08:00
Huibin Hong
bb25b636df irq-gic: read AIAR instead of IAR when FIQ_GLUE is enable
If FIQ_GLUE is enable, uart interrupt is group0, but all
other interrupts are group1. AIAR is for group1, IAR is
for group0 and group1. We need IRQ handles group1 interrupts
only, FIQ handles group0 interrupts.

Fixes: 4c9f0407c6 ("irq-gic: support fiq")
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I062e6cafcd8728165b6eda8b82f92f7a90672132
2022-04-19 17:52:16 +08:00
Finley Xiao
a3486b7554 clk: rockchip: rk3588: change pll to slow mode before power down
Make the downstream mux work fine,fix reboot and suspend issues.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I06e6f6c22238da6aec0a8690564743dff02db0ad
2022-04-19 10:57:09 +08:00