Commit Graph

591767 Commits

Author SHA1 Message Date
David Wu
c3f8cdf6db dtsi: arm64: rockchip: add pinctrl DT node for rk3399
Change-Id: Ib729c2f6e07aed1e16703541cc0dcc548e6ced06
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-02-03 10:32:22 +08:00
Caesar Wang
3e25ac60e8 thermal: rockchip: fix a impossible condition caused by the warning
As the Dan report the smatch check the thermal driver warning:
drivers/thermal/rockchip_thermal.c:551 rockchip_configure_from_dt()
warn: impossible condition '(thermal->tshut_temp > ((~0 >> 1))) =>
(s32min-s32max > s32max)'

Although The shut_temp read from DT is u32,the temperature is currently
represented as int not long in the thermal driver.
Let's change to make shut_temp instead of the thermal->tshut_temp for
the condition.

Fixes: commit 437df2172e
("thermal: rockchip: consistently use int for temperatures")

Change-Id: I7951bf83baec2ef0ae8fe50d5735f992a7d3ed41
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-02-03 10:27:49 +08:00
Caesar Wang
7d99e90215 thermal: rockchip: Support the RK3399 SoCs in thermal driver
The RK3399 SoCs have two Temperature Sensors, channel 0 is for CPU.
channel 1 is for GPU.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

(cherry picked from git.kernel.org torvalds/linux.git master
 commit b0d70338bc)
Change-Id: I12bccb3c4a56c56f16a019c3faad909bfae65b97
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-02-03 10:27:26 +08:00
Caesar Wang
d28e4345fb thermal: rockchip: Support the RK3228 SoCs in thermal driver
The RK3228 SoCs has one Temperature Sensor, channel 0 is for CPU.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

(cherry picked from git.kernel.org torvalds/linux.git master
 commit 7b02a5e782)
Change-Id: I45def60892a8f5cd6fd18ad064b4bf7c13260b59
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-02-03 10:27:00 +08:00
Xu Jianqun
eca32606bc clk: rockchip: remove CLK_IGNORE_UNUSED from rk3368 usb otg clocks
Change-Id: Iea6c2e8cd011bcaab30c6f6ce2ed7a9ab7a8711c
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-02 16:32:01 +08:00
Xu Jianqun
7ef8499669 clk: rockchip: add HCLK_USB_PERI for rk3368 usb
Change-Id: Ib1fad4af45ac5ba42ddd97918385aee3bd58e18e
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-02 16:30:56 +08:00
xiaoyao
8eac41b19c ARM64: dts: add eMMC/SDMMC/SDIO config for RK3366 SDK boards
Change-Id: Ic469221cfd2f9ff1c9e81c689654fc2a74ea161b
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-02-02 16:12:31 +08:00
xiaoyao
db7ec7339a ARM64: dtsi: Rockchip: add eMMC/SDMMC/SDIO node for RK3366
Change-Id: I0ab4980da43c914a2925a41a92807688458759d3
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-02-02 16:11:45 +08:00
Xu Jianqun
f9822a38d1 clk: rockchip: add SCLK_CRYPTO for rk3368 crypto
Change-Id: I5ea4bca3e164df50e720ef748f8ece4511330d70
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-02 16:00:36 +08:00
Shengfei xu
1231831b6b Revert "regulator: rk818: remove the repeated operations."
This reverts commit 5d24f68822.

Change-Id: I0a98e803958b3f56b8fd2a0099f402fab9a83ad4
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-02-02 14:24:35 +08:00
Xu Jianqun
ac8723b701 ARM64: dts: rockchip: add ion node for rk3366 board
Change-Id: I35cc26100f8eff7408b4d5a55b7544f0b4744b8e
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-01 17:24:42 +08:00
Xubilv
debb2d340f ARM64: dts: rk3366: add mipi dsi node
Change-Id: I3401a98eb5b0c527f25e2a937d59738b1388c025
Signed-off-by: Xubilv <xbl@rock-chips.com>
2016-02-01 16:01:43 +08:00
Xiao Feng
10ebc58772 clk: rockchip: add ids for mipi on rk3366
Change-Id: Ie7c26e9fa1bc5459fcdeefc69a3175a0a50b8260
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-01 14:22:11 +08:00
Xiao Feng
b87bf41078 ARM64: dts: rk3366: add dmac node
Change-Id: I3037b48c91cbe05e2ba6090ce316844ecbe46420
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-02-01 09:55:43 +08:00
Elaine Zhang
53eedb49fe thermal: rockchip: fix calculation error for code_to_temp
the calculation use a global table, not their own table.
so adapt the table to the correct one.

Change-Id: Id416e41910de297259a85a3ae06f4cc3c5788035
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-02-01 09:50:22 +08:00
Xiao Feng
35b081cfd8 clk: rockchip: add ids for usbphy_480m and wifi on rk3366
Change-Id: Ie0d1c4cd7c9c7e660608e097780cd253ddd505fe
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-01-30 16:04:53 +08:00
Heiko Stuebner
ea0e490f8d UPSTREAM: clk-divider: make sure read-only dividers do not write to their register
Commit e6d5e7d90b ("clk-divider: Fix READ_ONLY when divider > 1") removed
the special ops struct for read-only clocks and instead opted to handle
them inside the regular ops.

On the rk3368 this results in breakage as aclkm now gets set a value.
While it is the same divider value, the A53 core still doesn't like it,
which can result in the cpu ending up in a hang.
The reason being that "ACLKENMasserts one clock cycle before the rising
edge of ACLKM" and the clock should only be touched when STANDBYWFIL2
is asserted.

To fix this, reintroduce the read-only ops but do include the round_rate
callback. That way no writes that may be unsafe are done to the divider
register in any case.

The Rockchip use of the clk_divider_ops is adapted to this split again,
as is the nxp, lpc18xx-ccu driver that was included since the original
commit. On lpc18xx-ccu the divider seems to always be read-only
so only uses the new ops now.

Fixes: e6d5e7d90b ("clk-divider: Fix READ_ONLY when divider > 1")
Reported-by: Zhang Qing <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from git.kernel.org clk/linux.git clk-next
 commit 5035981979)

Change-Id: I382323c61f94e79ee7eaec6db16f6c2a9ad387eb
2016-01-30 12:00:43 +08:00
Xing Zheng
5b3b4587bb UPSTREAM: clk: rockchip: add new pll-type for rk3036 and similar socs
The rk3036's pll and clock are 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 commit 9c4d6e5537)

Change-Id: I3a4aa2eb470976d69fef6b4fc2a33d9b46989817
2016-01-30 11:42:21 +08:00
Shengfei xu
67f27449b3 ARM64: dts: rk3368-tb: the regulator-names match the hardware.
Change-Id: I7e5de0c05942d622e9f26743bb8c7600f1155406
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-01-30 10:07:26 +08:00
Shengfei xu
5d24f68822 regulator: rk818: remove the repeated operations.
Populates regulator_init_data structure by extracting data from device
tree node, when regulator drivers register a regulator.  so we don't 
repeat it.

Change-Id: I481e7c802a24916f15c5b3a5eaf66f32dc0272d7
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-01-30 10:04:44 +08:00
Zhaoyifeng
8de0542fae ARM64: dtsi: add nandc config for RK3366
Change-Id: Ib15f6ed6e7ebb80775c57b6c496db712fcc8ea80
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2016-01-28 15:48:42 +08:00
David Wu
e4c2ff17b9 dts: arm64: rockchip: add rk3366-tb dts file
Change-Id: I9b053677f411f7e0e447b663269689fdf7738ab8
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-01-25 22:15:15 +08:00
xiaoyao
36eaf1e2bd ARM64: dts: rockchip: add sd_card support for RK3368
Change-Id: Icb4c4c23db3a75c90b75cad5374411603c66984b
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2016-01-28 12:13:32 +08:00
David Wu
82cfabe7d7 dtsi: arm64: rockchip: add rk3366 dtsi file
Change-Id: I5a4d3b904f458e2a0df1a0055c97bf5b10b2905f
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-01-28 11:47:51 +08:00
David Wu
4b4ca6f00b dtsi: arm64: rk3399: add pmugrf syscon node
Change-Id: I9b07672091e11f3a45bc20af30da94dd92266869
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-01-28 10:40:03 +08:00
Hecanyang
13041cc922 ARM64: dts: rockchip: add dts file for RK3366 fpga
Change-Id: I18f6ee0a5a422b05ebb6cf0ac88cfe1076649a91
Signed-off-by: Hecanyang <hcy@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
2016-01-25 19:07:11 +08:00
Zheng Yang
842e201cb1 video: rockchip: rename display sysfs node
Backward compatibility with develop-3.10 except for
3dmode, which rename to mode3d.

Change-Id: I9dea6d25adc18c5e1580078f574fa44690791a33
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2016-01-27 14:26:50 +08:00
Xu Jianqun
bdb442a462 clk: rockchip: rk3368 plls' supports 1188MHz
Since HDMI needs clock rate 74.25MHz, so plls must support
a multiple of it.

For Rockchip rk3368 pll has better jetter with 1188MHz, so
add 1188MHz support.

Change-Id: I68c7333ae076ecabf8637298ee8ca43149cb17d1
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-01-27 10:58:33 +08:00
Xu Jianqun
fe87e18dd1 ARM64: dts: rockchip: add clock assign for rk3368 cru
Add "assigned-clocks" for rk3368 cru node, to intalize
clock rate for plls, bus and peripher.

Change-Id: Ic36401fef73b005d778b8ccc8527633af408985c
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-01-27 10:08:03 +08:00
zhangqing
02ec3dcd17 UPSTREAM: clk: rockchip: rk3368: enable the CLK_SET_RATE_PARENT flag for i2s_2ch
I2S_2CH set freq need to select parent and calculate parent freq.
so just mark it as the CLK_SET_RATE_PARENT flag.

Signed-off-by: zhangqing <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 e8099067de)

Change-Id: I1e7b75eba06fbe27079c3887170ce801da005ce0
2016-01-26 17:29:54 +08:00
zhangqing
c9c8007ff7 UPSTREAM: clk: rockchip: rk3368: enable the CLK_SET_RATE_PARENT flag for spdif_8ch
SPDIF_8CH set freq need to select parent and calculate parent freq.
so just mark it as the CLK_SET_RATE_PARENT flag.

Signed-off-by: zhangqing <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 0bbe62eb92)

Change-Id: I3deed226430c492dc3b70337ae3e89d201aeb66d
2016-01-26 17:29:28 +08:00
zhangqing
9c61fe501d UPSTREAM: clk: rockchip: rk3368: fix edp_24m parent
The edp_24m parent select bit define is:
1'b0:xin24m
1'b1:1'b0(dummy)
so adapt the parent sel bit to the currect one.

Signed-off-by: zhangqing <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 d566ebc3c0)

Change-Id: Ia0530f4e00c8ea15420b49587097f07ac1af5092
2016-01-26 15:58:02 +08:00
Heiko Stuebner
24ebcaf1c0 UPSTREAM: clk: rockchip: rk3368: fix hdmi_cec gate-register
Fix a typo making the sclk_hdmi_cec access a wrong register to handle
its gate.

Fixes: 3536c97a52 ("clk: rockchip: add rk3368 clock controller")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: zhangqing <zhangqing@rock-chips.com>
Cc: stable@vger.kernel.org
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.6-clk/next
 commit fd0c0740fa)

Change-Id: I549ef7e3c29df9fe7d4280288639e401727a001e
2016-01-26 15:54:06 +08:00
Heiko Stuebner
cb438027f7 UPSTREAM: clk: rockchip: rk3368: fix parents of video encoder/decoder
The vdpu and vepu clocks can also be parented to the npll and current
parent list also is wrong as it would use the npll as "usbphy" source,
so adapt the parent to the correct one.

Fixes: 3536c97a52 ("clk: rockchip: add rk3368 clock controller")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: zhangqing <zhangqing@rock-chips.com>
Cc: stable@vger.kernel.org
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.6-clk/next
 commit 0f28d98463)

Change-Id: Ie7e8f1e7d6de5e149705cc5f6d6207e839eca2bd
2016-01-26 15:53:46 +08:00
Heiko Stuebner
e518354e37 UPSTREAM: clk: rockchip: rk3368: fix cpuclk core dividers
Similar to commit 9880d4277f ("clk: rockchip: fix rk3288 cpuclk core
dividers") it seems the cpuclk dividers are one to high on the rk3368
as well.

And again similar to the previous fix, we opt to make the divider list
contain the values to be written to use the same paradigm for them on all
supported socs.

Fixes: 3536c97a52 ("clk: rockchip: add rk3368 clock controller")
Reported-by: Zhang Qing <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: zhangqing <zhangqing@rock-chips.com>
Cc: stable@vger.kernel.org
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.6-clk/next
 commit c6d5fe2ca8)

Change-Id: If85678467e8dc4b4cfce07c3d31faf0c11479780
2016-01-26 15:07:46 +08:00
Heiko Stuebner
69c9ca4166 UPSTREAM: clk: rockchip: rk3368: fix cpuclk mux bit of big cpu-cluster
Both clusters have their mux bit in bit 7 of their respective register.
For whatever reason the big cluster currently lists bit 15 which is
definitly wrong.

Fixes: 3536c97a52 ("clk: rockchip: add rk3368 clock controller")
Reported-by: Zhang Qing <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: zhangqing <zhangqing@rock-chips.com>
Cc: stable@vger.kernel.org
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.6-clk/next
 commit 535ebd428a)

Change-Id: I26364fdba8cdfe36c8b9ba767b4226c9ac6ff118
2016-01-26 14:45:44 +08:00
Caesar Wang
631bfc4eee dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible
This patchset attempts to new compatible for thermal founding
on RK3228/RK3399 SoCs.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

(cherry picked from git.kernel.org torvalds/linux.git master
 commit 4be02530fc)
Change-Id: I9fd1f52d7b4781230e5436e90ed6d9d2c95d06cb
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-01-26 10:09:08 +08:00
Caesar Wang
1da295343b thermal: rockchip: fix a trivial typo
This patchset trys to dictate unified format for driver.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>

(cherry picked from git.kernel.org torvalds/linux.git master
 commit 13c1cfda1a)
Change-Id: I9659ae150c9d24f2482fd8c285dcfeb65bf873b1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-01-26 10:09:08 +08:00
Xiao Feng
e75eb8ab79 dt-bindings: add documentation of rk3366 clock controller
Add the devicetree binding for the cru on the rk3366 which quite
similar structured as previous clock controllers.

Change-Id: I109da26f88cd733b64d4c4339db63346dd9ffea6
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-01-26 09:20:14 +08:00
Xiao Feng
a13a9f0417 clk: rockchip: add dt-binding header for rk3366
Add the dt-bindings header for the rk3366, that gets shared between
the clock controller and the clock references in the dts.

Change-Id: Ie4d8f9d02be2331b368d44f5d76a92fd9959b72a
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-01-26 09:19:36 +08:00
Xiao Feng
85f127f547 ARM64: configs: rockchip_defconfig enable cpufreq
Change-Id: Ie49f1c205c3fadac8dec58efbf1746e703e67970
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-01-26 09:18:09 +08:00
Xiao Feng
ab12d29622 ARM64: configs: rockchip_defconfig add RK808 clkout
Change-Id: I106c419f92436fc41f95aa57a50bdfc2ba53b0f9
Signed-off-by: Xiao Feng <xf@rock-chips.com>
2016-01-26 09:17:26 +08:00
Huang Jiachai
6b3ef17099 video: rockchip: update coding style
Change-Id: I7bd8d6875d126db2062e48cd81ec191d954da4bf
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-01-25 20:40:47 +08:00
Huang Jiachai
e6dcbc2e77 video: rockchip: vop iommu state depend on dts and delete CONFIG_ROCKCHIP_IOMMU
Change-Id: I4de26882995313ed11c81b2162e29bc771e117de
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-01-25 20:40:47 +08:00
Mark Yao
9edb5631b2 video: rk322x: fix crash on suspend/resume
Skip the update_reg_update when vop is suspend, because
register access would hang up the system when vop is suspend.

Change-Id: I01e712736df9a6de88440ee67c624a26ea752d85
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-01-25 20:40:46 +08:00
Huang Jiachai
dbbe2a6bb4 video: rockchip: vop: 322x: sync with develop-3.10
Change-Id: Iab27d3ac659df8f22198ec0c058cb864fec37c1d
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-01-25 20:40:46 +08:00
Mark Yao
88f9467e51 video: rk322x: rename vop rk3228 to rk322x
Change-Id: I6d8d9ff84f76d7fa5c820b682081bbe0cb851ff1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-01-25 20:40:45 +08:00
Huang Jiachai
cd3f162865 video: rockchip: lvds: rk31xx_lvds.c add support rk3366
Change-Id: Iecd6bacf28cb4620a1141c89ff16612ec4866230
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-01-25 20:31:13 +08:00
Huang Jiachai
7ec167829a video: rockchip: lcdc: 3368: add support rk3366
Change-Id: I7e6137418b18c58c53f958089527635ac62eb887
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-01-25 20:28:24 +08:00
Xu Jianqun
9da1bda27c staging: ion: cma heap support map/unmap iommu
Add apis for cma-heap to map/unmap iommu.

Change-Id: I993d54285691e7015ffa302a4bb776234ca45bcb
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-01-25 18:46:27 +08:00