Commit Graph

865501 Commits

Author SHA1 Message Date
XiaoTan Luo
760158d29b ASoC: rockchip: add machine driver for hdmi audio
this patch is used for rockchip HDMI audio output.

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I577179e7563ad241014d023da12af1e622e84c9a
2021-09-27 17:33:42 +08:00
Simon Xue
2001f161f2 iio: adc: rockchip_saradc: fix interrupt issue
Saradc interrupt status may exist forever if read saradc
when system suspending which disable clock that finally
lead to interrupt system dead. Add mutex in suspend to
avoid this issue.

Change-Id: I6a83e4bd79db90a79985685b5e94df2209b5ae81
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-09-27 17:25:38 +08:00
Wang Panzhenzhuan
55e6dba6c1 arm64: dts: rockchip: rk3326-evb-lp3-v11: fix camera config
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Ibde871bcfd026cd926d8ffbe4c94e975572aaeb8
2021-09-27 17:22:07 +08:00
Michael Grzeschik
6a5b75cf13 BACKPORT: usb: gadget: uvc_video: add worker to handle the frame pumping
This patch changes the function uvc_video_pump to be a separate
scheduled worker. This way the completion handler of each usb request
and every direct caller of the pump has only to schedule the worker
instead of doing the request handling by itself.

Moving the request handling to one thread solves the locking problems
between the three queueing cases in the completion handler, v4l2_qbuf
and video_enable.

Many drivers handle the completion handlers directly in their interrupt
handlers. This patch also reduces the workload on each interrupt.

Test on RK3568 EVB1 USB 3.0 UVC, use the high priority dedicated
workqueue instead of the system_wq can help to improve the uvc
transfer performance.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I3c7ab421f8f58dad0a36e005edf8640f7b0a0402
(cherry picked from commit 43cd002387)
2021-09-27 14:29:58 +08:00
William Wu
d5736c3819 usb: dwc3: gadget: fix req list in miss isoc event processing
If miss isoc event happens, the current code just move the
current req to the tail of the pending list, and then stop
the active transfer with cmd DWC3_DEPCMD_ENDTRANSFER. After
these operations, the isoc endpoint wait for a XferNotReady
event to restart the transfer with the first pending req
from the pending_list.

If there are already reqs in the pending list when move the
miss isoc reqs to the tail of the pending list, some of the
reqs are out of order.

This patch first moves all of the reqs in the started list
to the tail of the cancelled list, and then move all of the
reqs in the pending list to the tail of the cancelled list.
At last move all of the reqs in the cancelled list to the
pending list. This can make sure all of the reqs are in order
when restart the isoc transfer later.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Idf38d9fd4d483854473c18f792d1996fb5fcab4b
2021-09-27 14:29:15 +08:00
Zorro Liu
10a836e900 drm/rockchip: ebc_dev: release version v2.12
add EPD_AUTO_DU and EPD_AUTO_DU4 mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I663dce6978a922fff2afe73327b0f8dc8c83f58a
2021-09-27 10:34:11 +08:00
Tao Huang
089105b205 rk: scripts/mkimg: Support Create U-Boot FIT Image use ${BOOT_ITS}
Change-Id: Id878ebf13606f1be324b11d89cb803ec9ed6c209
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-09-26 17:39:30 +08:00
Sugar Zhang
8df01b9fa0 arm64: dts: rockchip: rk3566-box: Fixup inputclkfs for hdmi audio
Fixes: 1232b84288 ("arm64: dts: rockchip: add rk3566 box dts")

Change-Id: I36b5b09149dfd3537e500925134a49f777b6b0b0
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-09-26 17:32:05 +08:00
Ziyuan Xu
f86904e7fe ASoC: es7202: provide configuration for i2c_bus_num/mic_max_channels
Configuration is flexible than hard code, and minimal changes.

Change-Id: I15835fcbf198252410feb3feb6080ca047388ce1
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2021-09-26 17:16:33 +08:00
Zefa Chen
1ac27c2f80 media: rockchip: cif fix errors in rgb24 data format
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0766997860f06dc25e604c2ea8425049a987fdc5
2021-09-26 16:28:50 +08:00
Wyon Bi
6adc164ec8 mfd: Drop unused rk610/rk616 driver
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I76c73d0c565b04261a099373c7a9200d6058b8ec
2021-09-26 14:26:45 +08:00
Ding Wei
00b8be6742 video: rockchip: mpp: fix issue for CONFIG_IOMMU_SUPPORT=n
if CONFIG_IOMMU_SUPPORT=n, log:
 error: 'const struct iommu_ops' has no member named 'flush_iotlb_all'
   if (domain && domain->ops && domain->ops->flush_iotlb_all)

Change-Id: I8268e0b5d5a513d1c55b0c755c479049b13bdeb7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-09-26 11:50:46 +08:00
David Wu
56f6b33ef0 net: ethernet: stmmac: Add config option for full driver
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh drivers/net/ethernet/stmicro/

before size: 82879 Bytes
after  size: 59075 Bytes
save   size: 23804 Bytes

Change-Id: I5f6b4573d7358c3b6f046e960c7ddf7d53541b14
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-09-26 10:32:31 +08:00
David Wu
345c4d0af3 net: ethernet: stmmac: Add config option for stmmac ethtool
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh drivers/net/ethernet/stmicro/

before size: 94474 Bytes
after  size: 82879 Bytes
save   size: 11595 Bytes

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I828130d961846a955b998d63afffbabcc9dd5925
2021-09-26 10:31:52 +08:00
Jon Lin
0aa9fa02c4 spi: rockchip: Preset cs-high and clk polarity in setup progress
After power up, the cs and clock is in default status, and the cs-high
and clock polarity dts property configuration will take no effect until
the calling of rockchip_spi_config in the first transmission.
So preset them to make sure a correct voltage before the the first
transmission comming.

Change-Id: Ib00336a3ebda6e04bdb33c56c7da419bfb6efdd9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-24 17:25:38 +08:00
Algea Cao
7a48f58291 drm/bridge: synopsys: dw-hdmi: Fix display err when system boot set hdmi properties
Linux system will set hdmi properties when system boot
When some properties such as quant_range was set, dw_hdmi_setup()
will be called. HDMI status may not be config correctly. So if HDMI
is not properly initialized, don't call dw_hdmi_setup() when
these properties was set.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I6956e50161a4a5bd579f7174c73977d2e33da0c5
2021-09-24 17:24:40 +08:00
Wyon Bi
fa11be322f drm/rockchip: analogix_dp: Fix unbalanced clock
Fixes: ad3cad3616 ("drm/rockchip: analogix_dp: Covert to use bulk clk")
Change-Id: I5a980fdef172013138293c999a00014141a0ffbd
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-09-24 17:24:40 +08:00
Andy Yan
25003d386c drm/rockchip: vop2: Support set unique possible_crtcs by plane_mask
Enabled by:

&vop2 {
	disable-win-move;
};

Change-Id: Idc15f713b74650ac910233538d186ad799e25124
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-24 17:24:40 +08:00
Andy Yan
2120901346 drm/rockchip: vop2: Assign plane for vp by plane_mask
Change-Id: I6cbd87a5c4ecab7a54f30f0a6bfdd8721f86cce9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-09-24 17:24:40 +08:00
Cai YiWei
15351d5a0d media: rockchip: isp: before frame start to update bridge mi
isp20 bridge will config gain and image dma address when isp
frame start interrupt event, and frame end update. But no
actual update if frame start and frame end together. One read
back is the same as the start interrupt event, so to update
bridge mi this.

Change-Id: I697128fd60c3e38eb2ed163a5a94df8c4c018241
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-24 17:24:40 +08:00
Cai YiWei
25cc3a7a9e media: rockchip: isp: fix default params config for mode switch
Change-Id: I7946d394e0a224ef8f2e1a460b9bf89c9334d015
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-24 17:24:40 +08:00
Cai YiWei
14f3d5cac4 media: rockchip: isp: rawrd support uncompact mode
Change-Id: If9ff4b2043e3c9b29843b7f3562d107da597c9d8
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-24 17:24:40 +08:00
Yu Qiaowei
f9b49c76ca video/rockchip: rga2: Modify the memory check of dma buffer.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I9f51a0ec08c49a86b70c775cc9e81f3d70384553
2021-09-24 17:24:40 +08:00
Xing Zheng
1b30a33f67 Revert "ASoC: rockchip: rk817-codec: add support recover playback/capture path after resume"
This reverts commit 20d8a7925f.

Generally, we cannot guarantee that the paths of capture and
playback need to be turned on by default after resume, which
can be manually controlled by the user layer. In this way, the
problem of asymmetrical clock operation can also be corrected
after resume.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I1cb7b364313a7573032851fe0c2970cf1a078b0a
2021-09-24 17:24:40 +08:00
Simon Xue
5a922e0af0 iommu/rockchip: fix vop blocked and screen black on RK356X
RK356X has the same issue as RV1126/RV1109 that caused by
dte fetch time limit, So we can set BIT(31) of register 0x24 default
to 1 as a workaround.

Change-Id: Ib0d1fd110aa0349145a63f7c4be5ce77ed6ab4e4
Fixes: fcbec99d51 ("iommu: rockchip: disable fetch dte time limit")
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-09-24 17:24:40 +08:00
Jon Lin
d94845019e drivers: rkflash: Not recheck the cache for XTX devices
Change-Id: I440b3a07d86bbdcbeaa6ab4b5282623bf6cb74c7
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-09-23 11:01:56 +08:00
Cai YiWei
c8eebe7f77 media: rockchip: isp: enable soft reset for other isp version
Change-Id: I620718f555f091d2ca53214c3fd3cd1a44107692
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-22 16:52:19 +08:00
Cai YiWei
328ab6e699 media: rockchip: isp: fix input crop config for isp21 multi device
Change-Id: I6185273f8474e151ee26c938b8825af383fb73e3
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-09-22 16:52:19 +08:00
Zhen Chen
898f20536f MALI: remove drivers/gpu/arm/bifrost_for_linux/
Change-Id: Ib91cbcc1d1413bdd9510661ffdd38dd72d984c56
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-09-22 16:26:23 +08:00
Zhen Chen
572af1468b MALI: remove definitions of MALI_BIFROST_FOR_ANDROID and MALI_BIFROST_FOR_LINUX
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Idd03a830e62582fe738919b7ef4d43163e9cdcb1
2021-09-22 16:26:23 +08:00
Zhen Chen
dc87a4564b arm64: configs: rockchip: not to use CONFIG_MALI_BIFROST_FOR_LINUX
No need to use CONFIG_MALI_BIFROST_FOR_LINUX
after px30/rk3326 Android and Linux device
use the same bifrost_device_driver "drivers/gpu/arm/bifrost".

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: Ia4c9c79be2c10d5d708a8ea1bb4bc5d49c97267b
2021-09-22 16:26:23 +08:00
Zhen Chen
fedf4bcc70 MALI: remove MALI_MIDGARD_FOR_ANDROID and MALI_MIDGARD_FOR_LINUX
Because they are no longer useful,
after rk3288/rk3399 Android and Linux device
use the same midgard_device_driver "drivers/gpu/arm/midgard".

Change-Id: I7ccc3c99fdfdde5a0ea12a7f3e1931fd5f1ce4cb
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2021-09-22 16:26:23 +08:00
Jianwei Fan
0d9ef4a325 arm64: dts: rockchip: rk3399-evb-ind-lpddr4-android-avb: add tc35874x
configuration

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ib3e274017f3a971b5fb301c81e3ade43141af1d3
2021-09-22 16:23:00 +08:00
Jianwei Fan
1bc3ec16fd arm64: dts: rockchip: rk3399-evb-ind-lpddr4-v13-android-avb: add
tc35874x configuration

Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Change-Id: Ia8e5c19ae4d37e0c7e16f8f149c17716e9f54d2d
2021-09-22 06:00:35 +00:00
Shunhua Lan
d0444258a7 pinctrl: rockchip: add i2sx_sclk_rx/i2sx_sclk_tx mux route for rk3568
Change-Id: I35525224a39ce45962bfb1559b5002eb841ddd00
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
2021-09-22 11:11:11 +08:00
David Wu
aab3af8ad0 net: ethernet: stmmac: dwmac-rk: Add config option for dwmac-rk-tool
Add this config option to reduce memory usage, if it was not necessary.

./ksize.sh drivers/net/ethernet/stmicro/

before size: 105216 Bytes
after  size: 94474  Bytes
save   size: 10742  Bytes

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I96c88d5eb5109fc956a85b8685e1746d76545a87
2021-09-18 20:06:20 +08:00
Sandy Huang
c66b7345f6 drm/rockchip: vop: fix alpha mode error for vop lite
1. vop lite can't support pixel-alpha + scale and can support global
alpha + scale;
2. global alpha must be non-premul alpha mode;
3. vop lite and vop full premul alpha config bit is reversed;
4. vop full add premul and non-premul config from userspace;

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ic42892eac39f07a41d46ed1a77398862f37894c0
2021-09-18 19:57:27 +08:00
Caesar Wang
9efdeb1c2a arm64: dts: rockchip: fixes ramoops for rk3399-linux.dtsi
This patch fixes the ramoops right register for kernel.

check the '/sys/fs/pstore/console-ramoops-0' after the reboot system.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I345ca0b497031c5d18c2b10eb661efe39a4b3025
2021-09-18 16:01:32 +08:00
Algea Cao
54614e8ea6 drm/rockchip: dw_hdmi: set capacity properties immutable
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ia9774706b9647217c4065ade3f1a9f21e46edccc
2021-09-18 15:59:14 +08:00
Caesar Wang
6fa47f3ec2 arm64/configs: update rockchip_lnux_defconfig
1) Enable LT6911UXC and LT8619C

    Enable lt6911uxc HDMI to MIPI CSI-2 bridge driver for hdmi-in
application. Which found on rk3568-evb2-lp4x-v10.
Enable lt8619c HDMI to BT656/BT1120 bridge driver for hdmi-in
application. Which found on rk3568-evb6-ddr3-v10.

2) Enable CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP

    This add the devfreq-event driver for Rockchip SoC. It provides NoC
(Network on Chip) Probe counters to monitor traffic statistics.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I7d4e50329ff9576f5e16599b04c6b7af37d5d306
2021-09-18 09:08:52 +08:00
Fenrir Lin
709c17f341 ARM: dts: rockchip: add rv1126-bat-evb-v11.dts
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I33365b97e74ff35d26a16861b6c81ab07f3e0f54
2021-09-17 15:48:52 +08:00
Liang Chen
e70299d6e8 soc: rockchip: add depends for config ROCKCHIP_SCHED_PERFORMANCE_BIAS
CONFIG_ROCKCHIP_SCHED_PERFORMANCE_BIAS depends on CONFIG_SMP and
CONFIG_CPU_FREQ_GOV_INTERACTIVE.

Change-Id: I6b564b1693e225ff6310f2dc8c8adabfb509cae9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-09-17 15:36:44 +08:00
Yu Qiaowei
2e6dc356c9 video/rockchip: rga2: Added support for ARGB format
Add ARGB8888/XRGB8888/ARGB5551/ARGB4444/ABGR8888/XBGR8888/ABGR5551/ABGR4444.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I9eb8f5fbcc1a87a5750b7dc2eaf808f8395856a0
2021-09-17 15:35:53 +08:00
Yu Qiaowei
b4d1ec5cd2 video/rockchip: rga2: Optimize the process of mapping dma.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie8d140d8fc102c9a3677b266ac7848c4c3ade78e
2021-09-17 15:35:53 +08:00
Zorro Liu
9f1d22a8f0 regulator: xz3216: add resume function
enable sleep vol when resume, if not reboot will failed after sleep out
by vdd_cpu off

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: If56bc9894abb37b771ed1097e0deb73c679cc315
2021-09-17 15:17:36 +08:00
XiaoTan Luo
5f47c9f404 UPSTREAM: ASoC: hdmi-codec: Use set_jack ops to set jack
Use set_jack ops to set jack so machine drivers do not need to
includehdmi-codec.h explicitly.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link:https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 55c5cc63ab)

Change-Id: I5717c3e47ac9a8feb05b830b159c9ac9224f4136
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
2021-09-17 14:35:07 +08:00
Cheng-Yi Chiang
0315c89b25 UPSTREAM: drm: bridge: dw-hdmi: Report connector status using callback
Allow codec driver register callback function for plug event.

The callback registration flow:
dw-hdmi <--- hw-hdmi-i2s-audio <--- hdmi-codec

dw-hdmi-i2s-audio implements hook_plugged_cb op
so codec driver can register the callback.

dw-hdmi exports a function dw_hdmi_set_plugged_cb so platform device
can register the callback.

When connector plug/unplug event happens, report this event using the
callback.

Make sure that audio and drm are using the single source of truth for
connector status.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20191028071930.145899-2-cychiang@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit a9c82d63ca)

Change-Id: Ieea468bf53165e2436996b453b048db049bcbf67
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
2021-09-17 14:34:51 +08:00
Cheng-Yi Chiang
3bfb85ec20 UPSTREAM: ASoC: hdmi-codec: Add an op to set callback function for plug event
Add an op in hdmi_codec_ops so codec driver can register callback
function to handle plug event.

Driver in DRM can use this callback function to report connector status.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Link: https://lore.kernel.org/r/20190717083327.47646-2-cychiang@chromium.org
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 6fa5963c37)

Change-Id: I5f4a931c3b91c2b230ce5a61b60f191628d93105
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
2021-09-17 14:33:31 +08:00
Tao Huang
77dd1a64ea media: rockchip: cif: build depends on CPU config
When build with rv1126_defconfig:

before:
   text    data     bss     dec     hex filename
   7820	    144	      0	   7964	   1f1c	drivers/media/platform/rockchip/cif/hw.o

after:
   text    data     bss     dec     hex filename
   4301	    144	      0	   4445	   115d	drivers/media/platform/rockchip/cif/hw.o

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0dee5f7f43da3eb58a65342319ccb77b5501e0ce
2021-09-16 10:55:21 +08:00
Tao Huang
1a0176f009 net: stmmac: dwmac-rk: build depends on CPU config
When build with rv1126_defconfig:

before:
   text	   data	    bss	    dec	    hex	filename
  17063	    144	      0	  17207	   4337	drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o

after:
   text	   data	    bss	    dec	    hex	filename
   7387	    144	      0	   7531	   1d6b	drivers/net/ethernet/stmicro/stmmac/dwmac-rk.o

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I941f79357f686f5d35e727abea2fe26c4ea0dafa
2021-09-16 10:55:21 +08:00