Commit Graph

613274 Commits

Author SHA1 Message Date
Ziyuan Xu
e919ced3e4 arm64: rk1808_linux_defconfig: disable CONFIG_PHY_ROCKCHIP_EMMC
The rockchip-emmc-phy driver is used for rk3399, so disable it
for rk1808.

Change-Id: I1642ff07b8749a1487b5515f86dfb1161151409d
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-12 11:54:51 +08:00
Ziyuan Xu
4ef2449889 clk: rockchip: fix wrong mmc phase shift for rk3328
mmc sample shift is 0 for rk3328 refer to user manaul.
So it's broken if we enable mmc tuning for rk3328.

Change-Id: I863204b94be29842294597b1a1e10b3d7840e8d8
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-12 11:26:49 +08:00
Sandy Huang
ad4dadaa24 drm/rockchip: csi tx: enable irq for debug
Change-Id: I406abc16268a70ef4e69dbbf434deef103f32149
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-12 11:26:33 +08:00
Jianqun Xu
fb4f9d860b pinctrl: rockchip: fix rk1808_mux_route_data
Fix rk1808_mux_route_data, support:
i2c2m0_sda
i2c2m1_sda
uart1_rxm0
uart1_rxm1
uart2_rxm0
uart2_rxm1
uart2_rxm2

Tested on RK1808-evb.

Change-Id: Iea221a5cab8a63e336e183d30f3faaffb3a14873
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-10-12 11:06:38 +08:00
Tao Huang
5b5a08939a arm64: rk1808_linux_defconfig: disable unused ethernet driver
Change-Id: I7c0f1605c1082b940301ac7aca4e77b6dc00e553
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-12 10:20:31 +08:00
Liang Chen
1b18665d28 arm64: dts: rockchip: rk1808: Add pvtm node
Change-Id: Ifba22d49d08cea1897a963b4ab1bc43791e78032
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-12 09:46:22 +08:00
Liang Chen
212bbd910c dt-bindings: soc: rockchip: add pvtm for rk1808 SoCs
Change-Id: I89c153f98d027e6e0b5d9b1816c70f3ec2c66f6d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:31:28 +08:00
Liang Chen
cae46ca822 soc: rockchip: pvtm: Add support for RK1808 SoCs
This adds the necessary data for handling pvtm on the rk1808.

Change-Id: Ic283bd854f43a8b46722d28008856005bec3582b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:23:38 +08:00
Liang Chen
0c08c32cae dt-bindings: soc: rockchip: add coregrf compatible string for rk1808
Change-Id: I55687ca089a43e9b3d8f293717747866e33e77cc
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 21:22:04 +08:00
Sandy Huang
927d98bf4f drm/rockchip: rk1808 vop: update vop raw max input and output
rk1808 vop raw max input and output resolution is 5120x2880.

Change-Id: Idf6bca98b03c913878ae950e55722b5204958990
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-11 20:57:25 +08:00
Sandy Huang
670d74a8a5 drm/rockchip: csi tx: define mipi csi tx raw format
Change-Id: Ib3e1202d91a46db88616edfe70be4ba46eb5a721
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-10-11 20:57:05 +08:00
Liang Chen
bb19e4692c arm64: dts: rockchip: rk1808: Add watchdog node
Change-Id: I1986d09ab35c5c0b7cb5ec77a1a5b767325ca03b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-10-11 20:49:39 +08:00
Shixiang Zheng
0fb4dd2ca8 video/rockchip: rga2 && rga add debug nod and some auto check case and combine rga version
add rga debug node rga1: d/rga_debug/rga rga2: d/rga2_debug/rga2
auto check case :align check,scale check,memory check.
combine rga version from kernel 3.1 and 4.4 into one version by macro definition.

Change-Id: I97f7d9c670f81ae13768029126f7dbd6976c79f1
Signed-off-by: Shixiang Zheng <shixiang.zheng@rock-chips.com>
2018-10-11 20:40:00 +08:00
David Wu
93bdae5de9 arm64: configs: Enable ethernet for rk1808_linux_defconfig
Change-Id: Icf1ac7b0584598fd2885112837711a9057360d0b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:38:11 +08:00
David Wu
c9b578b5cc arm64: dts: rockchip: Add gmac support for rk1808-evb
Change-Id: Iba573b78dfe46d7278d6a425da56dd2d35114e32
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:37:47 +08:00
David Wu
865e382104 arm64: dts: rockchip: Change the gmac tx drive strength to 8ma for rk1808
Change-Id: I094517b037b8c814923e65613f7830ee7fd7b2bd
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-10-11 20:37:31 +08:00
Cai YiWei
a4bb4f5d2c media: rockchip: isp1: fix cplanes address calculation error
for multiple cplane:
cplane 0 addr: Y addr + Y size
cplane 1 addr: cplane 0 addr + cplane 0 size
and cplane size refer to xysubs

Change-Id: I50dbb0175f04452c62dd327f73ede1ca4a2d2ad7
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-10-11 18:42:42 +08:00
Ziyuan Xu
10dbf59d3f iio: light: vl6180: add something initialization from vendor
Change-Id: I77ca2c836c998be5158e222909834bda8bb24245
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:36:09 +08:00
Ziyuan Xu
b2950611bb arm64: configs: rk1808_linux: enable CONFIG_SND_SOC_RK817
Change-Id: I23c5619e8d9b1b4366eb11ffb262f7b73e50c7e8
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:27:25 +08:00
Ziyuan Xu
faa5c25228 arm64: configs: rk1808_linux: update form savedefconfig
Change-Id: Ie7ff945938fdad3a4ba1b565eb899afd224e36fa
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-10-11 18:27:25 +08:00
Wyon Bi
b9c21ec37c drm/rockchip: lvds: check PLL lock state before enable tx
Change-Id: I299d93f89ec52d3778bc2b18cb9105f9910dd5fc
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 16:18:38 +08:00
Tao Huang
f125bf6b07 soc: rockchip: remove default y for CPU_RK3308
Change-Id: I79330a302596e6c1a433a2b6db0e4d141975fa59
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:12:13 +08:00
Tao Huang
3bd8e047d3 soc: rockchip: remove default y for CPU_RV110X
Change-Id: Ib423c7c60502c566da1e5c36fb6712f508c8b9b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:07:25 +08:00
Tao Huang
b47bc74541 soc: rockchip: remove default y for CPU_RK1808
Change-Id: I637197b927a243e9403719ccdcad426e61f0db34
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 15:06:48 +08:00
Tao Huang
29f42eb299 ARM: rk3308_linux_aarch32_debug_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Change-Id: I0f2bd3404b2532ead9340ee6bf4ad66fc0309ba2
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:36:45 +08:00
Tao Huang
5e2493f821 ARM: rk3308_linux_aarch32_defconfig: enable CRYPTO_LZ4
Keep support lz4 compression for zram

Fixes: 30a850bbf1 ("UPSTREAM: zram: delete custom lzo/lz4")
Change-Id: I79170f53ab92d17586af9226e4472e20f6894ee5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:36:45 +08:00
Wyon Bi
b0c9700602 drm/bridge: analogix_dp: remove dead codes
Change-Id: I8ec07028d911d48756fd5ce59ca4fd6e544230b5
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 14:13:47 +08:00
Wyon Bi
289059c61b drm/bridge: analogix_dp: rework hpd gpio detection
Change-Id: I0d62201095ab82f5ed0ddcfd53abaef6089a2e9d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 14:13:07 +08:00
Tao Huang
828b971fb0 soc: rockchip: remove default y for CPU_RK3366
Change-Id: Idfca39cc6261c951b87a50366334e6cda2aafa63
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-10-11 14:08:53 +08:00
Wyon Bi
357b22cca8 drm/bridge: analogix_dp: Fix AUX CH not work properly when disabled the rockchip logo
Fixes: 44f714e435 (drm/analogix: dp: remove some function which cause loader logo flash)
Change-Id: Ia4d999ce4287e75fd23c4920e1b4e07e7004f4aa
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:59 +08:00
Wyon Bi
e82ecb98b4 drm/bridge: analogix_dp: Fix unbalanced phy_power_on
Change-Id: I25b6967f651e2eab9a10029f4b241b8ed8d50b59
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:45 +08:00
Wyon Bi
77ec03b5af drm/rockchip: edp: Fix unbalanced power status
Change-Id: I85f2c9b051a0933a13a709ad8eb27bc2c4a2b990
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:13:14 +08:00
Lin Huang
0ab00aeb46 UPSTREAM: drm/bridge: analogix_dp: Move enable video into config_video()
We need to enable video before analogix_dp_is_video_stream_on(), so
we can get the right video stream status.

We needed to increase the delay in the timeout loop because there is
random "Timeout of video streamclk ok" message happen when debug edp
panel, this time do not define in the spec.

Cc: 征增 王 <wzz@rock-chips.com>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-2-enric.balletbo@collabora.com

Change-Id: I46ed11886a0e82a7d61bdb968ff1ea357a662d0a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 93cba9dab1)
2018-10-11 12:11:58 +08:00
Sylwester Nawrocki
836ec984e2 UPSTREAM: drm/bridge: analogix: Remove unreachable code from analogic_dp_core.c
This patch removes an unreachable code found by the SVACE static
analysis:

UNREACHABLE_CODE: This statement in the source code might be unreachable
during program execution.
[unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787
retval != 0 is always false because at this program point the variable retval
is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171212112037.13107-1-s.nawrocki@samsung.com

Change-Id: Ia96459ce8bdd5062f7c51921837462c84586d0cf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit c4712f27be)
2018-10-11 12:11:58 +08:00
Wyon Bi
cdda59cd03 Revert "drm: bridge: analogix: Avoid timeout warnings in analogix_dp_config_video()"
This reverts commit dd25e35e08.

Change-Id: Id3f886bdfeddf26626087c67cafe263c01ce372d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-10-11 12:11:58 +08:00
Marek Szyprowski
2bbddaf948 BACKPORT: drm/bridge: analogix_dp: Postpone enabling runtime power management
Enabling runtime power management early in analogix_dp_bind() causes following
kernel NULL pointer dereference:

Unable to handle kernel NULL pointer dereference at virtual address 000007d8
pgd = 28ffa2e4
[000007d8] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 6 PID: 69 Comm: kworker/6:1 Not tainted 4.16.0-rc1-00062-ge25751974ba8 #3622
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
PC is at analogix_dp_resume+0x8/0xc0
LR is at pm_generic_runtime_resume+0x2c/0x38
pc : [<c0531b98>]    lr : [<c0543fec>] psr: a0000113
sp : ee13fbd8  ip : 0000001a  fp : 00000001
r10: ee0eb080  r9 : c0552bd8  r8 : c0fb1d98
r7 : eebb1010  r6 : eeae9808  r5 : 00000000  r4 : d4850415
r3 : ee0ed010  r2 : b2d05e00  r1 : 00000000  r0 : 00000000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment none
Control: 10c5387d  Table: 2000406a  DAC: 00000051
Process kworker/6:1 (pid: 69, stack limit = 0x913205b4)
Stack: (0xee13fbd8 to 0xee140000)
...
[<c0531b98>] (analogix_dp_resume) from [<c0543fec>] (pm_generic_runtime_resume+0x2c/0x38)
[<c0543fec>] (pm_generic_runtime_resume) from [<c054ffb4>] (__genpd_runtime_resume+0x2c/0x8c)
[<c054ffb4>] (__genpd_runtime_resume) from [<c0552d24>] (genpd_runtime_resume+0x14c/0x258)
[<c0552d24>] (genpd_runtime_resume) from [<c0547798>] (__rpm_callback+0x134/0x214)
[<c0547798>] (__rpm_callback) from [<c0547898>] (rpm_callback+0x20/0x80)
[<c0547898>] (rpm_callback) from [<c0546ff4>] (rpm_resume+0x3a0/0x734)
[<c0546ff4>] (rpm_resume) from [<c05475ec>] (__pm_runtime_resume+0x64/0x9c)
[<c05475ec>] (__pm_runtime_resume) from [<c053b95c>] (__device_attach+0x8c/0x134)
[<c053b95c>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c05390d0>] (device_add+0x3a8/0x580)
[<c05390d0>] (device_add) from [<c06764c4>] (i2c_register_adapter+0xd4/0x3ec)
[<c06764c4>] (i2c_register_adapter) from [<c05321c8>] (analogix_dp_bind+0x2a0/0x410)
[<c05321c8>] (analogix_dp_bind) from [<c0528e90>] (exynos_dp_bind+0x9c/0x12c)
[<c0528e90>] (exynos_dp_bind) from [<c0535bc4>] (component_bind_all+0xfc/0x258)
[<c0535bc4>] (component_bind_all) from [<c0522ee8>] (exynos_drm_bind+0x15c/0x28c)
[<c0522ee8>] (exynos_drm_bind) from [<c0536378>] (try_to_bring_up_master+0x1b8/0x29c)
[<c0536378>] (try_to_bring_up_master) from [<c05364fc>] (component_add+0xa0/0x170)
[<c05364fc>] (component_add) from [<c0528fe4>] (exynos_dp_probe+0x64/0xb8)
[<c0528fe4>] (exynos_dp_probe) from [<c053debc>] (platform_drv_probe+0x50/0xb0)
[<c053debc>] (platform_drv_probe) from [<c053bd18>] (driver_probe_device+0x2b8/0x4a0)
[<c053bd18>] (driver_probe_device) from [<c0539e4c>] (bus_for_each_drv+0x44/0x8c)
[<c0539e4c>] (bus_for_each_drv) from [<c053b970>] (__device_attach+0xa0/0x134)
[<c053b970>] (__device_attach) from [<c053ad08>] (bus_probe_device+0x88/0x90)
[<c053ad08>] (bus_probe_device) from [<c053b258>] (deferred_probe_work_func+0x3c/0x168)
[<c053b258>] (deferred_probe_work_func) from [<c014352c>] (process_one_work+0x1d0/0x7bc)
[<c014352c>] (process_one_work) from [<c0143b84>] (worker_thread+0x34/0x4dc)
[<c0143b84>] (worker_thread) from [<c014a30c>] (kthread+0x128/0x164)
[<c014a30c>] (kthread) from [<c01010b4>] (ret_from_fork+0x14/0x20)
Exception stack(0xee13ffb0 to 0xee13fff8)
ffa0:                                     00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e2800e37 eafee601 e92d4070 e1a05000 (e59067d8)
---[ end trace bf6046013df7cab2 ]---

This oops happens, because analogix_dp_bind() calls drm_dp_aux_register()
which registers i2c adapter. I2C core tries to runtime get i2c host
device during registration. This ends in analogix_dp_resume(), but dp
context is NULL there. dp context is set in exynos_dp_bind() after
executing analogix_dp_bind(). Fix this issue by postponing enabling runtime
power management after drm_dp_aux_register().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180305085741.18896-3-m.szyprowski@samsung.com

Change-Id: I728633e4f827614c95e0cf20b1cbf48e96ec4577
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit f25c835815)
2018-10-11 12:11:58 +08:00
Marek Szyprowski
c1212cdf9f BACKPORT: drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback
get_modes() callback might be called asynchronously from the DRM core and
it is not synchronized with bridge_enable(), which sets proper runtime PM
state of the main DP device. Fix this by calling pm_runtime_get_sync()
before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and
analogix_dp_transfer() to ensure that main DP device is runtime active
when doing any access to its registers.

This fixes the following kernel issue on Samsung Exynos5250 Snow board:
Unhandled fault: imprecise external abort (0x406) at 0x00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da420b #3357
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events output_poll_execute
task: edc14800 task.stack: edcb2000
PC is at analogix_dp_transfer+0x15c/0x2fc
LR is at analogix_dp_transfer+0x134/0x2fc
pc : [<c0468538>]    lr : [<c0468510>]    psr: 60000013
sp : edcb3be8  ip : 0000002a  fp : 00000001
r10: 00000000  r9 : edcb3cd8  r8 : edcb3c40
r7 : 00000000  r6 : edd3b380  r5 : edd3b010  r4 : 00000064
r3 : 00000000  r2 : f0ad3000  r1 : edcb3c40  r0 : edd3b010
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 4000406a  DAC: 00000051
Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210)
Stack: (0xedcb3be8 to 0xedcb4000)
[<c0468538>] (analogix_dp_transfer) from [<c0424ba4>] (drm_dp_i2c_do_msg+0x8c/0x2b4)
[<c0424ba4>] (drm_dp_i2c_do_msg) from [<c0424e64>] (drm_dp_i2c_xfer+0x98/0x214)
[<c0424e64>] (drm_dp_i2c_xfer) from [<c057b2d8>] (__i2c_transfer+0x140/0x29c)
[<c057b2d8>] (__i2c_transfer) from [<c057b4a4>] (i2c_transfer+0x70/0xe4)
[<c057b4a4>] (i2c_transfer) from [<c0441de4>] (drm_do_probe_ddc_edid+0xb4/0x114)
[<c0441de4>] (drm_do_probe_ddc_edid) from [<c0441e5c>] (drm_probe_ddc+0x18/0x28)
[<c0441e5c>] (drm_probe_ddc) from [<c0445728>] (drm_get_edid+0x124/0x2d4)
[<c0445728>] (drm_get_edid) from [<c0465ea0>] (analogix_dp_get_modes+0x90/0x114)
[<c0465ea0>] (analogix_dp_get_modes) from [<c0425e8c>] (drm_helper_probe_single_connector_modes+0x198/0x68c)
[<c0425e8c>] (drm_helper_probe_single_connector_modes) from [<c04325d4>] (drm_setup_crtcs+0x1b4/0xd18)
[<c04325d4>] (drm_setup_crtcs) from [<c04344a8>] (drm_fb_helper_hotplug_event+0x94/0xd0)
[<c04344a8>] (drm_fb_helper_hotplug_event) from [<c0425a50>] (drm_kms_helper_hotplug_event+0x24/0x28)
[<c0425a50>] (drm_kms_helper_hotplug_event) from [<c04263ec>] (output_poll_execute+0x6c/0x174)
[<c04263ec>] (output_poll_execute) from [<c0136f18>] (process_one_work+0x188/0x3fc)
[<c0136f18>] (process_one_work) from [<c01371f4>] (worker_thread+0x30/0x4b8)
[<c01371f4>] (worker_thread) from [<c013daf8>] (kthread+0x128/0x164)
[<c013daf8>] (kthread) from [<c0108510>] (ret_from_fork+0x14/0x24)
Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8)
---[ end trace cddc7919c79f7878 ]---

Reported-by: Misha Komarovskiy <zombah@gmail.com>
CC: stable@vger.kernel.org # v4.10+
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com

Change-Id: I9f2ba9175dd0b733ddd47f601d6bd4207e831eb9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 510353a637)
2018-10-11 12:11:58 +08:00
Jeffy Chen
cada5e5f49 UPSTREAM: drm: bridge: analogix: Destroy connector & encoder when unbinding
Normally we do this in drm_mode_config_cleanup. But:
1/ analogix dp's connector is allocated in bind, and freed after unbind.
So we need to destroy it in unbind to avoid further access.
2/ the drm bridge is attached in bind, and detached in encoder cleanup.
So we need to destroy encoder in unbind.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-5-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I0941dd1b02e0d55775f3d6d888c7591f1f478e4d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 37e0487788)
2018-10-11 12:11:58 +08:00
Jeffy Chen
49ae4e4a2d UPSTREAM: drm: bridge: analogix: Disable clock when unbinding
The clock is enabled when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-4-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I6b62b38646499d2e66f02e4547dec4b8acad04f4
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit ede2fdf677)
2018-10-11 12:11:58 +08:00
Jeffy Chen
0442dd8d15 UPSTREAM: drm: bridge: analogix: Unregister dp aux when unbinding
The dp aux is registered when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-3-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I0f70fb0e1e9ad3e430f93980cfcdebb1afda8070
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 7b017a5816)
2018-10-11 12:11:58 +08:00
Jeffy Chen
97a243d365 UPSTREAM: drm: bridge: analogix: Detach panel when unbinding analogix dp
The panel is attached when binding analogix dp.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491481885-13775-2-git-send-email-jeffy.chen@rock-chips.com

Change-Id: I51cae59226b9b93a496f4b705b5cb3a51e85cbc9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 18aea7db84)
2018-10-11 12:11:58 +08:00
Baoyou Xie
519570ad4e UPSTREAM: drm: bridge: analogix/dp: mark symbols static where possible
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1053:5: warning: no previous prototype for 'analogix_dp_get_modes' [-Wmissing-prototypes]
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1097:1: warning: no previous prototype for 'analogix_dp_detect' [-Wmissing-prototypes]

In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks both functions with 'static'.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474788764-6069-1-git-send-email-baoyou.xie@linaro.org

Change-Id: Idea810a90652d2f75416bcd0dd590444e1b269a8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 089cfdd9b0)
2018-10-11 12:11:58 +08:00
Sean Paul
c9f39a454c BACKPORT: drm/bridge: analogix_dp: Don't read EDID if panel present
If there's a panel connected to the analogix_dp bridge, rely on
the panel driver for modes, rather than reading EDID *and* calling
get_modes() on the panel.

This allows panels with a valid EDID to read it in the panel driver
(e.g. simple_panel), and panels with invalid EDID to homebrew modes
in their get_modes implementation.

Signed-off-by: Sean Paul <seanpaul@chromium.org>

Change-Id: Ic144db2fedfcc10bc5b740cd6aa4f8f4e8452427
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 8c77e2c2a4)
2018-10-11 12:11:58 +08:00
Tomeu Vizoso
4c06e137d2 BACKPORT: drm/bridge: analogix_dp: Remove duplicated code
Remove code for reading the EDID and DPCD fields and use the helpers
instead.

Besides the obvious code reduction, other helpers are being added to the
core that could be used in this driver and will be good to be able to
use them instead of duplicating them.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Yakir Yang <ykk@rock-chips.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Archit Taneja <architt@codeaurora.org>

Change-Id: I7d1bf2f13cc68e5c89f871bada33c5b10b87a859
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 0d97ad03f4)
2018-10-11 12:11:58 +08:00
Masahiro Yamada
fdc5efe649 UPSTREAM: drm/bridge: analogix_dp: squash lines for simple wrapper functions
Remove unneeded variables and assignments.

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[seanpaul added analogix prefix to subject]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473863952-7658-4-git-send-email-yamada.masahiro@socionext.com

Change-Id: Ia7c0e75f667ff4140719bf1b11738a0854a820da
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 03d6356d45)
2018-10-11 12:11:58 +08:00
Frank Wang
2c0460f796 ARM64: dts: rockchip: add hwlock node for rk1808
This patch adds Hardware spinlock node support for rk1808 SoC.

Change-Id: I53b3413bfca6a7310a192d029c9fe922fe48964a
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:01:42 +08:00
Frank Wang
5237212dd7 hwspinlock: rockchip: add hardware spinlock driver
The Hardware spinlock device on Rockchip platform provides hardware
assistance for synchronization between the multiple processors in the
system.

Change-Id: Ib118dfe38c2ceb665556d5ec3aaf7be13552d2d9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:01:02 +08:00
Frank Wang
2b57f38056 dt-bindings: hwlock: add the rockchip hwspinlock bindings document
Add binding documentation for the Rockchip Hardware spinlock.

Change-Id: Iec1bf55196f910323a2158ecd04f31223135242d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2018-10-11 12:00:54 +08:00
shengfei Xu
b60783fdae arm64: dts: rockchip: rk1808-evb: the sw1 interconvert with sw2
Change-Id: I18f5b8274716d0250fd22b4fac0de82c185b0dfb
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-10-11 10:37:52 +08:00
Elaine Zhang
5b3e79f430 arm64: dts: rockchip: modify gpll freq to 1188M for rk1808
set gpll 1188M is better for cif 27M\37.125M\74.25M

Change-Id: I05003333980da535b9f20f021c38a2dbcedf74f6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-10-11 09:49:17 +08:00