Commit Graph

603871 Commits

Author SHA1 Message Date
Alex Zhao
20e331abc4 ARM: rockchip_defconfig: Enable CONFIG_WIFI_BUILD_MODULE
Change-Id: I5bbd67e283072bbd1882b994346334e14f86090d
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-10-31 11:17:16 +08:00
Alex Zhao
b4098fb117 ARM64: rockchip_defconfig: Enable CONFIG_WIFI_BUILD_MODULE
Change-Id: I3491227c05b63d6e6cb1be3286c7e74decbfb060
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-10-31 10:48:43 +08:00
Alex Zhao
d0eaf0d99e net: wireless: rockchip_wlan: add CONFIG_WIFI_BUILD_MODULE
support compile wifi driver as ko module

Change-Id: Idfb9951f2851dee51e8cc88ad938301f280119dd
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-10-31 10:48:25 +08:00
Alex Zhao
53d1a87a0b ARM: dts: rockchip: rk3126-bnd-d708: add wifi support
Change-Id: I4eb164908020ce913444816d7f666fe7060d84db
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-10-31 10:44:07 +08:00
Langlang Wang
7746365205 input: sensor: add gsensor bma2xx and p/lsenspr stk3410 support
Change-Id: Id863d67574cfe9aa463090b3377e8945a5146f7a
Signed-off-by: Langlang Wang <langlang.wang@rock-chips.com>
2017-10-31 10:37:07 +08:00
Peng Zhou
016f7ec166 Rockchip: vip: support cif controller
Transplant from kernel v3.10.

Change-Id: I8b1f8d664ebcaad435132f260250204255793b66
Signed-off-by: Peng Zhou <benjo.zhou@rock-chips.com>
2017-10-31 09:49:17 +08:00
Joseph Chen
392fd544e8 regulator: rk808: fix rk816 regulators register failed
fix commit: 45a046e.
regulator framework requires continuous regulator id.

Change-Id: I2e2b789c3ab9126e793d9e304ef2a44d8f46eacd
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-31 09:39:45 +08:00
Joseph Chen
80e52d1b8a ARM: rockchip_defconfig: enable rk816 battery
Change-Id: I59bd7037c2650f5a66d5168bf52422646aa829d6
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-31 09:39:37 +08:00
Joseph Chen
c6151403e7 power: add rk816 battery support
porting from kernel 3.10, it includes fuel gauge and charger.

Change-Id: Ib1dbc6a2c869a44459570f5368900e9dbfe93ed0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-31 09:39:03 +08:00
Zheng Yang
81ba0ec901 drm: bridge: dw-hdmi: add switch state in dw_hdmi_connector_force
Application need to listen HDMI connector state when connector is
forced on/off, so we add switch_set_stat in dw_hdmi_connector_force.

Change-Id: I2b76a0a647eb6a4cfde7584e085f53540d0fa27f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-30 20:57:34 +08:00
Huibin Hong
4391b28ca8 serial: 8250_dw: set uart clk according to buadrate
Change-Id: I27f92816b202bbe4fa9d97f7656721661afbaa6e
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-10-30 15:52:41 +08:00
Liang Chen
e67276b8f7 ARM: dts: rk3126-evb: correct pull state of rk816 interrupt pin
Change-Id: Ice5e4608fa2e228a58655f484e8c58c7cd431e16
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-10-30 15:51:54 +08:00
Zheng Yang
a1af913eb2 drm/edid: fix color format when parsing hdmi deep color info
According to HDMI spec 1.4, YCbCr422 is also 36-bit mode, so
we remove the override of color format when parsing hdmi deep
color info. And record hdmi YCbCr444 deep color info in
edid_hdmi_dc_modes.

The edid_hdmi_dc_modes should be clean up when parsing EDID.

Change-Id: Ic5bd3ff5e50b37f04ed4a0688be68bd8259e5af0
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-30 11:08:57 +08:00
Jyri Sarha
5cb9cc3e1b UPSTREAM: drm: Make drm_atomic_replace_property_blob_from_id() more generic
Change drm_atomic_replace_property_blob_from_id()'s first parameter
from drm_crtc to drm_device, so that the function can be used for other
drm_mode_objects too.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/851b8504c7f294a10645ba6f6d391ac9764068b7.1492768073.git.jsarha@ti.com
(cherry picked from commit dafee60d48)

Change-Id: I479323a163deaeb6e6ecac2f04fecb39d48444b1
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-30 11:08:41 +08:00
Randy Li
4280fa5581 ARM: dts: rockchip: bind the internal ethernet at rk3036
It allows me to set the mac address in the bootloader.

Change-Id: Iad988205c6953e843e62aec67daad52128086324
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-10-30 10:47:31 +08:00
Randy Li
b759d24c86 ARM: dts: rockchip: enable the video decoder at rk3036 kylin
The kylin is ready for the media time.

Change-Id: I94e46912c82b4ad8b8b184b34dd2820078e0c697
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-10-30 10:46:44 +08:00
Randy Li
d03d742c29 ARM: dts: rockchip: add hevc & vpu service for rk3036
There is a combo of a HEVC decoder and a VPU1 decoder at rk3036.

Change-Id: Ia7174cc9e2f2d640a74271077bd62cc68f3482b4
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-10-30 10:46:37 +08:00
Wu Liangqing
be95647823 driver: input: touch: rockchip_gslX680 remove log printk
Change-Id: Ied793a64b2ea1830df51a96a7b4a3ce7401a69f5
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-10-30 10:44:20 +08:00
Wu Liangqing
33d10ca2e8 ARM: dts: rockchip: rk3126c: add battery in bnd-d708
Change-Id: I01854a7d233f5bf4b783392641093503cbda9217
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2017-10-30 10:26:26 +08:00
Langlang Wang
ad2af6f833 arm64: dts: rockchip: rk3368-xikp: change the layout of gsensor
Change-Id: I8855196b4a3bec0f2470f12b754d2285fd71f0a9
Signed-off-by: Langlang Wang <langlang.wang@rock-chips.com>
2017-10-30 10:09:27 +08:00
Mark Yao
3651973a75 drm/rockchip: vop: support yuv420 mode on rk3288w
Change-Id: I1b0b41df5c521b1113407ab6a87353eb1ec23a84
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-30 09:18:07 +08:00
Mark Yao
0f391989ce drm/rockchip: vop: correct rk3288 vop version
From rk3288 vop version register, rk3288 vop version is 3.0

Change-Id: Ib7e40ec93792290a8ea6e350bb7fdcfeeb697ec6
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-30 09:15:57 +08:00
Mark Yao
c852061b5a drm/rockchip: hdmi: support yuv420 mode on rk3288w
Change-Id: Ie7c68dad11a98a1142388deadb7d3034443f9658
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-30 09:15:56 +08:00
Zheng Yang
9156d7504c drm: bridge: dw-hdmi: fix ycbcr_420_allowed condition of RK3288
The version of RK3288 HDMI is 0x200a, it doesn't support ycbcr420 mode.

Change-Id: I65ee16ae79f42fd13514db8e5819db6d07db9d3d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-10-30 09:15:55 +08:00
Randy Li
eb3761e409 staging: ion: implement the vmap() and vunmap()
Comparing to the latest the ion driver, the vmap() or
vunmap() are not supported yet, but at least it would
be more easy to implement the sync function.

I didn't remove those legacy iommu code this time, I just
add this patch to make the functions I want work.

Change-Id: Id7731fd44b729338c0a0059a1517bfe1333391e8
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-10-27 11:05:04 +08:00
Langlang Wang
a769f78068 input: sensor: mc3230: ensure the layout can be apply by the driver
Change-Id: I9481b4b15103a57571d448efb65e7bc539f85349
Signed-off-by: Langlang Wang <langlang.wang@rock-chips.com>
2017-10-27 10:57:00 +08:00
Langlang Wang
c47a241f69 ARM: dts: rockchip: rk3368-bnd: change backlightscale and add gsensor
Change-Id: I768b9649c212ba0214136626b950e2da37682d78
Signed-off-by: Langlang Wang <langlang.wang@rock-chips.com>
2017-10-27 10:56:29 +08:00
Simon Xue
6edf2bce3e dt-bindings: iommu: add disable iommu reset and skip iommu read for rockchip iommu
Change-Id: I3f31f5745078717dfecba649ae6aca573eb7f30b
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2017-10-27 09:18:18 +08:00
Simon Xue
9589e35ca4 ARM: dts: rk3128: add skip mmu read for vop mmu
Change-Id: Ibdae8ec005fd87eb2a9db36e53d260996797e3a6
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2017-10-27 09:17:59 +08:00
Simon Xue
539e70084b iommu/rockchip: skip read vop iommu registers on rk3128 and rk3126
RK3128 and RK3126 failed to read vop iommu register, it is SoC bug.
Add this patch as a workaround for this bug, make SoC work as normal

Change-Id: I44d4ef7f6e15f85a466563b0b3e8e091db23fba0
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2017-10-27 09:17:51 +08:00
hgc
e41c016401 arm64: rockchip_linux_defconfig: enable initramfs
Change-Id: Ibb6db8a415a498896ee22d2d143529dc8c559a4a
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2017-10-26 10:10:28 +08:00
shengfei Xu
dce2f990d7 regulator: rk808: fix the regulator control value in system suspend for rk816
set 1 if the regulator is enabled in system suspend, 0 if not.

Change-Id: I8d51ac685bbd2417f440842d010fe47946c9f567
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-10-26 10:07:42 +08:00
Tao Huang
26f7f90fa4 ARM: rockchip_defconfig: disable DEVKMEM
42019da52a ("android: base-cfg: turn off /dev/mem and /dev/kmem")

Change-Id: I2d34d76b6ed85fbd590be2e0c445c19f253bc2c4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-10-25 15:51:43 +08:00
Tao Huang
3770f6c8a5 arm64: rockchip_defconfig: disable DEVKMEM and DEVPORT
42019da52a ("android: base-cfg: turn off /dev/mem and /dev/kmem")
870f86b79c85 ("Unsetting DEVPORT from marlin configurations.")

Change-Id: I03610d55f3af2e9398b02e36d1d6c05a2eda9657
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-10-25 15:42:12 +08:00
Joseph Chen
7c45c0ad21 ARM: dts: rk3126-evb: add rk816 battery node
Change-Id: I334d5ae872a4b72f04e65fad94abf73bc0cb061c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:39:11 +08:00
Joseph Chen
45a046e864 regulator: rk808: delete rk816 boost and otg switch regulator
Due to hardware issue, boost and otg switch must be conctrolled
with special timing carefully by rk816 battery driver. Otherwise
boost maybe burn off.

Change-Id: Id28208c5b9757e1ff0e57ec5d26f1ac0afb88ad5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:38:42 +08:00
Joseph Chen
029f5a92bc mfd: rk808: add rk816-battery child cell of rk816s
Change-Id: I6a6a1c05be947f9084f80e7357b32b1708b27c57
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:38:27 +08:00
Joseph Chen
248c73b6b3 mfd: rk808: add rk816 battery regmap irq chip
Due to different irq_reg_stride of register, add individual
irq chip for battery.

Change-Id: Ic37b136ebc543d4f7bd22d5748b59df73526ccbe
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:38:02 +08:00
Joseph Chen
ac440f018e mfd: rk808.h: add fuel gauge register definition
Change-Id: I9ef7ed807f21959fd1c9f5696378785dd920d1b0
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:37:32 +08:00
Joseph Chen
73c05faa7f power: rk818-battery: fix TS1 adc issue
Due to hardware design, "Vdelta = (R_sample + R_other) * I_avg"
will be included into TS1 adc value. We must subtract it to get
correct adc value.

Change-Id: I71eb0b53d1a9ef14efb2c4a798f4cf8c8b49e950
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-10-25 14:37:17 +08:00
Rocky Hao
a9e988c63a thermal: rockchip: rk3288: fix temperature-jump issue
Due to 32k clock jitter, tsadc will wrongly report a very
high temperature, that is a temperature-jump. This may lead
to an abnormal OS reboot. A filter function is added to
predict the true temperature.

Change-Id: I5b5641efe8e64b4058a604f274350b1e94584fa6
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-10-25 14:35:31 +08:00
Tao Huang
646e27e0f5 rk: Makefile: rm kernel.img and resource.img when make clean
Change-Id: I79d53d683cdff51c2077d77e049bc533c79b76f1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-10-24 19:55:29 +08:00
Tao Huang
30b9a5e323 rk: .gitignore: ignore kernel.img and resource.img
Change-Id: Icfd5518a10fef49c76164f4943f6451877c32f99
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-10-24 19:39:16 +08:00
Sandy Huang
0fc389f0d1 drm/panel: simple: fix regulator reference count be set to 2
when power invert and power on:
	->loader_protect[on]->disable regulator(ref count is 0)
	  -> panel_simple_prepare[on]->disable regulator(ref count is 0)
	    ->loader_protect[off]->enable regulator(ref count is 1)
	      ->suspend->enable regulator(ref count is 2)
	        ->resume->disable regulator faild(ref count is 1)

Fixes: 7a91ba36d80 ("drm/panel: panel: add power-invert for some special hardwre")
Change-Id: I43f1cef2410316faec24238cd3f8d2bc1fe38335
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-10-24 16:36:25 +08:00
Mark Yao
7af58fc74e drm/rockchip: make multi-display independent on synchronous commit
Previous atomic commit force wait for old commit finish, it
would make performance bad, if we have two outputs committing
at the same time, the two commit will block each other, make
things bad.

with this patch, difference output commits can be independent,
they can commit at the same time.

TEST: before this patch: HDMI + MIPI: 40-55fps
      after this patch: HDMI + MIPI: 60fps

Change-Id: Ie6c80f908080a40986d0193af5aff52f1bead455
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:12:29 +08:00
Mark Yao
8f4d032130 drm/atomic-helper: fixup atomit commit backport
Change-Id: I7a8dc2552a1738eb3837e7bfffb82872627340c9
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:12:16 +08:00
Daniel Vetter
6d2f104013 UPSTREAM: drm/atomic-helper: roll out commit synchronization
To facilitate easier reviewing this is split out from the overall
nonblocking commit rework. It just rolls out the helper functions
and uses them in the main drm_atomic_helper_commit() function
to make it clear where in the flow they're used.

The next patch will actually split drm_atomic_helper_commit() into
2 pieces, with the tail being run asynchronously from a worker.

v2: Improve kerneldocs (Maarten).

v3: Don't convert ERESTARTSYS to EINTR (Maarten). Also don't fail if
the wait succeed in stall_check - we need to convert that case (it
returns the remaining jiffies) to 0 for success.

v4: Switch to long for wait_for_completion_timeout return value
everywhere (Maarten).

v5: Fix miscaped function in kerneldoc (Maarten).

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465398936-22305-1-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit a095caa7f5)

Change-Id: I116ef7f1196534159dd75d75e9bfa712ca869249
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:12:06 +08:00
Daniel Vetter
3428c0783f UPSTREAM: drm/atomic-helper: use for_each_*_in_state more
This avois leaking drm_atomic_state internals into the helpers. The
only place where this still happens after this patch is drm_atomic_helper_swap_state().
It's unavoidable there, and maybe a good indicator we should actually
move that function into drm_atomic.c.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1464818821-5736-2-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit be9174a482)

Change-Id: I524c17d896ac9a816429599403ecf3384d537fb5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:55 +08:00
Daniel Vetter
8b97ee27fd UPSTREAM: drm/atomic: Add struct drm_crtc_commit to track async updates
Split out from my big nonblocking atomic commit helper code as prep
work. While add it, also add some neat asciiart to document how it's
supposed to be used.

v2: Resurrect misplaced hunk in the kerneldoc.

v3: Wording improvements from Liviu.

Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com>
Cc: Daniel Stone <daniels@collabora.com>
Tested-by: Liviu Dudau <Liviu.Dudau@arm.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-8-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit 3b24f7d675)

Change-Id: I3c8ffa0d3defc915bac9127944ebb962b04806ad
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:44 +08:00
Daniel Vetter
8862c8b101 UPSTREAM: drm: Create drm_send_event helpers
Use them in the core vblank code and exynos/vmwgfx drivers.

Note that the difference between wake_up_all and _interruptible in
vmwgfx doesn't matter since the only waiter is the core code in
drm_fops.c. And that is interruptible.

v2: Adjust existing kerneldoc too.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Acked-by: Daniel Stone <daniels@collabora.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Inki Dae <inki.dae@samsung.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1452548477-15905-6-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[danvet: Squash in compile fixup, spotted by 0-day.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry picked from commit fb740cf249)

Change-Id: I249350864b0b236b6289d2badbbdf32bd4607f36
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-10-24 15:11:28 +08:00