Commit Graph

592539 Commits

Author SHA1 Message Date
Frank Wang
c6b59a6e76 ARM64: dts: rockchip: add usb otg node for rk3366
Change-Id: I1c641a9b622861142991b5a19b40b145c9fd903c
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-03 14:58:27 +08:00
Frank Wang
960cc8a2ec usb: dwc_otg: optimized grf and clk operation for rk336x board
Get grf offset form DT and optimize hclk_usb_peri clock process logic.

Change-Id: I136970c7052e5d621fd10e5d2b90f0fdac620067
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-03-03 14:53:55 +08:00
Feng Xiao
e5c66868aa ARM64: dts: rockchip: rk3366: add initial clock rate for vop
Change-Id: Iac586853a9acc4e396eabc01b31fb6d75dc61fcf
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-03 11:39:57 +08:00
Feng Xiao
408dcb8d4c ARM64: dts: rockchip: rk3366-tb: add clk_ignore_unused in bootargs
Change-Id: I6b4cfd03141264da7368051c8d10f3eefbf27164
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-03 10:55:20 +08:00
Feng Xiao
16a036448a ARM64: dts: rockchip: rk3366: add initial clock rate for plls
Change-Id: I9ea6bcac10a7b67471613aea3ea41aff44a8fe34
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-03 10:23:35 +08:00
Feng Xiao
764276eeef clk: rockchip: rk3366: pll's rate support 480MHz 520MHz 576MHz 750Mhz
Change-Id: I56c75018ffd27a21ac87c2004eb5bd6a3b1e0e3d
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-03 10:06:21 +08:00
Huang Jiachai
07aae424ae video: rockchip: add win property node for application layer
Change-Id: I2e96d531d8fd1cf9eda665e4912501e4bec4d954
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-02 19:50:16 +08:00
Huang Jiachai
adb92c7648 video: rockchip: fb: fix update reg kfree data lead to list_del null point
Change-Id: I5a9f3c795cf6f8ecbe9f45a769135fe890525fab
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
(cherry picked from commit fe05c53704fb3b61455dddbae8b5078be0f48a12)
2016-03-02 19:13:36 +08:00
Huang Jiachai
5622629518 video: rockchip: rk3288: fix extend screen type error
Change-Id: Ie1754c8ffa51f01637bf08f2fae443c821d8e09a
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
(cherry picked from commit b6403156107533cf97e6fe326576831af214f47d)
2016-03-02 19:13:18 +08:00
Huang Jiachai
16316dbe2c video: rockchip: lcdc: 3368: add support write back
Change-Id: Id4ae5fe8e0e3a6ae490bfa31594033a5eeba5233
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
(cherry picked from commit 96c50052a58b38f73432b9bf4156f1a9e6fdd023)
2016-03-02 18:14:37 +08:00
Huang Jiachai
ca3e9cef16 video: rockchip: add vop config for write back function
Change-Id: I8d27bb44fa1e8b30b422f2692a257ac9e0282f5e
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
(cherry picked from commit e853ac5f48c0d6da970def84c465ce319ab6f1a8)
2016-03-02 17:42:18 +08:00
Arnd Bergmann
40e4c35358 UPSTREAM: regulator: core: avoid unused variable warning
The second argument of the mutex_lock_nested() helper is only
evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
get this build warning for the new regulator_lock_supply
function:

drivers/regulator/core.c: In function 'regulator_lock_supply':
drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]

To avoid the warning, this restructures the code to make it
both simpler and to move the 'i++' outside of the mutex_lock_nested
call, where it is now always used and the variable is not
flagged as unused.

We had some discussion about changing mutex_lock_nested to an
inline function, which would make the code do the right thing here,
but in the end decided against it, in order to guarantee that
mutex_lock_nested() does not introduced overhead without
CONFIG_DEBUG_LOCK_ALLOC.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9f01cd4a91 ("regulator: core: introduce function to lock regulators and its supplies")
Link: http://permalink.gmane.org/gmane.linux.kernel/2068900
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit fa731ac7ea)

Change-Id: Id700f411f2bcbe0cd49be332f329cd1b03768868
2016-03-02 13:51:40 +08:00
Elaine Zhang
8f99da39a9 UPSTREAM: clk: rockchip: include downstream muxes into fractional dividers on rk3368
During the initial conversion to the newly introduced combined fractional
dividers+muxes the rk3368 clocks were left out, so convert them now.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.6-clk/next
 commit 7af8a26ce7)

Change-Id: I81e408089ff1095d4735072d3ddb15c3564f6970
2016-03-02 11:10:08 +08:00
Huang, Tao
0f8180aba7 arm64: dts: rockchip: remove unused files
Change-Id: I5264e3967cd6dfbe776d03bc77d7434656d58772
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-03-02 10:11:31 +08:00
Jianqun Xu
8e7b7be080 ARM64: dts: rockchip: rk3399 dtsi fix for upstream
Fix rk3399.dtsi for upstream, includes:
- remove psci related codes due to no impletement
- rmeove pmu node since wrong content
- add spi 3/4/5
- fix pmucru

Change-Id: I078874c35e66ef8301e40a753a2acbae9f10b852
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-03-02 09:48:00 +08:00
David Wu
c2b591a805 ARM64: dts: rockchip: rk3366-tb: fix power_key gpio error
Change-Id: I698e300b3d34d2bb5e8f1b83f3c6655af7e5d15a
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-03-02 09:46:16 +08:00
Xing Zheng
e49eecc926 clk: rockchip: update dt-binding header for rk3399 sdmmc/sdio
Add DRV/SAMPLE clock nodes for SDMMC/SDIO.

Change-Id: Ib23698f3b1b78bb7af42903fff8df34c3b62271f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-02 09:35:18 +08:00
David Wu
6a83a5f39e pinctrl: rk3366: add support for rk3366
The drive strength control of rk3366 is very different from others'.
RK3366 soc adds N and P channel drive strength control, and we assume
they are the same value.

Change-Id: I45896f1483cb0a7550789df3bf84a0460cb21527
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-03-02 09:23:45 +08:00
Huang Jiachai
37f4ab272e video: rockchip: fb: fix double free when use devm_kzalloc() buf
Change-Id: I12872a61e2f07da23189cd57e2a355d73b98b005
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-01 19:57:27 +08:00
Zheng Yang
a9ca4a9142 video: rockchip: hdmi: skip operation when suspend or disabled
Change-Id: I294d338416a04d751ec5a5771e6b623ba7b69c02
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 0fdde42e0c459c9cc1b315cf2fbb0894d57ec0e4)
2016-03-01 18:03:17 +08:00
Huang Jiachai
d82596ac1b arm64: dts: rk3366-tb: sheep board default to use mipi screen
Change-Id: I239777aa4f95543be9c5699e459cd7326ccc4f2c
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-01 17:54:45 +08:00
Heiko Stuebner
5dacd5fa11 UPSTREAM: clk: rockchip: add a factor clock type
Add a clock type for fixed factor clocks. This allows us to define fixed
factor clocks where they appear in the clock hierarchy instead of in the
init function.

The additional factor_gate type, finally allows us to model some last
parts of the clock tree correctly.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 29a30c269a)

Change-Id: Ie4ec8b9d9199cdbe0be045c2ed4c270029e37949
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-01 17:11:44 +08:00
Xing Zheng
4db3d2b3f5 clk: rockchip: update dt-binding header for rk3399
Separate the number of CRU and PMUCRU, and modify the date to 2016.

Change-Id: I235fc8a93640e13fb112f45bb3387542b07e1a87
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-01 17:07:39 +08:00
Shawn Lin
42ca4e06a9 mmc: dw_mmc-rockchip: fix failing to mount partition with "discard"
Without MMC_CAP_ERASE support, we fail to mount partition
with "discard" option since mmc_queue_setup_discard is limited
for checking mmc_can_erase. Without doing mmc_queue_setup_discard,
blk_queue_discard fails to test QUEUE_FLAG_DISCARD flag, so we get
the following log from f2fs(actually similar to other file system):

mounting with "discard" option, but the device does not support discard

Change-Id: Iee781795c9c61153644f0dd5b00dfc2cca6cc721
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-03-01 15:46:48 +08:00
Shengqin.Zhang
6662acdefe ARM64: dts: rockchip: add rga node for rk3366
Change-Id: Ib1853054a9935eb0d48b5eaf346e9f7e58c688ed
Signed-off-by: Shengqin.Zhang <zsq@rock-chips.com>
2016-03-01 14:50:33 +08:00
Caesar Wang
94dd9eda04 UPSTREAM: thermal: rockchip: fix the tsadc sequence output on rk3228/rk3399
As the TRM says, add the tsadc_q_sel to control the temperature-code
sequence since the rk3228/rk3399 need set this bit (1024 - tsadc_q)
as output.

Fixes: commit
b0d7033 "thermal: rockchip: Support the RK3399 SoCs in thermal driver"
7b02a5e "thermal: rockchip: Support the RK3228 SoCs in thermal driver"

Reported-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from git.kernel.org evalenti/linux-soc-thermal fixes
 commit 7ea38c6c36)

Change-Id: I9d39b947e197393688ed58bf079e519e7d5a6d9e
2016-03-01 14:22:29 +08:00
Caesar Wang
56789b8d3c UPSTREAM: thermal: rockchip: the rename compatibles for rockchip SoCs
This patch renames to be more adapter compatibles since more and more
SoCs are supported in thermal driver.

Reported-by: Huang,Tao <huangtao@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
(cherry picked from git.kernel.org evalenti/linux-soc-thermal fixes
 commit 952418a34f)

Change-Id: Ia053d6877a16b36e357bd9b427b323703e5a514b
2016-03-01 14:19:29 +08:00
Shawn Lin
95154ee3e2 UPSTREAM: phy: core: fix wrong err handle for phy_power_on
If phy_pm_runtime_get_sync failed but we already
enable regulator, current code return directly without
doing regulator_disable. This patch fix this problem
and cleanup err handle of phy_power_on to be more readable.

Fixes: 3be88125d8 ("phy: core: Support regulator ...")
Cc: <stable@vger.kernel.org> # v3.18+
Cc: Roger Quadros <rogerq@ti.com>
Cc: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit b82fcabe21)

Change-Id: I1cb5327d624d88a97096eccaa94924b851dcce27
2016-03-01 12:00:05 +08:00
Elaine Zhang
c2bdb4abe8 rockchip: power & pmic: fix compile warning
fixed the WARNING: invalid free of devm_ allocated data

Change-Id: I54514cf53a8a0d1f885fd0a17e7f6db7af1d10f9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-02-29 20:49:13 +08:00
Frank Wang
6014197ab1 usb: dwc_otg: support to the latest usb gadget driver.
For gadget driver, usb_ep_caps is a new structrue in usb_ep, and its
attribute will be check in usb_ep_autoconfig method, so we need to do
some initialization work at ep creating.

Meanwhile, the process of android gadget driver have been changed,
correspondingly, udc_start and udc_stop are invoked differently from
before, so dwc_otg_gadget_stop method need to refactor and ajust
the new process.

Change-Id: Id1e20d4c265e0d382b0f36f6e729681f9c94c947
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-02-29 20:43:35 +08:00
Shawn Lin
86616613bd UPSTREAM: phy: add a driver for the Rockchip SoC internal eMMC PHY
This patch to add a generic PHY driver for ROCKCHIP eMMC PHY.
Access the PHY via registers provided by GRF (general register
files) module.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from git.kernel.org kishon/linux-phy next
 commit 9743f1c935995a55ddd926943ee7b3cfb4718208)

Change-Id: Ia24ccd041392e64efd28868ffccc8da4419bd29f
2016-02-29 11:55:59 +08:00
Shawn Lin
e7e7401ac5 UPSTREAM: Documentation: bindings: add dt documentation for Rockchip eMMC PHY
This patch adds a binding that describes the Rockchip eMMC PHYs
found on Rockchip SoCs eMMC interface.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from git.kernel.org kishon/linux-phy next
 commit c9a1ddcac5b95a9dbf3d3f71d3be8b157239cce5)

Change-Id: I6913babddbc70c1ad3ea2234d8afac79190852a4
2016-02-29 11:54:18 +08:00
Shen Zhenyi
a5a28cb9c7 video: rockchip: tve: fix compile error and warning
Change-Id: Iacfc54e3f1c01cf3827cbb576d36f64145976bc1
Signed-off-by: Shen Zhenyi <szy@rock-chips.com>
2016-02-29 09:26:07 +08:00
David Wu
035b32d273 ARM64: dts: rockchip: add io-domain node for rk3366
Change-Id: I774e717fb49a725f143ff21cd7c4969dbe66a2de
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-02-26 20:05:44 +08:00
David Wu
16f09683b6 POWER: AVS: rockchp: add rk3366 io domain supprot
Change-Id: I64eb48ee7e161306b941a851585c50a1ee0edae2
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-02-26 19:06:18 +08:00
xuhuicong
c4d7401059 video: rockchip: hdmi: v1: modify double free to avoid compile warning
rockchip_hdmiv1.c:375:1-6: WARNING: invalid free of devm_ allocated data

Change-Id: I0ab0b3d8f30a9c106e67f33ae93bc1df1b333fc2
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-02-26 16:57:34 +08:00
Elaine Zhang
102147ac69 ARM64: powerdomain: enable power domain debug config by default
enable PM_ADVANCED_DEBUG by default.
use pd debug get pd tree like this:
cat d/pm_genpd/pm_genpd_summary

Change-Id: I1ca27a7619cc0655c2256918d7b6530b6a637bcf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-02-26 16:34:13 +08:00
xiaoyao
68874647f2 net: rfkill: fixed "WARNING: invalid free of devm_ allocated data"
Change-Id: I3c84a08e9d62d6f16e4f162708584f7fd716066b
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-02-26 16:29:29 +08:00
Heiko Stuebner
01e482c2d7 UPSTREAM: phy: rockchip-usb: expose the phy-internal PLLs
The USB phys on Rockchip SoCs contain their own internal PLLs to create
the 480MHz needed. Additionally this PLL output is also fed back into the
core clock-controller as possible source for clocks like the GPU or others.

Until now this was modelled incorrectly with a "virtual" factor clock in
the clock controller. The one big caveat is that if we turn off the usb phy
via the siddq signal, all analog components get turned off, including the
PLLs. It is therefore possible that a source clock gets disabled without
the clock driver ever knowing, possibly making the system hang.

Therefore register the phy-plls as real clocks that the clock driver can
then reference again normally, making the clock hirarchy finally reflect
the actual hardware.

The phy-ops get converted to simply turning that new clock on and off
which in turn controls the siddq signal of the phy.

Through this the driver gains handling for platform-specific data, to
handle the phy->clock name association.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit b74fe7c761)

Change-Id: Ie05464a9523af86b602d4801cb9b842f65d08670
2016-02-25 16:11:34 +08:00
Heiko Stuebner
c1536abe40 UPSTREAM: phy: rockchip-usb: add compatible values for rk3066a and rk3188
We need custom handling for these two socs in the driver shortly,
so add the necessary compatible values to binding and driver.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit c2bfc3b888)

Change-Id: I63cf61e12b1f3bb56856accc38949c6cd8c0ce8e
2016-02-25 16:11:17 +08:00
Heiko Stuebner
359563976d UPSTREAM: phy: rockchip-usb: move per-phy init into a separate function
This unclutters the loop in probe a lot and makes current (and future)
error handling easier to read.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 97dd910109)

Change-Id: I5c2ccfbd42e52b77649f01bca2a86767f27fe32f
2016-02-25 16:10:53 +08:00
Heiko Stuebner
970f98bcd2 UPSTREAM: phy: rockchip-usb: introduce a common data-struct for the device
This introduces a common struct that holds data belonging to
the umbrella device that contains all the phys and that we
want to use later.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 5fdbb97dec)

Change-Id: I48dd87b0b39739e0c75d0613e881b2b57e8cb6f2
2016-02-25 16:10:32 +08:00
Heiko Stuebner
5caeb6eca8 UPSTREAM: phy: rockchip-usb: fix clock get-put mismatch
Currently the phy driver only gets the optional clock reference but
never puts it again, neither during error handling nor on remove.
Fix that by moving the clk_put to a devm-action that gets called at
the right time when all other devm actions are done.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry picked from commit 75d390fecf)

Change-Id: I976d5a49448febdb7da5b5c35455c708bfc83899
2016-02-25 16:10:00 +08:00
David Wu
9e87280e0d keys: rockchip: use late_initcall for driver init
Use late_initcall to ensure saradc driver init bofore
keys driver init.

Change-Id: I34a12cb4d3e28c749d9a8bbf35329185edf7c0c6
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-02-25 09:54:01 +08:00
Xiao Feng
80859cc1d1 ARM64: dts: add power-management node for rk3366
add pd parameters in the dtsi.
support pd for rk3366.

Change-Id: Id8a7c7b84038e4987aea8cb0e9846fbe187af0e9
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-25 09:51:19 +08:00
Xiao Feng
1fd3c9b0b1 soc: rockchip: power-domain: Modify power domain driver for rk3366
This driver is modified to support RK3366 SoC.

Change-Id: If278582e721517a96499be203e3d28573cad880f
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-25 09:50:38 +08:00
Xiao Feng
fdf85a873f dt-bindings: add power-domain header for RK3366 SoCs
According to a description from TRM, add all the power domains.

Change-Id: I65046318da4592b76bfd5ab7c0294e2c5d66d20a
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-25 09:49:51 +08:00
Xiao Feng
98bfaee3b1 dt-bindings: modify document of Rockchip power domains
Modify binding documentation for the power domains
found on Rockchip RK3366 SoCs.

Change-Id: Ib9cd07971303b1205f501a06430811e877870212
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-25 09:49:33 +08:00
Frank Wang
61e878943f ARM64: configs: rockchip_defconfig select USB20_HOST and USB20_OTG
Change-Id: I6eaa1fedeb05d5e50dc8da7eb3109d47715cd5d0
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-02-24 14:21:54 +08:00
Frank Wang
29d37eb195 ARM64: dts: add usb2.0 dwc otg configuration for RK3368 sheep board
Change-Id: I01fd9671f89d9e61e2a59ac2272569ce8ebfd092
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2016-02-24 14:21:37 +08:00