Commit Graph

593672 Commits

Author SHA1 Message Date
ZhengShunQian
f2be573199 ARM64: CrOS: defconfig: update defconfig for chromeos
The CONFIG_ANDROID_PARANOID_NETWORK will block network access on ChromeOS.
Disable it on CrOS.

CONFIG_DRM_DMA_SYNC can be used to synchronize CPU/GPU access to a buffer.

Change-Id: Ia979af42b8693161c854e1987122d49c8737b51c
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-04-08 11:41:36 +08:00
Dominik Behr
47587d3a97 CHROMIUM: drm/rockchip: add GEM CPU acquire/release ioctls
These ioctls can be used to synchronize CPU/GPU access to a buffer.

BUG=chrome-os-partner:33438
TEST=add CONFIG_DRM_DMA_SYNC=y, in conjunction with xf86-video-armsoc change,\
run any X application, like xev

Change-Id: I8065ec465ebd0cb6abe128a3e7d92a8f74a88928
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/229441
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Conflicts:
	drivers/gpu/drm/rockchip/rockchip_drm_drv.c
	drivers/gpu/drm/rockchip/rockchip_drm_drv.h
	drivers/gpu/drm/rockchip/rockchip_drm_gem.c
(cherry picked from cros/chromeos-3.14 commit a847e1f492cbd186116c01a3f56575320dc87152)
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-04-08 11:40:51 +08:00
Mark Yao
ae0099057b CHROMIUM: drm/rockchip: Add GEM create ioctl support
Rockchip Socs have GPU, we need allocate GPU accelerated buffers.
So add special ioctls GEM_CREATE/GEM_MAP_OFFSET to support
accelerated buffers.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>

BUG=chromium:399935
TEST=With rest of patch set, can boot to UI on eDP

Change-Id: Ia4b13798aac97d16214da7a75a2479e6e334313e
Reviewed-on: https://chromium-review.googlesource.com/222153
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Conflicts:
	drivers/gpu/drm/rockchip/rockchip_drm_drv.c
(cherry picked from cros/chromeos-3.14 commit c29c5a3037e18815937d8af664738e499ada94d1)
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-04-08 11:40:14 +08:00
Dominik Behr
e734712472 CHROMIUM: drm: add helpers for fence and reservation based dma-buf sync
BUG=chromium:395901
TEST=emerge-veyron chromeos-kernel-3_14, deploy and boot kernel

Change-Id: I0cdf6d23e9f4924128d4de77c0f3ed7589766bb8
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/218381
Conflicts:
	drivers/gpu/drm/Makefile
(cherry picked from cros/chromeos-3.14 commit 0adee464da8094c70469514dd96799c1797f77b0)
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-04-08 11:39:49 +08:00
Yakir Yang
e86a6220ca drm: rockchip: analogix_dp: split the lcdc select setting into device data
eDP controller need to declare which vop provide the video source,
and it's defined in GRF registers.

But the specific GRF register address is different between RK3288
and RK3399, so we need to create a device data to declare the GRF
messages for each CPU chips.

Change-Id: I695d1c729f5605d9e913c82453d311ed97c79a94
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-08 11:10:41 +08:00
Xing Zheng
df7f5fe7d4 clk: rockchip: rk3399: move VOP clock to other PLLs
We hope to be able to HDMI/DP can obtain better signal quality,
therefore, we move VOP pwm and aclk clocks to other PLLs, let
HDMI/DP phyclock can monopolize VPLL.

Change-Id: Ib715f9d29c0743d113f9f74886ff3921c9e0a327
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-08 09:26:18 +08:00
Caesar Wang
3f2d0cb56f ARM64: config: enable the REGULATOR_PWM for rockchip
That's useful for every PWM controlled to adjust the voltage
regulators.

In the moment. We make savedefconfig to cleanup the rockchuip_cros_defconfig.

Change-Id: I33d68d6cd48310b2da0ea2c3331380e71fc51eee
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-07 21:49:52 +08:00
Douglas Anderson
66fd42ba64 ARM64: dts: gru: fix up the pwm regulator node
This attempts to model commit 063e65397a ("ARM64: dts: rk3399-tb: fix
up the pwm regulator node").

Note that instead of putting a duty cycle of 25000 ns (40 kHz) I've set
a duty cycle of 1667 ns (600 kHz) because I think that's what the TRM
says.

Change-Id: Ifc209eddb20122feec96c5e86f7a14da7d74eb3f
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-07 21:49:51 +08:00
Caesar Wang
7a2cde0816 ARM64: dts: rk3399-chrome: delete unused code in dts
We shouldn't need them in here if you are using the coreboot/firmware.
In general, the cmdline/memory/logic_center will be overwrited
since the coreboot will do that.

Change-Id: I3902ff4eb71891b5c6320bed4355992e699e4835
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-07 21:49:29 +08:00
alpha.lin
4b51c867dd ARM64: dts: rk3399-monkey: add iep dts resource for android
Add the iep dts resource for android platform.

Change-Id: Ibb624fe0ad5253fb026d3470b52f76bc61cdb960
Signed-off-by: alpha.lin <alpha.lin@rock-chips.com>
2016-04-07 18:54:29 +08:00
Yakir Yang
afa22c6877 ARM64: dts: rk3399: gru: enable eDP display nodes
Change-Id: I1548fdebfb9bb3ac98e309a3becfa16216e94ede
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-07 18:51:38 +08:00
Wu Liang feng
abb8612a9f ARM64: dts: rk3399: remove aclk_usb3_noc which is ignored unused
Change-Id: Ie864933514db3f1117ea67bd06549ad145514bef
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-04-07 14:44:49 +08:00
Xing Zheng
65fac424f2 clk: rockchip: rk3399: add SCLK_PCIEPHY_REF100M for PCIe
Change-Id: Iead548d47a627745267acbcc73d401f73c68a702
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-07 12:50:32 +08:00
Yakir Yang
da771ed410 ARM64: dts: rk3399: add eDP device node
Change-Id: I0b1bb874b51f45d71f63445cb30c43f94b022c20
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-07 12:14:12 +08:00
Yakir Yang
144e62cef3 drm/bridge: analogix_dp: hardcode input video format to RGB10 for Rockchip platform
Rockchip LCD controller could only output the RGB101010 video
format, so just hardcode the eDP input video format to that.

Change-Id: I39673a35b439656dff7e3358b65ec835c92c4120
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-07 11:21:36 +08:00
roger
8aeab24a36 net: phy: add sysfs node for reading PHY's registers
Change-Id: I76468dd235a39b6f79699b1cc931c2c7bb7bdbc5
Signed-off-by: roger <roger.chen@rock-chips.com>
2016-04-06 18:20:01 +08:00
roger
0c6edb9721 ARM64: dts: rk3399-tb: change "ext_gmac" to "clkin_gmac" according to clk-rk3399.c
Change-Id: Ic0ea696408493aae97099d579d34ae33f30cc41a
Signed-off-by: roger <roger.chen@rock-chips.com>
2016-04-06 18:19:49 +08:00
roger
a71426fe3e ARM64: dts: rk3399: fix drive strength to 13mA for GMAC TXD pins
Change-Id: Ia5a45864d2f71bd7548cc5b897c33265a20c4fea
Signed-off-by: roger <roger.chen@rock-chips.com>
2016-04-06 18:19:23 +08:00
Elaine Zhang
30bb1d8132 clk: rockchip: rk3399: remove unnecessary CLK_IGNORE_UNUSED flags
remove unnecessary CLK_IGNORE_UNUSED flags for m0.

Change-Id: Iba9daf76980c969b90700c175bfa5fec044f3524
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-06 16:42:31 +08:00
Elaine Zhang
6e130fc1e8 clk: rockchip: rk3399: remove unnecessary CLK_IGNORE_UNUSED flags
remove unnecessary CLK_IGNORE_UNUSED flags for uart4/gpio/timer.

Change-Id: I6046dd8d12cc78363d4e653bcad78671746a3914
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-06 16:31:55 +08:00
Huang, Tao
094993e23c ARM64: rockchip_defconfig: enable IPA and CPU_THERMAL
Change-Id: Ia70704b3e77041231f02246ad1a230a45d4b930f
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-04-06 14:47:17 +08:00
Xing Zheng
7b1d503459 clk: rockchip: rk3399: add SCLK_RMII_SRC for gmac
Change-Id: I0b678b60ab99ba8166866a7f664314055f55c606
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-06 14:34:02 +08:00
Shengfei xu
b2c0fb3a3c mfd: RK808: update the "pm_power_off" initalization conditons
Only the powerofff callback feature is supported through the
rockchip,system-power-controller.

Change-Id: I55e73c05a749edab6c3710e304ee86c03812ab6f
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-04-06 14:19:59 +08:00
Yakir Yang
32a1a6180d include: drm: rockchip_drm.h: remove those old unsued file
Thoes file were introduced by Commit bdafdac384
(rk3288 chromium: drm grafic fb support for x11 mali gpu), for now we have the
mainline rockchip drm code, no need those old head files, let's removed them.

Change-Id: I325a5b7981ac5478349f276f8811b1b51e40c564
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-05 16:22:50 +08:00
xubilv
01128dd5ad video: rockchip: mipi: add long packet support for linux-4.4
Change-Id: I0f226f0caabe100c6c41c9b0b23f80a2c61f7f4f
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-04-05 14:15:30 +08:00
Douglas Anderson
374fbd6b03 ARM64: dts: gru: Put back in TODO comments + recent SD work
This DTS purposely has some comments in "//" style to indicate bringup
work that needs to be done.  Don't remove them unless the issues have
been addressed.

The DTS that landed in Rockchip's tree also lost some recent SD work.

Change-Id: I388cfe855b52aa160c1e8d1b468d7e8f35207790
Signed-off-by: Douglas Anderson <dianders@chromium.org>
2016-04-05 14:10:48 +08:00
Huang Jiachai
8781498a28 ARM64: dts: rk3399-monkey: enable iommu and vop lite
Change-Id: I6cb75f09c99ffe76691ceb61d60774256663e72e
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:08:39 +08:00
Huang Jiachai
24baf60e95 video: rockchip: vop: 3399: update hdmi RGB101010 output and csc parameter
Change-Id: I7428da925c78f68f418ff5669b08c8cfd44808b6
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:07:26 +08:00
Huang Jiachai
5321f01c24 video: rockchip: vop: 3399: update for iommu
Change-Id: Ic4550a2534fd016b6fff7e47f8d89ec239beba10
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:06:44 +08:00
Mark Yao
4534d4b841 video: rockchip: rk322x: check hwc_size before H/W register config
Check hwc_size after hwc registor config, if check fail, would cause
unexpect problem, iommu crash.

Change-Id: I2e18ea86e9e27e13ccce0737d9d48befcbe345fb
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-04-05 14:05:22 +08:00
Huang Jiachai
52649986e8 video: rockchip: vop: 3399: add win2 and win3 when get dsp_info
Change-Id: Ib1ae76de66656b0531683eede117346945587008
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:04:39 +08:00
Huang Jiachai
306e4f63c0 video: rockchip: vop: 3399: add to config YUYV and UYVY data format
Change-Id: I5762f691d724449035098333a732095774c96513
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:03:15 +08:00
Huang Jiachai
3056b9b9f9 video: rockchip: fb: add support data format YUYV and UYVY
Change-Id: Iaef1a0e6f80e4246cfe6b2692bdb6085ea5355b0
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:00:32 +08:00
Huang Jiachai
67b4ff4846 video: rockchip: vop: 3399: add support afbdc
Change-Id: I2e796809baeef99c3463c4789a65eb1057cb577f
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-04-05 14:00:12 +08:00
Caesar Wang
72463f4c3d thermal: rockchip: fixes the code_to_temp for tsadc driver
We should judge the table.id[mid].code insearch algorithm on matter the
adc value increment or decrement.

Or otherwise, the temperature return the incorrect value in some cases.
[    1.438589] adc_val=402,temp=-40000
[    1.438903] adc_val=403,temp=-39375
[    1.439217] adc_val=404,temp=-38750
...
[    1.441102] adc_val=410,temp=-40000
[    1.441416] adc_val=411,temp=-34445
[    1.441737] adc_val=412,temp=-33889
...

Let's fix it right now.

Fixes commit 020ba95
"thermal: rockchip: Add the sort mode for adc value increment or decrement"

Change-Id: Icac84d06ebf463439ca11db5a19d629b4b2b865c
Reported-by: Rocky Hao <rocky.hao@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-05 13:59:37 +08:00
Douglas Anderson
3fbafa3e99 ARM64: dts: rk3399: the USB 2.0 vbus GPIO is board specific
A GPIO was put in rk3399.dtsi that doesn't belong there.  Specifically
this GPIO isn't the same for all rk3399 boards.  I presume it belongs in
rk3399-tb.dts, so move it there.

Change-Id: I0b3272655da565eb6b348a33401f7517224db5fa
Fixes: 3ed499f07c ("ARM64: dts: rockchip: rk3399: add usb2.0 phy node")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
2016-04-05 13:55:19 +08:00
Xing Zheng
2d30b20671 ARM64: rockchip_cros_defconfig: Add support DRM for cros
And removed:
----
-CONFIG_FB=y
-CONFIG_LCDC_RK3368=y
-CONFIG_LCDC_LITE_RK3X=y
-CONFIG_RK_IOMMU=y
-CONFIG_RK_IOVMM=y
----
which are unused on the chromeos.

Change-Id: Icd521b56b6285099d72d3bf25575466792b6d353
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-05 10:56:47 +08:00
alpha lin
0447f8589e vcodec_service/rockchip: revise build failure
there will be a build failure when CONFIG_RK_IOMMU
disabled.

Change-Id: Ifd56e39b9cb3021f308f195087304a1d1ec2c599
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
2016-04-01 15:53:25 +08:00
Elaine Zhang
063e65397a ARM64: dts: rk3399-tb: fix up the pwm regulator node
add pwm init voltage and id for uboot.
fix up the pwms node and add pwm polarity.

Change-Id: I4159c97ae498411ab958c2b1e1223139ac670452
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-01 15:34:54 +08:00
Brian Norris
d5357e4dcf Makefile: hack out the double version of SUBLEVEL
Portage's linux-info.eclass (in getfilevar_noexec) looks for the
definition of SUBLEVEL, and it doesn't expect 2 definitions. We could
fix the eclass, but let's hack this out for now.

See strongswan's emerge output:

...
 * Found sources for kernel version:
 *     4.4.6
 * 0
/mnt/host/source/src/third_party/portage-stable/eclass/linux-info.eclass: line 388: 6
0: syntax error in expression (error token is "0")
...

Change-Id: I6964e6731ed461ca3a8c4afde0ddfe48e0105627
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/252620
Reviewed-by: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
2016-04-01 15:18:54 +08:00
Caesar Wang
7208f5d6c5 ARM64: rockchip_cros_defcofnig: turn on the chrome platform
This config should be opened since the config used for chromeos.

Change-Id: I52dd22b1c1a707e6d27311337a5be6f0041cb7f9
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-01 15:14:27 +08:00
Xing Zheng
7d875e40bd clk: rockchip: rk3399: remove unnecessary critical clocks
Change-Id: If1f3cf9eb91f89ad38f034b5a9d90571c486efc9
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-01 15:12:38 +08:00
Xing Zheng
368ba19d57 clk: rockchip: rk3399: add all of NOCs into critical clocks
We need to declare that we enable all NOCs which are critical clocks
always and clearly and explicitly show that we have enabled them at
clk_summary.
         
Change-Id: I859664692b4d1bb0dda0ee38295dfcbc3cc70019
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-01 15:11:58 +08:00
Xing Zheng
c07cefb19c clk: rockchip: rk3399: Keep DMAC1 enable always for SPI5
Change-Id: I4b2b8bdf7649b0c5209852160597ad2737ed5a7b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-01 14:59:45 +08:00
Xing Zheng
f6833b7cfa clk: rockchip: rk3399: remove unnecessary CLK_IGNORE_UNUSED flags
Change-Id: I87dddf2ceb14e5d094b320568530ae8976fdbf14
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-01 14:59:02 +08:00
Xing Zheng
bdbe26d286 ARM64: dts: rk3399: remove clk_ignore_unused
Change-Id: I48874e2b82487d5e9ae6e83c954ea2bd06960c8f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-01 14:58:43 +08:00
Caesar Wang
5fba1fcf25 Input: touchscreen-gt9xx: enable the gt9xx SLOT REPORT
On the moment, the gt9xx touchscreen driver can't work on chromeos.
Since the driver report event has *not* judge correct by the chromeos.

We need report the singel point touch information for event firstly,
otherwise the chromeos will force a signel point to work.

That's seem a chromeos issue/leak.
Anyway, we can report the point including the signal information
to workaround.

Verify on rk3399evb board with chromeos.

root@localhost / # evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      goodix-ts
/dev/input/event1:      rk29-keypad
Select the device event number [0-1]: 0
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb
Input device name: "goodix-ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
  Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
  Event code 0 (ABS_X)
  ...

  Event: time 1450321044.293221, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
  Event: time 1450321044.293221, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 4095
  Event: time 1450321044.293221, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 4083
  Event: time 1450321044.293221, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 8
  Event: time 1450321044.293221, type 3 (EV_ABS), code 50 (ABS_MT_WIDTH_MAJOR), value 8
  Event: time 1450321044.293221, -------------- SYN_REPORT ------------
  Event: time 1450321044.384655, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
  Event: time 1450321044.384655, -------------- SYN_REPORT ------------

Change-Id: Ic41327a673632e471429ded35b68eecbbd7f3069
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-01 14:44:38 +08:00
Mark Yao
3f7dfb2216 ARM64: dts: rk3399: chrome: enable mipi node
Change-Id: Icc169b97ec985b5e7332ed1ed5ed78d20c717062
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-04-01 14:26:59 +08:00
alpha lin
3caf545c35 ARM64/cros_defconfig: remove IEP and RK_VCODEC
Remove CONFIG_IEP and CONFIG_RK_VCODEC definition for
they aren't required in rockchip chromeos.

Change-Id: I3a0bce0943931a7546378fb7c7e663e1317b93da
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
2016-04-01 14:10:16 +08:00
alpha lin
47027ce287 iep/rockchip: revise build fail when CONFIG_RK_IOMMU disabled
When CONFIG_RK_IOMMU disabled, iep build will throw out error
information for some mismatch definitions.

Change-Id: I0fb22550eaaebd62523d794e45de7b94fae8db63
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
2016-04-01 11:09:30 +08:00