Commit Graph

863241 Commits

Author SHA1 Message Date
Xing Zheng
4ecdbad17d ASoC: es8311: add support 'delay-pa-drv-ms' property
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I3a7827fec9815ee407106d43d364e9c33975cb97
2021-05-18 09:30:06 +08:00
Zorro Liu
10d832d91c drm/rockchip: ebc_dev: release version v1.12
1.add debug ioctl
2.EPD_A2 mode no need to do part count

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I6ddfbc5683743759cb2f7be96265df06d3db7de9
2021-05-18 09:14:09 +08:00
Ding Wei
ff19001f1b video: rockchip: mpp: rkvdec2: rcb_info move to session->priv
if rcb_info not change, then the infos will not ioctl from userspace.
thus, it needs to restore infos in session.

Change-Id: I4ff3b5bcc22b033b1d7549866af7c253bf46945c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-17 16:40:08 +08:00
Jianqun Xu
25e9738a2b staging: android: ion: support force sync for partial sync
Change-Id: Icfe94628e524d99a36ffc49894266a9fc237e986
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-05-17 16:24:28 +08:00
Yu Qiaowei
0804113fa3 video/rockchip: rga2: support Y400 input.
By making the Y channel and the UV channel's access address equal,
the function of RGA input grayscale image is realized, without
need to allocate extra UV channel memory.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I0110ec6935c7233905e724be3df9f4fba9ef8cf0
2021-05-17 16:21:39 +08:00
Alex Zhao
dccc696cc9 net: rockchip_wlan: rtl8821cs: disable CONFIG_ERROR_STATE_MONITOR
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Id9afa007304fe9a6be379e6393da66fdeda48fd0
2021-05-17 16:13:21 +08:00
Andy Yan
495049b0b7 drm/rockchip: vop2: check win_mask for each plane on crtc
win_mask is more safe than plane_mask on crtc_state,
because crtc_state may changed by many interface.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I886c8e1e1c0505e46292721de05d9be7c167d956
2021-05-17 16:05:51 +08:00
William Wu
3b9546b824 usb: gadget: f_uac1: fix ep address for get sample rate
The f_uac1 use ep address 0x81 and 0x01 to get sample rate,
so it can only support uac1 ep1-in and ep1-out to get 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.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ia1a454d9738324605c00c4889b3fe187fdfcdb7d
2021-05-14 14:43:43 +08:00
William Wu
adc4b01322 usb: gadget: f_uvc: not handle alt 0 for bulk streaming intf
Because alt settings in an interface are supported only
for ISOC endpoints, so do not handle alt 0 for bulk
streaming interface.

Change-Id: Iadcf6c058023d5a3d6caa353cd783752f84a77a9
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-14 14:36:55 +08:00
Caesar Wang
96764dff33 arm64: dts: rockchip: remove the duplicate pmu_io_domains on rk3399-evb-ind.dtsi
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Id42f1e425a6015ac11851decd3a36d80b23b30e5
2021-05-14 14:27:25 +08:00
Ding Wei
b39c718938 arm64: dts: rockchip: rk3328: add normal and advanced rates for rkvdec
when pixels less then default-max-load, use normal-rates,
otherwise, use advanced-rates instead.

Change-Id: Ie2d58c05a2e8d2f5e5f9d932b3e51024b48b91d2
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-13 18:15:14 +08:00
William Wu
573d2e1e2e usb: gadget: f_uac1: finalize wMaxPacketSize according to bandwidth
According to USB Audio Device 1.0 Spec, Ch4.6.1.1:
The wMaxPacketSize of endpoint is defined as follows:
Maximum packet size of endpoint is capable of sending
or receiving when this configuration is selected. This
is determined by the audio bandwidth constraints of
the endpoint.

In current code, the wMaxPacketSize is limited to 200,
and the bInterval is set to 4 (1ms). That is, the maximum
bandwidth over USB bus is 200 * 1000 = 200000 bytes.

We find an issue about bandwidth limitation when we try to
support UAC1 with 8ch * 16bit * 16KHz on RK3308 platform,
which needs more bandwidth than it can support.

This patch sets the wMaxPacketSize dynamically according
to the parameters of UAC1. It is similar to the same thing
done earlier for f_uac2.

Change-Id: I9af3fd7665a80b5eb0cfb5dc91ebe2c20df1dd46
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-13 18:12:51 +08:00
Cai YiWei
3a54d14600 media: rockchip: ispp: fix page fault due to config reg during working
Change-Id: Ie5e23fc0e79a946b692278fc28b4a7794fe1a5f4
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-05-13 18:12:37 +08:00
Sandy Huang
0071ffb064 drm/rockchip: vop2: fix calculation error
fix calculation error and add double check done bit

Change-Id: I23852ff0c6cca0efef2eb52257d499bb99dbe009
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-05-13 16:24:22 +08:00
Ruslan Bilovol
d0f1327e76 UPSTREAM: usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot
As per UAC2 Audio Data Formats spec (2.3.1.1 USB Packets),
if the sampling rate is a constant, the allowable variation
of number of audio slots per virtual frame is +/- 1 audio slot.

It means that endpoint should be able to accept/send +1 audio
slot.

Previous endpoint max_packet_size calculation code
was adding sometimes +1 audio slot due to DIV_ROUND_UP
behaviour which was rounding up to closest integer.
However this doesn't work if the numbers are divisible.

It had no any impact with Linux hosts which ignore
this issue, but in case of more strict Windows it
caused rejected enumeration

Thus always add +1 audio slot to endpoint's max packet size

Change-Id: I3bef24e77d5d9dfc11438da24664192753e2cac4
Fixes: 913e4a90b6 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth")
Cc: Peter Chen <peter.chen@freescale.com>
Cc: <stable@vger.kernel.org> #v4.3+
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Link: https://lore.kernel.org/r/1614599375-8803-2-git-send-email-ruslan.bilovol@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 789ea77310)
2021-05-12 17:00:14 +08:00
Sandy Huang
1a81ee3e2d drm/rockchip: gem: add flag ROCKCHIP_BO_ALLOC_KMAP to assign kmap
RGA need to access CMA buffer at kernel space, so add this flag to keep kernel
line mapping for RGA.

Change-Id: Ia59acee3c904a495792229a80c42f74ae34200e3
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-05-12 14:40:53 +08:00
Rikard Falkeborn
425876baa8 UPSTREAM: pinctrl: rk805: Constify rk805_gpio_cfgs
Mark pin_cfg as const, allowing the compiler to put the struct in
.rodata instead of .data.

Change-Id: Iffdf034cf756d73f3e4c050a1ac6a7a325299c29
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200425203813.6442-1-rikard.falkeborn@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 8068071c09)
2021-05-12 11:47:26 +08:00
Nishka Dasgupta
d20b7443fa UPSTREAM: pinctrl: rk805: Make structures constant
Static structures rk805_pinctrl_desc and rk805_gpio_chip, of types
gpio_chip and pinctrl_desc respectively, are not used except to be
copied into the fields of a different variable. Hence make
rk805_pinctrl_desc and rk805_gpio_chip both constant to protect them
from unintended modification.
Issue found with Coccinelle.

Change-Id: I63bf61b6aecaa095495157cd9eca6d8db5580fb8
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190819075757.1753-1-nishkadg.linux@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 6e28aaab07)
2021-05-12 11:47:12 +08:00
Andy Yan
596d1eb25c drm/rockchip: vop2: Fix color_key_en register definition
It's a copy and paste mistake.

Change-Id: Ica36201dc9b463f2ff7dd6adb8253d09be66bf37
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-05-12 10:06:47 +08:00
Alpha Lin
4e73c1a959 rockchip: video: iep: enable blending and intra interp
Enable blending and intra interpolation by default.

Change-Id: I3f304714d630b4aab677ab6d09cfea514b03d7b1
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2021-05-11 16:17:13 +08:00
Shawn Lin
9c21d0a139 mmc: dw_mmc: remove CMD23 support for sd cards
Some sd cards violate the spec. They claim to support CMD23
but actually not. We don't have a good method to work around
them except for adding MMC_QUIRK_BLK_NO_CMD23 one by one. But
it's not a acceptable way for our custmors. So removing CMD23
support for all sd cards to solve it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I006ee5d6c0035aed114cbdaac36cc854b9135f60
2021-05-11 16:16:26 +08:00
Zefa Chen
d4afea3931 media: i2c: imx317 fixed g_mbus_config error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I5e66d8f19740bb5c309b037fc6e706fc8b215b15
2021-05-11 14:11:19 +08:00
Dingxian Wen
879d0f3293 ARM: dts: rockchip: rk3288-evb-rk628-hdmi2csi-avb: enable isp_mmu
Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I50eabee85a9e751c64ce80c5f1e13ff360ca8651
2021-05-10 14:38:25 +08:00
Dingxian Wen
8d8cdba8b7 media: i2c: rk628csi: upgrade the driver version to v0.0.3
Modify RK628_CSI_PIXEL_RATE_LOW to 400M.

Signed-off-by: Dingxian Wen <shawn.wen@rock-chips.com>
Change-Id: I024a0c24f7e61e9314e9e6f24c78f24ec403e4e4
2021-05-10 14:37:45 +08:00
Jon Lin
e63a36dcb0 soc: rockchip: mtd_vendor_storage: Change vendor storage item size realloc strategy
Item size is calculated according to the actual space used

Change-Id: I7133368130689f792f05e82fea04ebf16a755a37
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-05-10 14:04:48 +08:00
Jon Lin
a7adc7ec80 soc: rockchip: flash_vendor_storage: Change vendor storage item size realloc strategy
Item size is calculated according to the actual space used

Change-Id: I7e4ce774a16d665a33e411991dc6dc767e1aba93
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-05-10 14:04:37 +08:00
Caesar Wang
d753ba89d8 arm64: dts: rockchip: update rk3399-evb-ind-lpddr4-linux.dts
1) Support the usb hub on evb ind v13 board
2) enable i2s1

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: If3f394da18f79a7d4800eeef97377893af31357b
2021-05-10 10:45:13 +08:00
William Wu
3dfc6a0180 usb: gadget: f_uvc: disallow the CPU to enter deeper sleep when streamon
I test on RK3399 IND EVB running Android R system, and
set the USB gadget as UVC function via configfs, both
the USB 2.0 and 3.0 UVC have preview abnormal problems.
If the CPU enter deeper sleep, the USB DMA transfer gets
corrupted, and the UVC ISOC transmission lost data.

This patch puts in a "pm_qos_latency" requirement which
will keep the CPU out of the deeper sleep states when
UVC stream on. And allow the CPU to enter deeper sleep
state after UVC stream off.

Change-Id: I808290f124c6a32da3888819348093a205bfad61
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-08 18:56:57 +08:00
William Wu
3b07017b96 usb: gadget: f_uvc: fix the superspeed ep companion descriptor
As per USB 3.1 spec "Table 9-26. SuperSpeed Endpoint Companion
Descriptor", the wBytesPerInterval must be set to zero for bulk
endpoints.

Change-Id: I2ec14ac0b0db1f4b5dc3bdbb61e3d2c02c63da23
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-08 18:56:57 +08:00
William Wu
3e41649e10 usb: gadget: get ep mult and maxburst for rockchip superspeed
For Rockchip platforms, they may need to get the mult and
maxburst of endpoints for USB superspeed gadget when bind
USB functions (e.g. uvc_function_bind), then the USB DWC3
controller can do Tx fifos resize properly for each endpoints.

Change-Id: I7baddbc0dc515c91d82ca4bc1960531919ed6008
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-08 18:56:57 +08:00
William Wu
23ce756d92 usb: dwc3: gadget: support tx fifos resize for superspeed
This patch supports tx fifos resize for superspeed, if needed.
And it limits the maximum fifo size to six times of the endpoint
maxpacket because of the limited dwc3 hardware fifos.

Change-Id: I69af3419ecdc7f5d0869ba5d2dce041e4d90fae7
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-08 18:56:57 +08:00
William Wu
f5a905b3ea phy: rockchip: naneng-combphy: adjust PLL parameters for USB
When do USB 3.0 Receiver Jitter Tolerance Test, it fails at
Sj Frequency 2.0/4.9/10.0 [MHz]. This patch adjusts the PLL
parameters for USB to pass the Receiver Jitter Tolerance Test,
and it's helpful to improve the USB 3.0 signal compatibility.

Change-Id: I58eb687a4677fe22cf5bc324578b033526310859
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-05-08 18:55:42 +08:00
Fenrir Lin
0676191edb media: rockchip: isp: fix the problem of no data when no reserved memory
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Ia94a8032fae6c741376924c98dae336e4a9329bd
2021-05-08 15:35:39 +08:00
Zorro Liu
f5460d6a7f drm/rockchip: ebc_dev: release version v1.11
1.ebc buffer support cache for userspace
2.fix rkf waveform file parse tempeleture error

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ib0b95e30a0ac1cc6cb9643b1c62ba506cbb92619
2021-05-08 14:58:47 +08:00
Elaine Zhang
c953ed2a09 UPSTREAM: clk: rockchip: support more core div setting
Use arrays to support more core independent div settings.
A55 supports each core to work at different frequencies, and each core
has an independent divider control.

Change-Id: I40dde15e25843090160bbc32d2de8e2cddffc96e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20210315085608.16010-4-zhangqing@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit a3561e77cf)
2021-05-08 14:15:15 +08:00
Ding Wei
c655ba882d arm64: dts: rockchip: rk3568-nvr: Set parameters for nvr
1. rockchip,disable-auto-freq, means when get/set/reduce freq,
   return directly.
2. set assigned-clock-rates at hardware running rates, then
   it not need to adjust before running.

Change-Id: I0d7864112bb5ade99e29bcce9824f84e9a58735e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-08 10:16:00 +08:00
Ding Wei
d8efa8439a video: rockchip: mpp: Add property for disable freq set
if property set, then it will skip get/set/reduce freq.

Change-Id: I56f641807327e9e63b8ebc0c91e79ffb19680b1c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-08 10:15:38 +08:00
Alex Zhao
7d5518f87b net: rockchip_wlan: cywdhd: update version to 1.363.125.19-20210427
1. Add to support Low Power Solution.
2. Fix that system can't suspend in Android.
3. Fix that the SSID list will be shown very slowly when disable/enable wifi in Android.

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Ib0f9387e670cb2cb4aca9e2279f76f24dec3aa99
2021-05-08 09:53:55 +08:00
Wyon Bi
c9825f398a pinctrl: rk628: Dynamic allocation of GPIOs
Change-Id: I7b6de3d5a1f0866fc18bd3355c44ecc0862ad800
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-05-08 08:51:16 +08:00
Wyon Bi
311506dc96 Revert "ARM: Kconfig: set default gpio number for rockchip SoCs"
This reverts commit 7b5da4c3b9.

After commit 7ca267faba ("gpio: Increase ARCH_NR_GPIOs to 512"),
default ARCH_NR_GPIOS=512.

Change-Id: I028967da6fe2279d62803fb35d9d8874af9dbd11
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-05-08 08:51:16 +08:00
Weixin Zhou
d12d3e8501 ARM: dts: rockchip: rk628: Avoid namespace conflicts for pinctrl
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: Ibc14654e8b321daebf5b15d51c0de26acb41df91
2021-05-08 08:51:15 +08:00
Wyon Bi
ed85b3c401 ARM: dts: rockchip: rk628: Avoid namespace conflicts
Add a prefix for all clocks to avoid namespace conflicts,
and no functional changes.

Change-Id: I1cf1c868f84b9bee4ba033bdd80c4995876b43f1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-05-08 08:51:15 +08:00
Wyon Bi
613d31105b clk/rockchip/regmap: rk628: Avoid namespace conflicts
Add a prefix for all clocks to avoid namespace conflicts,
and no functional changes.

Change-Id: I6b586ce859ecf084fe6037c10c775d6bcc78baa1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-05-08 08:51:15 +08:00
Caesar Wang
a2f7ea78f2 arm64/configs: update rockchip_linux_defconfig
1) enable rk628 configure
2) enable CONFIG_NTFS_FS
3) enable CONFIG_RK_HEADSET

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ie66c1ca860fc53342dc5b8fad012f3e996b61c33
2021-05-07 20:08:48 +08:00
Jianqun Xu
e68e6d1a35 drm/rockchip: add dmabuf sync partial to dma_buf_ops
Change-Id: I6ba192c11a0ff9eeafa4f4f0260addb1e56c4afc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-05-07 20:07:07 +08:00
Tao Huang
8d73d218b3 video: rockchip: mpp: rkvdec2: Fix compile warning on ARM
drivers/video/rockchip/mpp/mpp_rkvdec2.c:1029:16: warning:
format '%llx' expects argument of type 'long long unsigned int',
but argument 3 has type 'resource_size_t {aka unsigned int}' [-Wformat=]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5bb3ac3a2d5d2d41c802e42ed6a26efb5219d0aa
2021-05-07 18:22:57 +08:00
Ding Wei
98fdba74e1 video: rockchip: mpp: when meet unknown cmd, not return error.
reason: when kernel version later than mpp which user space, then
it will meet unknow cmd. however, it should not return error, and
let it continue instead.

Change-Id: I1209c27ef8de98f25b47700bc48dfcff305e0c0e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-05-07 17:25:45 +08:00
Fenrir Lin
d6db4040f4 media: platform: rockchip: cif: avoid initcall later than isp
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: Ic69f50d9d2c9b87d1e701badab6d2538f5c191ed
2021-05-07 17:19:57 +08:00
Sandy Huang
6cbc8aefdc drm/rockchip: drv: add support bcsh read from loader
Change-Id: I181f0d9066b4a1dbfdfe076a5b18a8d4cd639230
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-05-06 20:48:55 +08:00
Sandy Huang
fb57e7e357 drm/rockchip: vop2: add support cubic lut from loader
Change-Id: I11d65477364dc9ff4fb34d038179d5702faeb484
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-05-06 20:48:55 +08:00