Commit Graph

865131 Commits

Author SHA1 Message Date
Wyon Bi
d8a6016ef3 drm/rockchip: analogix_dp: Add support for external bridge
The current output code only supports connection to drm panels.
Add code to support drm bridge, to support connections to
external connectors.

Change-Id: I775244b7183692f07b74123fa43c8bb958525087
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-01 09:15:43 +08:00
Weixin Zhou
36b35520b4 input: touchscreen: cyttsp5: fix memory out of bounds write issue
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I8d58353b74b96d6014613ae01e8a25643e2a50c9
2021-06-30 19:50:04 +08:00
Wyon Bi
403ae7fd2a drm/rockchip: cdn_dp: Fix link retrain condition
Validate the cached values of link parameters before
attempting to retrain.

Change-Id: Idf4f8a7c2d85109e05dc7e387f46ddeb55cd0a01
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-06-30 18:59:33 +08:00
Wyon Bi
d7b5c81015 phy: rockchip-typec: Fix DP lane config
Split dynamic lane configuration from tcphy_dp_cfg_lane().

Change-Id: Ie4ce3138b30f3f9304daec9a9c582091548c0e60
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-06-30 18:14:47 +08:00
Zheng Yang
3ab5d277d1 drm/bridge: dw-hdmi: fix rgb2yuv csc coeff
According the CEA-861, HDMI outputs the limited range by default.

Change-Id: I06fc1b92ca15e17fd27f3c09f9ced675f686c15f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-06-30 17:49:02 +08:00
Zheng Yang
f0c323800d drm/rockchip: dw_hdmi: correct output bus format if unsupported_yuv_input
If unsupported_yuv_input is true, like RK3288, the current logic
will fix the output bus format to MEDIA_BUS_FMT_RGB888_1X24 or
MEDIA_BUS_FMT_RGB101010_1X30, does not changed width the property
hdmi_output_format. This patch fix the issue.

Change-Id: Iddf4182ea8eff066b5f4972c8c3802f7919eb7da
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-06-30 17:46:58 +08:00
Zorro Liu
a759193144 regulator: xz3216: update drivers to support vsel set
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Ifd686fb977f9d397d856cf6338499fcbbe674fd2
2021-06-30 11:23:18 +08:00
Dmitry Torokhov
f9560c9c14 cpufreq: interactive: fix policy locking
cpufreq_interactive_speedchange_task() is running as a separate kernel
thread and is calling __cpufreq_driver_target(), which requires callers
to hold policy->rwsem for writing to prevent racing with other parts of
the kernel trying to adjust the frequency, for example kernel thermal
throttling. Let's change the code to take policy->rwsem and while at it
refactor the code a bit.

This was originally 2 changes reviewed at:
	https://chromium-review.googlesource.com/246273
	https://chromium-review.googlesource.com/256120

Change-Id: Icc2d97c6c1b929acd2ee32e8c81d81fd2af778ab
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@google.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-06-30 10:52:20 +08:00
Shawn Lin
a6f921d31f mmc: dw_mmc-rockchip: Always fix ID mode clk request into 375KHz for RK356X
RK356X SoCs only support 375KHz for ID mode, otherwise it will be always
failed to set clk if the first attempt to identify cards.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I99ba322b3eeb4c4658869dc88b7a9f303081e12e
2021-06-30 10:40:21 +08:00
Zorro Liu
d6f112ccc1 drm/rockchip: ebc_dev: release version v2.03
1.add 8 pixel align buf process
2.overlay mode use double buf
3.add EPD_DU4 mode

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I849206c3776e445bff9e3722868ee8cc8b041e4e
2021-06-29 18:43:40 +08:00
Yandong Lin
536c29c220 arm64: dts: rockchip: rk3568: modify rkvdec compatible
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0c0d927bd4c995f2be4570a5c2128acbf7f6cc63
2021-06-29 18:22:37 +08:00
Yandong Lin
c2de227bfc dt-bindings: video: mpp: add rk3568 codec properties
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I53eed4f4f0d444515dcac4c533baa15c8fba6f32
2021-06-29 18:20:25 +08:00
Yandong Lin
c7a7aa3370 video: rockchip: mpp: Fix 3568 cabac/cavlc switch issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ifd54d76470889e4d76d97cd33b2a4af26c7af6ab
2021-06-29 12:03:37 +08:00
Yifeng Zhao
b0868873db mmc: sdhci-of-dwcmshc: rk3568: do not enable DLL while the clock rate less than 52mhz
The DLL may not be able to lock while the clock rate less than 52mhz.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ifacc3da516d78f5f242d8b03a60500a7dfe28993
2021-06-28 14:07:03 +08:00
Tao Huang
6770b766b4 regulator: xz3216: Fix gcc this statement may fall through warning
drivers/regulator/xz3216.c: In function 'xz3216_dcdc_set_suspend_mode':
drivers/regulator/xz3216.c:112:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:115:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:165:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/regulator/xz3216.c:168:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4709021a667a5def61361f27a1675099bcb7b45f
2021-06-28 10:37:59 +08:00
Cai YiWei
ff7380d396 media: rockchip: isp: clear rdbk fifo at dmarx stop
Change-Id: If26ebfa218da49d272c1e4aa0a2e8c7e4361ba5f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-25 19:56:17 +08:00
Shunqing Chen
2f3b789905 media: i2c: rk628csi: workround avi packet probabitity error
If read the same value three times,
we think this avi patket is correct.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I96154c38a79fe142368a2069175fa58fa2d38b0f
2021-06-25 16:29:58 +08:00
Zhihuan He
3fbe548efa include: linux: rockchip: add share mem page type define
The share mem page type should be corresponded with
smccc call.

Change-Id: I2fc97fc6841e2fd6ed7080d6af2fa2929ae355fb
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-25 09:07:07 +08:00
Cai YiWei
93aa3972ad media: rockchip: fix isp and ispp share dmabuf release fail
Change-Id: I80d34b89c0dd8965baebbc9cd75b0877f5e4ed9d
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-24 10:02:34 +08:00
Cliff Chen
ce02e6a41d f2fs: Avoid using empty extent_tree when look up extent cache
If CONFIG_F2FS_CHECK_FS is not enabled, the lookup_extent_tree function will continue to run when
the extent_tree is NULL, causing the kernel to crash. The dump like this:
[05-13 09:41:14][ 3309.526262] Unable to handle kernel NULL pointer dereference at virtual a5ddress 0000000000000040
[05-13 09:41:14][ 3309.715348] Mem abort info:
[05-13 09:41:14][ 3309.715618]   ESR = 0x96000006
[05-13 09:41:14][ 3309.715899]   Exception class = DABT (current EL), IL = 32 bits
[05-13 09:41:14][ 3309.716416]   SET = 0, FnV = 0
[05-13 09:41:14][ 3309.716693]   EA = 0, S1PTW = 0
[05-13 09:41:14][ 3309.717003] Data abort info:
[05-13 09:41:14][ 3309.717260]   ISV = 0, ISS = 0x00000006
[05-13 09:41:14]  0): Mem abort info:
[05-13 09:41:14]05-13 01:40:58.784 F/        (    0): ESR = 0x96000006
[05-13 09:41:14]05-13 01:40:58.784 F/        (    0): Exception class = DABT (current EL), IL = 32 bits
[05-13 09:41:14]05-13 01:40:58.785 F/        (    0): SET = 0, FnV = 0
[05-13 09:41:14]05-13 01:40:58.785 F/        (    0): EA = 0, S1PTW = 0
[05-13 09:41:14]05-13 01:40:58.785 F/        (    0): Data abort info:
[05-13 09:41:14]05-13 01:40:58.785 F/        (    0): ISV = 0, ISS = 0x00000006
[05-13 09:41:14]05-13 01:40:58.792 F/Internal error(    0): Oops: 96000006 [#1] PREEMPT SMP
[05-13 09:41:14][ 3309.726031] Process Binder:382_1 (pid: 396, stack limit = 0x00000000b36c00c5)
[05-13 09:41:14][ 3309.726670] CPU: 3 PID: 396 Comm: Binder:382_1 Tainted: G        W         4.19.172 #166
[05-13 09:41:14][ 3309.727380] Hardware name: Rockchip RK3566 RK817 TABLET LP4X Board (DT)
[05-13 09:41:14][ 3309.727968] pstate: 60400009 (nZCv daif +PAN -UAO)
[05-13 09:41:14][ 3309.728412] pc : _raw_read_lock+0x20/0x48
[05-13 09:41:14][ 3309.728779] lr : f2fs_lookup_extent_tree+0xd0/0x330
[05-13 09:41:14][ 3309.729216] sp : ffffff800cc3b700
[05-13 09:41:14][ 3309.818050] Call trace:
[05-13 09:41:14][ 3309.818288]  _raw_read_lock+0x20/0x48
[05-13 09:41:14][ 3309.818617]  f2fs_lookup_extent_tree+0xd0/0x330
[05-13 09:41:14][ 3309.819021]  f2fs_lookup_extent_cache+0x4c/0x60
[05-13 09:41:14][ 3309.819427]  f2fs_map_blocks+0x84/0x9e8
[05-13 09:41:14][ 3309.819774]  f2fs_mpage_readpages+0x1e8/0x604
[05-13 09:41:14][ 3309.820166]  f2fs_read_data_pages+0xf4/0x11c
[05-13 09:41:14][ 3309.820551]  read_pages+0x64/0x148
[05-13 09:41:14][ 3309.820852]  __do_page_cache_readahead+0x164/0x1c4
[05-13 09:41:14][ 3309.821278]  ondemand_readahead+0x1e4/0x264
[05-13 09:41:14][ 3309.821647]  page_cache_async_readahead+0xb4/0xd0
[05-13 09:41:14][ 3309.822066]  generic_file_read_iter+0x168/0x8b4
[05-13 09:41:14][ 3309.822474]  f2fs_file_read_iter+0x34/0xa0
[05-13 09:41:14][ 3309.822848]  generic_file_splice_read+0xc8/0x144
[05-13 09:41:14][ 3309.823263]  splice_direct_to_actor+0xf8/0x274
[05-13 09:41:14][ 3309.823655]  do_splice_direct+0x78/0xc8
[05-13 09:41:14][ 3309.824008]  do_sendfile+0x1cc/0x404
[05-13 09:41:14][ 3309.824336]  __se_compat_sys_sendfile+0x9c/0x26c
[05-13 09:41:14][ 3309.824750]  __arm64_compat_sys_sendfile+0x18/0x20
[05-13 09:41:14][ 3309.825181]  el0_svc_common+0x98/0x160
[05-13 09:41:14][ 3309.825518]  el0_svc_compat_handler+0x18/0x20
[05-13 09:41:14][ 3309.825913]  el0_svc_compat+0x8/0x34
[05-13 09:41:14][ 3309.826244] Code: aa0003e1 52804000 11000529 b9001909 (b8a0003e)

Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Change-Id: Ic7d144eb2518ecc255428eff1c493dbcb36d7976
2021-06-23 15:57:07 +08:00
Thinh Nguyen
f8d073dcd3 UPSTREAM: usb: dwc3: gadget: Remove FS bInterval_m1 limitation
The programming guide incorrectly stated that the DCFG.bInterval_m1 must
be set to 0 when operating in fullspeed. There's no such limitation for
all IPs. See DWC_usb3x programming guide section 3.2.2.1.

Fixes: a1679af85b ("usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1")
Cc: <stable@vger.kernel.org>
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/5d4139ae89d810eb0a2d8577fb096fc88e87bfab.1618472454.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3232a3ce55)
Change-Id: I3e77e49152bbf85c2ecb01bb490b930a78af18ee
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-23 12:06:10 +08:00
Yifeng Zhao
e6ce9c3ded drivers: rk_nand: set dma mask to 32bits
The nandc's DMA only supports 32bits. When the DDR capacity exceeds 4GB,
It need to configure DMA mask to 32bits and use API dma_map_single to
get the physical address.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I39d7270cfc9ed02770fca5946b57011722ab2d7b
2021-06-23 12:05:17 +08:00
Zhihuan He
059b67e1f1 arm64: configs: rockchip_defconfig enable DMC_DEBUG
enable CONFIG_ARM_ROCKCHIP_DMC_DEBUG

Change-Id: Id5c5353a18144d4bd69afa1263d56eee55f07bd8
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 12:04:40 +08:00
Zhihuan He
d4f90f4fd9 ARM: configs: rockchip_defconfig enable DMC_DEBUG
enable CONFIG_ARM_ROCKCHIP_DMC_DEBUG

Change-Id: Ia6837312b36f51eb519d19c95de1174e4e3543ec
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 12:02:52 +08:00
Zhihuan He
fda7f718ae arm64: dts: rockchip: px30: add dmcdbg node
Change-Id: Ic75fea4de3bec07c2730678bcf63d38aac2530a7
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 12:01:10 +08:00
Zhihuan He
0eb6c247c3 PM / devfreq: rockchip_dmcdbg: add px30 support
Change-Id: I9da8f3229b8a9c44ea1c1237bb36aa4b8762e545
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:57:54 +08:00
Zhihuan He
ac365f86b9 PM / devfreq: rockchip_dmcdbg: add dramid info
Change-Id: Ibf4aca3e6c37cd3acc1348af578dde6df279ff62
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:42:50 +08:00
Zhihuan He
1115cdab28 PM / devfreq: rockchip_dmcdbg: updata rv1126 version to 0x102
Change-Id: I44f489dbe383feb58436acf61defa21e9e48dc0d
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:12:47 +08:00
Zhihuan He
1fe4802396 PM / devfreq: rockchip_dmcdbg: refactor rv1126_dmcdbg_init()
Change-Id: I47c2e3712aeacefa22ec4c589309ab13ce9ec7b1
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:12:38 +08:00
Herman Chen
41284f5dd3 video: rockchip: mpp: Fix mpp_free_task crash
Due to hardware timeout the session may be released before the remaining
task is alll finished. So mpp_free_task could run after mpp_dev_release.
Then the session used in mpp_free_task could be invalid and crash the
thread.

So we attach session to the mpp_taskqueue and let the work thread to
destroy and release session later.

NOTE: the session is created in mpp_dev_open and attached to
corresponding taskqueue on client init. So when we release the session in
mpp_dev_release if the session is not attached to certain taskqueue just
release it immediately.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9d4b2358154522e6bcde6e688592c0058781529a
2021-06-22 16:13:41 +08:00
shengfei Xu
0d79e76e79 arm64: dts: rockchip: enable the suspend default config for rk3568-linux
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I6fefa1d37cf7e1d7bade038f2b909a62417ec254
2021-06-22 14:14:48 +08:00
shengfei Xu
b4b17e1401 arm64: dts: rockchip: enable the suspend default config for rk3568-android
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I9581ce931162012ecf508c6d14990b98e8466361
2021-06-22 14:13:54 +08:00
Andy Yan
6ffe953d26 drm/rockchip: vop2: No register mirror win when only one vp used
when only one vp(crtc) is registered to drm, all the
plane->possible_crtc will be force set to this crtc.
this make current hwc think that all these planes can be
assigned to this crtc, but the mirror plane(rk3566 feature)
cant't be activated on the same crtc with source plane.

So if some boards only use one vp(crtc), don't register
mirror plane.

Change-Id: Ib25246cf44a0fc4caf98e7c6d21ebba18f1a6c88
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-21 18:38:34 +08:00
Sandy Huang
754bb09b98 drm/rockchip: vop2: close cluster sub win when main win is closed
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifad854f2e70fe3487731f6cd1d3c41f2a512087e
2021-06-21 18:38:24 +08:00
Andy Yan
05c93d1db1 drm/rockchip: vop: Set output mode to P888 before send mcu cmd
VOP will do a dither logic transform when output is not P888,
this will make send wrong cmd.

Change-Id: Id289d90f029be457269d039d68f43a7cf1867eb2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-21 17:21:01 +08:00
ZhiZhan Chen
96ec871718 arm64: dts: rockchip: use cluster for cursor on rk3568-evb1-ddr4-v10-linux.dts
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
Change-Id: Icf667a4598a93b672777587775673539018bf4bc
2021-06-18 17:28:51 +08:00
Caesar Wang
141645215d Revert "arm64: dts: rockchip: disable afbc by default on rk3568-linux.dtsi"
This reverts commit bcd00049f4

Fixed by commit bba5e44c03
("drm/rockchip: vop2: Move Primary window to head and Cluster to tail")

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Id7f0ce15fcbc7cf0edb9c74ee5ca7f6ee2f2d20a
2021-06-18 17:27:27 +08:00
Herman Chen
7b9018beed video: rockchip: mpp: Use kthread to process task
The kthread has less context switch overhead comparing to workqueue.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I509d8cd86c0966a2bfee8cb8459753368050b2b3
2021-06-18 14:57:00 +08:00
Andy Yan
bc3c93ff07 drm/rockchip: vop2: wait port_mux cfg done before configure new plane
We need two vsync cycle when move a window from
on vp to another: the port_mux take effect in
first vsync, than enable the window at second
vsync.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I87c1ac0803081ecb201d9218d40fdea89424fbd8
2021-06-18 14:15:27 +08:00
Andy Yan
bba5e44c03 drm/rockchip: vop2: Move Primary window to head and Cluster to tail
This make primary win register first to get the lower zpos.

Also hide the cluster win to the tail, give it a lower chance to
be found by some tradional display sorftware(etc X11).

Change-Id: I20e4885c6b18d7eec6ecc32fbf1ac5620fbb8a30
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
7c867f0214 drm/rockchip: vop2: Only register used vp to drm
A registered vp(crtc) need a primary plane, some
linux style display software(X11/weston) want more
overlay plane, so we don't register unused vp to
same some plane for overlay.

Change-Id: I66846af7364d1a20f38f35d65ed3fe34b7f280ab
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
89ee594a71 drm/rockchip: vop2: Support disable Cluster sub win
Change-Id: Ia2f764992ce51ca61f6ba269083fa643509f58e1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
fb5b2cfea8 drm/rockchip: vop2: Support set cursor win from dts
for example:

Use CLuster0 as cursor win for vp0.

&vp0 {
	cursor-win-id = <ROCKCHIP_VOP2_CLUSTER0>;
};

Change-Id: I10f7921928fbf7ff803c55a95cbce62df658fbed
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Zorro Liu
87a35c65f8 drm/rockchip: ebc_dev: release version v2.02
1.adjust panel power on/off sequence
2.remove EPD_OVERLAY_WHITE mode
3.use another way to draw white Lines

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I4787b0cd4a1f0f0f8cac310afa06d3d1db6dae9b
2021-06-18 14:11:52 +08:00
Wu Liangqing
ae4c563bea scripts: io-domain.sh: fix parse error caused by io_domain duplicate definitions
Change-Id: Ie8aaa817985643cc48ce8020a7eac38a35029c46
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-06-18 14:11:18 +08:00
Fenrir Lin
8a735d4ec1 media: i2c: os04c10: fix the gain error problem
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I20bbf598d4bcc9f3029112f6d729286d40bf338d
2021-06-18 10:51:52 +08:00
Sudeep Holla
febcd380ef UPSTREAM: firmware: arm_scmi: Move scmi protocols registration into the driver
In preparation to enable building SCMI as a single module, let us move
the SCMI protocol registration call into the driver. This enables us
to also add unregistration of the SCMI protocols.

The main reason for this is to keep it simple instead of maintaining
it as separate modules and dealing with all possible initcall races
and deferred probe handling. We can move it as separate modules if
needed in future.

Link: https://lore.kernel.org/r/20200907195046.56615-4-sudeep.holla@arm.com
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit 1eaf18e35a)

Conflicts:
	drivers/firmware/arm_scmi/driver.c
	drivers/firmware/arm_scmi/system.c

Fixes: 5730f8b50f ("UPSTREAM: firmware: arm_scmi: Move scmi protocols registration into the driver")
Change-Id: I0509be2a8614d3f98bad8d19e57d75e6371008a4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-17 19:17:38 +08:00
Sudeep Holla
950a4fde3c UPSTREAM: firmware: arm_scmi: Add names to scmi devices created
Now that scmi bus provides option to create named scmi device, let us
create the default devices with names. This will help to add names for
matching to respective drivers and eventually to add multiple devices
and drivers per protocol.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit 9c5c463f2a)

Conflicts:
	drivers/firmware/arm_scmi/driver.c

Add missing reset devname.

Fixes: b430ea6fd1 ("UPSTREAM: firmware: arm_scmi: Add names to scmi devices created")
Change-Id: I2ba7edb8b3e6483e2a8d6ce3a33dce41d432c7b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-17 19:11:34 +08:00
Sudeep Holla
9f10a3c532 UPSTREAM: reset: reset-scmi: Match scmi device by both name and protocol id
The scmi bus now has support to match the driver with devices not only
based on their protocol id but also based on their device name if one is
available. This was added to cater the need to support multiple devices
and drivers for the same protocol.

Let us add the name "reset" to scmi_device_id table in the driver so
that in matches only with device with the same name and protocol id
SCMI_PROTOCOL_RESET.

Change-Id: Iccebdc2ed032db23d5b4e86462ce33534a23924c
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 34ce3c5e69)
2021-06-17 19:02:15 +08:00
Sudeep Holla
70379c59db UPSTREAM: reset: reset-scmi: add missing handle initialisation
scmi_reset_data->handle needs to be initialised at probe, so that it
can be later used to access scmi reset protocol APIs using the same.

Since it was tested with a module that obtained handle elsewhere,
it was missed easily. Add the missing scmi_reset_data->handle
initialisation to fix the issue.

Change-Id: Id4a398dc0bede531e384301067a71327f1d78821
Fixes: c8ae9c2da1 ("reset: Add support for resets provided by SCMI")
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reported-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 61423712db)
2021-06-17 19:00:34 +08:00