Commit Graph

595969 Commits

Author SHA1 Message Date
Chris Zhong
d0879670cf drm/rockchip: dw-mipi: remove mode_valid
The MIPI DSI do not need check the validity of resolution, the max resolution
should depend VOP. So remove rk3288_mipi_dsi_mode_valid here.

Change-Id: I789d184f9a14010795fe595ef31e1bea5d1022e0
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-08-02 21:15:37 +08:00
Jianqun Xu
f992c4e345 ARM64: dts: rk3399: add support edp screen for evb3
Support for some evb3 with edp screen, and with new touchscreen.

Change-Id: I8624ae38faef63aa5205861cfebb2a04f7bb8b30
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Tested-by: Frank Wang <frank.wang@rock-chips.com>
2016-08-02 21:14:21 +08:00
Mark Yao
ba5c781dad dt-bindings: display: support drm_mipi_dsi macro
Change-Id: Ibbe73605fff42762d88f2bc138ce98914ab200cc
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-08-02 20:11:37 +08:00
Mark Yao
c92d7c6174 drm/rockchip: get rid of vop->is_enabled
With atomic helpers there's no need to track the enabled state of a pipe
any more, because atomic helpers track this accurately already.

Change-Id: Ic2441b5acefe327cdef797aca88f6a2098643c69
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-08-02 20:09:10 +08:00
Mark Yao
acb8c96304 UPSTREAM: drm/rockchip: Disarm vop->is_enabled
With atomic helpers there's no need to track the enabled state of a pipe
any more, because atomic helpers track this accurately already.

Just disable the early returns, since the debug checks might be useful.

v2: Don't call drm_helper_disable_unused_functions, it blows up
without this check. At least explains why rockchip still needed this
old legacy-style state tracing - to work around issues from calling
other legacy style functions!

Change-Id: Ib63ad83b0212c5e2b0a44c1c5e2d188e7c876107
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Mark yao <mark.yao@rock-chips.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-18-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-08-02 20:08:59 +08:00
chenzhen
9384c6c19e MALI: midgard: rockchip: add sysfs files to get GPU utilisation
Change-Id: I758369bdd9ef945a89fd87fd7a69bd9f391f0880
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-08-02 20:01:37 +08:00
chenzhen
8b6de6fa83 ARM: dts: rockchip: fix vdd_cpu to 1.25V on rk3036 kylin board
In rk3036, the voltages of CPU and GPU are controlled by the same
regulator 'vdd_cpu'.
Here, we fix it to 1.25v to ensure that GPU could work well in
development period.
The actual voltage GPU needs might be much lower, and relative to
the frequence GPU runs at. this would be optimized when we implement
GPU DVFS with devfreq.

Change-Id: Ia25f0a67577fbfe248a25e4d913dc5f14fa40f0d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-29 15:10:29 +08:00
Caesar Wang
c1866508e3 arm64: dts: rockchip: manage the evb cros for rk3399
Add the rk3399-evb-cros.dtsi for cros private.
Also, we should add the rev3 dts to support it.

Change-Id: Ie68d4352474c7ea02c188e2c2176244709ac1b48
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-07-29 15:09:38 +08:00
Jianqun Xu
c9c55f25e8 ARM64: dts: rk3399-box: ajust gpu opp table
Ajust voltage of 800M to 1v, and remove 700M.

Change-Id: Iabcdcee4f84693c9db53fbaf885e946bc8ca4212
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-29 14:51:07 +08:00
Jianqun Xu
2e08673f5e ARM64: dts: rk3399-vr: ajust gpu opp table
Ajust voltage of 800M to 1v, and remove 700M.

Change-Id: I429af91ff5660c0398f6c84f6e426be43c068c24
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-29 14:51:07 +08:00
Nickey Yang
d54b182526 ARM: dts: rockchip: enable vpu for rk3288-miniarm
Change-Id: Idc6b51984f92caf9ea8c8e608f3cef151d3c6b97
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-07-29 14:43:44 +08:00
Caesar Wang
69a393d260 ARM64: configs: rockchip_cros_defconfig: enable EAS
This patch trys to sync the rockchip_defconfig for cros.

Change-Id: Ieeda1e41f05f33ffaa708c9825901553a759b17b
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-07-29 13:53:16 +08:00
Wu Liang feng
b629f78193 arm64: dts: rockchip: enable both of otg usb2 phys for rk3399
Enable both OTG1 PHY and OTG2 USB2 PHY for rk3399 board.
With this patch, we can support usb battery charger detect
and hold wake lock in OTG peripheral mode.

Change-Id: Icae1924d8a2427c297f28032588f178532acc560
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-29 11:33:31 +08:00
Jacob Chen
91fc367f8a ARM: dts: rk3288: add asoc simple card for DW-HDMI audio for fennec board
Change-Id: I36e01d79fe48722369e896992b7086be7a762752
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-07-29 10:45:51 +08:00
Yakir Yang
9bdceb355a arm64: dts: rockchip: enable dw_hdmi audio support on EVB boards
DRM dw_hdmi audio driver is based on common hdmi-codec driver, and bind
with i2s controller through simple-audio-card.

Change-Id: I2d9d5941b8e7c1f256e505338f43869584772e79
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-29 10:44:29 +08:00
Yakir Yang
783d640494 arm64: configs: enable dw-hdmi i2s audio on rockchip_cros_defconfig
Change-Id: I02762b544f5813036040bf526b0bd2561d79fa88
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-29 10:44:21 +08:00
Wu Liang feng
d7d2a689d4 HACK: phy: rockchip-inno-usb2: disable otg phy suspend for rk3399
This patch prevents OTG0 and OTG1 PHY from entering suspend mode.
Because if PHY enter suspend, it will cause DWC3 controller work
abnormally now. We can revert it if fusb302 driver is merged.

Change-Id: I74c3ee5d3e1b925e8dc758bdc6d67372df421b98
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-29 10:39:41 +08:00
Wu Liang feng
9b2bafd67f phy: rockchip-inno-usb2: add phy1 otg-port configurations for rk3399
This patch add USB2 PHY1 OTG port configurations for rk3399,
it support PHY1 suspend and bvalid detect, but not support
usb battery charger detect.

Change-Id: I7a6aaf484d6ad2ad097a7d9679a56aa545f217c8
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-29 10:39:21 +08:00
Wu Liang feng
35e7cfb4c0 arm64: dts: rockchip: add u2phy1_otg node for rk3399
RK3399 SoC USB2 PHY1 comprises with one host-port and
one otg-port, now we support PHY1 otg-port.

Change-Id: I8e7fd53ce6f1552172044ad2adc3f19e923d1bcd
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-29 10:39:04 +08:00
Elaine Zhang
fd4c48722a clk: rockchip: rk3399: delete the CLK_IGNORE_UNUSED for aclk_pcie
allow aclk_pcie and aclk_perf_pcie disabled when unused.

Change-Id: I55edb319d0abbabf841e7d479a40d736e657ad4b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-07-28 18:11:02 +08:00
Mark Yao
2f8648006d drm/rockchip: vop: make windows disable take effect
Should do vop_cfg_done to let windows disable take effect

Change-Id: Ib2966d8825a195696a963de7bc1d9665e78e5389
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-07-28 16:00:07 +08:00
Mark Yao
25a1235046 drm/rockchip: vop: get rid of vop_initial
It's not need to do reset on vop init.

Change-Id: I25aec554b545471ce435648edc3b1e2ca51df570
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-07-28 15:59:45 +08:00
Mark Yao
17f3b4e9bb drm/rockchip: vop: add vop full series of vop support
The series of vop is:
IP version    chipname
3.1           rk3288
3.2           rk3368
3.4           rk3366
3.5           rk3399 big
3.6           rk3399 lit
3.7           rk322x

The IP version is from VERSION_INFO register

major version: used for IP structure, Vop full framework is 3,
vop little framework is 2.
minor version: on same structure, newer design vop will bigger then
old one.

Change-Id: I032cb3d74cd01440274d3efeefa747e6028c1689
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-07-28 15:59:40 +08:00
Chris Zhong
06ad8234d0 ARM64: rockchip_cros_defconfig: enable Rockchip Inno usb2phy driver
Change-Id: I5d3a87aec065b5a3af2cc17888047a2506e8573b
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-07-28 12:04:34 +08:00
Huang, Tao
0c1edc4208 arm64: dts: rockchip: add more reboot mode on rk3399
Add charging and fastboot mode support.

Change-Id: Ib66c0d8c36ae33eeef2672b2bb31f075f833dd87
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-28 11:59:00 +08:00
Huang, Tao
8090be7aeb power: reset: reboot-mode: fix normal mode setup
If cmd is empty in get_reboot_mode_magic, we should return normal magic.

Change-Id: I10931adc49e33f72ae73d9471159f82cc02ff0c0
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-28 11:58:17 +08:00
Huang, Tao
bcb4ce870a dt-bindings: soc: rockchip_boot-mode: add charging mode support
Change-Id: I66d5eb1813583aae37b2d19a2cf18dd9bbaf7125
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-28 11:57:19 +08:00
xiaoyao
e12edc4e75 arm64: dts: rockchip: rk3399-box-rev1: increase drive strength for sd/sdio pin
Change-Id: I6566a7ea6e6e91160f4f456f4f402f2b06c63b56
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-07-28 11:56:39 +08:00
xiaoyao
2959db4f86 arm64: dts: rockchip: Add some drive strength properties for rk3399
Change-Id: I8e838901729142dabff3703c52103daf28945edb
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-07-28 11:53:25 +08:00
Caesar Wang
33ecc89934 FROMLIST: arm64: dts: rockchip: support the pmu node for rk3399
This patch add to enable the ARM Performance Monitor Units for rk3399.
ARM cores often have a PMU for counting cpu and cache events like cache
misses and hits.

Also, as the Marc posted the patches [0] to support Partitioning per-cpu
interrupts. Let's add this patch to match it on rk3399 SoCs.

[0]:
https://lkml.org/lkml/2016/4/11/182
https://patchwork.kernel.org/patch/9209369/

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
CC: linux-arm-kernel@lists.infradead.org
Acked-by: Mark Rutland <mark.rutland@arm.com>

(Remove the original dts PMU)
Change-Id: I7e06c479bff7a431b0dc03309df08a640060bafd
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(am https://patchwork.kernel.org/patch/9215663/)
2016-07-27 21:07:48 +08:00
Caesar Wang
ff7e139076 FROMLIST: arm64: dts: rockchip: change all interrupts cells for 4 on rk3399 SoCs
Add the interrupts cells value for 4, and the 4th cell is zero.

Due to the doc[0] said:" the system requires describing PPI affinity,
then the value must be at least 4"
The 4th cell is a phandle to a node describing a set of CPUs this
interrupt is affine to. The interrupt must be a PPI, and the node
pointed must be a subnode of the "ppi-partitions" subnode. For
interrupt types other than PPI or PPIs that are not partitionned,
this cell must be zero. See the "ppi-partitions" node description
below.

[0]:
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.txt

Change-Id: I80d459b746aea40027a7eacfcc7aa764a57fdc9f
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(am https://patchwork.kernel.org/patch/9215659/)
(Note: fixes some no sync upstream node)
2016-07-27 21:05:22 +08:00
Marc Zyngier
e85a330488 FROMLIST: drivers/perf: arm-pmu: Handle per-interrupt affinity mask
On a big-little system, PMUs can be wired to CPUs using per CPU
interrups (PPI). In this case, it is important to make sure that
the enable/disable do happen on the right set of CPUs.

So instead of relying on the interrupt-affinity property, we can
use the actual percpu affinity that DT exposes as part of the
interrupt specifier. The DT binding is also updated to reflect
the fact that the interrupt-affinity property shouldn't be used
in that case.

Change-Id: I4a48e116cfa84d74985f44ed30d6e664ce3cfa5f
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9216445/)
2016-07-27 20:54:48 +08:00
chenzhen
220f85975a ARM: rockchip_linux_defconfig: enable driver for mali400(utgard) GPU
Change-Id: I2f89c53cd6eba49c7a6d8439cb94e1d3a2f95f0a
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-27 20:21:00 +08:00
xiaoyao
a7352aa663 wifi: power save: turn off the reset pin when wifi is closed
Change-Id: I06b188d9a67319d2508f016595e73b2f1d97fa99
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-07-27 20:20:39 +08:00
Wu Liang feng
dfe6a838f9 arm64: dts: rockchip: rk3399-evb: add utmi-avalid for evb1/evb2
The usb2 phy utmi bvalid status is invalid for ES1 evb1/evb2
board, so check vbus status by utmi avalid status.

Change-Id: Iae369183cd15034eb35818c63988150f3aad6374
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-27 20:16:17 +08:00
Wu Liang feng
5b9c454fb7 phy: rockchip-inno-usb2: make utmi vbus configurable in DT
Rockchip USB2 phy provides utmi_avalid and utmi_bvalid for
user to check UTMI vbus status. Generally, both of them can
reflect the vbus status correctly, and the utmi_bvalid has
higher sensitivity, so we select the utmi_bvalid to get vbus
status by default.

But some special SoCs may not provide utmi_bvalid, so we
need to select utmi_avalid in this case.

Change-Id: I0d47c2237f852cb67ebd82fe2673b2bd2e6ccce6
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-27 20:16:08 +08:00
chenzhen
6b66590b06 MALI: utgard: rockchip: walk around 'Understanding page domain faults'
Change-Id: I89c935f9b309393b16fcb848ded6e665f525bd1c
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-27 19:59:54 +08:00
chenzhen
85c2e5b901 MALI: utgard: rockchip: avoid crash when CONFIG_GPU_TRACEPOINTS enabled
Change-Id: Icbb4f9e1b56a9a23cd7041c589e9814743fe562b
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-27 19:59:32 +08:00
chenzhen
78da86a86a MALI: utgard: rockchip: fix a compile error when GPU_TRACEPOINTS enabled
Change-Id: Ib8dafc9116b1b1a95dfe687faeb9889e0ab66d3c
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-27 19:57:39 +08:00
Zorro Liu
4ff8c4d569 ARM64: dts: rk3399: vr: add support compass ak8963
Change-Id: I095e9af7e2e007e042ff35a6a92425707465bc08
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-07-27 19:56:57 +08:00
Nickey Yang
a477d9e2e2 ARM: dts: rockchip: add rk3288-miniarm board
This adds support for rk3288-miniarm board,
Rockchip RK3288 based development boards.

Change-Id: I3db8f16ae7fa5e18675eefb29684f6ef07434683
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2016-07-27 19:54:57 +08:00
Rocky Hao
20bba55bcc arm64: dts: rk3399: ajust ipa parameters
Big cores' power consumption and gpu's are greatly reduced, ipa parameters
are ajusted accordingly.

Change-Id: Ibfdae1856c2f1c2cf80a0a2f963ec878053c6ef0
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-07-27 19:53:58 +08:00
Jianqun Xu
17ecdacf77 ARM64: dts: rk3399-evb3: ajust gpu opp table
Some evb3 need 1v for 800M.
We remove 700M currently since havn't a good opinion of it.

Change-Id: I7083857f5bb8a09efe0369a6bdd49e28c67da8b7
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-27 19:51:47 +08:00
Frank Wang
ed0e5c0650 arm64: dts: rockchip: add clk-480m for ehci and ohci of rk3399
We found that the suspend process was blocked when it run into
ehci/ohci module due to clk-480m of usb2-phy was disabled.

The root cause is that usb2-phy suspended earlier than ehci/ohci
(usb2-phy will be auto suspended if no devices plug-in). and the
clk-480m provided by it was diabled if no module used. However,
some suspend process related ehci/ohci are base on this clock,
so we should refer it into ehci/ohci driver to prevent this case.

Change-Id: Ic5e70a4234382e5cd1e1690e5174891e89360741
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-07-27 16:52:10 +08:00
Xing Zheng
8267396774 clk: rockchip: rk3399: export 480M_SRC clock id for usbphy0/usbphy1
Change-Id: Icd566864d3651e7b64ee8209b66e8a326011422f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-07-27 16:52:10 +08:00
Jianqun Xu
8787ffd8d4 ARM64: configs: rockchip support CONFIG_F2FS_FS
Select CONFIG_F2FS_FS and CONFIG_F2FS_FS_SECURITY.

Change-Id: I0380977d3593fccf6b417f8e72f118b7fc2c2b9b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-27 16:46:02 +08:00
Jianhong Chen
8c0033c11e power: rk818: support rk818 charger driver
Change-Id: Ica9a517723d10ea75baddd3f16e3ee0aa07dfb8b
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-07-27 16:44:13 +08:00
Jianhong Chen
b7e3865056 power: rk818: support rk818 battery driver
Update version to v7.0, main features:
    1. new algorithm which is independent of time calculation in almost case,
    2. remove charger detect to driver: rk818-charger.c;
    3. save algorithm calculation rest value for next system power on calculation;
    4. recognize system halt and reset dsoc as rsoc;
    5. support hardware sample resistor selected as 10mR or 20mR;
    6. optimize zero algorithm to make discharge figure more smooth;
    7. fix some logic bugs.

Change-Id: I789d070693ac16102ecbe813d878a2a3c256c030
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-07-27 16:44:12 +08:00
Simon
3d362c8dbe iommu/rockchip: active and inactive count should be in pairs if attach failed
Change-Id: Ic2362814695d135c68ce2db1aec7b71bfcb28dd0
Signed-off-by: Simon <xxm@rock-chips.com>
2016-07-27 16:44:11 +08:00
Jianqun Xu
54e5bf9f3a ARM64: dts: rk3399-box: rename files for box-rev1
Make dts files in order as follows:
rk3399.dtsi
rk3399-box.dtsi
rk3399-box-rev1.dts
rk3399-box-rev2.dts
...

Change-Id: I93d1fb4380d0c84a14fc3476b7435b1abe4989d2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-27 16:44:10 +08:00