Commit Graph

602385 Commits

Author SHA1 Message Date
WeiYong Bi
bae7eaad9f ARM64: dts: rockchip: rename mipi to dsi for rk3366
Change-Id: I677f4554bdc0d6df9cfdffa86eebe0fa4e1759dd
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-07-20 14:36:28 +08:00
WeiYong Bi
e289a149fb drm/rockchip: lvds: add loader protect
Change-Id: Ia0866cb9125a98ffb4ce99be26be9e0ccd665765
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-07-20 14:34:43 +08:00
Jacob Chen
1908837527 ARM: dts: sync tinker board dts
Sync our kernel with asus to reduce rebase work.

origin:
https://github.com/TinkerBoard/debian_kernel/blob/linux4.4-rk3288/arch/arm/boot/dts/rk3288-miniarm.dts
with dmc and camera nodes deleted

Change-Id: I7e699ca57465c03f41acb4ae47e5e70794118489
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-07-20 14:10:54 +08:00
Huang Jiachai
a9aba6a5ec arm64: dts: rockchip: rk3288: add dts file for lvds panel
Change-Id: I5991d0301935b5bdf51aead7719f84b6aa9264c5
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2017-07-20 14:03:49 +08:00
Zheng Yang
6d20589677 phy: rockchip-inno-hdmi-phy: update 3328 phy pixclock in the recalc_rate
If default phy pre-pll output pixclock is same to the requested rate,
the set_rate function is not called, inno->pixclock is zero and
make phy work not ok. This patch update inno->pixclock both in the
recalc_rate and set_rate, make pixclock be the real value.

Change-Id: Ifd4e145c499c2e82f96918ca62235627bf326734
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-20 10:41:02 +08:00
Mark Yao
cb4f52e156 drm/panel: support drm_find_panel_by_connector
Change-Id: Iee970e013ff8b1558a060f334c700dea36c38d0f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:49:25 +08:00
Mark Yao
64bc07d5dc drm/rockchip: vop: add rk3399 cabc registers
Change-Id: Ia7929e4c62ac031453fdb50ed4dcb20d11faee95
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:34:00 +08:00
Mark Yao
ea5e704026 drm/rockchip: add cabc support
CABC(Content Adaptive Backlight Control) is used to
increase the contrast of such LCD-screens the backlight
can be (globally) dimmed when the image to be displayed
is dark (i.e. not comprising high intensity image data)
while the image data is numerically corrected and adapted
to the reduced backlight intensity.

Change-Id: I0bd84375264675943f1b601f0cac8b843567087d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:34:00 +08:00
Finley Xiao
b7bf509807 arm64: dts: rockchip: rk3399: add 528MHz and 600MHz for dmc
Only 200MHz, 300MHz, 400MHz, 528MHz, 600MHz, 666MHz, 732MHz and
800MHz are available at present.

Change-Id: I3a376b389fe6b06b3b32f0c695de2cbde05dfeea
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-07-19 14:33:59 +08:00
Huang Jiachai
b4bf2fa8d7 drm/rockchip: lvds: set correct step to power off lvds
Change-Id: I6ce0fea548a0bc66c231ac184b45b74fd9acaf1f
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2017-07-19 14:33:59 +08:00
WeiYong Bi
56640e72df arm64: dts: rockchip: rk3368: fix compatible string for lvds node
Replace "rockchip,rk33xx-lvds" with "rockchip,rk3368-lvds"

Change-Id: I065de5d994f167129591025e4251944478fa43e7
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-07-19 14:33:58 +08:00
WeiYong Bi
d86682da2c drm/rockchip: lvds: Add support for rk3366
Change-Id: Iaf54c4667042b0b24a9083cb7ca931c1b0603804
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-07-19 14:33:58 +08:00
WeiYong Bi
7604d9498f arm64: rockchip_defconfig: remove CONFIG_RK31XX_LVDS
Change-Id: Ie7716e38dd68876ab037cc3ed6072dba4118a798
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-07-19 14:33:57 +08:00
Zhangbin Tong
4408897c1f arm64: dts: rockchip: rk3368-r88: Select xin32k from pwm1 out
Change-Id: Iff675d47600cd7bf1d30564ca82697ce3b1fd9f4
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-07-19 14:33:57 +08:00
Zhangbin Tong
9c36f71bb9 arm64: rockchip_defconfig: enable CONFIG_COMMON_CLK_PWM
Change-Id: Ie8c076e6d4c1a0a81c90f7dcd5653bef424b27e2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-07-19 14:33:56 +08:00
Stephen Boyd
10fa811640 UPSTREAM: clk: pwm: Use pwm_get_args() where appropriate
The PWM framework has clarified the concept of reference PWM config (the
platform dependent config retrieved from the DT or the PWM lookup table)
and real PWM state.

Use pwm_get_args() when the PWM user wants to retrieve this reference
config and not the current state.

This is part of the rework allowing the PWM framework to support
hardware readout and expose real PWM state even when the PWM has just
been requested (before the user calls pwm_config/enable/disable()).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
(cherry picked from commit dd0b38b7ca)

Change-Id: I54c4b3853359b5fa41f8f949b504f82c6f069034
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-07-19 14:33:56 +08:00
Huang Jiachai
6724059ae5 drm/rockchip: lvds: if port is null return -EINVAL
Change-Id: I9503b4f2d317a12d91ce136213d8d2e629b72823
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2017-07-19 14:33:56 +08:00
xubilv
2d1c413b96 ARM: dts: rk3288: rename mipi to dsi
Change-Id: I35d348068df3720608fc9cd22f97be0264a03f67
Signed-off-by: xubilv <xbl@rock-chips.com>
2017-07-19 14:33:55 +08:00
William Wu
5098971074 usb: dwc_otg_310: fix bad unlock balance issue
There is a bad unlock balance issue in the following case:
1. Use micro USB 2.0 interface;
2. Vbus 5v is always powered on;
3. Wait until DWC2 completes initialization, and then plug
   in OTG to Host cable;
4. Plug out the OTG cable, and then we will reproduce this
   issue, and we'll get the following log if we enable the
   kernel lock debugging.

=====================================
[ BUG: bad unlock balance detected! ]
4.4.71 #303 Not tainted
-------------------------------------
swapper/0/0 is trying to release lock (&(sl)->rlock) at:
[<c0795848>] dwc_otg_pcd_suspend_cb+0x20/0x48
but there are no more locks to release!

other info that might help us debug this:
1 lock held by swapper/0/0:

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.71 #303
Hardware name: Rockchip (Device Tree)
[<c0110018>] (unwind_backtrace) from [<c010c04c>] (show_stack+0x10/0x14)
[<c010c04c>] (show_stack) from [<c0423e28>] (dump_stack+0x9c/0xd4)
[<c0423e28>] (dump_stack) from [<c021803c>] (print_unlock_imbalance_bug.part.7+0x8c/0xb8)
[<c021803c>] (print_unlock_imbalance_bug.part.7) from [<c018ce74>] (lock_release+0x284/0x54c)
[<c018ce74>] (lock_release) from [<c0c0e03c>] (_raw_spin_unlock+0x18/0x54)
[<c0c0e03c>] (_raw_spin_unlock) from [<c0795848>] (dwc_otg_pcd_suspend_cb+0x20/0x48)
[<c0795848>] (dwc_otg_pcd_suspend_cb) from [<c0792cc4>] (dwc_otg_handle_usb_suspend_intr+0x68/0x37c)
[<c0792cc4>] (dwc_otg_handle_usb_suspend_intr) from [<c079329c>] (dwc_otg_handle_common_intr+0x2c4/0xd58)
[<c079329c>] (dwc_otg_handle_common_intr) from [<c0786a18>] (dwc_otg_common_irq+0xc/0x18)
[<c0786a18>] (dwc_otg_common_irq) from [<c0199e48>] (handle_irq_event_percpu+0x188/0x4d4)
[<c0199e48>] (handle_irq_event_percpu) from [<c019a1cc>] (handle_irq_event+0x38/0x5c)
[<c019a1cc>] (handle_irq_event) from [<c019d654>] (handle_fasteoi_irq+0xa8/0x124)
[<c019d654>] (handle_fasteoi_irq) from [<c0199454>] (generic_handle_irq+0x18/0x28)
[<c0199454>] (generic_handle_irq) from [<c0199754>] (__handle_domain_irq+0x88/0xb0)
[<c0199754>] (__handle_domain_irq) from [<c01014b4>] (gic_handle_irq+0x4c/0x94)
[<c01014b4>] (gic_handle_irq) from [<c010cbb8>] (__irq_svc+0x58/0x98)

It's because that when plug in OTG to host cable, the
core_if->lock will be initialized to hcd->lock (check_id()->
id_status_change()->cil_hcd_start()->dwc_otg_hcd_reinit()),
so we should release core_if->lock before call cil_pcd_suspend()
rather than release the pcd->lock inside of callback function.

Change-Id: I1e32f37c701d1a8d741947b6bf385c1bbcb6da78
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-07-19 14:33:55 +08:00
Zorro Liu
11c83641df arm64: dts: rockchip: add vpu for rk3366 android7.1
Change-Id: I798a6518a2a74fe07ae2bb82abaca2da501ae07b
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-07-19 14:33:54 +08:00
Jonas Karlman
ecac203383 FROMLIST: drm: skip wait on vblank for set plane
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
(am from https://github.com/LongChair/LibreELEC.tv/commit/debdec6)

Change-Id: I20d3d03638388fbb1e84215cba187f2e89089a62
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:33:54 +08:00
Tomasz Figa
2c47c0d0c9 UPSTREAM: drm/rockchip: Replace custom wait_for_vblanks with helper
Currently the driver uses a custom function to wait for flip to complete
after an atomic commit. It was needed before because of two problems:
 - there is no hardware vblank counter, so the original helper would
   have a race condition with the vblank interrupt,
 - the driver didn't support unreferencing cursor framebuffers
   asynchronously to the commit, which was what the helper expected.
Since both problems have been solved by previous patches, we can now
make the driver use the generic helper and remove custom waiting code.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 81c248f75a)

Change-Id: Ida5a38b71f9e7812f415eb8889d906d2fe3b093e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:33:53 +08:00
Tomasz Figa
f097cd8e93 UPSTREAM: drm/rockchip: Unreference framebuffers from flip work
Currently the driver waits for vblank and then unreferences old
framebuffers from atomic commit code path. This is however breaking the
legacy cursor API, which requires the updates to be fully asynchronous.
Instead of just adding a special case for cursor, we can have actually
smaller amount of code to unreference any changed framebuffer from a
flip work.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 47a7eb4597)

Change-Id: Id36cdef1ea3962ac8c9a99549732d1810c57c4f9
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:33:53 +08:00
Tomasz Figa
ffa4516b09 UPSTREAM: drm/rockchip: Avoid race with vblank count increment
Since VOP does not have a hardware vblank count register, the ongoing
commit might be racing with a requested vblank interrupt, which would
increment the software vblank counter before the changes being committed
actually happen.

To avoid this, we can extend .atomic_flush(), so after it sets cfg_done
bit, it polls the vblank interrupt bit until it's inactive to make sure
that any old vblank interrupt gets to the handler and then uses
synchronize_irq(vop->irq) to make sure the handler finishes running.

The polling case should happen very rarely, but even if, the total wait
time should be relatively low and in practice almost equal to the vop
hardirq handler running time.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 7caecdbec1)

Change-Id: Ic5f6231300214485ea569a2296c990aa123f6ff7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:33:52 +08:00
Jacob Chen
773d46618b ARM: dts: rockchip: add node for ov8858 on rk3288 evb
Disabled by default to avoid error messages.

Change-Id: I4fc05c0a782d6b1035b9e4bc7b31cc462d65166a
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-07-19 14:33:52 +08:00
Jacob Chen
abbe13bf46 ARM: dts: rockchip: use iommu for rk3288 v4l2 isp
we have videobuf2 cip isp support now

Change-Id: I7f6da305f2a4a658a4097e06361c694ca6ba9a18
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-07-19 14:33:52 +08:00
shengfei Xu
ce4e02a88b mfd: rk808: add rk816 support
include sub modules: regulator, rtc, gpio, pwrkey

Change-Id: I59cc4b943403f1e0b1210a314cfcbf61fc193bdf
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-07-19 14:33:51 +08:00
Jacob Chen
9d1525c6d7 ARM: config: enable MIPI CSI config for rockchip linux
Change-Id: I32d3b569ffeb44132b2e28efdb0f2759f9f8498c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-07-19 14:33:51 +08:00
Huang Jiachai
c79f49f2b8 arm64: dts: rockchip: fix lcd pinctrl define error for rk3368
Change-Id: I843049573cda97cc226730e34f043bd54021951e
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2017-07-19 14:33:50 +08:00
Finley Xiao
c19fd46394 arm64: dts: rockchip: rk3366: add leakage nvmem-cells for cpu
Change-Id: I5e546ecbf5e1d8cc0a36d8ebd439663e1658f23b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-07-19 14:33:50 +08:00
David Wu
1d8af7a261 arm64: dts: rockchip: Remove the rk3366-tb build
Change-Id: I8260d583da480f49834647ad114f3d1346ef1bbd
Signed-off-by: David Wu <david.wu@rock-chips.com>
2017-07-19 14:33:49 +08:00
Mark Yao
20a7783dc7 drm/atomic: export drm_atomic_replace_property_blob_from_id
Change-Id: Iebca91e396f6770b0b2ce588093119ea321f3fb5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-19 14:33:49 +08:00
lanshh
ff9ce5a7ba hid: rkvr: fix application of sizeof to pointer
Change-Id: I698445dd006551090578fc04226d5c792094ad05
Signed-off-by: lanshh <lsh@rock-chips.com>
2017-07-14 11:41:10 +08:00
David Wu
9f21286cea arm64: dts: rockchip: Add rk3366-sheep and rk3366-android dts file for Android7.1
Change-Id: Ib0f2dd27cb5154bed68e71780cfff4a1730399a3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2017-07-14 11:13:54 +08:00
David Wu
1f8e2ba8d4 arm64: dts: rockchip: Add drm dispaly nodes and move nod-drm display nodes to rk3366-android-6.0.dtsi
Change-Id: I98cafab3739f322e1b3826e597b7191ddd0e49c3
Signed-off-by: David Wu <david.wu@rock-chips.com>
2017-07-14 10:31:41 +08:00
Zhangbin Tong
6ed6da842c arm64: dts: rockchip: rk3368-r88: Fix power and platform suspend support
Change-Id: I9b3d8178a3bf245cad91dec3c1284f395378ff68
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2017-07-14 10:28:10 +08:00
Huang, Tao
bdc986dd0b regulator: remove unused rockchip-pwm-regulator driver
Change-Id: I20594d198f49f6232b409031884ca27f95470592
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-07-14 10:16:41 +08:00
Huang, Tao
d53614fe83 PM / devfreq: rockchip_dmc: fix coccinelle warnings
drivers/devfreq/rockchip_dmc.c:665:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:676:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:686:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:697:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:707:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:766:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:776:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:1397:2-3: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:1022:3-4: Unneeded semicolon
drivers/devfreq/rockchip_dmc.c:662:5-11: inconsistent IS_ERR and PTR_ERR on line 664.
drivers/devfreq/rockchip_dmc.c:683:5-11: inconsistent IS_ERR and PTR_ERR on line 685.
drivers/devfreq/rockchip_dmc.c:704:5-11: inconsistent IS_ERR and PTR_ERR on line 706.
drivers/devfreq/rockchip_dmc.c:773:5-11: inconsistent IS_ERR and PTR_ERR on line 775.

Change-Id: I95f2f66649ead3d0c0f59ae713d9272863eb9f63
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-07-14 09:38:44 +08:00
Mark Yao
85cc5b07aa drm/rockchip: gem: add begin/end cpu access
Change-Id: Ie2c54addcf037cf501edcad76470e5e46c667b7e
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-13 18:40:17 +08:00
Mark Yao
c6036ecd26 drm/prime: add dmabuf begin/end cpu access
Change-Id: I0b4be7f8d78142024a2067db041e4f1c2670086c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-13 18:40:13 +08:00
Finley Xiao
631fd486de ARM: dts: rk3288-android: add 1800MHz for cpu
Change-Id: I9206739d879b7648ae4e19df9f5a67ad9844c5d6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-07-13 15:30:22 +08:00
Finley Xiao
6600132da6 clk: rockchip: Add adaptive frequency scaling for pll_rk3399
Change-Id: Id7be0fd4045f273052d69f49df1272922fb8f8dc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-07-13 14:21:30 +08:00
algea.cao
8e8c0e3f49 Revert "ARM64: dts: rk3328-evb: enable tve"
This reverts commit c69d61610a.
There is conflict between cvbs and hdmi.Hdmi is used more than cvbs,
so disable cvbs by default.

Change-Id: I1c0966e0166715da0d4c11426686b28386d16a0c
Signed-off-by: algea.cao <algea.cao@rock-chips.com>
2017-07-13 11:41:24 +08:00
Feng Mingli
1246a265e1 usb: dwc_otg_310: hcd: fix isoc urb actual length
USB isochronous urb consists of some isoc frames, urb use iso_frame_desc
structure record actual_length, then device drivers always use this and
don't care urb actual_length. But in usb devio driver, processcompl()
function will process urb complete and copy data to user depend on urb
actual_length.

In dwc controller driver, update_isoc_urb_state() function will only
update isoc frames actual_length, urb actual_length will be 0. When use
usb devio driver, there is no data copy to user, so need update urb
actual_length at the same time.

TEST=use libusb to transport isochronous data

Change-Id: I1dc8e8d8c6609924626761525b98f41a739aeb65
Signed-off-by: Feng Mingli <fml@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-07-13 11:40:26 +08:00
zhangyunlong
6ce1035676 camera: rockchip: camsys_drv: 0.0x22.0x2
modify the condition of DRM iommu, which makes code  more readable
by using of_parse_phandle to check whether the "iommus" phandle exists
in the isp device node.

Change-Id: I41d2c1c1e237364f19d79abb15aaca4a81616287
Signed-off-by: zhangyunlong <dalon.zhang@rock-chips.com>
2017-07-13 11:40:01 +08:00
Jacob Chen
67e6174224 arm64: rockchip_linux_defconfig: enable CIF_ISP10
Change-Id: I2e677e3b80b6ba065543ab0123e8154cf7d794a3
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:34:24 +08:00
Jacob Chen
c8a58c7fa9 arm64: dts: rk3399-sapphire-excavator-linux: add camera nodes
Change-Id: I7f2e356f33439723a9ebec6fd341e213ebb2c871
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:34:02 +08:00
Jacob Chen
6544f168ac arm64: dts: rk3399-linux: add cif isp nodes
Change-Id: Iaadc9bcfdf7b2a236a0740170cc7bcfa0e7d9398
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:33:47 +08:00
Jacob Chen
f08082651f media: isp: migrate isp driver to videobuf2
Verify the functionality of isp driver with
sensor ov7750.
V4l2n or gstreamer is suitable for test.

Change-Id: I4f0cf68b84f4909dd1c132ec3506777f39d487ee
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:33:10 +08:00
Jacob Chen
4ec2b40809 media: soc_camera: add ov7750 sensor driver
Change-Id: Ibe6e393b5e1ce518181d285b5c08e191a0b2dca4
Signed-off-by: Jacob Chen <cc@rock-chips.com>
2017-07-13 11:32:49 +08:00