Commit Graph

602171 Commits

Author SHA1 Message Date
Zheng Yang
96471cefb8 drm/rockchip: hdmi: Limit rk3229/rk3328 max output resolution
Limit RK3229/RK3328 max output resolution to 4K 50/60 YCbCr420 mode.

Change-Id: Icb934f6f057503ccb619f4ca6167b0958def336a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:21:57 +08:00
Zheng Yang
e7a7270135 arm64: dts: rockchip: rk3328-evb: enable hdmiphy
Change-Id: I173ec8ec759a1404f31718c8647cf6eb6315061f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:21:34 +08:00
Zheng Yang
07de9f1996 arm64: dts: rockchip: rk3328: hdmi enable inno-hdmi-phy driver
Change-Id: I3d4c6dfcaffeb6679666fcedf58e645d26205efa
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:21:18 +08:00
Zheng Yang
70b06ed6f5 drm: bridge: dw-hdmi: delete phy ops read/write
RK3328/RK3228 phy registers are mapped by inno-hdmi-phy driver,
there is no need to register hdmi phy debugfs on RK3328/RK3228.

Change-Id: I1e259b75ee7af6f29dffd5526d67776d5c6853ae
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:20:06 +08:00
Zheng Yang
4e7d536820 drm/rockchip: hdmi: use inno-hdmi-phy driver to operate rk3328 hdmi phy
Change-Id: Ic090fec14f076ba634d35cb85c59c160c47d0058
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:12:56 +08:00
Zheng Yang
95843d5e61 phy: rockchip-inno-hdmi-phy: support rk3328 hdmi phy
RK3328 hdmi phy is an upgraded version of 3228 hdmi phy, with
a completely different register layout. It improves physical
and antistatic capabilities.

It's max output bandwidth is same as rk3228 hdmi phy, optimized
up to 3.72Gbps per TMDS link.

Change-Id: I03c718c49e44cfeaa113e3ed07eec7055b4380cc
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:05:15 +08:00
Zheng Yang
0782841cc7 arm64: rockchip_linux_defconfig: enable CONFIG_PHY_ROCKCHIP_INNO_HDMI_PHY
Change-Id: Ie775672f43e6c2491d750c82f604c454a367e136
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-07-12 19:05:06 +08:00
Mark Yao
01e93d4065 drm/rockchip: vop: support get register by name
When get vop base register byname failed, retry first entry.

Change-Id: I60f4ebd901d353966c94734dd796dc702ae06f3f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-12 16:04:28 +08:00
Mark Yao
db449c6bf5 dt-bindings: rockchip: vop: introduce registers names
Change-Id: I0df821f2582b26e26cfe3059db19a90b206df5c5
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-07-12 16:04:23 +08:00
Huibin Hong
5d2c557f03 arm64: dts: rockchip: rk3399-android: enable fiq mode
Change-Id: Ib40f065ba6ac2f597a27db87a46a0d2f7c0714ed
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-07-12 15:04:29 +08:00
Steven Chen
5955832084 ARM: dts: rk3288-android: enable dmc auto frequency adjustment
Enable dmc auto frequency adjustment and
set dmc minimum frequency to 400MHz for better performance

Change-Id: I0d2a192f438c23d879158f55dc948205f67f8663
Signed-off-by: Steven Chen <cw@rock-chips.com>
2017-07-12 14:40:35 +08:00
Huibin Hong
d1adb29d59 spi: rockchip: test: update driver
Change-Id: I773cdc245fcdf8eee10dd7983343f206aecb856c
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-07-12 14:39:27 +08:00
Huibin Hong
0e366d11fe spi: rockchip: rockchip_spi_prepare_dma return 1 if it is ok
If rockchip_spi_prepare_dma return 0, spi_transfer_one_message
won't wait for the dma complete event. Which may cause unknown
error.

Change-Id: Idf51a737bbd9fa9b9d1ae749636fe524de1cbfa9
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2017-07-12 14:38:09 +08:00
Zhaoyifeng
5d40559119 soc: rockchip: vendor storage support realloc
To rewrite the same id with the data size large than first alloc size,
it`s will write fail. This commit will support realloc new memory
for rewrite.

Change-Id: Icd53afd072328dc45f1faae033471c5069664f05
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2017-07-12 14:28:43 +08:00
Zorro Liu
d76a04838f arm64: dts: rockchip: use dwmmc for rk3366
Change-Id: I3ecadd51e34545af61a1bfcc54ee0d6f045c40fa
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-07-12 11:30:12 +08:00
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