Commit Graph

591784 Commits

Author SHA1 Message Date
Zheng Yang
64bccfea37 video: rockchip: hdmi: 3368 work okay
Change-Id: I40f6b87f1f77fb410d4adb9c2b352624b6b19d34
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2016-02-16 13:59:03 +08:00
Xu Jianqun
484dbffdc8 ARM64: dts: rockchip: rk3368 reserved 128M memory for cma
Required by isp, the continuous memory region should reserve
128M for cma-heap.

Change-Id: I906fa713ee111c0a5242ffaa42416d9bd568d3a3
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-16 13:56:54 +08:00
David Wu
e367ce05f7 UPSTREAM: pinctrl: rockchip: add support for the rk3399
The pinctrl of rk3399 is much different from other's,
especially the 3bits of drive strength.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from git.kernel.org linusw/linux-pinctrl for-next
 commit b6c2327577)

Change-Id: I6d0260256f8cf742f940770b317b26571bf42023
2016-02-15 16:43:03 +08:00
Julia Lawall
e4597d3069 UPSTREAM: pinctrl: rockchip: add missing of_node_put
for_each_child_of_node performs an of_node_get on each iteration, so a
return from the loop requires an of_node_put.

A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):

// <smpl>
@@
local idexpression n;
expression e,e1;
@@

 for_each_child_of_node(e1,n) {
   ...
(
   of_node_put(n);
|
   e = n
|
   return n;
|
+  of_node_put(n);
?  return ...;
)
   ...
 }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit f7a81b7f4e)

Change-Id: Ib0eb8520fbb3d83fc67135634c4f17112e73f215
2016-02-15 16:41:45 +08:00
Jeffy Chen
96f3a06f76 UPSTREAM: pinctrl: rockchip: add support for the rk3228
The pinctrl of rk3228 is much the same as rk3288's, but
without pmu.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit fea0fe6052)

Change-Id: I68a5881ed8daf45f62ccee911d83a52e3362a25a
2016-02-15 16:41:28 +08:00
Zheng Yang
e4809e7304 video: rockchip: hdmi: fix code style following the 4.4 kernel rule
Change-Id: I685ff16f652cc32343316c26cafd5feaf29efe40
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2016-02-15 15:26:52 +08:00
Zheng Yang
3064eec08b video: rockchip: hdmi: sync to develop-3.10
HDMI driver sync to develop-3.10 following commit:

commit 10dfac7372fb980c950d0405ee7bf175e089bf2f
Author: Zheng Yang <zhengyang@rock-chips.com>
Date:   Thu Jan 28 15:30:19 2016 +0800

video: rockchip: hdmi: rename some vic which pic aspect is 21:9
Use picture aspect ratio define vic, instead of pixel aspect ratio.

Change-Id: I488520a1bf42d228936806e17f19f00b4579008d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2016-02-15 15:26:39 +08:00
Xu Jianqun
50b7fa6e2e clk: rockchip: add clock ids for vip of RK3368 SoCs
Change-Id: I73ac0fd0010d0dc95c6da0770f85d7b35a11a628
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-03 16:49:30 +08:00
Xu Jianqun
db9c0c4ab7 ARM64: dts: rockchip: add rk3368 sound node
Add sound node, use simple card driver for rt5640 codec on rockchip
rk3368 sheep board.

Change-Id: I1e7f0f7ca974d7232a2660219bd3ddfb408aaec3
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-03 16:46:24 +08:00
Jianhong Chen
a3405ef678 ARM64: dts: rk3366-tb: add rk818 support
Change-Id: I8ddd45f6c2eba3ac3a9dd3d8fa962d27a52fda5f
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com>
2016-02-03 15:19:12 +08:00
Xu Jianqun
f5fb0dee26 ARM64: configs: rockchip_defconfig enable simple card driver
Change-Id: I2f3daa98ec5cb5ef09710bd1c479c2e0d3c10b42
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-03 14:26:03 +08:00
Xu Jianqun
77c0bcbacb ARM64: configs: rockchip_defconfig select RT5640
Change-Id: If269722b9383a6fc9b02fe3f85163b143736ed2a
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-03 14:25:45 +08:00
Xu Jianqun
25bfe84f49 ASoC: RT5640: make rt5640 driver enable to be selected
Change-Id: I4600f79220ab4faf7bfde1cb75b7fbe7b5fef747
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
2016-02-03 14:25:10 +08:00
Wolfram Sang
4f7b0257ee UPSTREAM: i2c: make i2c_parse_fw_timings() always visible
This function used to be DT only, so it lived inside a CONFIG_OF block.
Now it uses device attributes and must be moved outside of it. No
further code changes, only one whitespace improvement.

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 54177ccfbe)

Change-Id: Ie7a73fef09266a97be4d1f50efc295428357c84c
2016-02-03 11:12:55 +08:00
Wolfram Sang
70ce99ebf8 UPSTREAM: i2c: add generic routine to parse DT for timing information
Inspired from the i2c-rk3x driver (thanks guys!) but refactored and
extended. See built-in docs for further information.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit e1dba01ca6)

Change-Id: I491e8e51529d2aad1bbeed706a617ccf39ef3205
2016-02-03 11:12:00 +08:00
Wolfram Sang
73d27be72f UPSTREAM: i2c: document generic DT bindings for timing parameters
Also, sort the properties alphabetically and make indentation
consistent. Wording largely taken from i2c-rk3x.txt, thanks guys!

Only "i2c-scl-internal-delay-ns" is new, the rest is used by two drivers
already and was documented in their driver binding documentation.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 99b809d7bd)

Change-Id: I7f60b372e5ec2425ef6976306a7e26a1437f0384
2016-02-03 11:11:09 +08:00
Huang Jiachai
0bb8dc17eb ARM64: dts: rk3366: add config for display
Change-Id: I2112b26b762c56da1c621332743e376255669646
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-02-03 10:51:06 +08:00
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