Commit Graph

862878 Commits

Author SHA1 Message Date
Andy Yan
53744719be drm/rockchip: vop2: use dev_dbg instead of DRM_WARN to warn odd dst_w
There are many display scene with odd dst_w, so
DRM_WARN will bring too much warning log, which
may frighten somebody.
Use dev_dbg hide it.

Change-Id: I2b132eb49a90792468fbea4e133c9e63aa50bf04
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-13 18:21:55 +08:00
Zefa Chen
dbc572151b media: i2c: imx307 support lvds 2 lane
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2828b5db68064e15597f37ceac80f1307bb90c71
2021-03-12 19:09:49 +08:00
Ren Jianing
0b82f4909b usb: gadget: u_audio: disable eps when usb disconnect
UAC gadget disable eps only when receiving set_alt_0. If USB is
unplugged before the packet of set_alt_0, the corresponding eps
will not be released and leading to UAC dysfunction when the next
time the usb is plugged.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I476ef8ce64a5b04cc3fec32a28126e2eb9d5ad78
2021-03-12 18:45:50 +08:00
Yiqing Zeng
2b48a7268d media: i2c: gc02m2: update gc02m2 sensor driver
1. add hflip/vflip function.
2. modify set_gain_reg function.

Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I5178fee98bc06e445737a2c7f665921d501ec906
2021-03-12 17:30:02 +08:00
Cai YiWei
eb6b27104a media: rockchip: ispp: add cru reset
Change-Id: Ief13da5cb192777d9743954377005ef90796e8c7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-03-12 17:26:19 +08:00
Zefa Chen
ddc6e37dc6 media: i2c: ov4689 fixed hdr2 exposure issue
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie9f7c0401d6b1b3ee30a159c1c2aac02e17a9e04
2021-03-12 15:51:33 +08:00
Yandong Lin
b3c39dfa96 video: rockchip: mpp: Fix wait all the time when hw hang issue
When the dec hw is stuck, the software timeout is triggered.
the waiting thread should be awakened and return timeout at this time.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifc1a6fbac4b4b328c7a2f5c8d8a6322fff222088
2021-03-12 15:50:19 +08:00
Steven Liu
95c92f0df0 arm64: dts: rockchip: rk3568: add pwm interrupt
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ie330a1cc111d1f9f9cbedc7f123e06b31518fa5a
2021-03-12 15:49:42 +08:00
Lin Jinhan
4c59d5d2ae crypto: rockchip: fix dead lock when FDE enable
Full disk encryption can result in a deadlock by nested
 calls to the crypto driver.To fix this bug, it should
decrease the granularity of mutex, lock in rk_load_data
 and unlock in rk_unload_data.

Change-Id: Ic61aadfe3e6f548e1c2e27be9862941af2b53fd9
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-03-12 15:49:26 +08:00
Lin Jinhan
c3b8c753c6 crypto: rockchip: fix bugs on rk_iv_copyback
rk_iv_copyback is referring NULL point in ECB mode calculation
which will cause kernel crashed.

Change-Id: I98edd3529811b08b3de4fc46437a7d0d32e36f6f
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2021-03-12 15:49:26 +08:00
Cai YiWei
ad10b5dd9b media: rockchip: ispp: fix input video config
Change-Id: I818e546aabc63fa717354cdcdf2eaadb146bb0f4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-03-12 15:08:00 +08:00
Cai YiWei
44b1a2e820 media: rockchip: isp: fix err of mp dump raw for isp20
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Change-Id: If36d8f233db6318b51a65ed80fa4343f6f5e3aaf
2021-03-12 15:07:36 +08:00
Allon Huang
20118d8c09 phy: rockchip: csi2-dphy: optimize config operation code
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I210e8de9b437d5117649609c53591dedf42fae00
2021-03-12 14:54:32 +08:00
Jianqun Xu
6a40ead69f staging: android: ion: set dma ops for platform device
Set dma ops for platform device.

Change-Id: I09c43104774f8b5b95f816293a44d280d8d0f23a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-03-12 14:36:19 +08:00
Tao Huang
319e24e84a Revert "staging: android: ion: use dma_sync_sg_for_device to do flush"
This reverts commit d37c482e0e.

Change-Id: I320b78412a9a89fea7f24c3c8405176d750d0415
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-12 14:35:13 +08:00
Jon Lin
5e9451196b drivers: rkflash: Support more slc nand
Change-Id: I243b6dec7a23a11514d2b623b3aef19bca4cfd83
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-03-12 14:31:42 +08:00
Andy Yan
7a827bc658 drm: Fix typo in drm_debugfs
Change-Id: Iafbab1e642b95acbbc64c04e9ad3e39d720c0a4e
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-12 14:27:11 +08:00
Sandy Huang
e1370ed7ec drm/rockchip: vop2: set vop min size to 4x4
Change-Id: I6e11917386400cec306520b52feecf4f78a971f7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-03-12 11:49:29 +08:00
Sandy Huang
6749d4644b drm/rockchip: vop: set vop min size to 4x4
Change-Id: Ib00c223b4df34cf0821e19fb23b54c1496bc2b3a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-03-12 11:49:22 +08:00
Allon Huang
89d6545bd1 media: rockchip: cif: update frm0 buf when frm0/frm1 appear simultaneously to avoid panic
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I9062f45c9fc2ac6799c768182fbb2214906117df
2021-03-12 09:13:46 +08:00
Allon Huang
7415111556 arm64: dts: rockchip: rk3568: mipi_csi2 remove power domain
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Idee694f39fc7607aa244854e189abdab7e0b0e5b
2021-03-12 09:00:22 +08:00
Sugar Zhang
91fb91fc6c arm64: dts: rockchip: rk3568: Set i2s3 as sync mode default
Change-Id: Iaea752e404c739d3dd2672383435d5bf95614211
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-03-11 12:08:29 +08:00
Sugar Zhang
4a81700996 Revert "ASoC: rockchip: i2s-tdm: Add mclk oe for rk3568"
This reverts commit 01a9a1b00a.

Instead, clk framework will handle this with the patchs:

[1] 27e692bdf18a (clk: rockchip: rk3568: Allow config i2s mclk as out/in)
[2] 5505f2112d69 (arm64: dts: rockchip: rk356x: Change to use I2Sx_MCLKOUT)

Change-Id: I0278a633bc3806c93d9ad2e6361ac9129798ec8d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-03-11 12:08:29 +08:00
Sugar Zhang
d32dcf7014 arm64: dts: rockchip: rk356x: Change to use I2Sx_MCLKOUT
This patch changes to use I2Sx_MCLKOUT, and Fix its parent
assignment.

Change-Id: I584da197cebdb3846eefc463e336cd6998db2325
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-03-11 12:08:29 +08:00
Sugar Zhang
7ddb8b2d97 clk: rockchip: rk3568: Allow config i2s mclk as out/in
This patch exports I2Sx_IOE to allow user to config mclk
direction from DT.

e.g.

i2s2 mclk as output:

&ext_codec {
	clocks = <&cru I2S2_MCLKOUT>;
	clock-names = "mclk";
	assigned-clocks = <&cru I2S2_MCLK_IOE>, <&cru I2S2_MCLKOUT>;
	assigned-clock-rates = <0>, <12288000>;
	assigned-clock-parents = <&cru I2S2_MCLKOUT>;
};

clk summary:

gpll                           6        9        0  1188000000
  clk_i2s2_2ch_src             0        0        0   594000000
    clk_i2s2_2ch_frac          0        0        0    12288000
      clk_i2s2_2ch             0        0        0    12288000
        mclk_i2s2_2ch          0        0        0    12288000
          i2s2_mclkout         0        0        0    12288000
            i2s2_mclk_ioe      0        0        0    12288000

i2s2 mclk as input:

&ext_codec {
	clocks = <&i2s2_mclkin>;
	clock-names = "mclk";
	assigned-clocks = <&cru I2S2_MCLK_IOE>, <&cru CLK_I2S2_2CH>;
	assigned-clock-parents = <&i2s2_mclkin>, <&i2s2_mclkin>;
};

clk summary:

i2s2_mclkin                    0        0        0    12288000
  clk_i2s2_2ch                 0        0        0    12288000
    mclk_i2s2_2ch              0        0        0    12288000
  i2s2_mclk_ioe                0        0        0    12288000

Change-Id: I57d10ea02b65bf14d2c2f9ff403f06ec4c33c610
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-03-11 12:08:29 +08:00
Sugar Zhang
100efc8547 arm64: dts: rockchip: rk3568: Add fixed-clock for i2sx mclkin
Change-Id: I0bf0d013897462243eec6df3209cbcfeddc6ee52
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-03-11 12:08:29 +08:00
Jason Zhu
e596cd7c88 init: panic the kernel when compare the ramdisk hash failed
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I362eda9782f661d5faef85a773c358ad26fd4dcd
2021-03-11 12:06:13 +08:00
Jason Zhu
048b3bf402 soc: rockchip: thunderboot_sfc: calculate the ramdisk hash
Open CONFIG_ROCKCHIP_THUNDER_BOOT_CRYPTO to enable it.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: If87598ae61c4490bd2dd23cf33ab30827bdc2d27
2021-03-11 12:06:13 +08:00
Jason Zhu
1c9b72894e soc: rockchip: thunderboot_mmc: calculate the ramdisk hash
Open CONFIG_ROCKCHIP_THUNDER_BOOT_CRYPTO to enable it.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I0ff9889417377b9e4f72c12356bf3e86e927f137
2021-03-11 12:06:13 +08:00
Zorro Liu
fd361aa5d3 drm/rockchip: ebc_dev: release version v1.05
speed up the handwriting speed.

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I4dafb9252067900e6a976d0aed2d5c9a791c1fbe
2021-03-11 12:04:52 +08:00
Liang Chen
cb488e870a arm64: dts: rockchip: delete combphy0 for rk3566
combphy0 is not available on rk3566 SoCs.

Change-Id: Ia68ec8441c2f3d9ac3cd13d55cb784a79f1eeb37
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-03-11 10:41:06 +08:00
Zhenke Fan
e3a7770782 media: i2c: sc430cs: update gain logic
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I93db6c3acb4f5c664f40b04c4a03afe6e81e4178
2021-03-11 10:21:12 +08:00
Andy Yan
ea7d06c680 drm/rockchip: Add a virtual vop driver
Some times we only want use some of the module
of rockchip vop driver(et: rkmpp some times only
wat to use rockchip drm gem),
the real vop drivers is not needed to load.

Add a virtual vop driver let the rockchip drm launch.

Change-Id: Id6cd14a735eabaf8b4949330d56f77354e50c51c
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-10 20:29:05 +08:00
Jason Zhu
a2a7deede1 ARM: dts: rv1126-thunder-boot: enable the crypto
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I375b8beab2ba6054ba13a311ce724e03034ea5d0
2021-03-10 20:16:57 +08:00
Jason Zhu
30192f8985 soc: rockchip: thunderboot_crypto: init version
Add rk_tb_sha256 for thunderboot.

Change-Id: Iff9aba9c1d4c8188e618914bc16a3faefa1b3abd
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
2021-03-10 20:13:58 +08:00
Bin Yang
00f6c0f23c arm64: dts: rockchip: add scr node for rk3568
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Change-Id: If1815a521d7db16867e47de5270b26978bb56e42
2021-03-10 19:48:01 +08:00
Yandong Lin
cb121d3d47 video: rockchip: mpp: fix offset be added repeatedly issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I30db16b843f29c9d07ec3aec0eb99406eca147ed
2021-03-10 19:43:07 +08:00
Huang zhibao
8f61ddb10f input: rc: add support parser power key by rk pwm controller
some chips like 1126,356x support this feature

Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: Ia182204a4b3783b63b3cefbd70da8bd7089a9e82
2021-03-10 19:34:04 +08:00
Xu Hongfei
ca19cf66a1 media: platform: isp: don't start ldch asynchronously in multi-isp mode
fix the bug that ldch map error in multi-ISP mode

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: I95d88b8db312bdce079974d3a54a3b6b79b0daab
2021-03-10 19:20:23 +08:00
William Wu
a846281fee usb: dwc3: gadget: print device events
This patch prints the reset/disconnect/suspend/wakeup event
for USB developer to check if the USB is reset/disconnted/
suspended/waked from USB PHY.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I889867edc6fd4b4d2fb2927c80d55a850556a8ad
2021-03-10 19:02:23 +08:00
William Wu
69e3769569 usb: gadget: f_uvc: trace uvc control request
This patch add new uvc trace for setup request processing.

1. enable trace
   echo 4 > /sys/module/usb_f_uvc/parameters/trace

2. dump trace
   dmesg

Test on RV1109 EVB with UVC function when streaming on:

[  426.441316] uvcvideo: setup request a1 81 value 0100 index 0003 001a
[  426.450280] uvcvideo: uvc_send_response: req len 26
[  426.450444] uvcvideo: event_setup_out 0, data len 26
[  426.451545] uvcvideo: setup request 21 01 value 0100 index 0003 001a
[  426.460862] uvcvideo: uvc_send_response: req len 26
[  426.461014] uvcvideo: event_setup_out 1, data len 26
[  426.461173] uvcvideo: setup request a1 81 value 0100 index 0003 001a
[  426.485791] uvcvideo: uvc_send_response: req len 26
[  426.486672] uvcvideo: event_setup_out 0, data len 26
[  426.487145] uvcvideo: setup request a1 83 value 0100 index 0003 001a
[  426.496529] uvcvideo: uvc_send_response: req len 26
[  426.496655] uvcvideo: event_setup_out 0, data len 26
[  426.497485] uvcvideo: setup request a1 82 value 0100 index 0003 001a
[  426.506737] uvcvideo: uvc_send_response: req len 26
[  426.507195] uvcvideo: event_setup_out 0, data len 26

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: If882728e891d033c249e6c466b40d3e2a28bccb6
2021-03-10 19:02:13 +08:00
Zou Dengming
4024ff990d arm64: configs: rockchip_defconfig: Enable CONFIG_VIDEO_GC4C33
Add camera gc4c33 for rk3566 box demo.

Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
Change-Id: I561c89ecb385283882f0f3da12ae9c59ce9aeef1
2021-03-09 20:56:53 +08:00
Bin Yang
9773cc5d87 misc: add rockchip SOC smart card reader controller driver
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Change-Id: I8d3ab66bc6fa7cbb4e8d9b2f2c5c2feee94a045b
2021-03-09 20:51:02 +08:00
Zou Dengming
bf77a65fee arm64: dts: rockchip: rk3566-box-demo-v10: enable mipi camera gc4c33 or gc8034
Change-Id: Id3b8a317f0018d6a044bf95f3e58967ee5113741
Signed-off-by: Zou Dengming <marsow.zou@rock-chips.com>
2021-03-09 20:41:06 +08:00
Rafael J. Wysocki
34da25dd21 UPSTAREM: PM: runtime: Update device status before letting suppliers suspend
Because the PM-runtime status of the device is not updated in
__rpm_callback(), attempts to suspend the suppliers of the given
device triggered by rpm_put_suppliers() called by it may fail.

Fix this by making __rpm_callback() update the device's status to
RPM_SUSPENDED before calling rpm_put_suppliers() if the current
status of the device is RPM_SUSPENDING and the callback just invoked
by it has returned 0 (success).

While at it, modify the code in __rpm_callback() to always check
the device's PM-runtime status under its PM lock.

Change-Id: I801d91afcace8fb70fa92b447d8641cd0cd2b0cc
Link: https://lore.kernel.org/linux-pm/CAPDyKFqm06KDw_p8WXsM4dijDbho4bb6T4k50UqqvR1_COsp8g@mail.gmail.com/
Fixes: 21d5c57b37 ("PM / runtime: Use device links")
Reported-by: Elaine Zhang <zhangqing@rock-chips.com>
Diagnosed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Elaine Zhang <zhangiqng@rock-chips.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 4.10+ <stable@vger.kernel.org> # 4.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 44cc89f764)
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-03-09 20:35:02 +08:00
Jianqun Xu
a594a2bb95 staging: android: ion: add support for ion_protected_heap
Add a new heap named "ion_protected_heap" with heap index as
(ION_HEAP_TYPE_CUSTOM + 1).

The protected heap could be used for secure memory, or memory limit.

Change-Id: I080f7d1c8e0516c1e967c3ec6d1c123d5df1867c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-03-09 20:19:43 +08:00
Wu Liangqing
471ad265e4 arm64: dts: rockchip: add rk3566-evb-mipitest-v10 board
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: Ic46f1db90f10c3f78858ff83875c18dc6eb78822
2021-03-09 19:55:18 +08:00
Liang Chen
a85e12dc3f arm64: dts: rockchip: retrieve sata2 for rk3566
sata0 is not available for rk3566 and sata2 is available.

Change-Id: I901a509d98826dd63788cde49c4a9caae7d0f6f0
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-03-09 19:49:48 +08:00
Weiwen Chen
1ff461225d ARM: dts: rv1126-evb-v10: fix sdmmc vmmc-supply
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: I197f02279d283d3f788e9e90b9a0e7f27d797093
2021-03-09 19:48:15 +08:00
Elaine Zhang
8bedd31fee clk: rockchip: rk3568: mark hclk_usb as critical clk
gmac1 access to the NIU bus depends on this clock.

Change-Id: I883e39678693f71acdc655004b59c5abc760ad86
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-03-09 19:44:42 +08:00