Commit Graph

863036 Commits

Author SHA1 Message Date
Zhen Chen
55cfc8ea78 MALI: midgard: rk: do not use deferrable work for poweroff
In the same way of
commit 697aafe93f ("MALI: bifrost: rk: do not use deferrable work for poweroff")

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I061ca478f4e8f8a836ce3996a138b1d0382cfd2b
2021-04-08 14:07:29 +08:00
Allon Huang
0d41682dc8 media: platform: rockchip: cif: fix panic when frm0/frm1 end occurr at the same time
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I0f77fbd0c8e847f88df921fa70f817fa79672634
2021-04-08 11:18:04 +08:00
Yifeng Zhao
1ce0110473 drivers: rk_nand: fix the problem of clang compilate error
compilate error info:
drivers/rk_nand/rk_zftl_arm64.S:29609:19: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
 add x0, x5, x21, uxth
                  ^
drivers/rk_nand/rk_zftl_arm64.S:29635:19: error: expected 'sxtx' 'uxtx' or 'lsl' with optional integer in range [0, 4]
 add x3, x19, x3, uxth 3
                  ^
make[1]: *** [scripts/Makefile.build:433:drivers/rk_nand/rk_zftl_arm64.o] error 1

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I59578a4ff3434911c135778f83afc6ec0af5bffc
2021-04-08 09:27:02 +08:00
Sandy Huang
d2439e1a53 drm/rockchip: vop2: disable layer mix when it's unused
If the layer pass through layer mix is unused, we need to disable alpha,
at this time, the layer mix only used to transfer alpha to next mix.

Change-Id: Ibd469b4fb61b41480297bc20c346e9ceefa61fc7
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-04-08 09:25:12 +08:00
Tao Huang
c871641576 arm64: rockchip_defconfig: Disable CONFIG_HW_RANDOM_CAVIUM
Which is default y.

Change-Id: Ia8c443016bc42394d98c1561ff4efdddf7161124
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-04-07 20:09:50 +08:00
Shunqing Chen
94a40e549f drm: rockchip: rk628: post_process: recalculate dst clock
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I93388ba499f0d74c5f5c549decc83f3225ae1b82
2021-04-07 15:28:46 +08:00
Zefa Chen
8050c27003 media: i2c: add camera driver sc401ai
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ic8cdd26d811af32eb0ada5ac88630a6a03720bd2
2021-04-07 15:00:46 +08:00
Wang Panzhenzhuan
0770f9faee media: i2c: nvp6324: update driver to match newest rkcif code
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ieed09f47bddcbd55b8d6bab98a002a1997bf6353
2021-04-07 14:40:10 +08:00
Fenrir Lin
2839a6df71 ARM: configs: rv1126-battery.config: enable MPP_VEPU2
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I7d8d1889d2c55c79fe474e4137b657bfc286625e
2021-04-07 10:52:47 +08:00
Fenrir Lin
1ebf485017 ARM: dts: rockchip: rv1126 battery-ipc add rkisp vir1 and vepu
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Ie0cf09917059bd523350f1e2362f5f37c3c78738
2021-04-07 10:52:21 +08:00
XiaoDong Huang
018db46d70 arm64: dts: rockchip: rk3568: tsadc: config "rockchip,hw-tshut-mode = <0>"
To use tsadc_shut_m0 function, tsadc must switch to cru_shut_mode,
because tsadc_shut signal have to go through the cru to get to tsadc_shut_m0 signal.
Refer to "10.10.10.81\技术文档\thermal\rk3568_tsadc_shut.png" for details.

Change-Id: I0528917efe2f5ea6f002ebf1608815eb01f552c0
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-04-07 09:24:01 +08:00
XiaoDong Huang
6e1c5a1b8e Revert "arm64: dts: rockchip: rk3568: tsadc: use tsadcm0_shut function"
This reverts commit 0a01772bd5.

Change-Id: I12c9b8e28a54c2087929680c84a65d8c5b95bcae
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-04-07 09:24:01 +08:00
Bian Jin chen
2a9bdbbdd7 ARM: rockchip_defconfig: Enable metadata FBE.
Android 11 requires metadata File Base Encryption to protect userdata.

+CONFIG_BLK_INLINE_ENCRYPTION=y
+CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
+CONFIG_DM_DEFAULT_KEY=y
+CONFIG_MMC_CRYPTO=y
+CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I479f43d9188f2619e0ac03e2e10006015a50599c
2021-04-07 09:19:39 +08:00
Bian Jin chen
ee70434a0e arm64: rockchip_defconfig: Enable metadata FBE.
Android 11 requires metadata File Base Encryption to protect userdata.

+CONFIG_BLK_INLINE_ENCRYPTION=y
+CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
+CONFIG_DM_DEFAULT_KEY=y
+CONFIG_MMC_CRYPTO=y
+CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y

Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Change-Id: I2a741aa3d46f64375400c6fe8d7fac66b48eecad
2021-04-07 09:17:50 +08:00
Wang Panzhenzhuan
9b4e23e511 dt-bindings: media: i2c: Document add nvp6324
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I1a1e69b82e9ecd864d543eff96ca959ce75ab185
2021-04-06 15:40:31 +08:00
Wang Panzhenzhuan
bf7588322c dt-bindings: media: i2c: Document add nvp6158
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: If23bc9bf8610b1c726eb24aa2dd856b2d1449c66
2021-04-06 15:40:31 +08:00
Wang Panzhenzhuan
dbac31a536 media: i2c: nvp6158: add v4l2 interface
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I7932353657f5a75f2787647c7b4f31c6c9dbde44
2021-04-06 14:16:31 +08:00
Wang Panzhenzhuan
5aff91f510 media: i2c: add nvp6158 sensor driver from NEXTCHIP Inc
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I9f58e128889db55333e90e75144687ce9cc6d40f
2021-04-06 14:16:31 +08:00
Cai YiWei
e1756b078d media: rockchip: isp/ispp to version v1.6.0
Change-Id: I21b36b5f4738e912ee6409b045c00198ef016c42
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-04-06 12:11:24 +08:00
Cai YiWei
ac4efe6eb1 media: rockchip: isp: capture buf queue add to list tail
Change-Id: I21e030408ca936bd6f567536a6c12c9be3caebf5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-04-06 12:11:24 +08:00
Guochun Huang
701d4bb8ff drm/rockchip: dsi: set vop2 standby before command mode in rk356x
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I59c84b3eaeb5eb7be30878bbca196e3774f1e54b
2021-04-02 19:22:44 +08:00
Andy Yan
319ce39de8 drm/rockchip: vop2: Add vop2_standby
This is for mipi dsi on rk356x: there
is a hold signal from mipi dsi to
vop.

Mipi dsi may trigger the hold signal
when send dsi command or switch between
video mode and command mode.

vop may run into an unexpected situation if this hold
signal is rise when vop is running.

So when mipi dsi switch between video mode
or command mode, or send a dsi command, it
should set vop in stanby state.

Change-Id: I80e456d3416518436045ae8e0eec215c22b111a3
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-04-02 19:21:16 +08:00
William Wu
622a886296 usb: gadget: f_uac1: fix ep address for set sample rate
The f_uac1 use ep address 0x81 and 0x01 for set sample rate,
so it can only support uac1 ep1-in and ep1-out to set playback
and capture sample rate, it has limitation for USB composite
device (e.g. RNDIS & UAC1). This patch use in_ep->address and
out_ep->address instead of the fixed addresses.

Change-Id: Ie2c70e2c2ec89fb66b00cd2a64928b50ee0541cc
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-04-02 19:20:43 +08:00
Sandy Huang
87093d4d48 drm/rockchip: vop2: alpha value need transfer to next mix
Change-Id: I2f00b8f834cd93a206643c0faaf557d38c238a13
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-04-02 18:34:45 +08:00
Sandy Huang
c55b62f477 drm/rockchip: vop2: fix start mixer id error
Change-Id: I6e6287d43d375f8a8be47fe00cbe39764ffe6ee3
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-04-02 18:34:45 +08:00
Wenping Zhang
4325c08d06 arm64: dts: rockchip: change mmc aliases for rk356x in android platform.
Rechange the emmc aliase to mmc2 to be same as other rockchip's chips,
so the android application can process the emmc property of all chips
in a uniform manner.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Ia092ec08552e360e7fc5dc271dbb69edc08bd486
2021-04-02 14:08:25 +08:00
Wenping Zhang
002dfbe8bb ARM: dts: rockchip: change mmc aliases for rk3288 in android platform.
Rechange the emmc aliases to mmc2 to be same as other rockchip's chips,
so the android application can process the emmc property of all chips
in a uniform manner.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Id1bbd8c63f919eb13cd7b511e9afe885753d99f5
2021-04-02 11:07:43 +08:00
Zorro Liu
68e27c3ec3 arm64: dts: rockchip: rk3566-rk817-eink-w103.dts: remove npu
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I23495b013e6687d5a64f77d95433e6152cd98be7
2021-04-02 11:05:27 +08:00
Wu Liangqing
a8acb53e60 arm64: dts: rockhip: rk3566-tablet: set dcdc_boost min 5v
Solve the problem of insufficient power supply voltage of
USB peripheral

Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Change-Id: I7e06b463a2da567fcf8fa2fc641379d9274ed549
2021-04-02 09:18:56 +08:00
Ziyuan Xu
93d0ff21b4 clk: rockchip: rv1126: ungate pdvdec/pdjpeg's for VEPU2
Fixes: 5522e03af8 ("clk: rockchip: rv1126: mux clocks to none-cpll/hpll")
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I8a361a11dea9d3546efd883e7c1394e9d2834223
2021-04-01 20:51:44 +08:00
Ren Jianing
1c86926435 usb: gadget: uvc: support h265 format
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ifbe15ef632a5b58e45a04228537e7f653761e233
2021-04-01 20:51:01 +08:00
Johan Jonker
fd37ea326e UPSTREAM: arm64: dts: rockchip: assign a fixed index to mmc devices on rk3368 boards
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs are
not practical. Use newly introduced aliases for mmcblk devices from [1].
The sort order is based on reg address.

[1] https://patchwork.kernel.org/patch/11747669/

Change-Id: I9ae6f07f295553990118596f379275876d852497
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210118155242.7172-5-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
(cherry picked from commit 0523b124aa)
2021-04-01 20:27:42 +08:00
Andy Yan
a7ffaf261c drm: Not mark crtc state as connectors_changed when a writeback connector attatch to a crtc
The drm core will disable than enable a crtc when is marked as
connectors_changed.

But when we attach a writeback connector to a running
crtc, we really don't need this disable/enable, which
will black a running screen.

Change-Id: I636615f27424bc60496ffc487c218f60fb95d719
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-04-01 14:56:41 +08:00
Wang Panzhenzhuan
d30fa0e575 media: platform: rockchip: cif: distinguish multi id mode 2 & 4
According test, if sensor output 2mux mode, cif needs to be
configured BT656_1120_MULTI_ID_MODE_2, nor no interrupts will be
triggered. So BT656_1120_MULTI_ID_MODE_2 & BT656_1120_MULTI_ID_MODE_4
is different, distinguish it.

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I8e1959131708d2cab87ab086e03023a718f5b807
2021-04-01 14:50:35 +08:00
Huang zhibao
cf63f776c9 arm64: dts: rockchip: rk3566-box: update usb host0/1 config
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: If948a5f33020ab62261aba7d63acdb10201768fe
2021-04-01 09:10:26 +08:00
Caesar Wang
f4d5f23503 arm64: configs: update rockchip_linux_defconfig
1) enable CONFIG_VIDEO_RK628_CSI

2) enable configs for docker or k8s

CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I12c7bb599c4f8b553b17768453e9bcf5c69e39a1
2021-03-31 18:32:21 +08:00
Weixin Zhou
697aafe93f MALI: bifrost: rk: do not use deferrable work for poweroff
the poweroff work contains an operation to release the gpu
wake_lock, sometimes, the deferrable work can cause the gpu
wake_lock to be delayed for tens of seconds before release,
the device can not into deepsleep, resulting in increased
power consumption.

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I49aba25cfc000739f344420f818c91b382926e6e
2021-03-31 18:02:57 +08:00
Longjian Lin
83b8211135 ARM: dts: rockchip: rk3126-bnd-d708: fix rtk bt uart issue
Donot pull up BT uart pin before rtl87xx power on.

Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: I562e4c403f2a56f9253ff677d78d9056cd98a54d
2021-03-31 16:44:44 +08:00
William Wu
3fb1f42ff0 usb: gadget: f_uac1: set baInterfaceNr of ac_header_desc dynamically
As per UAC1.0 spec Table 4-2: Class-Specific AC Interface
Header Descriptor, the baInterfaceNr(n) are indicated the
interface number of each AudioStreaming. So it needs to
set the baInterfaceNr dynamically according to the interface
IDs allocated by the usb gadget core.

Change-Id: I57cc7b0070fb166aac4360262b2a7e6f2f5df6e1
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-03-31 15:18:26 +08:00
Algea Cao
45bfb674cd drm: rockchip: dw-hdmi: Fix reboot display err
When system reboot, drm framework will set mode to
prefer mode first then set mode to 0. Clearing flag
in encoder enable will causes the VOP to not set
the sync polarity.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I20dfcc7b6dc76faf903b42620454a7f5071bd3e3
2021-03-31 14:18:46 +08:00
Algea Cao
9ab9fd2458 drm/rockchp: drv: Add comparison to mode clock
For resolution floating refresh rate such as 59.94 Hz,
the only difference between the resolution and its
corresponding integer refresh rate resolution is the clock.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I149471f58c9eb65f972139b23a45339ea8807e54
2021-03-31 14:18:46 +08:00
Cai YiWei
fc439e4702 media: rockchip: ispp: change fec data state if params buf no use
Change-Id: I278d7ec35a39b2ce18af6553cdca33892ec1382b
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-03-31 11:42:05 +08:00
Wenping Zhang
be0d5270c6 ARM: dts: rockchip: add mmc aliases for rk312x.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Ide6179393b7dae5752ab4b9105d344cd371d6ad9
2021-03-31 09:05:34 +08:00
Johan Jonker
5bfc198162 UPSTREAM: arm64: dts: rockchip: assign a fixed index to mmc devices on px30 boards
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs are
not practical. Use newly introduced aliases for mmcblk devices from [1].
The sort order is based on reg address.

[1] https://patchwork.kernel.org/patch/11747669/

Change-Id: I3a61c02162e975b1ba4f8635b36965f99f0b60d7
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210118155242.7172-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 84b2c2c872)
2021-03-30 20:33:39 +08:00
Tao Huang
ba3f217445 arm64: rockchip_defconfig: Enable CONFIG_LEDS_TRIGGER_HEARTBEAT
RK3566 EVB use this feature.

Change-Id: I04796360365cf5e06952df5f00e4c7eb8493ea91
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-30 20:32:57 +08:00
Wu Liangqing
00e587302d arm64: dts: rockchip: rk356x-evb enabled work led
Change-Id: Id5ab430ae0b417646e416ee894929ee4e45f05f5
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-03-30 20:32:40 +08:00
Herman Chen
9aa7f0beff video: rockchip: mpp: Add device task capacity
1. Add mpp_dev task capacity and default is 1.
   The task capacity is the task queue length that hardware can accept.
   Default 1 means normal hardware can only accept one task at once.

2. Attach mpp_dev to mpp_taskqueue for status probe. The task queue
   capacity is the minimum task capacity of all the attached mpp_dev.

Change-Id: I8cafe806ec9399902237418d2bbcb088240ed415
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-30 18:00:49 +08:00
Elaine Zhang
e76369cf03 clk: rockchip: rk3568: use CLK_FRAC_DIVIDER_NO_LIMIT flag for uart clk
Change-Id: I7aa00abf3623f1b96571f327824161428a367892
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-03-30 15:52:13 +08:00
Elaine Zhang
e5cbf33404 clk: rockchip: add flag CLK_FRAC_DIVIDER_NO_LIMIT for fractional divider
There are some clks(uart) that do not have to comply with the 20 times
fractional divider limit.

Change-Id: I420d8ba3b5de65d9e0ea74920d5ea8450ae94465
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-03-30 15:52:13 +08:00
William Wu
a5bc56f4b7 usb: dwc3: host: workaround xhci u2 broken suspend for RK356X
The RK356X DWC3 supports to set the USB 2.0 PHY enter
suspend mode if the DWC3 core suspend conditions are
valid (as per DWC3 controller databook 6.3.46 GUSB2PHYCFG
register bit6). This cause xHC driver failed to send
USB resume signal to USB 2.0 device in xhci_bus_resume().
This patch adds a quirk "xhci-u2-broken-suspend" to force
the xHC to set the link state to XDEV_RESUME and send USB
resume signal to USB 2.0 device.

Change-Id: I24c017867f80728890c0562a12e4554625913e67
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-03-30 15:23:35 +08:00