Commit Graph

592825 Commits

Author SHA1 Message Date
David Wu
00a00a1ff0 iio: adc: rockchip_saradc: add saradc support for rk3399
Change-Id: I1d60583f02cc4b4cac8a8a1c1fb22bfeb5e52647
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-03-16 14:06:50 +08:00
xiaoyao
2f9c9cd46e net: rkwifi: Modify driver loading way to reduce boot time
Change-Id: Ie569aeedb5544cb0131ab48818db6a5b0dde05bb
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-03-16 11:17:22 +08:00
Zhaoyifeng
85da5ca07a ARM64: dts: rk3366-tb: enable nandc
Change-Id: I2b563214e9ad276524f555a31a408c8995cb63a9
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-03-16 10:06:52 +08:00
Zhaoyifeng
8613805fc7 arm64: configs: rockchip_defconfig add nand driver
Change-Id: I3bccfe5710c860841714d6e54aa23ed075d5a584
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-03-16 10:06:19 +08:00
huweiguo
f99458ca37 net: rfkill-bt: auto compatible for uart rts control for all uart bt chip
Change-Id: I9b4d6614160285754ee86c427e8918296b92ddbd
Signed-off-by: huweiguo <hwg@rock-chips.com>
2016-03-15 19:38:01 +08:00
Zhaoyifeng
3cbba607a8 ARM64: nand: update nand drvier for 3366
Change-Id: I96ff59f331591807f8d5b009c933a6c71f62a93b
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-03-15 18:56:30 +08:00
Shengfei xu
050039bbaa ARM64: rockchip_defconfig: enable rk808 rtc
add CONFIG_RTC_DRV_RK808=y

Change-Id: I7aae9990c9bbf787a7e42e319116df6b4749c3cd
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-03-15 18:05:32 +08:00
Xing Zheng
85e725256d UPSTREAM: clk: rockchip: add new pll-type for rk3399 and similar socs
The rk3399's pll and clock are similar with rk3036's, it different
with base on the rk3066(rk3188, rk3288, rk3368 use it), there are
different adjust foctors and control registers, so these should be
independent and separate from the series of rk3066s.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit 95e0c473a0ac1bdac25f55678dc602eb50dae684)

Change-Id: I77872b5fb33eb92402e9036b97b185ea56eb45c6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:51:57 +08:00
Shawn Lin
6e7ff899c2 UPSTREAM: clk: rockchip: release io resource when failing to init clk
We should call iounmap to relase reg_base since it's not going
to be used any more if failing to init clk.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit 86609a6613c64ee9272da1fd2f578d4beab2174e)

Conflicts:

	drivers/clk/rockchip/clk-rk3228.c
[zx: there is no rk3228 clock controller, and apply this patch for
clk-rk3366 manually.]

Change-Id: I2d73c90eb6f43150725c81417af37a6a562cd329
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:49:31 +08:00
Shawn Lin
d73b398d05 UPSTREAM: clk: rockchip: remove redundant checking of device_node
rockchip_clk_of_add_provider is used by sub-clk driver which
already call of_iomap before calling it. If device_node does
not exist, of_iomap returns NULL which will fail to init the
sub-clk driver. So really it's redundant.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit a96edf5a5243e1bdf642492b783221aa498f1e49)

Change-Id: I9a51ed269fe26742da2ae84d99cf9689f49add1b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:48:56 +08:00
Shawn Lin
fbb233e6fa UPSTREAM: clk: rockchip: fix warning reported by kernel-doc
./scripts/kernel-doc -man -v drivers/clk/rockchip/clk.h > /dev/null

drivers/clk/rockchip/clk.h:133: warning: missing initial short
description on line:
 * struct rockchip_clk_provider: information about clock provider
drivers/clk/rockchip/clk.h:133: info: Scanning doc for struct
drivers/clk/rockchip/clk.h:164: warning: missing initial short
description on line:
 * struct rockchip_pll_clock: information about pll clock
drivers/clk/rockchip/clk.h:164: info: Scanning doc for struct
drivers/clk/rockchip/clk.h:194: warning: No description found for
parameter 'parent_names'
drivers/clk/rockchip/clk.h:194: warning: No description found for
parameter 'num_parents'
drivers/clk/rockchip/clk.h:194: warning: Excess struct/union/enum/typedef
member 'parent_name' description in 'rockchip_pll_clock'
drivers/clk/rockchip/clk.h:235: warning: missing initial short
description on line:
 * struct rockchip_cpuclk_reg_data: describes register offsets and
masks of the cpuclock

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit 1c908b320055e1ce706e91121dbb2ce7934c788f)

Change-Id: I18dbd45ebd528fe2a871c98a1561dd0c0bf41e13
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:48:21 +08:00
Shawn Lin
b270437e9d UPSTREAM: clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data
mux_core_reg isn't been used anywhere, let's remove it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit 72478f190fec9f2358b62f32ce5e27e6f323fa53)

Change-Id: Ib6d8ee5bca61d1ada6215660862d2d728927a948
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:47:44 +08:00
Xing Zheng
f7bb23aecf UPSTREAM: clk: rockchip: Add support for multiple clock providers
There are need to support Multi-CRUs probability in future, but
it is not supported on the current Rockchip Clock Framework.

Therefore, this patch add support a provider as the parameter
handler when we call the clock register functions for per CRU.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/next commit d509ddf2e57c99ae760d1a289b85f1e0d729f864)

Conflicts:

	drivers/clk/rockchip/clk-rk3036.c
	drivers/clk/rockchip/clk-rk3188.c
	drivers/clk/rockchip/clk-rk3228.c
	drivers/clk/rockchip/clk-rk3366.c
[zx: keep calling clk_register_fixed_factor previouslly, and there
is no rk3228 clock controller, add support for clk-rk3366 manually,
because it is not in the upstream codes.]

Change-Id: I94976f38fb6edd88f334479d6e44fef5bcdfc16a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:46:48 +08:00
Xing Zheng
35bba3204b UPSTREAM: clk: rockchip: allow varying mux parameters for cpuclk pll-sources
Thers are only two parent PLLs that APLL and GPLL for core on the
previous SoCs (RK3066/RK3188/RK3288/RK3368). Hence, we set fixed
GPLL as alternate parent when core is switching freq.

Since RK3399 big.LITTLE architecture, we need to select and adapt
more PLLs (ALPLL/ABPLL/DPLL/GPLL) sources.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-clk/next
 commit 0fda2be634398f4b8d53c0436311f99557e56c4e)

Conflicts:

	drivers/clk/rockchip/clk-rk3228.c
[zx: there is no rk3228 clock controller, apply this patch for 
clk-rk3366.]

Change-Id: I48fde9facccd41585873c997b0b02a7a73972717
2016-03-15 17:24:38 +08:00
Heiko Stuebner
9f11b885e1 UPSTREAM: clk: rockchip: only enter pll slow-mode directly before reboots on rk3288
As commit 1d33929e2a2b ("clk: rockchip: switch PLLs to slow mode before
reboot for rk3288") states, switching the PLLs to slow-mode is only
necessary when rebooting using the soft-reset done through the CRU.

The dwc2 controllers used create really big number of interrupts in
special constellations involving usb-hubs and their number is so high,
it can even overwhelm the interrupt handler if the cpu-speed os to low.

Right now the PLLs are put into slow-mode in a shutdown syscore_ops
callback which means it happens on all reboots (not only the soft-reset
ones) and even on poweroff actions.

This can result in the system not powering off and getting stuck instead,
so we should move the slow-mode change nearer to the actual reboot action.

For this we introduce the possiblity to also set a callback that gets
called from the restart-handler directly prior to restarting the system
and move the shutdown-callback to this new option.

With this the slow-mode switch is done only on the necessary reboots
and also has a smaller possibility of causing artifacts.

Fixes: 1d33929e2a2b ("clk: rockchip: switch PLLs to slow mode before reboot for rk3288")
Signed-off-by: Heiko Stuebner <heiko.stuebner@collabora.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from commit dfff24bde7fb8d57482e907d5dfb0be3a9e28119)

Conflicts:

	drivers/clk/rockchip/clk-rk3228.c
[zx: there is no rk3228 clock controller, apply for clk-rk3366]

Change-Id: I2e91afd893c87eb3ab8a41db1fe81f5c43409951
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:21:33 +08:00
Chris Zhong
f0df56476f UPSTREAM: clk: rockchip: switch PLLs to slow mode before reboot for rk3288
We've been seeing some crashes at reboot test on rk3288-based systems,
which boards have not reset pin connected to NPOR, they reboot by
setting 0xfdb9 to RK3288_GLB_SRST_FST register. If the APLL works in
a high frequency mode, some IPs might hang during soft reset.
It appears that we can fix the problem by switching to slow mode before
reboot, just like what we did before suspend.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 1d33929e2a2b69ae6d40e09ccfc8c7d705a543ba)

Change-Id: Ic01f80e6f33ae84cc87e954aae35f26b6f1a5434
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-15 17:20:14 +08:00
Frank Wang
eaef8b16af ARM64: dts: rockchip: rk3366: add usb2.0 phy node
Change-Id: Ib1bc0add32d99de9ed78e70c29526cef926c7cad
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-15 17:00:11 +08:00
Frank Wang
bf011cb752 phy: rockchip-usb: support InnoSilicon usb2.0 phy
For InnoSilicon usb2.0 phy, there is no siddq bit for operating,
what is more, when we control usb phy to suspend, its Plls will
not be affected. So we can operate resume/suspend bits directly
when it is going to power on/off.

Change-Id: I6bfe6b1a90b1bdcb0b0d5b670d579a625b22c0ba
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-15 16:59:43 +08:00
Frank Wang
a441e07982 Documentation: bindings: add compatible entry for Rockchip USB2.0 PHY
Compatible "rockchip,rk336x-usb-phy" support to RK3368 & RK3366.

Change-Id: I435ecd0a9f1c2a50836f7e3c44b6089ba49d728a
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-15 16:59:17 +08:00
Xing Zheng
331fd8c032 UPSTREAM: clk: rockchip: add a COMPOSITE_FRACMUX_NOGATE type
Because there are some frac clock mux nodes don't have a gate node on
the RK3399.

Change-Id: I4791b90a08faab286743a5cba30738cfb046594c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-clk/next
 commit ffd9d4d39ef7ff90364d3abd6c39919e6582b605)
2016-03-14 15:45:56 +08:00
Feng Xiao
e69848b3a5 clk: rockchip: add clock ids for mpll_src and 32k on RK3366
Set the newly added id for mpll_src and 32k, so that they can be called
in other parts.

Change-Id: Ief82231215a147b62abcfbb5565054470fc9ea37
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-14 15:40:06 +08:00
Caesar Wang
a04db15f5a ARM64: dts: rockchip: enable the tsadc for rk3399 chrome
This patch enables the tsadc for rk3399 evb board.

The rk3399 evb board uses the gpio to reset the chip since it connects the
PMIC to work, and TSHUT is low active on evb board.

Change-Id: Ibd4fc2c752fe1f34cc231385ee314e4b9a32e970
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-03-14 11:16:08 +08:00
Caesar Wang
ca96c1efd9 ARM64: dts: rockchip: add the thermal main info found on rk3399
This patch adds the thermal needed main information for rk3399 SoCS.

Basically has the following content:

1) TSADC controller:
    Add the needed attributes for rk3399 TSADC controller.
    Especially for the TSHUT, in some cases if we are unable to shut it down
    in orderly fashion (says: kernel is stuck holding a lock or similar), then
    hardware TSHUT will reset it.
    If the temperature is over 95C over a period of time the thermal shutdown
    of the tsadc is invoked with can either reset the entire chip via the CRU,
    or notify the PMIC via a GPIO. This should be set in the specific board.

2) Thermal zones:
    Add the needed device mode for thermal generic framework.
    Detail in Documentation/devicetree/bindings/thermal/thermal.txt.

Change-Id: I1361beeb85e6d4a134b4640c16440452aa950e16
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-03-14 11:16:00 +08:00
Huang Jiachai
d4a6147e3d video: rockchip: lcdc: 3366: add support power domain control
Change-Id: Ibb9d15e6e2a84a1847f4cfbbc8e75bca54e1782b
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-14 11:04:58 +08:00
Elaine Zhang
65fa879a39 dt/bindings: power: add RK3399 SoCs header for power-domain
According to a description from TRM, add all the power domains

Change-Id: Ibbf17fb1edc125358760db8acd99dd681913cd3c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-03-14 10:08:07 +08:00