Commit Graph

1065473 Commits

Author SHA1 Message Date
Zefa Chen
4979094097 media: rockchip: rkcif fixed buf error when used dma_sg
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Icbf960fe532a746342634566f06537d0fe87fd5d
2022-03-22 11:45:55 +08:00
Zefa Chen
d5e0728c35 media: rockchip: rkcif fixed bug for rv1106
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4d5639ebd85fbfabe81f210dcc4df2e455c20c45
2022-03-22 11:45:55 +08:00
Cai YiWei
10d6a43961 media: rockchip: isp: isp32 fix nv12 error
Change-Id: I90c563f0120b9000b45d68a526c74d99f3913f01
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-22 11:45:55 +08:00
William Wu
fcfcf4e516 ARM: dts: rockchip: Add usb otg support rv1106/3 evb board
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1a8651f428b2d1784da1db1a9a747545ffd7c323
2022-03-22 11:45:55 +08:00
William Wu
93d5b00f1f ARM: dts: rockchip: fix usb phy grf for rv1106
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I084acc961fa8e3fb25b44ec61bc87be6e5d367f5
2022-03-22 11:45:55 +08:00
David Wu
209bfdd968 ARM: configs: rv1106: Enable RK630_PHY config for rv1106_defconfig
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I770a1a8dc991cabe4ba2fd36bb308b79c826279f
2022-03-22 11:45:55 +08:00
David Wu
9617a594cd ARM: dts: rockchip: rv1106: Fix reg range and PHY id for MAC
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ibf88a133d2abb4ba64a0033d86a2d28ad3c39263
2022-03-22 11:45:55 +08:00
David Wu
73ce190171 net: stmmac: dwmac-rk: rv1106: Fix RMII mode for MAC and normal mode for PHY
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I779e8c0fefe148e47d334ae193e4622bc5bce048
2022-03-22 11:45:55 +08:00
Yu Qiaowei
4d45d7257e ARM: rv1106-evb.config: Enable ROCKCHIP_RGA_PROC_FS
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I47c5131b38f2409fd2ca7d5d7886fec8777d6537
2022-03-22 11:45:55 +08:00
Yu Qiaowei
dba6339962 ARM: dts: rockchip: rv1106-evb: Enable RGA2
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id9ed5d13aa739de29b0efbb71e414c7162c335c1
2022-03-22 11:45:55 +08:00
Sugar Zhang
7d0fe37b39 rk: scripts/mkimg: Clean out directory before repack fit image
Also support fit boot.img is symlink.

Change-Id: I1d2ebea389d0d8a2cbf19dee56832dd087c2c858
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2022-03-22 11:45:55 +08:00
Algea Cao
a63d297ffd phy: rockchip-samsung-hdptx-hdmi: Reset apb when disable phy
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I85cd210e2f22a7e8a3bbbf5b468adbf0160a676c
2022-03-22 11:45:55 +08:00
Cai YiWei
6ec9dad4d4 Revert "media: rockchip: isp: dynamic memory alloc for params and stats function"
This reverts commit 57bacabe6e.

Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Change-Id: I97801770b8ed4e618bf99c4ab72c3c3d80c81d82
2022-03-22 11:45:55 +08:00
Tao Huang
8ab16742cf ARM: rv1106_defconfig: Enable CONFIG_SYNC_FILE
RVE/RGA use this feature.

Changes to vmlinux size:
Before:
   text	   data	    bss	    dec	    hex	filename
2547114	1011100	  83856	3642070	 3792d6	vmlinux

After:
   text	   data	    bss	    dec	    hex	filename
2549039	1011548	  83856	3644443	 379c1b	vmlinux

delta: 2373 (dec)

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic4bbb0c5769bba6968b449b545e4b0e970abae69
2022-03-22 11:45:55 +08:00
Jon Lin
a3a3b0fe02 spi: rockchip-sfc: Support VER6
Change-Id: Id4cc5e0131172c6f2a9831182ef4931e55876418
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-03-22 11:45:55 +08:00
Dingxian Wen
5addbe2904 media: rockchip: hdmirx: Bind interrupts and delayed works to big cpu
Bind interrupts and delayed works to big cpu, and limit the
minimum frequency of the cpu to 1.2G when hdmi is inserted.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I66204c27d550f76224f1dc7087977a59257abdb8
2022-03-22 11:45:55 +08:00
Dingxian Wen
b66bcc1b27 soc: rockchip: sip: Fix sip_fiq_control parameter passing error
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: Ie4fcde48212cfa723d6a6cfb7f03f43468159150
2022-03-21 16:14:23 +08:00
Chen Shunqing
d6d0364d59 media: rockchip: hdmirx: filter the abnormal frames
If the color is YUV format, when resume or change resolution or plugin,
the first few frames of DMA is zero, Cause green screen display.

Signed-off-by: Chen Shunqing <csq@rock-chips.com>
Change-Id: I8084e1c0b3c9b0e763fa8aae24994da6875b2f32
2022-03-21 16:14:07 +08:00
Algea Cao
b948c50465 drm/bridge: synopsys: dw-hdmi-qp: Get uboot status when hdmi bind
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I050987ca3ef4e5cd738cef998f68390b7187cd8c
2022-03-21 15:25:22 +08:00
Algea Cao
0d8aa5c744 drm/bridge: synopsys: dw-hdmi-qp: Don't set picture_aspect_ratio to none when get edid failed
The value must match that of uboot.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I99e593cf6c85ffc2aeaa6e1055a1294124096dc3
2022-03-21 14:23:12 +08:00
Algea Cao
16776f1ef1 phy: rockchip-samsung-hdptx-hdmi: Get actual frequency each time when enable dclk
When HDMI0/1 are bound to the same VP, vop will only set one dclk rate,
The frequency of another dclk will not be changed. But HDMI driver will
set phy output frequency, The dclk core->rate does not correspond to the
actual phy output frequency. So dclk core->rate need to be updated when
enable dclk.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I497bf9a01b8210c17b1c720839fc8f5d15dd0baf
2022-03-21 14:23:12 +08:00
Shawn Lin
504bc07b5b PCI: rockchip: dw: Add affinity for legacy INTX
We try to avoid to create and look up parent domain hierarchy, which is
a normal way we need because it's indeed is a hierarchy. Instead we set
affinity via parent irq by using irq_set_affinity API.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I04252b956b7c29fb5c156f1c8ff59adf82d5c638
2022-03-21 11:45:11 +08:00
Huang zhibao
3a450b7a0d arm64: dts: rockchip: rk3588-nvr-demo: fix pcie3.0 startup delay time to 7500us
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I679305c6d5fadcba861841013b6e0a08cce4e0e2
2022-03-21 11:38:52 +08:00
Cai YiWei
26093e03f8 media: platform: rockchip: cif/isp/ispp remove vb2_dma_contig and vb2_dma_sg
reduce driver size

Change-Id: I3f7eeec74603ae9b601c68bd1b2a0633094cd531
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-21 11:33:46 +08:00
Jianqun Xu
06f898829b media: platform: rockchip: cif/isp/ispp use videobuf2-cma-sg
Fix the videobuf2-rdma-sg to videobuf2-cma-sg, and move it into
videobuf2 directory.

The videobuf2-cma-sg almost keep same as videobuf2-rdma-sg, both of them
are referenced from videobuf2-dma-sg. But the videobuf2-cma-sg also
support the videobuf2-dma-sg if the device's attr without force
contiguous attr.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I397fd5cbcd54a0575a34ecbc853dda9e53629892
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-21 11:33:09 +08:00
Simon Xue
2797eedc4f video: rockchip: mpp: enable pd/clk by av1dec_bus
Change-Id: Id7cb8b33cba90ac49b0b503aff3d0eef92174641
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2022-03-21 11:30:30 +08:00
Yandong Lin
457c8b8ba2 video: rockchip: mpp: fix av1d cannot suspend issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifc38cf6f05b8abfe4867dfedbe708f2ecb61b7ed
2022-03-21 11:30:14 +08:00
Cai YiWei
5b8a719b6d media: common: videobuf2-cma-sg: support more pages alloc
if DMA_ATTR_FORCE_CONTIGUOUS to alloc contiguous pages and
dma alloc from rk_dma_heap default if it enable, else
alloc compacted pages.

Change-Id: Id1c020fd953e6b090ba734d1c41ed1c3d6932510
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-21 11:23:46 +08:00
David Wu
a0c01681c5 net: phy: rk630phy: Differentiate the PHYs of S40 and T22
At present, it is the best way to distinguish by address,
the two configure different registers during the initialization process.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I2bbb0cfb6f2e33e25406b7d28ac22e5e035f64e3
2022-03-19 19:44:28 +08:00
David Wu
cd5a378048 net: phy: rk630phy: Use falling edge instead of rising edge
The default voltage is high, so it is more appropriate to
use a falling edge.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I74a9ae7e0a2432c4050f2d305aeaa8d9f4f31e62
2022-03-19 19:44:17 +08:00
David Wu
4b46408341 net: phy: rk630phy: Remove unused code
Now adjust the voltage through BGS, so don't need this part
of the code.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ia915cd0b2a3ac96386f96aee6204e477c3188f2a
2022-03-19 19:44:01 +08:00
Zefa Chen
259f76f849 media: i2c: sensor adapter support write sensor register by i2c interface
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I45d7ab10c24ee4b046b3fb85ea7fd45a88c9e4a9
2022-03-19 19:14:10 +08:00
Zefa Chen
6cb6bcaf2c include: rk-camera-module: add command for sensor adapter
1.modify RKMODULE_SET_MCLK
2.add RKMODULE_SET_DEV_INFO

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ifaedf8a4ed96c9daa31fe946c6cd6eeaf7a51f02
2022-03-19 19:13:38 +08:00
Jianqun Xu
f8e84013a5 tools: testing: selftests: add iomux instance
Add a new instance for rockchip pinctrl to do selftest, and the userland
can set or get the iomux to one pin directly.

Build the iomux by gcc:
    xx-gcc tools/testing/selftests/rkpinctrl/iomux.c -o iomux

Tested on rk3588-evb1:

[root@RK3588:/]# iomux 1 15 1
[root@RK3588:/]# iomux 1 15
mux get (GPIO1-15) = 1

[root@RK3588:/]# iomux 1 15 2
[root@RK3588:/]# iomux 1 15
mux get (GPIO1-15) = 2

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: Ic5271b25e55e1023caa5580346ffb82fe7a4cb65
2022-03-19 18:45:46 +08:00
Jianqun Xu
1d7ef69052 soc: rockchip: add iomux device for uapi support
Add a new driver to create a device named /dev/iomux, which allows
userland to set or get iomux by bank index and pin index.

For now the /dev/iomux supports two commands:
 - IOMUX_IOC_MUX_SET
 - IOMUX_IOC_MUX_GET

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I0467af6885863f5dc69d513601f597fca2cc6948
2022-03-19 18:23:04 +08:00
Jianqun Xu
9dff075126 pinctrl: rockchip: introduce rk_iomux_set/get
Add rk_iomux_set and rk_iomux_get functions and export them, which can
set or get iomux by bank and pin index.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I2fa94c9fe7d28c545fc31033e70c26cd5c57fed7
2022-03-19 18:23:04 +08:00
Zefa Chen
af227dbe4a media: rockchip: vicap support rv1106
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I1a8f4a8a7e80494eef9991a7551762bc4c6267f6
2022-03-19 16:27:10 +08:00
William Wu
1f622163d8 usb: gadget: f_uac1: add interface assoc desc
According to the spec "USB Interface Association Descriptor Device
Class Code and Use Model"[1], the Interface Association Descriptor
(IAD) is needed for composite device which has multiple interfaces
controlled independently of each other. Without the IAD, the device
may not work as expected because the USB system software will not
properly bind the interfaces with drivers (e.g UAC1 && UVC composite
device not recognized in Win10).

[1] https://www.usb.org/sites/default/files/iadclasscode_r10.pdf

Change-Id: If88c43d20d6133c05a2d2c90507ff03fae21ecdf
Signed-off-by: William Wu <william.wu@rock-chips.com>
2022-03-19 16:23:38 +08:00
Tao Huang
a7e405fc72 ARM: rv1106-evb.config: Enable ROCKCHIP_RGA_ASYNC/DEBUGGER/DEBUG_FS
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1b5f3b67c086f52220b7159f6dbd417d1a34a663
2022-03-19 16:00:25 +08:00
Herman Chen
6cee981d5a video: rockchip: mpp: rkvenc2: Fix slice mode issue
1. Use MPP_CMD_POLL_HW_IRQ to handle the hw slice irq.
   Old MPP_CMD_POLL_HW_FINISH will wait hardware finish and skip hw irq.
2. Clear poll request msgs when it is handled.

NOTE: When MPP_CMD_POLL_HW_IRQ return slice with zero length the
current task is completed. This way can reduce an extra
MPP_CMD_POLL_HW_FINISH ioctl.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2c81d85c236d4290a497c1747ae2f3e5ac1ce55c
2022-03-19 15:52:42 +08:00
Herman Chen
298511efd0 video: rockchip: mpp: rkvenc2: Add task id
Use task_id in taskqueue to identify each task while task_index in
mpp_dev will have conflict in multi-core case.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia0c5acc9139cfba177fb828daed6c87750a47ef1
2022-03-19 15:52:42 +08:00
David Wu
8fb18885c7 ethernet: stmmac: dwmac-rk: Disable split header currently
If the length of the tftp test packet exceeds 6K bytes, there
will be problems, and disabling the feature works fine.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I2eff716ac27546b76d4414cb1b30efb8b8de6285
2022-03-19 15:33:07 +08:00
Lin Jinhan
26b58799e1 crypto: rockchip: modify RK_DMA_ALIGNMENT from 64byte to 128byte
For SHA384/SHA512, the data length must be 128 bytes alignment.
Otherwise, the calculation results will be incorrect.

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: If3b16a62d0eaf842ccc8bf954a489508b232a4b3
2022-03-18 18:09:05 +08:00
Hu Kejun
79bfcdd26c media: i2c: ov50c40: fix cannot get channel info on android
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I60a02c71bd2bd8970a608d5fffdca74801ca8efc
2022-03-18 16:11:56 +08:00
Cai YiWei
33a3879e8e media: rockchip: isp: isp32 remove bls2_val
useless at struct isp32_bls_cfg

Change-Id: If8659818c04581336577ee28435be604fbc28c8f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-03-18 15:47:43 +08:00
Damon Ding
69b53f960d drm: Kconfig: CONFIG_DRM select I2C_ALGOBIT if !ROCKCHIP_MINI_KERNEL
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ic58fc4efc06f585dd762b97d7117888743deb625
2022-03-18 15:21:58 +08:00
Damon Ding
7c7517b5c1 drm: Kconfig: CONFIG_DRM select CONFIG_HDMI if !ROCKCHIP_MINI_KERNEL
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I7e7fc74d737796a5c777a2d845dc9f58c0b3b5e1
2022-03-18 15:17:20 +08:00
Sugar Zhang
d4d3e9ea07 ARM: dts: rv1106-evb: Make clk always on temporarily
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iaff298f9eccece1a8905f2b90fafc56b1d1c4140
2022-03-18 15:08:04 +08:00
Lei Chen
230ee551c9 drm/rockchip: dsi2: fix support dynamic binding to different vp port
Fixed VOP_OUTPUT_IF_MIPI being turned off when switching resolution

Signed-off-by: Lei Chen <lei.chen@rock-chips.com>
Change-Id: I4f432a7d352578baa9351e2f859afd67b4ea0152
2022-03-18 15:06:09 +08:00
Joe Perches
a596e98a98 FROMGIT: usb: gadget: f_uac2: Neaten and reduce size of afunc_validate_opts
Remove the repetition and reduce the object size a bit.

$ size drivers/usb/gadget/function/f_uac2.o* (x86-64 defconfig with gadget)
   text	   data	    bss	    dec	    hex	filename
  24515	   3136	     16	  27667	   6c13	drivers/usb/gadget/function/f_uac2.o.new
  24817	   3136	     16	  27969	   6d41	drivers/usb/gadget/function/f_uac2.o.old

Change-Id: I2a6d4b671f8c7600735676d2ad84ff5d28b46c3e
Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/2132d97ca8d4dd5ac9426cc23af95e819079b02c.camel@perches.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 2dac5d2864
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
2022-03-18 14:48:07 +08:00