Commit Graph

1065901 Commits

Author SHA1 Message Date
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
Finley Xiao
907260b017 clk: rockchip: rk3588: change pll mode register for cpu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia258b7a152c3458f488a63c5f2ca1a6478f854a0
2022-04-19 09:12:51 +08:00
Alex Zhao
b96485b7af arm64: dts: rockchip: rk3588s fix sdio pins to pull up
The sdio requires the cmd and data pins to pull up by soc.

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I7390dad3e1af19c5cae778064e49e47eb8514baf
2022-04-19 09:11:53 +08:00
David Wu
0940193c47 ethernet: stmmac: dwmac-rk: Set input/output before disable pclk_gmac
For rk3588, the input/output of the clock direction needs to set
the php_grf register, and the pclk of php_grf is associated with
pclk_gmac, so you need to set the input/output before closing
pclk_gmac.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Idddec040660aaadd80d7dd6d8aba6220b65425fe
2022-04-18 18:54:10 +08:00
Tao Huang
2f4b611c2a clk: rockchip: Add ROCKCHIP_DDRCLK Kconfig
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5569cb9b52dd1f7fb702d8a37aef494fcc189c2c
2022-04-18 15:49:38 +08:00
Huang zhibao
9a489d57b7 arm64: dts: rockchip: rk3588-nvr: add dts for nvr demo3 v10 board
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: If6301e713a1f3e1b4ec983cec94d705e7855538c
2022-04-18 14:57:04 +08:00
shengfei Xu
335ee47416 arm64: dts: rockchip: rk3588-rk806-single: initialize the configuration of NLDO5
The single-pmic configuration is based on the EVB7

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: If3e9136ce9e0ebbd50780bc7d06481e6c69bcf12
2022-04-18 14:52:56 +08:00
XiaoDong Huang
443afabe9c arm64: dts: rockchip: rk3588s: reserve 0~4k and 960~1024k of syssram
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ib554e9f020abdc31f5eeb93bd1f0730d576bec8b
2022-04-18 14:51:50 +08:00
Algea Cao
22bdb72e37 drm/bridge: synopsys: dw-hdmi-qp: Set hdcp2 bypass when dvi mode
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I7c14a2398f9c1304a40a5c987eadde0e23fac1d1
2022-04-18 14:50:50 +08:00
Tao Huang
84a182ce57 Revert "arm64: rockchip_gki.config: Enable CONFIG_RK_NAND"
This reverts commit 6fbbbac945.
Which make eMMC boot failed.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I7ed10941a1031d752a0a7567f60fd42304a33d03
2022-04-18 12:22:06 +08:00
Elaine Zhang
8b5833cb37 Revert "clk: composite: Add support to change brother clock rate"
This reverts commit c1a61a70dc.

Change-Id: I26da50110300d4147049fd56a8d09dde9a0f611d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-04-18 09:59:31 +08:00
Elaine Zhang
f5f47389d4 Revert "clk: rockchip: implement the composite brother branch type"
This reverts commit d433943b34.

Change-Id: I9d7fc94a30a65e1804ec836e113a4b930c2ab663
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-04-18 09:59:31 +08:00
Elaine Zhang
5e82d7c4b7 clk: rockchip: remove COMPOSITE_BROTHER
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Iacbdbcb4bf8f87f6f10f2b1543292c7831e3677c
2022-04-18 09:59:31 +08:00
Elaine Zhang
0df9c9491c Revert "clk: rockchip: Add supprot to limit input rate for fractional divider"
This reverts commit 5abd502598.

Change-Id: Ib2301076fe703c92cd08c82c3f45771c3e6f3826
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-04-18 09:59:31 +08:00
Elaine Zhang
5c50edccbe Revert "clk: rockchip: add a COMPOSITE_DCLK clock-type"
This reverts commit 124c0977a0.

Change-Id: I2e93b3c5fda206c07c6a218bfc4e3ee727ea9fbe
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-04-18 09:59:31 +08:00
Finley Xiao
401836675e cpufreq: rockchip: Fix build error when build as module
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie3eb49fa245a970a953c496d4c26300cea4dc18f
2022-04-18 09:57:27 +08:00
Tao Huang
925ab43971 arm64: rockchip_gki.config: simple and sync with rockchip_defconfig
Only support RK3588:
-CONFIG_CPU_PX30=y
-CONFIG_CPU_RK3328=y
-CONFIG_CPU_RK3368=y
-CONFIG_CPU_RK3399=y
-CONFIG_CPU_RK3568=y

-CONFIG_MALI400=m
-# CONFIG_MALI400_PROFILING is not set
-CONFIG_MALI450=y

-CONFIG_MALI_DEBUG=y
-CONFIG_MALI_DEVFREQ=y
-CONFIG_MALI_DT=y
-CONFIG_MALI_EXPERT=y
-CONFIG_MALI_MIDGARD=m
-CONFIG_MALI_PLATFORM_THIRDPARTY=y
-CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="rk"
-CONFIG_MALI_SHARED_INTERRUPTS=y

Disable ION:
-CONFIG_ION=y
-CONFIG_ION_SYSTEM_HEAP=y

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ibf188b9d8385440294bb81288ae693694e5dc546
2022-04-16 17:20:52 +08:00
Zefa Chen
a8109ffafd media: rk_ircut: return error if ioctl not supportted
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I6219df0f4db9244195d5722e7b8c81fac9410b32
2022-04-16 16:32:11 +08:00
Zhichao Yu
ad4221ec5a ARM: configs: rv1106: enable CONFIG_COMMON_CLK_PROCFS
Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: I29cee4152ad16ddd91fb240f1e1058cd4a1488df
2022-04-16 16:15:05 +08:00
Huang zhibao
8e91c976b1 ARM: dts: rockchip: rv1106-uvc-demo: remove clk always on
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Ic2106dc3b71b775a6f6227089e832c8a8af54c87
2022-04-16 16:10:56 +08:00
Zhang Yubing
d8004e3b97 drm/rockchip: dw-dp: filtering unexpected hotplug event.
When reset the dp controller, if a DP device is connected, the dp
controller will generate a hotplug irq, which is a unexpected hotplug
event.

To filter this hotplug event, disable irq before reset the DP
controller. After dp controller reset, wait the first hotpulg event
then clearing the hotplug interrupt status bit and enable dp
controller irq.

Fixed:
commit f14693316b ("drm/rockchip: dw-dp: reset dp controller status")

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ic4cabd3b816121b2d1109a5bbfe608f615971953
2022-04-15 18:50:41 +08:00
Cliff Chen
b988b52e76 ARM: configs: rockchip: rv1106: switch to preempt voluntary
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Change-Id: Ib1ca6e64673104ac40e861f7dbe119aa5fd6895b
2022-04-15 18:45:46 +08:00
Yu Qiaowei
383ed4e002 video: rockchip: rga3: Support import buffer with size
Update driver version to 1.2.9

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I26e4142b7b9d62a222fa5bd503dac232840022a2
2022-04-15 17:24:19 +08:00
Zhichao Guo
1aed8950e0 ARM: dts: rockchip: RV1103G EVB support SPI NOR and SD card
Signed-off-by: Zhichao Guo <zhichao.guo@rock-chips.com>
Change-Id: Ieee013b2dca2503c02c954ceb6e09c1c0a0f9b02
2022-04-15 17:06:17 +08:00
Zhichao Guo
e82c835c43 ARM: configs: rv1106-evb.config support SPI NOR and JFFS2
Signed-off-by: Zhichao Guo <zhichao.guo@rock-chips.com>
Change-Id: Ib3c4ce2486f22dd0553f6bd00bad52e821791a4c
2022-04-15 17:06:17 +08:00