Commit Graph

595955 Commits

Author SHA1 Message Date
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
Jacob Chen
a5f740a128 MALI: utgard: rockchip: fix_mali_hang_on_windows
Change-Id: I9a03f2427cbe0653821a1671c1f3758bc8e891fe
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-27 16:44:07 +08:00
Jacob Chen
fde488a131 drm/rockchip: add rk3036_alpha_support
Change-Id: Ife16fb36502e70dfffc80d31d7f33235d63366eb
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-27 12:55:26 +08:00
Elaine Zhang
a69364e01c clk: rockchip: rk3399: fix up the make warning
fix up the warning:
Line 246: 			rate_table->nf = nf_out;
drivers/clk/rockchip/clk-pll.c:246:19: warning: 'nf_out' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: I6c11bf91a280f324c21214cb7839e36f9ffa0da3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-07-27 10:09:09 +08:00
wlq
45ca7dff0d ARM64: dts: rk3399: vr: add support for new hardware
Change-Id: I50d71c7e3b66013b7e8f65fdee662911c586a0bd
Signed-off-by: Liangqing Wu <wlq@rock-chips.com>
2016-07-26 19:29:38 +08:00
Xing Zheng
ed700d552b clk: rockchip: rk3399: fix the incorrect bit
Due to refer to incorrect diagram, the bits of theXpll_aclk_perihp_src
and Xpll_aclk_emmc_src are incorrect, let's fix them.

Change-Id: I1054d172c8a1897da16287a01bfc5d83126d9666
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-07-26 19:28:31 +08:00
Zhangbin Tong
734bf3f3a5 ARM64: dts: rk3399: add support for box rev2
Change-Id: I77be7d3373696cb45aa4580fbb9a836dc2ff7ed0
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-07-26 19:28:07 +08:00
Huang, Tao
66c1892f8c arm64: rockchip_defconfig: enable modules
Change-Id: I1dd9a7f8672144ad0994913a99560f4cee7045bd
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-26 19:11:44 +08:00
Jianqun Xu
3e89f7de9a arm64/dma-mapping: __generic_dma_ops always call swiotlb_dma_ops
Arm64 dma-mapping will return dummy_dma_ops if none call arch_setup_dma_ops
at device creation time.

For ion APIS, ion_pages_sync_for_device and ion_pages_sync_for_cpu always
pass "NULL" as device, then dma-mapping return dummy_dma_ops, which cause
ion pages fail to sync.

This patch fixs __generic_dma_ops to return swiotlb_dma_ops instead of
dummy_dma_ops.

Change-Id: Ic00db5d4547bcd5f74e5fd155133fde408a05cdb
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-26 19:11:09 +08:00
Jacob Chen
9774b15bc3 MALI: utgard: rockchip: remove code depending on rk_dvfs_module
Set clk_gpu to 200M when initializing.
vdd_gpu isn't initialized explicitly.
DVFS isn't implemented.

Change-Id: I82c242d7929d55b7e40277a24b5c2b06a3121a3c
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-26 17:28:29 +08:00
Zorro Liu
0a41e45e1d driver, sensors, sensor-dev: add COMPAT ioctl for userspace
Change-Id: Id9340f8cca57f98c1b29e28e4d6aa566365b37e2
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-07-26 17:14:36 +08:00
Zorro Liu
16ab432dd9 include, linux, sensor-dev: add COMPAT ioctl define for sensors
Change-Id: If59601bf08586f8a507ce3513b52e839327af59d
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-07-26 17:13:20 +08:00
Sugar Zhang
16a9c8ae12 ARM64: dts: rk3399-evb-rev3: correct the es8316 codec i2c addr
Change-Id: I5d329ae57d1059f464327f481d3db6525f5dbd64
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-07-26 14:10:07 +08:00
Jianqun Xu
5348b2111d ARM64: dts: rk3399: ajust gpu opp table for ES2 on evb3
Change-Id: Ia7283e2b4ddd2c008327024afbd89b2b176796e0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-26 09:54:48 +08:00
Elaine Zhang
c98c6d7873 clk: rockchip: rk3399: add pll up and down when change pll freq
set pll sequence:
	->set pll to slow mode or other plls
	->set pll down
	->set pll params
	->set pll up
	->wait pll lock status
	->set pll to normal mode
        
To slove the system error:
rockchip_rk3399_wait_pll_lock: timeout waiting for pll to lock
rockchip_rk3399_pll_set_params: pll update unsucessful,
				trying to restore old params

Change-Id: I62aecd9f292de5a3c7bcd8a87231785bf115159d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-07-26 09:54:26 +08:00