Commit Graph

854473 Commits

Author SHA1 Message Date
Cai YiWei
df47abdafa media: rockchip: isp: more isp state for debug
Change-Id: I3b47effb53080bfb751fc293567abd666917934e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-07-21 17:57:33 +08:00
Allon Huang
ddd2bba26f ARM: configs: rv1126_defconfig: enable CONFIG_VIDEO_ROCKCHIP_CIF
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Ie52a8d7173006016de34bfe8cf3ccdb7e1ec85f0
2020-07-21 17:36:12 +08:00
Sandy Huang
4f4dcf8d82 drm/rockchip: use DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE
use DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE to instead of
DRM_BUS_FLAG_PIXDATA_NEGEDGE.

Fixes: d5272ec9bd ("drm/rockchip: use DRM_BUS_FLAG_PIXDATA_NEGEDGE to identify dclk polarity")
Change-Id: Ifaa376f1d71e77a83096c1e8fd8e1d245fea63d5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-21 16:08:22 +08:00
Laurent Pinchart
f1de77acd6 UPSTREAM: drm: Clarify definition of the DRM_BUS_FLAG_(PIXDATA|SYNC)_* macros
The DRM_BUS_FLAG_PIXDATA_POSEDGE and DRM_BUS_FLAG_PIXDATA_NEGEDGE macros
and their DRM_BUS_FLAG_SYNC_* counterparts define on which pixel clock
edge data and sync signals are driven. They are however used in some
drivers to define on which pixel clock edge data and sync signals are
sampled, which should usually (but not always) be the opposite edge of
the driving edge. This creates confusion.

Create four new macros for both PIXDATA and SYNC that explicitly state
the driving and sampling edge in their name to remove the confusion. The
driving macros are defined as the opposite of the sampling macros to
made code simpler based on the assumption that the driving and sampling
edges are opposite.

Change-Id: I262d7c66791f5de18042e627b32c64851fcaf1ee
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
(cherry picked from commit a792fa0e21)
2020-07-21 16:03:00 +08:00
Zhichao Yu
b6597a7964 ARM: configs: Rename rv1126-evb-ddr3-v12-tb-emmc.config to rv1126-tb-emmc.config
Signed-off-by: Zhichao Yu <zhichao.yu@rock-chips.com>
Change-Id: Ifa96d0bfba6f4266fd297c9c1cbdde0b1155f8a2
2020-07-21 09:49:24 +08:00
Elaine Zhang
f188cd20eb net: can: rockchip: fix up the tx_id_mask bit error
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I1bb0b35abe53d37dfb99eeaf99416f0bc03cc70d
2020-07-21 09:29:27 +08:00
Sandy Huang
6ea8daccaf Revert "drm: fix some no need warning"
This reverts commit 455796818d.
and deal with this issue by following commit:
commit 1f525e2416b3 ("drm/rockchip: reset conn->state->best_encode")

Change-Id: I239296a0a618a3034c6502ca95050dd85da7b5fe
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-21 09:17:26 +08:00
Sandy Huang
dba4fb464a drm/rockchip: reset conn->state->best_encoder
reset conn->state->best_encoder, otherwise will dump the following
warning log at one crtc multiple connector platform:

WARNING: CPU: 6 PID: 61 at drivers/gpu/drm/drm_atomic_helper.c:225
set_best_encoder.isra.3+0x40/0xf0

[    1.520856] Call trace:
[    1.520868]  set_best_encoder.isra.3+0x40/0xf0
[    1.520896]  drm_atomic_helper_check_modeset+0x670/0xa60
[    1.520907]  drm_atomic_helper_check+0x1c/0xc0
[    1.520920]  drm_atomic_check_only+0x354/0x640
[    1.520932]  drm_atomic_commit+0x18/0x58
[    1.520960]  rockchip_drm_bind+0x12f0/0x18e8
[    1.520973]  try_to_bring_up_master+0x144/0x1a8
[    1.520985]  component_master_add_with_match+0xd4/0x130
[    1.520996]  rockchip_drm_platform_probe+0x178/0x2e8
[    1.521022]  platform_drv_probe+0x50/0xa8
[    1.521033]  really_probe+0x200/0x2b0
[    1.521043]  driver_probe_device+0x58/0x100
[    1.521054]  __device_attach_driver+0x90/0xc0
[    1.521064]  bus_for_each_drv+0x70/0xc8
[    1.521074]  __device_attach+0xdc/0x138
[    1.521097]  device_initial_probe+0x10/0x18
[    1.521107]  bus_probe_device+0x94/0xa0
[    1.521118]  deferred_probe_work_func+0x80/0xb8
[    1.521131]  process_one_work+0x1a0/0x418
[    1.521143]  worker_thread+0x1e4/0x3e0
[    1.521154]  kthread+0x12c/0x158
[    1.521166]  ret_from_fork+0x10/0x18
[    1.521189] ---[ end trace bb121b6492800165 ]---

Change-Id: I64a35a13819add55a565165198b1313f8cfc7597
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-21 09:17:06 +08:00
Sandy Huang
1656d858b1 Revert "drm/modes: add dclk invert config parse"
This reverts commit 4492caa259.

remove rockchip private flag.
use DRM_BUS_FLAG_PIXDATA_NEGEDGE to instead of DRM_MODE_FLAG_PPIXDATA.

Change-Id: I24ce988a84a4a5793f7eb3e26e51293988d854d0
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-21 09:16:29 +08:00
Sandy Huang
d5272ec9bd drm/rockchip: use DRM_BUS_FLAG_PIXDATA_NEGEDGE to identify dclk polarity
Change-Id: Ie5c708d0d52e8909d5dc9257e0b6b76d3d960d82
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-21 09:10:27 +08:00
Alpha Lin
99ce805e13 rockchip/iep: remove devm_* de-initialization call
Get rid of devm_* de-initialization call in iep driver,
for devm de-initialization api aren't necessary called
in modules driver.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Change-Id: I20f063d1cf30d15087fbf36f57b2d07fe1eff200
2020-07-20 18:59:48 +08:00
Caesar Wang
cdd135c051 arm64: dts: rockchip: update rk3399 and rk3399pro linux boards
1) remove fiq_debugger, exist on rk3399-linux.dtsi
2) update the related vpu node
3) update edp node

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I64f563bd75eb91d252681e6075b52d1715c7b3d4
2020-07-20 18:38:06 +08:00
Caesar Wang
f6364264de ARM: configs: update rockchip_linux_defconfig for kernel4.19
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I2667bed8369e3fbc160db36e57122395f3f99cdb
2020-07-20 18:35:34 +08:00
Caesar Wang
4f226f7cdc ARM: dts: rk3288: update rk3288 linux board
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I8da7ba913f0a5b835dae1a1af653a4574f4c70b5
2020-07-20 18:35:34 +08:00
Lin Jinhan
df3d95db4d crypto: rockchip - add cfb/ofb/ctr mode for crypto v2
des      : cfb/ofb
des3_ede : cfb/ofb
aes      : cfb/ctr
sm4      : cfb/ofb/ctr

Change-Id: Idf0813785f4e629f14a5cd234fc211a9fa7b4ef3
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Lin Jinhan
5a8a8b4664 crypto: rockchip - add aes ecb/cbc/xts for rv1126
Change-Id: I27f2949382d6bc17d97631efa8340a6fe50af6fb
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Lin Jinhan
99122bd853 crypto: rockchip - add HMAC(md5/sha1/sha256/sha512/sm3) for crypto v2
Change-Id: I28fd8f262fba7f96ca61ce2edc55517a6522b7ab
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Lin Jinhan
d39a33349b crypto: rockchip - add crypto v2 sm3/sm4 support
Change-Id: I31e4ac2d7c47c0f7649306d72fdf172150d45d7e
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Lin Jinhan
e0ae674ca6 crypto: rockchip - add crypto v2 sha1/sha256/sha512/md5 support
Change-Id: I1db69026a7b66642abc80d45f7e6ce22445c36a5
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Lin Jinhan
adef25b776 crypto: rockchip - optimize duplicate code
1.optimize duplicate code
2.modify enable_clk and disable_clk
3.use RK_CRYPTO_PRIORITY instead of magic number 300

Change-Id: I416036c5739dc916e318e1cb3233a44fd0428717
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2020-07-20 18:32:35 +08:00
Ding Wei
121c639a94 video: rockchip: mpp: fix issue for task free meet null pointer
1. mpp_free_task is called in several places.
2. The user space wait fails and free session immediately,
   while, the ISR thread is still working, then mpp_dma_release
   will meet session null.

Call trace:
__ll_sc___cmpxchg_case_acq_8+0x4/0x20
mpp_dma_release+0x1c/0x50
mpp_task_finalize+0x80/0xc8
vepu_free_task+0x14/0x30
mpp_free_task+0x44/0xc0
mpp_taskqueue_pop_running+0xf8/0x100
mpp_task_finish+0x84/0x160
vepu_isr+0x54/0xe0
mpp_dev_isr_sched+0x48/0x98

Change-Id: I315a01d700791fa50dfed67175c77e5d733fe30d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-07-20 16:57:50 +08:00
Wenping Zhang
4e0c1b6938 net/rfkill: bt: fix crash issue if probe failed after wake_lock_init.
rfkill_rk_probe will fail in some situation after calling wake_lock_init,
but in failed situation, wake_lock_destroy is not called, it will cause
system crash if userspace program read /sys/kernel/debug/wakeup_sources.

Unable to handle kernel NULL pointer dereference at virtual address 00000010
[   36.171834] pgd = ffffffc0dd710000
[   36.175230] [00000010] *pgd=00000000dd480003, *pud=00000000dd480003, *pmd=0000000000000000
[   36.183554] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[   36.189129] Modules linked in:
[   36.192203] CPU: 4 PID: 738 Comm: Binder:605_4 Not tainted 4.4.126 #1
[   36.198633] Hardware name: Rockchip RK3399 Excavator Board dp(Android) (DT)
[   36.205583] task: ffffffc0cb43de80 task.stack: ffffffc0cac4c000
[   36.211502] PC is at _raw_spin_lock_irqsave+0x1c/0x50
[   36.216553] LR is at print_wakeup_source_stats+0x30/0xf0
[   36.221862] pc : [<ffffff8008b65890>] lr : [<ffffff800853e074>] pstate: a04001c5
[   36.229242] sp : ffffffc0cac4fc50
[   36.232554] x29: ffffffc0cac4fc70 x28: ffffffc0cac6ee80
[   36.237901] x27: ffffffc0ed446f00 x26: ffffffc0cac4fd78
[   36.243283] x25: ffffffc0cac4feb0 x24: ffffffc0cac6ee40
[   36.248634] x23: 0000000000000000 x22: 0000000000000010
[   36.253978] x21: ffffffc0cb43de80 x20: ffffff8009236db8
[   36.259323] x19: fffffffffffffff8 x18: ffffffc0caf18000
[   36.264675] x17: 00000070b84c8674 x16: ffffff80081c0e50
[   36.270020] x15: 0000000000000000 x14: 0000000000000000
[   36.275358] x13: 000000000000000a x12: 0000000000000020
[   36.280705] x11: 00000000fffffffb x10: ffffffc0caf17673
[   36.286051] x9 : 0000000005f5e0ff x8 : 0000000005f5e100
[   36.291378] x7 : 0000000000012054 x6 : ffffffc0caf17675
[   36.296711] x5 : 00000000ffffffff x4 : ffffff8008f98e4f
[   36.302054] x3 : 0000000000000140 x2 : ffffffc0cb43de80
[   36.307398] x1 : 0000000000000001 x0 : 0000000000000010
Call trace:
[   37.884693] [<ffffff8008b65890>] _raw_spin_lock_irqsave+0x1c/0x50
[   37.890778] [<ffffff800853e1ec>] wakeup_sources_stats_show+0xb8/0xc4
[   37.897125] [<ffffff80081e2118>] seq_read+0x120/0x404
[   37.902171] [<ffffff80081bfbc8>] __vfs_read+0x38/0xf4
[   37.907215] [<ffffff80081c03d4>] vfs_read+0x78/0x12c
[   37.912175] [<ffffff80081c0eac>] SyS_read+0x5c/0xbc
[   37.917055] [<ffffff80080832f0>] el0_svc_naked+0x24/0x28

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: I57216b16ffdd35bbcf0fda56924bf00a71d152ac
2020-07-20 15:33:15 +08:00
Jianqun Xu
f27d8c9975 spi: rockchip: get pinctrl for lookup pinctrl state
Fix system crash issue when spi dev has no correct pinctrl handle.

Fixes: 87dbea63d5 ("spi: rockchip: set higher io driver when sclk higher than 24MHz")
Change-Id: I603fe8f74681b576fe7fcd404a386ec2b2c03da4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-17 10:38:30 +08:00
Elaine Zhang
6d1fd05b9d net: can: add rockchip CANFD driver
Change-Id: Ie49293531038583e7d0d4b8055dba3e8f026d734
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-07-16 15:10:00 +08:00
Elaine Zhang
ebe6e465c4 dt-bindings: can: rockchip_canfd: add canfd support for rockchip
This patch add the rockchip canfd to the device tree bindings
documentation.

Change-Id: Ief6ffeeda87e28e8b70a706c92eba526e0db0686
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-07-16 15:10:00 +08:00
Jianqun Xu
389fe61846 ARM: dts: rv11xx-evb-v10.dtsi export wireless-wlan node
Since wireless-wlan node uses gpio as:
WIFI,host_wake_irq = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;

It should allow to disable the node.

Change-Id: I27cc8acbb84025ae5f8e76e4c3e7aee36907729e
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-07-16 15:01:13 +08:00
Liang Chen
51d4aae73f sched/fair: optimize scheduler for performance
1. init util_avg of new task to half the util of big core.
2. treat task wait time as busy time.
3. do not put task to the cpu whose max util can not fit the task.
4. boost cpufreq when a task is wakeup.

if prefer powersave, we can disable this optimization by command:

echo 0 > /proc/sys/kernel/sched_performance_bias

Change-Id: I937d1cc2295645a1d044e0735ef575b6507bb752
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-07-16 14:50:45 +08:00
Liang Chen
2d367d61e8 cpufreq: interactive: introduce boost cpufreq interface for task
boost cpufreq for a task if current capacity is not fit for the task.

Change-Id: I85cfeaeb6d8fcface8f6534bb95b5baf3bfc839f
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-07-16 14:49:37 +08:00
Finley Xiao
f555437199 clk: rockchip: rv1126: Fix some clks' parent when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Fixes: 1980c11fab ("clk: rockchip: rv1126: Remove more clks when CONFIG_ROCKCHIP_THUNDER_BOOT=y")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic9dce77658aa613fc5f0ff41261a43ca5884dab5
2020-07-16 11:37:32 +08:00
Wyon Bi
7c959b40c9 drm/bridge: analogix_dp: Fix the logic of prepare/unprepare the panel
This patch avoids frequent prepare/unprepare the panel, and keep
the current state until the panel is disabled.

Change-Id: I0148ab85779df6ef447796d2f07eb46315813d56
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-15 09:34:08 +08:00
Wyon Bi
14fbe98150 drm/bridge: analogix_dp: allows to get edid for the panel
Change-Id: I7caba18fb979ad2b8f419c58f989b27d3e756ebf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-15 09:34:08 +08:00
Wyon Bi
c49c170321 drm/bridge: analogix_dp: Fix aux not work before modeset
Change-Id: I8b00df83d5c3a17b0c73dba66d06a20c55575209
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-15 09:34:08 +08:00
zain wang
53a9ebd3b3 FROMLIST: drm/bridge: analogix_dp: Don't return -EBUSY when msg->size is 0 in aux transaction
The analogix_dp_transfer() will return -EBUSY if num_transferred is zero.
But sometimes we will send a bare address packet to start the transaction,
like drm_dp_i2c_xfer() show:
	......
	/* Send a bare address packet to start the transaction.
	 * Zero sized messages specify an address only (bare
	 * address) transaction.
	 */
	msg.buffer = NULL;
	msg.size = 0;
	err = drm_dp_i2c_do_msg(aux, &msg);
	......

In this case, the msg->size is zero, so the num_transferred will be zero too.
We can't return -EBUSY here, let's we return num_transferred if num_transferred
equals msg->size.

BUG=chrome-os-partner:57501
TEST="gooftool probe --comps display_panel"

Change-Id: Ie09f26b2c31e2406d21233afd8677337de5e77f2
Signed-off-by: zain wang <wzz@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9569045/)
Reviewed-on: https://chromium-review.googlesource.com/414674
Commit-Ready: Caesar Wang <wxt@rock-chips.com>
Tested-by: 征增 王 <wzz@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
2020-07-15 09:34:08 +08:00
Wyon Bi
d72fbd047b drm/panel: simple: allows mode info not to be described in the device tree
Change-Id: I4a5048dd9d590011216966817c3109dbbbde3164
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-15 09:34:08 +08:00
Wyon Bi
5beeda4a26 drm/bridge: analogix_dp: Add loader protect for psr function
Change-Id: Iffb651d3dbb11797b82ed2679e990b8c9610b200
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-07-15 09:34:08 +08:00
Ren Jianing
55c7a54911 usb: gadget: u_audio: add uevent for set_alt and set_srate
This patch add uevent to notify the application layer when it should
playback or capture and setting the accuration sample rate.

The event consists of three parts, namely USB_STATE, STREAM_DIRECTION
and STREAM_STATE. For example:

g_audio_work: sent uac uevent USB_STATE=SET_INTERFACE STREAM_DIRECTION=IN STREAM_STATE=OFF
g_audio_work: sent uac uevent USB_STATE=SET_INTERFACE STREAM_DIRECTION=OUT STREAM_STATE=ON
g_audio_work: sent uac uevent USB_STATE=SET_SAMPLE_RATE STREAM_DIRECTION=OUT SAMPLE_RATE=44100

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ia01572d92d0c3ae40b19e772571282b8806da9e5
2020-07-15 09:31:34 +08:00
Ren Jianing
a322b6c50d FROMLIST: usb: gadget: f_uac*: Support multiple sampling rates
Implement support for multiple sampling rates in the USB Audio gadgets.
A list of sampling rates can be specified via configfs. All enabled
sampling rates are sent to the USB host on request. When the host
selects a sampling rate the internal active rate is updated. The
currently configured rates are exposed through amixer controls. Also on
pcm open from userspace the requested rated is checked against the
currently configured rate of the host.

Link: https://lore.kernel.org/patchwork/patch/805286/
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I43dc28462062c9aa179c2b9c8e7e50c307137874
2020-07-15 09:31:34 +08:00
Ren Jianing
9de5fa6df1 FROMLIST: usb: gadget: f_uac*: Reduce code duplication
This replaces the dedicated headers for uac1 and uac2 functions with a
shared header for both of them. Apart from unifying the struct names,
further duplicated code for configfs setup is moved out of the function
files into the shared header.

Link: https://lore.kernel.org/patchwork/patch/805285/
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ie866bd02f174dc91168fe0bc49b571a77d849a42
2020-07-15 09:31:34 +08:00
Julian Scheel
9cc791ff36 FROMLIST: usb: gadget: f_uac1: Fix endpoint reading
The endpoint is stored in the lower byte of wIndex, according to USB
Audio 1.0 specification, section 5.2.1.1.

Link: https://lore.kernel.org/patchwork/patch/805284/
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I16634151e98cfb0f7107e96463a20b8fa8d7072f
2020-07-15 09:31:34 +08:00
William Wu
10e9abc766 ARM: dts: rockchip: enable txfifo resize for rv1126 usb
RV1126 EVB USB gadget maybe used as UVC function which
needs to resize txfifo to improve isoc ep throughput,
so this patch adds "snps,tx-fifo-resize" property to
enable txfifo resize.

Change-Id: I00447fb252a093acb24525b12479f67662d9dfe3
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-07-14 19:25:26 +08:00
William Wu
5d4fc6626d usb: dwc3: gadget: fix the txfifo resize for isoc ep
The dwc3 driver sets the mult to 6 and alloc 0x307 * 8 Bytes
for each isoc ep txfifo. It aims to improve isoc ep throughput,
but it's wasteful.

This patch sets the mult to dep->endpoint.mult * 2 for each isoc
ep, it's enough to improve isoc ep throughput, and it can avoid
exceeding the total size of txfifo if multiple isoc eps are used
at the same time.

Change-Id: I01d77d19b85e5f5930ff94ef40714129afe10b54
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-07-14 19:18:03 +08:00
XiaoDong Huang
50151fc7a3 regulator: tps549b22: add TI TPS549b22 support
Change-Id: I7550fc9f78a30b5d8ff705403ad91cfd8727fad6
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2020-07-14 16:17:40 +08:00
William Wu
432a0d89dd usb: dwc3: core: reset the whole controller during probe
This patch reset the dwc3 controller at the beginning of
probe. Without this patch, it may fail in enumeration phase
if the dwc3 has been initialized and used before kernel.

Typically, we use usb to download image and boot directly
on RV1126 board, it will fail to connect to host with the
following error log:

[2.029506] read descriptors
[2.029597] read strings
[3.038749] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
[3.077445] android_work: did not send uevent (0 0   (null))
[3.282586] vendor storage:20190527 ret = -1
[3.335505] usb0: HOST MAC 16:ba:52:5a:90:28
[3.335566] usb0: MAC 6a:73:d9:da:da:ce
[3.335597] configfs-gadget gadget: uvc_function_bind
[5.052086] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
[5.052431] dwc3 ffd00000.dwc3: unexpected direction for Data Phase

Change-Id: I7eede4685a26cff5fc9460233291757edf18e430
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-07-14 16:16:34 +08:00
Yiqing Zeng
82f893648d media: i2c: os04a10 changed supported mode to 10bit@30fps by default
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Change-Id: I1a6e94bd36ff09c2964251d1c0ad83ed7f577c47
2020-07-14 14:28:13 +08:00
Sandy Huang
af3bfcd5cf drm/rockchip: add rockchip_drm_get_sub_dev_type
1. before this, the DMC driver use drm_device_get_by_name() to get drm
connector info, now we use rockchip_drm_get_sub_dev_type() to instead of
it.
2. export rockchip drm sub dev functions.

Change-Id: Ief6546d933fbb49e46e6e8d2a99464eb5951e069
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-07-13 20:47:09 +08:00
David Wu
42f500840d i2c: rk3x: Remove start state and irq
Let configuration start and count be performed at the
same time as much as possible, which can reduce the
interval between the start signal and the data signal,
and can also reduce a start irq.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I529300a083dcd264cc5f25a2069b88601cade83e
2020-07-13 20:28:00 +08:00
Jon Lin
ab08158001 spi: rockchip: Fix error in SPI slave pio read
Maybe RXFLR is larger than rx_left

Change-Id: Ic851d68250ba9cbe73c00ba40a925542e5505265
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-07-13 20:23:29 +08:00
Mark Brown
ce3a66e6df UPSTREAM: spi: Fix core transfer waits after slave support
The refactoring done as part of adding the core support for handling
waiting for slave transfer dropped a conditional which meant that we
started waiting for completion of all transfers, not just those that the
controller asked for.  This caused hangs and massive delays on platforms
that don't need the core delay.  Re-add the delay to fix this.

Fixes: 810923f3bf (spi: Deal with slaves that return from transfer_one() unfinished)
Change-Id: I8fe4c6d42bc7c64d9c9b6803d154ec169752283f
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d57e79601b)
2020-07-13 20:22:07 +08:00
Lubomir Rintel
da31d8c6af UPSTREAM: spi: Deal with slaves that return from transfer_one() unfinished
Some drivers, such as spi-pxa2xx return from the transfer_one callback
immediately, idicating that the transfer will be finished asynchronously.

Normally, spi_transfer_one_message() synchronously waits for the
transfer to finish with wait_for_completion_timeout(). For slaves, we
don't want the transaction to time out as it can complete in a long time
in future. Use wait_for_completion_interruptible() instead.

Change-Id: I166415911f30fc821fca73b0250f6350b835e8c0
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 810923f3bf)
2020-07-13 20:22:07 +08:00
Phil Elwell
4c5472af2c UPSTREAM: spi: Make GPIO CSs honour the SPI_NO_CS flag
The SPI configuration state includes an SPI_NO_CS flag that disables
all CS line manipulation, for applications that want to manage their
own chip selects. However, this flag is ignored by the GPIO CS code
in the SPI framework.

Correct this omission with a trivial patch.

Change-Id: I75e69b1eb5068357d9abfe8236cfbd2188c626f1
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 25972d0c33)
2020-07-13 20:22:07 +08:00