Commit Graph

602156 Commits

Author SHA1 Message Date
Mark Yao
bccd5ee2bd drm/rockchip: vop: fliter interlace mode
rk3288 and rk3368 are not support interlace mode

Change-Id: I5b6c155095285a5ae6e574efba122b56ddb1a112
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-11 10:50:17 +08:00
William Wu
f7169a90bc power: rk818-charger: fix usb charger undetected
On some platforms (e.g. rk3399), we use extcon notify
framework to receive USB charger notifier from USB PHY
driver. Generally, the USB PHY driver uses a work to check
vbus status and the USB charger type every 2 seconds,
this polling mechanism may cause USB charger undetected
if we plug in/out USB charger quickly.

A typical error case is:
1. Plug in an USB DCP Adapter.
   - USB PHY driver sends notifier to rk818-charger
2. Plug out the USB Adapter, and plug in again immediately
   - rk818 detects plug out irq, and turns off charging
   - USB PHY driver schedule work doesn't detect the plug
     out/in operations, and doesn't send usb charger notifier

Fortunately, rk818 can detect plug in irq, so let's check
the USB charger type in rk818 plug in irq handler.

Change-Id: Iee45769c8a98c709da2dbfa514198ab0f648fd20
Signed-off-by: William Wu <william.wu@rock-chips.com>
2017-07-07 19:17:12 +08:00
Lionel Landwerlin
9aeb1194e3 UPSTREAM: drm: introduce pipe color correction properties
Patch based on a previous series by Shashank Sharma.

This introduces optional properties to enable color correction at the
pipe level. It relies on 3 transformations applied to every pixels
displayed. First a lookup into a degamma table, then a multiplication
of the rgb components by a 3x3 matrix and finally another lookup into
a gamma table.

The following properties can be added to a pipe :
  - DEGAMMA_LUT : blob containing degamma LUT
  - DEGAMMA_LUT_SIZE : number of elements in DEGAMMA_LUT
  - CTM : transformation matrix applied after the degamma LUT
  - GAMMA_LUT : blob containing gamma LUT
  - GAMMA_LUT_SIZE : number of elements in GAMMA_LUT

DEGAMMA_LUT_SIZE and GAMMA_LUT_SIZE are read only properties, set by
the driver to tell userspace applications what sizes should be the
lookup tables in DEGAMMA_LUT and GAMMA_LUT.

A helper is also provided so legacy gamma correction is redirected
through these new properties.

v2: Register LUT size properties as range

v3: Fix round in drm_color_lut_get_value() helper
    More docs on how degamma/gamma properties are used

v4: Update contributors

v5: Rename CTM_MATRIX property to CTM (Doh!)
    Add legacy gamma_set atomic helper
    Describe CTM/LUT acronyms in the kernel doc

v6: Fix missing blob unref in drm_atomic_helper_crtc_reset

Signed-off-by: Kumar, Kiran S <kiran.s.kumar@intel.com>
Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Acked-by: Rob Bradford <robert.bradford@intel.com>
[danvet: CrOS maintainers are also happy with the userspacde side:
https://codereview.chromium.org/1182063002/ ]
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1456506302-640-4-git-send-email-lionel.g.landwerlin@intel.com
(cherry picked from commit 5488dc16fd)

Change-Id: I8952fa72998b669cf6d8a7e120a72ffb225b1ba1
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-07 19:09:13 +08:00
Markus Elfring
5dd1f2569f UPSTREAM: GPU-DRM: Delete unnecessary checks before drm_property_unreference_blob()
The drm_property_unreference_blob() function tests whether its argument
is NULL and then returns immediately.
Thus the tests around the calls are not needed.

This issue was detected by using the Coccinelle software.

Link: http://patchwork.freedesktop.org/patch/msgid/563C8B3E.405@users.sourceforge.net
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 5f91190505)

Change-Id: I599721227294c7cde5fd4f2ef6d5a97212b61b77
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-07 19:09:07 +08:00
Huang, Tao
78ea6c7b21 ARM: dts: rockchip: fix rk3288-android fiq-debugger irq
153 is arm pmu irq.

Change-Id: I18c00eb0cb10646b1b73535837ac26af196a3b51
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-07-07 19:03:21 +08:00
Steven Chen
6eef1e1666 ARM: dts: rk3288-evb: enable hs200 mode
Change-Id: I2a805198e2441a33f721a2b7167c99a180f1fc21
Signed-off-by: Steven Chen <cw@rock-chips.com>
2017-07-07 16:32:57 +08:00
Huibin Hong
da9b140b66 rk_fiq_debugger: reset and init uart, if uart is abnormal
Change-Id: Idaa5d3d9ecd03325f3412a5b9e9b95eae20b0a22
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-07-06 21:28:11 +08:00
Andy Yan
2fc8002516 arm64: dts: rockchip: fix the memory size of PX5 Evaluation board
Commit 122682b2abb6 ("arm64: dts: rockchip: Add PX5 Evaluation board")
sets the memory size to 2 GB, but this board only has 1 GB DRAM, so change
it to the correct value here.

Fixes: 122682b2abb6 ("arm64: dts: rockchip: Add PX5 Evaluation board")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

(cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
 commit 2f513bd9ea)

Change-Id: If6a64fa0eab3d76b90f122e63d30c1d7940b0a57
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-06 11:05:55 +08:00
Shawn Lin
d37beb1454 arm64: dts: rockchip: add sdmmc support for px5-evb
px5-evb has one sdmmc slot, so we could support sdmmc.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

(cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
 commit 41a603b933)

Change-Id: I3f4edbeefb39516d814d54b6583e2ada5505ab75
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-06 11:05:55 +08:00
Shawn Lin
fc7cdfe977 arm64: dts: rockchip: Add more properties for emmc on px5-evb
The emmc on px5-evb can support hs200, so let's add mmc-hs200-1_8v.
And in order to speed up the boot time, we could add no-sdio and
no-sd to simplify the initialization.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

(cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
 commit 674c81cf2c)

Change-Id: I2e72c7b2d6bc5da939068264ed90b2980ffdfabb
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-06 11:05:54 +08:00
Andy Yan
c17ee7bcfa arm64: dts: rockchip: Add PX5 Evaluation board
PX5 EVB is designed by Rockchip for automotive field
with integrated CVBS (TP2825) / MIPI DSI / CSI / LVDS
HDMI video input/output interface, audio codec ES8396,
WIFI/BT (on RTL8723BS), Gsensor BMA250E and light&proximity
sensor STK3410.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Conflicts:
	Documentation/devicetree/bindings/arm/rockchip.txt
	arch/arm64/boot/dts/rockchip/Makefile

(cherry-picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
 commit 76c923bb64)

Change-Id: I41212701d9bec3ce0864b995070439d4640bce28
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-06 11:05:44 +08:00
shengfeiXu
d75db61d03 power_supply: Add support TI BQ25703 charger chip
Change-Id: I3689a9f108e6fb86db4800d47a3aa7da7f7010e7
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-07-06 09:32:57 +08:00
Tang Yun ping
b49f7beb28 PM / devfreq: get lcdc type from vop drivers for rk3368
Change-Id: I9205286f7b4c0d7ecba3bb08a45af3f49225abe5
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-07-06 09:29:01 +08:00
Huang, Tao
5de762aaa3 arm64: rockchip_defconfig: enable CROSS_MEMORY_ATTACH
For pass Android bionic sys_uio_test.

Change-Id: I45a951d195c630a3765769ca030791b099594340
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-07-05 16:17:43 +08:00
Huang, Tao
65ecac8dd1 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I44fc7dbdd6b87089668a7231d06424ea773742bd
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-07-05 14:50:33 +08:00
Rocky Hao
c01b156f02 ARM: dts: rockchip: rk322x: update thermal config and add cpu's parameters
add cpu's dynamic power coefficient and add gpu as a cooling device in the
thermal zone. rename the thermal zone's config and make it more readable.

Change-Id: Iac935a6dde5e079667b6712224b32e786ccebc1e
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-07-05 14:08:58 +08:00
Rocky Hao
e5f88fadef arm64: dts: rockchip: add gpu in thermal control for rk3328
add gpu as a cooling device in thermal control

Change-Id: Ia9db5df7b2d5d9ed19672f64f8924877016732c2
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-07-05 14:06:28 +08:00
chenzhen
7a4ab2ac58 arm64: dts: rockchip: change "power-mode" to "power_model" in gpu node for rk3328
The reference code from ARM uses "power_model".
It's convenient to use the same name
for rebasing Mali DDK update from ARM and avoiding confusion.

Change-Id: I9095500a5d0eb7f9edfeed3a07a1c2bdca51aaf1
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-07-05 14:05:55 +08:00
chenzhen
aeac2cb5b5 ARM: dts: rk322x: change "power-mode" to "power_model" in gpu node
The reference code from ARM uses "power_model".
It's convenient to use the same name
for rebasing Mali DDK update from ARM and avoiding confusion.

Change-Id: I1bb87bf3d80a7dcdeedf3320751d03c4e9339ad5
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-07-05 12:48:04 +08:00
huweiguo
fe71ecfcb7 arm64: dts: rockchip: rk3368-r88: solve gmac open fail probability
Change-Id: I64d358bfa4d64f53a207d5358615c3819a1566a5
Signed-off-by: huweiguo <hwg@rock-chips.com>
2017-07-05 11:27:31 +08:00
Jianqun Xu
3467c559d8 ARM: dts: rockchip: rk3288 re-name dts files
Intent to keep same dts with upstream version, this patch does:
1. restore rk3288-evb-act8846.dts, keep without android configurations.
2. add char of "-android-" to android dts files.

Change-Id: Ic063f1187160f88e9ec8a779749ff7b17cfac9e8
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-04 08:19:47 +08:00
Wenping Zhang
870dcb5c74 ARM: dts: rk322x: move the gpio_keys node from dtsi to product dts.
The keys configuration is constantly changed on different products,
so move it to product's dts.

Change-Id: Ifec408a0529a224b8716797a88b97eddeab10fa7
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-07-03 20:21:43 +08:00
Zorro Liu
15b83a7c45 arm64: dts: rockchip: rk3368-p9: add RKPM_CLUSTER_L_WKUP_EN for gpio wakeup
Change-Id: I19b6ff4a0770a7d7c1427c40c33c59953c5357b7
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-07-03 20:20:47 +08:00
huweiguo
68e3954fbc arm64: dts: rockchip: rk3368-r88: sdio work up
Change-Id: I7026275e46cce6a4460bd5464d63f583984b9d5e
Signed-off-by: huweiguo <hwg@rock-chips.com>
2017-07-03 20:18:31 +08:00
Jianqun Xu
83533c96c0 ARM: configs: rockchip_defconfig select CROSS_MEMORY_ATTACH
Change-Id: I0428b81385647872ff54e2d800e2b0b143138070
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-07-03 14:06:39 +08:00
Yankun Zheng
9e258a7e03 ARM: dts: rk3229-gva-sdk: enable cw2015 fuel gauge
Change-Id: Ibe6b3fd249a82239790e5d5a17c70a37f995ff9f
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-07-03 12:16:24 +08:00
Mark Yao
66892593ef drm/rockchip: vop: support drm legacy set property
Change-Id: I96ff8c49429ed8b71c8542c981f63c488f7d8baa
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-03 12:15:17 +08:00
Wenping Zhang
50ac003e45 ARM: dts: rk3229-gva-sdk: delete vcc_host node in gva dts.
Gva products don't use usb host mode, so delete vcc_host regulator
node and other related configuration.

Change-Id: I9d8db775ab33ab7b51c2a4d867d77e1fe8912d9a
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
2017-07-03 12:00:08 +08:00
xubilv
549be132f0 arm: dts: rk3288: use vopb by default, disabled mipi_in_vopl
Change-Id: I7db89cdd2acb9196b0a2bfb64fda06eb140f6f40
Signed-off-by: xubilv <xbl@rock-chips.com>
2017-06-29 18:04:03 +08:00
chenzhen
40b400f156 MALI: utgard: read parameters of power model from device tree
Change-Id: I6e71100b77b98d2994c0b284b992942e696b023a
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-06-29 16:08:51 +08:00
Sugar Zhang
c5e5df7b59 arm: dts: rk3288-android: rename card name
Change-Id: I62a9de19b115f96f0b55b1dad696816e623868d4
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-06-29 16:04:01 +08:00
Sugar Zhang
9a961be14d ASoC: hdmi_analog: add snd_card's name parsing from DT node support
Change-Id: Ie0fcd8ccbac5686b53261cf37a82921e05875dee
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-06-29 16:02:55 +08:00
Tang Yun ping
a901869bbd arm: dts: rockchip: enable dfi and dmc nodes for rk3288 rk818 edp board
Change-Id: I13d7de4810cc5d101db751f32afeaa3815a4727b
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-06-29 16:02:25 +08:00
chenzhen
4052bfdd13 arm: dts: rockchip: rk3328: add gpu_power_model in gpu node
Indeed, the values of the model parameters are supplied by Rocky Hao.

Change-Id: I23edaa0ee104d07f79f5bf5bdbd393b4fb3c5120
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-06-29 15:30:09 +08:00
chenzhen
6e3ee4de85 arm: dts: rockchip: rk322x: add gpu_power_model in gpu node
Indeed, the values of the model parameters are supplied by Rocky Hao.

Change-Id: Ie6ff535eab3a1fabcd69289a0c1f32c76603a391
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2017-06-29 15:26:58 +08:00
Zheng Yang
572c465358 drm: rockchip: hdmi: check sink max_tmds_clock in mode_valid
If sink max TMDS clock < 340MHz, we think the mode pixel clock
greater than 340MHz should support YCbCr420, or it is a bad mode.

Change-Id: I9f53fa4f9875977ae0355b65d9ccd8a304558c5d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-29 14:20:49 +08:00
Huang zhibao
e68ba0f6dd arm64: dts: rk3368-r88: enabled usb host
Change-Id: I02dbdeebb15221076a2e1c415e5e6e8bccb484b2
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
2017-06-29 14:16:14 +08:00
xubilv
9e30cc3b63 arm: dts: rk3288: remove cpll from cru
Change-Id: Iad4df450078a805abbeca5c271a75f40f2fefa6c
Signed-off-by: xubilv <xbl@rock-chips.com>
2017-06-29 11:47:07 +08:00
xubilv
1ba8e8e114 arm: dts: rk3288: support mipi dsi uboot display for rk818 evb
Change-Id: Id1b225de0905df9fe7837614b11b523f4b202c74
Signed-off-by: xubilv <xbl@rock-chips.com>
2017-06-29 11:45:16 +08:00
xubilv
8d3966e35f clk: rockchip: 3288: dclk will change if cpll initialized
Change-Id: I698437b21c94684af0a7dfbe643794de62edc962
Signed-off-by: xubilv <xbl@rock-chips.com>
2017-06-29 11:45:06 +08:00
Tang Yun ping
db73f668ab arm: dts: rk3288: add dfi and dmc device nodes
Add dfi and dmc nodes in the device tree for the ARM rk3288 SoC.
To support ddr frequency scaling function, we need enable dmc and
dfi nodes.

Change-Id: Ib796c08c694e74e0da3319d2797e95aecf3e7e73
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-06-29 09:49:17 +08:00
Tang Yun ping
5c906a2193 PM / devfreq: assign set_auto_self_refresh for rk3288
This makes ddr possible to enter auto self-refresh mode
when early suspend.

Change-Id: I0cd214bcb9c8e82aeea3f335a77be21feb356e2d
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-06-28 16:14:12 +08:00
Zheng Yang
0637d2d637 drm/edid: Clear the old hdmi info before parsing display info
The current EDID might not support advanced HDMI 2.0 features.
Leaving old hdmi info in the drm_display_info will make display
work not okay, when switching display from HDMI 2.0 device to
HDMI 1.4 device.

Change-Id: Ifaf11a115580a93ec00160d54f0d453842d7b484
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-06-28 15:06:55 +08:00
Sugar Zhang
ec32dc61d2 arm: dts: rk3288-android: enable built-in hdmi and rt5640 sound
This patch use one cpudai->multicodecs card for built-in hdmi and
external codec which share the same i2s controller.

Change-Id: Ib56d7f10b6739b1c26ec8946470b9f0cd7215979
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-06-28 10:45:52 +08:00
Sugar Zhang
e66d174f6e arm: configs: rockchip: enable SND_ROCKCHIP_HDMI_ANALOG
This patch enable SND_ROCKCHIP_HDMI_ANALOG for built-in hdmi sound
and external codec which share the same i2s controller.

Change-Id: I3ac29ba12f75c938e015d2b77a3b749888c2e4c2
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-06-28 10:45:52 +08:00
Jianqun Xu
240b24588c ARM: dts: rk3288: fix to timer0 for broadcast timer
Change-Id: I0dd9a367c2587391b17ab9bb3a4610abdee14816
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-06-28 10:09:20 +08:00
xuhuicong
7f4985d21c arm64: dts: rk3368-r88: add hdmi sound card
Change-Id: I2a81102c7e110a2fe36ec8ba3622ebb63cc91066
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2017-06-27 18:25:57 +08:00
buluess.li
5150079e68 arm: dts: rk3288: add iep node and enable it
Change-Id: Ie7fe0bbc91a5fedb0617d9b6c6056bdb4aed610d
Signed-off-by: buluess.li <buluess.li@rock-chips.com>
2017-06-27 18:25:09 +08:00
buluess.li
cb76f82440 input: touchscreen: gsl3673: to solve the boot and resume slowly
when boot and resume,the fw should load/reload,this will take up
much time in the main thread,so here add a thread to load/reload
fw in order to void this situation.

Change-Id: Ic1a67fd662b0406ede08b0aeb944525fabc519e6
Signed-off-by: buluess.li <buluess.li@rock-chips.com>
2017-06-27 18:23:34 +08:00
Rocky Hao
a5acf91cc0 arm: dts: rockchip: rk3288: update tsadc's working frequence
tsadc in rk3288 can not work well at 10k hz clock. at most time, tsadc
in rk3288 can work well, but it will wrongly report a very high
temperature (eg. 110 degree) occasionally.  we set 5k hz can
resolve this issue.

Change-Id: I06a4a1631baa5f65786a524e2430bb2386f52bdf
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2017-06-27 17:54:05 +08:00