Commit Graph

861611 Commits

Author SHA1 Message Date
Wyon Bi
fd258c7ba6 arm64: dts: rockchip: rk3566-evb3-ddr3-v10: Add edp2vga bridge support
Change-Id: I8283622639e8be1b9567b7133ec4b614ffc9a85f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-01-11 09:48:41 +08:00
Finley Xiao
e2fc934b98 arm64: dts: rockchip: Add cooling devices for rk3568
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I08cd7b2462bbb28c7cee79d72682f314d8ce716b
2021-01-08 17:59:35 +08:00
Finley Xiao
6fc2a5c028 MALI: bifrost: Add rockchip simple-power-model support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I721c0f247c81b63a1590c9001ad481837f15f15e
2021-01-08 17:59:35 +08:00
Sandy Huang
b080e565a9 drm/rockchip: vop2: set correct system status for dual display
Change-Id: I8402994faf2cd38d0a8559b2ca6e6c200ad6cbe4
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-01-08 17:56:10 +08:00
Finley Xiao
5db6a5c009 soc: rockchip: ipa: Make static coefficient more accurate when leakage is 0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic9326b41a818b16645ba8466952376f2acd5da55
2021-01-08 17:53:28 +08:00
Algea Cao
59ac9596a3 drm/rockchip: Set picture aspect to none when show kernel logo
Crtc mode will include picture aspect and generate umode's flags
will include picture aspect mask when show kernel logo. After hwc
start, DRM_CLIENT_CAP_ASPECT_RATIO will be set to 0, and the umode
hwc got will not include picture aspect. That will cause two modes
mismatch, leading to a resolution reconfiguration and cause display
err.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I4e3ad1263d9d462567d14ae4c77d7b1aa05ddb1c
2021-01-08 17:49:04 +08:00
Cai YiWei
eebb8c213f media: rockchip: isp/ispp set core clk to low freq if no stream output
Change-Id: I5d8dcfd27c8be4a0520d9bf5e18057f5376d98ef
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-08 17:27:13 +08:00
Jianqun Xu
a21959e676 dma-buf: add buf proc debug node
Usage: cat /sys/kernel/debug/dma_buf/dmaprocs

mediaserver (PID 662) size: 99044
DMA Buffers:
Name            Exp_name             Size (KB)       Time Alive (sec)
(null)          rockchipdrm          452             15
(null)          rockchipdrm          68              13
(null)          rockchipdrm          5988            15

ispserver (PID 649) size: 44528
DMA Buffers:
Name            Exp_name             Size (KB)       Time Alive (sec)
(null)          videobuf2_vmalloc    12              16
(null)          videobuf2_dma_sg     316             14
(null)          videobuf2_vmalloc    4               16

Change-Id: Icf46e9d585847ef6dafbddcd24e589046e3ff015
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-08 14:40:19 +08:00
Ding Wei
5d95879ae9 arm64: dts: rockchip: rk3568: add rcb-iova info for rkvdec
tips:
rockchip,rcb-iova=<iova_start iova_size>

Change-Id: I091a2af99573e1d5e677d0dad4b5dae5d4bd551d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-08 14:26:51 +08:00
Ding Wei
008cf6f695 video: rockchip: mpp: rkvdec2: support sram for rcb buffer
rcb buffer consists of sram and dma, sram is in the front.
rcb buffer: sram + dma
rcb_size = sram_size + dma_size

Change-Id: I4b0f1e7fb5f541b3fb1a84d7eeba5c473f7c07c5
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-08 12:52:37 +08:00
Cai YiWei
e5bf9b2cfb ARM: dts: rv1126: isp add iommu node
isp iommu on/off by rkisp_mmu's status

Change-Id: I0b156b9beea30c9c47a4fff4779b471dd464117b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-07 19:35:46 +08:00
Cai YiWei
505e09028a media: rockchip: isp/ispp add dma contiguous attrs
if device add reserved memory area and enable iommu,
pages can alloc from contiguous memory region, this
need DMA_ATTR_FORCE_CONTIGUOUS attrs.

Change-Id: I12e00467a1f7e4c6661397663835c328351715b9
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-07 19:34:49 +08:00
Cai YiWei
46e7d9882b media: videobuf2-dma-sg: support contiguous page by dma attrs
device maybe support alloc dma from contiguous memory area,
but dma sg page isn't contiguous default, add dma_attrs
(DMA_ATTR_FORCE_CONTIGUOUS) to alloc contiguous pages.

Change-Id: I909385ff3165f604ed498c71bc18f573064d3595
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-07 19:34:49 +08:00
Cai YiWei
2ef2357f15 media: rockchip: isp: fix dmatx width err for yuv422 format
Change-Id: I2b6c9e2fbb0f46cdddfc57b068d43bb08d0bb169
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-07 19:34:49 +08:00
Finley Xiao
7bfc54efa9 MALI: bifrost: Add private data for governor
This adds support to get simple_ondemand governor data from devicetree.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I6d44ba467d52bde191fb1b87bce02dc503055262
2021-01-07 19:29:58 +08:00
Finley Xiao
1543446b83 arm64: dts: rockchip: rk3568: Add 'nvmem-cells' property for cpu and gpu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I507d1851a0f6a200988fe22ce5e144cfd2ce7819
2021-01-07 19:24:54 +08:00
Finley Xiao
37110ebe35 arm64: dts: rockchip: rk3568: Add system monitor node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic540ff25ce443919372fe6a2a074d60e479c7209
2021-01-07 19:24:44 +08:00
Ding Wei
e544f5dd27 arm64: dts: rockchip: add rkvdec sram node for rk3568
Change-Id: I2c6ab9a203116591bdd33dc8c81eddacc70710eb
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-07 19:11:40 +08:00
Ziyuan Xu
86cc3029d7 drivers: rkflash: fixes compile error when !CONFIG_MTD
In file included from drivers/rkflash/sfc_nand_mtd.c:6:0:
./include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Wcpp]
error, forbidden warning:cfi.h:76
 #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.
  ^~~~~~~
scripts/Makefile.build:333: recipe for target 'drivers/rkflash/sfc_nand_mtd.o' failed
make[2]: *** [drivers/rkflash/sfc_nand_mtd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from drivers/rkflash/sfc_nor_mtd.c:6:0:
./include/linux/mtd/cfi.h:76:2: warning: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Wcpp]
error, forbidden warning:cfi.h:76

Change-Id: I900d20adbd86c8293a9496ffba4bd722a46bfeae
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-01-07 19:09:33 +08:00
Ren Jianing
2bd6e6bb10 usb: gadget: f_fs: fix ep req_match error for composite device
This patch add direction index for eps_revmap, which can avoid matching
to the requests for other functions.

For example, if we config ep1in for uac and ep1out for adb, the requests
for ep1in will be matching to ffs without this patch.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ic7a52fca35503656bbc306c9f0014dfdea61392b
2021-01-07 16:12:39 +08:00
Hu Kejun
5717d1681f media: rockchip: isp: fix lsc lut error in start/stop test
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I2d317b15f92f7a157da04ab770cd9dc8a243bf05
2021-01-07 15:47:39 +08:00
Shawn Lin
a57c7fa1c7 PCI: rockchip: dw: Fix suspend support for rk356x
Migrate to noirq phase and only call rk_pcie_reset_grant_ctrl()
when using in RK1808 platforms.

Change-Id: I629dc121457614b17bcf9a1e1d93e09859a4cb26
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-01-07 15:11:46 +08:00
Jianqun Xu
3b1adb0d79 ARM: mm: fix virtual kernel memory layout display format
Before this patch:
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xb0000000 - 0xf0000000   (1024 MB)
[    0.000000]     pkmap   : 0xafe00000 - 0xb0000000   (   2 MB)
[    0.000000]     modules : 0xaf000000 - 0xafe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 331 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 896 kB)

With this patch:
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xb0000000 - 0xf0000000   (1024 MB)
[    0.000000]     pkmap   : 0xafe00000 - 0xb0000000   (   2 MB)
[    0.000000]     modules : 0xaf000000 - 0xafe00000   (  14 MB)
[    0.000000]       .text : 0xb0008000 - 0xb0900000   (9184 kB)
[    0.000000]       .init : 0xb0c00000 - 0xb0d00000   (1024 kB)
[    0.000000]       .data : 0xb0d00000 - 0xb0d52d4c   ( 332 kB)
[    0.000000]        .bss : 0xb0d52d4c - 0xb0e329b0   ( 896 kB)

Change-Id: I3c77ff89dc5320213f4ff1e0a89b3c688f1d0638
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-07 15:03:45 +08:00
Jianqun Xu
7a669a6418 mm: cma: add CmaAllocated/CmaReleased info for meminfo node
Show the CMA pages used by cma_alloc in meminfo node.

Tested on RV1126 EVB DDR3:
CmaTotal:         270336 kB
CmaAllocated:      44408 kB
CmaReleased:      225928 kB
CmaFree:               0 kB

The CmaTotal = CmaAllocated + CmaReleased, and the CmaFree is pages
under cma area unused by system.

The CmaAllocated can be calculated by CMA_DEBUGFS.
Tested on RV1126 EVB DDR3:
cat /sys/kernel/debug/cma/*/used
10756
346

The results from cma used is in page count, 1 page = 4kByte
CmaAllocated = 44408kB = 10756 + 346 pages

Change-Id: Ib79001367562c968e6432816b158cba551978173
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-07 14:16:12 +08:00
Andy Yan
adb17e773c drm/rockchip: vop2: Register format_modifiers
Userspace can check format_modifiers to know if
we support afbc or other format.

Change-Id: I6c74876551877e5bef1d98d2d85d4c3d84e2104b
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-07 14:05:21 +08:00
Wyon Bi
22e1c3dbb7 drm/bridge: analogix_dp: Fix voltage_swing/pre_emphasis level calculation
Fixes: d7ad116fb3 ("drm/rockchip: analogix_dp: Add support for rk3568")
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I6da4a8c0c4b5486bac6bb054aee6535118e81f60
2021-01-07 11:42:15 +08:00
Cai YiWei
ebb99ecd46 media: rockchip: ispp: add virtual video for iqtool
Change-Id: I33229d46cb476e8ab036883238815821fe6119d2
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-07 11:36:59 +08:00
zhangqing
c6be2b1160 arm64: dts: rockchip: rk3568: modify gpu clk
GPU clk using SCMI,replace <&cru CLK_GPU> with <&scmi_clk 1>

Signed-off-by: zhangqing <zhangqing@rock-chips.com>
Change-Id: I12d263b29caa8dd5b635a5d6bbf86677ed12414d
2021-01-07 11:30:22 +08:00
Elaine Zhang
d8f8857b7e clk: rockchip: rk3568: add READ_ONLY flag for clk_gpu
clk_gpu is not allow to set rate, just read only.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I59b31b059cfe941104765c066a0c678b1ca50312
2021-01-07 11:29:55 +08:00
zhangqing
36f64d7150 arm64: dts: rockchip: rk3568: modify cpu clk
CPU clk using SCMI,replace <&cru ARMCLK> with <&scmi_clk 0>

Signed-off-by: zhangqing <zhangqing@rock-chips.com>
Change-Id: I321493604d95690ca2a2b4040dfcf8acd9f77697
2021-01-07 11:29:45 +08:00
XiaoDong Huang
bd22b8ce75 arm64: dts: rockchip: rk3568: Make some changes for scmi
1. Use DDR 1M+60K~1M+64K instead of sram to be share memory.
2. Delete property "shmem" in scmi_clk node.
3. Change smc-id to 0x82000010.

Change-Id: I97f25dec6b61fb749b1ef79ef9875abe48fa662e
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-01-07 11:27:37 +08:00
Yao Xiao
e5235d6a08 net: rockchip_wlan: update cywdhd to "1.363.125.19 (r)"
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
Change-Id: I4be636719d780978486d8ad204472cfb1023ca99
2021-01-06 18:20:16 +08:00
Caesar Wang
9ccfa45cf3 arm64/configs: update rockchip_linux_defconfig
1/ enable sii902x
Add RGB/BT1120 to HDMI support, this is needed by
rk3568-evb2-lp4x-v10-bt1120-to-hdmi.

2/ enable CONFIG_SDIO_KEEPALIVE
This is needed by RK356X EVB to support Wi-Fi.

3/ add rockchip ebc dev driver.

4/ remove unused CONFIG_I2C_MUX.

5/ enable CONFIG_PCIE_DW_ROCKCHIP for PCIE devices.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I3076aefab88fa2b166a8af89e8681fa46a69e7f9
2021-01-06 18:15:37 +08:00
Daniel Vetter
97fd895541 UPSTREAM: dma-buf: Fix SET_NAME ioctl uapi
The uapi is the same on 32 and 64 bit, but the number isn't. Everyone
who botched this please re-read:

https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html

Also, the type argument for the ioctl macros is for the type the void
__user *arg pointer points at, which in this case would be the
variable-sized char[] of a 0 terminated string. So this was botched in
more than just the usual ways.

Change-Id: Iaffffa806de8f6f10cd167881bb63fdabd6724a2
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Chenbo Feng <fengc@google.com>
Cc: Greg Hackmann <ghackmann@google.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: minchan@kernel.org
Cc: surenb@google.com
Cc: jenhaochen@google.com
Cc: Martin Liu <liumartin@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Martin Liu <liumartin@google.com>
Reviewed-by: Martin Liu <liumartin@google.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: updated some checkpatch fixes, corrected author email]
Link: https://patchwork.freedesktop.org/patch/msgid/20200407133002.3486387-1-daniel.vetter@ffwll.ch
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit a5bff92eaa)
2021-01-06 18:13:00 +08:00
Jianqun Xu
604baba3e7 android: ion: set sg address by sg_dma_address
Change-Id: I20b6d34a93aa3bc2b0044cfbc004e13ca60d2b2f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 18:03:33 +08:00
Jianqun Xu
479227ac66 android: ion: add debug node for ion heap
Add debug node [system/cma]_stats for ion [system/cma]-heap

Change-Id: Ib8ea98f516586c9598e17efe310f7673421fa02a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:58:37 +08:00
Jianqun Xu
7e32ad8b9a android: ion: add exp_name for dma buffer
Add the exp_name for dma buffer with KBUILD_MODNAME, heap->name, current->tgid
and task_comm.

Such as ion_alloc-ion_system_heap-263-allocator@4.0-service

Module: ion_alloc
Heap  : ion_system_heap
tgid  : 263
task  : allocator@4.0-service

Change-Id: I4f11394ae2470dcd2b113b4cfd01d70be9c67c8d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 17:56:50 +08:00
Weiguo Hu
d9d3e43de1 net: wireless: rockchip_wlan: realtek wifi: p2p ioctl illegal parameter protect
References: CNVD-C-2020-309986, CNVD-C-2020-309987, CNVD-C-2020-309988

Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Change-Id: I611e16f8155bac6431e0d786c29ef1425ff792d2
2021-01-06 17:08:25 +08:00
Jianqun Xu
6bb31db2cf mm/cma: show cma bitmap in hex format
Change-Id: I0f8b49202e3e173961f8f2697e0e3494a07afa1d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-01-06 16:59:56 +08:00
Weixin Zhou
12c78422e2 driver: input: touchscreen: Make sure that suspend/resume is called only once
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I198581c45baf31f62b9ffa6ba6d9ec15cf4c606d
2021-01-06 16:19:13 +08:00
Hu Kejun
e5c26944dd media: rockchip: isp: get stats only when meas done is on
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I52b167b0aa52a0e4e636334d3b874fa5616dc6da
2021-01-06 16:18:54 +08:00
Cai YiWei
56130b06e8 media: rockchip: isp: remove rx enable config
rx auto enable by csi op_mode

Change-Id: I0e4f807071ceceb1a9c53df5ede0a586febc442a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-01-06 16:16:23 +08:00
David Wu
1847729a77 arm64: dts: rockchip: rk3568: Add xpcs support
Change-Id: I431393b2346f5f7fd6b0d74f79e643df9a586479
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 15:24:40 +08:00
Alex Zhao
b59b1c0040 mmc: add a file to debugfs for changing host max clock at runtime
Usage is as follows:

rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
150000000

rk3566_rgo:/ # echo 200000000 > /sys/kernel/debug/mmc1/max_clock
rk3566_rgo:/ # cat /sys/kernel/debug/mmc1/max_clock
200000000
rk3566_rgo:/ # echo 200000000 >  /sys/kernel/debug/mmc1/clock

rk3566_rgo:/ # dmesg -c
[  285.884348] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 200000000Hz, actual 198000000HZ div = 0)

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I7ac9649b231c50b0c6c066407e28954e8c94510c
2021-01-06 15:18:42 +08:00
David Wu
6f8089df70 phy: rockchip: naneng-combphy: Add SGMII/QSGMII mode support
Change-Id: I56f30af84b8a2c2207a1c61afa1638736705d1f8
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
David Wu
8768a53391 phy: rockchip: naneng-combphy: Sort rockchip_combphy_grfcfg struct member by register
Change-Id: I3c0593574a442c4de460ff3b0dde651a7fcae901
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-01-06 10:14:41 +08:00
Wyon Bi
7c35a5ac27 clk/rockchip/regmap: rk628: Add CLK_SET_RATE_PARENT flag to clk_hdmirx_aud
Change-Id: I368512b92f5c5068a4f1b9b3c03e82cd5702a05b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-01-05 19:40:02 +08:00
Elaine Zhang
b4f60fb98b arm64: dts: rockchip: rk3568-evb: add can nodes
add can0\1\2 node.
set disabled by default.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9493d640e9afcf1ae4db57e0ad2d680b8922cb92
2021-01-05 19:30:47 +08:00
Elaine Zhang
9823a37f80 net: can: rockchip: canfd: fix up the bus error
Fix up tdc calculation rules.
Enable auto retransmission mode.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia909a71572be768be6639455129ef5c8885f4720
2021-01-05 19:28:21 +08:00
William Wu
ec7b288bbc usb: dwc3: core: disable device wakeup for rk356x usb host
RK356x SDK will power off logic and grf module in suspend.
So we don't need to enable device wakeup for rk356x usb host
to keep usb controller PD on. With this patch, it can call
rk356x combphy init by usb_phy_roothub_init during resume,
and fix the usb3.0 host function failure after resume.

Change-Id: I40f9a34b5f2aaeede833f9e46153f60b767ea3f0
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-01-05 19:05:18 +08:00