Commit Graph

592977 Commits

Author SHA1 Message Date
Rocky Hao
2b3cd136e1 ARM64: dts: rk3366: update cpu's opp table
Change-Id: Id0d722d90672f78941073a4ad7e45615893b1e90
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-03-23 15:08:29 +08:00
Elaine Zhang
bd8dd2c035 ARM64: rockchip_defconfig: enable rk808 regulator
set CONFIG_REGULATOR_RK808=y

Change-Id: I9cfc60fc82a4cb7dc4056bd13f3d678d6a0f7faf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-03-23 14:46:43 +08:00
Xing Zheng
78b679d075 clk: rockchip: fix pmu cru register name error
Change-Id: I4ab865326657dceaf8759b37d02d80de9e3071c0
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-23 14:46:00 +08:00
Xing Zheng
120126f7d1 clk: rockchip: add some clock IDs for reference
Change-Id: I8ce291b7145a56aea9d8f5b5742506a581f26912
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-23 14:44:53 +08:00
Xing Zheng
6d3b3d984d clk: rockchip: fix PLL table and add pclk DFLAG for rk3399
Change-Id: Id89c7099b24fdcff967528a3741af2e84fa1a754
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-23 14:41:21 +08:00
Huang Jiachai
a40e1eaedf video: rockchip: fb: the default state of FBDC is closed
Change-Id: I6c1a4e47daa00089bfeb7b7316dbe6bac4409a5c
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-23 14:36:45 +08:00
Huang Jiachai
a9cdb49f36 video: rockchip: lcdc: 3368: update for FBDC
FBDC state |= win[i]->area[0]->fbdc_en;

Change-Id: I2ddfdea66061ad67b876369c130b8cfa6e3bda55
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-23 14:36:05 +08:00
Huang Jiachai
bde74b75f5 video: rockchip: fb: init saved_list
Change-Id: I2da026cfcef25c6ae44356d0c3869e482cb97e11
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-23 14:35:32 +08:00
Huang Jiachai
7a67aeac84 video: rockchip: lcdc: 3366: add more format for gather
Change-Id: I5d20a52f1bd680af4083672b0607fa95332d7146
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-03-23 14:33:47 +08:00
Simon
3a1bdfa3a4 iommu: rk-iovmm: change compatible name to a unified name
To make android platform iommu work well, we need a unified compatible
name to match the new iommu definition in dtsi

Change-Id: Ied581653e1261fd0a21577f4e9ce3b915af135cd
Signed-off-by: Simon <xxm@rock-chips.com>
2016-03-23 14:29:32 +08:00
xubilv
75733989c6 video: rockchip: mipi: remove the function of get dsi host id
The rk3288, rk3368 and rk3366 have the same physical dsi id 0x3133302A,
so do not need to get dsi host id.

Change-Id: I0de1e9b7c0250b37ffdc2c39155c5f16afb48956
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-03-23 14:08:04 +08:00
xubilv
2315d4a0a0 ARM64: dts: rk3366: mipi: modify compatible
Change-Id: I05bb54c00019310fb57a0bc3fb0bd365aaed10dd
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-03-23 14:06:19 +08:00
xubilv
13021405bb video: rockchip: rk3366: add mipi support
Change-Id: Ibf70a23ba2fe02cff5e66932bc802264768d05cf
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-03-23 14:05:32 +08:00
Feng Xiao
be882fb6ba ARM64: dts: rk3366: assign rates for aclk_bus and aclk_peri
Assign rates for aclk_bus and aclk_peri according to our original design.

Change-Id: Iab4961d485421151be5dbdacf6929800150ab342
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-23 13:57:35 +08:00
Feng Xiao
854c7f9559 clk: rockchip: rk3366: modify cpuclk_rate_table
add 1296MHz, 1104MHz and 216MHz to the cpuclk_rate_table list

Change-Id: I1ea7ee432b7c69b89cb3c11a74e67d9d6af1a5dd
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-23 11:24:54 +08:00
Xing Zheng
c1f29ad9c6 clk: rockchip: fix big/LITTLE cores alternate parent failed
Change-Id: Iebe33903ad5a06f276454ffe12654866bd9567eb
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 21:27:16 +08:00
Xing Zheng
bf7bbf27dd clk: rockchip: fix pclk_pmu_src clock for rk3399
Change-Id: I1e9c04366af370664d864d2877fa87a385da44a6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 20:47:11 +08:00
Xing Zheng
a345e5d67b clk: rockchip: fix uart4_pmu and mipidphy_ref clock for rk3399
Change-Id: I307e4480cb4eb52c447b2db47643b478d4292500
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 20:46:50 +08:00
xuhuicong
8d0118ae38 video: rockchip: hdmi: v2: modify phy reg to pass CTS signal quality test
Change-Id: Ife9f9808dcc29320f628bf91005e16f22bbe3c50
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-03-22 19:32:16 +08:00
Shawn Lin
803df09a2b ARM64: dts: rk3399-tb: enable emmc_phy and sdhci
Change-Id: I0693b5e3f194b3fb0aed73784d0242ebf89d4ebe
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-03-22 19:31:08 +08:00
Feng Xiao
54ca0b112b ARM64: dts: rk3366: assigned parents for clk_32k
Change-Id: I1742823658aa46226e3112969d3eabc695921fb5
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-22 19:30:16 +08:00
Feng Xiao
4ed52a5633 ARM64: dts: rk3366: assigned parents for vop dclks
For sheep board, we have decided to assign vop full for
use with HDMI. And we can also change it in the board
dts in the further.

Change-Id: Id966615c84cef50f0e8d849e3840434ba7f7b7ec
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-22 19:28:09 +08:00
Feng Xiao
a36f89898e clk: rockchip: rk3366: leave npll for VOP only
We will need a pll to support all kinds of clock rate requirement
for HDMI which may change the rate at run time.

In order not to affect other clocks, remove the npll from the
parent list of other clocks and only DCLK_VOP(FULL or LITE) can
select npll as parent. Also add the ability for DCLK_VOP to set
the rate of its parent (which is now forced to NPLL).

Change-Id: I1e13ef1c4f1b9728f9c173454d5056780c47a95e
Signed-off-by: Feng Xiao <xf@rock-chips.com>
2016-03-22 19:26:44 +08:00
Shawn Lin
d1293e444e phy: rockchip-emmc: add init function
We need to init some signal related stuff
to make sure the SI meet the requirement.

Change-Id: I829203fb9cd2e93aa6acaa5288667f600370d781
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-03-22 19:01:34 +08:00
ZhengShunQian
91732e1fcb arm64: dts: rockchip: add compatible for rk3399evb board
Coreboot choose dtb by its compatible string.
Add "google,rk3399evb-rev*" accordingly.

Support more versions for rk3399evb in the future.
If we later find we need to introduce differences between versions,
it's easy to change things.

Change-Id: I049b4f113b1694577a1f0be68f6b635ae13653c0
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-03-22 18:43:59 +08:00
Xing Zheng
ab6f52894f clk: rockchip: fix cci src clocks for rk3399
Change-Id: I9c22a270c64feaf52436117e47fb874000361100
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 17:55:10 +08:00
Xing Zheng
f23b110813 clk: rockchip: add some critical clocks for rk3399
Change-Id: I1a04f11f881764929d9e5801626ce398bc3b193e
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 16:59:55 +08:00
Xing Zheng
4aa115b308 clk: rockchip: update dt-binding header for rk3399 pmucru IDs
Change-Id: I302dc97a3ec5ef5cd7609ecff929c6fea25f005b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 16:59:01 +08:00
Xing Zheng
016a5e2292 ARM64: dts: rk3399: fix incorrect pmucru reference
Change-Id: I4e6743eecf14597cc3391fd4f80ad329ee7b5785
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 14:43:42 +08:00
Xing Zheng
b586adddbf clk: rockchip: fix and add some critical clocks for rk3399
Change-Id: I1db9ab40ba9c25d5054a4011eee1ea14f1207443
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 14:43:17 +08:00
Xing Zheng
494dbc7c26 clk: rockchip: update dt-binding header for rk3399 pmucru clock IDs
Change-Id: Ic19ea01466ab4d90210cedbbb1d0bce21e3800e1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-03-22 14:28:48 +08:00
ZhengShunQian
e0492807e6 iommu/rockchip: fix bool operation error and probe warning
Bool type true is exactly BIT(0), so
	bool enable = true;
	enable &= BIT(2);
enable will be false, which isn't the result we expected in this case.
Change bool type to u32.

The other fix is checking the res in probe() to skip the irq resource.

Change-Id: I2947c9f1e15cb92f03096d26a44759c107bfacd1
Reported-by: Simon <xxm@rock-chips.com>
Suggested-by: Simon <xxm@rock-chips.com>
Signed-off-by: ZhengShunQian <zhengsq@rock-chips.com>
2016-03-22 11:19:31 +08:00
Jianqun Xu
6bd1f0943a ARM64: dts: rk3399-monkey: fix uart2 address error
Change-Id: Id857682e49063fb4d47253385b930acb59327046
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-03-22 09:45:42 +08:00
Elaine Zhang
5857747a44 rockchip: clk: rk3399: fix up clk tree assigned error
add some clk id.

Change-Id: Iffc3fbfa557e5d01f70ab0be2d84a85cff7ac34c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-03-21 23:21:32 +08:00
xuhuicong
846b7cb3a6 video: rockchip: hdmi: v2: modify phy clock rate to reduce tdms clock jitter
set hdmi phy clock as 148.5Mhz when dclk rate over this frequency

Change-Id: I416b2b98fe42fafc45491b66252f245aed0f1364
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-03-21 20:48:03 +08:00
Yakir Yang
cf12427db7 FROMLIST: drm: bridge: analogix/dp: Fix the possible dead lock in bridge disable time
It may caused a dead lock if we flush the hpd work in bridge disable time.

The normal flow would like:
  IN --> DRM IOCTL
        1. Acquire crtc_ww_class_mutex (DRM IOCTL)
  IN --> analogix_dp_bridge
        2. Acquire hpd work lock (Flush hpd work)
        3. HPD work already in idle, no need to run the work function.
  OUT <-- analogix_dp_bridge
  OUT <-- DRM IOCTL

The dead lock flow would like:
  IN --> DRM IOCTL
        1. Acquire crtc_ww_class_mutex (DRM IOCTL)
  IN --> analogix_dp_bridge
        2. Acquire hpd work lock (Flush hpd work)
  IN --> analogix_dp_hotplug
  IN --> drm_helper_hpd_irq_event
        3. Acquire mode_config lock (This lock already have been acquired in previous step 1)
** Dead Lock Now **

It's wrong to flush the hpd work in bridge->disable time, I guess the
original code just want to ensure the delay work must be finish before
encoder disabled.

The flush work in bridge disable time is try to ensure the HPD event
won't be missed before display card disabled, actually we can take a
fast respond way(interrupt thread) to update DRM HPD event to fix the
delay update and possible dead lock.

(am from https://patchwork.kernel.org/patch/8313001/)

Change-Id: Id7b357de0f497ff8c9f259fe31dc28be34f17083
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:45:44 +08:00
Yakir Yang
2cf47cc4cf FROMLIST: drm: bridge: analogix/dp: add panel prepare/unprepare in suspend/resume time
Turn off the panel power in suspend time would help to reduce
power waste.

(am from https://patchwork.kernel.org/patch/8312971/)

Change-Id: Iac01ac4041a2486e0347ed0377abcc094ab493ea
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:45:14 +08:00
Yakir Yang
e8eb9f4980 FROMLIST: drm: bridge: analogix/dp: add edid modes parse in get_modes method
Display Port monitor could support kinds of mode which indicate
in monitor edid, not just one single display resolution which
defined in panel or devivetree property display timing.

Note: Gustavo Padovan try to remove the controller and phy
power on function in bind time at bellow commit:
	drm/exynos: do not start enabling DP at bind() phase

But for now driver need to read edid message in .get_modes()
function, so controller must be inited in bind time, so we
need to add controller init back.

(am from https://patchwork.kernel.org/patch/8312921/)

Change-Id: I32abee21665a7e1470f2898b7fbc925108f9d768
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:44:39 +08:00
Yakir Yang
6d4a28cf6f FROMLIST: drm: bridge: analogix/dp: move hpd detect to connector detect function
This change just make a little clean to make code more like
drm core expect, move hdp detect code from bridge->enable(),
and place them into connector->detect().

Note: Gustavo Padovan try to remove the controller and phy
power on function in bind time at bellow commit:
	drm/exynos: do not start enabling DP at bind() phase

But for now the connector status don't hardcode to connected,
need to operate dp phy in .detect function, so we need to revert
parts if Gustavo Padovan's changes, add phy poweron
function in bind time.

(am from https://patchwork.kernel.org/patch/8312901/)

Change-Id: I0ed1be541210f85883477f1b2a88bd8d57e390d6
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:44:10 +08:00
Yakir Yang
feb68d83c2 FROMLIST: drm: bridge: analogix/dp: try force hpd after plug in lookup failed
Some edp screen do not have hpd signal, so we can't just return
failed when hpd plug in detect failed.

This is an hardware property, so we need add a devicetree property
"analogix,need-force-hpd" to indicate this sutiation.

(am from https://patchwork.kernel.org/patch/8313081/)

Change-Id: If99d29936aafd996c98568d6e184aee6d9c8bc47
Acked-by: Rob Herring <robh@kernel.org>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:43:41 +08:00
Yakir Yang
a673c78753 FROMLIST: drm: bridge: analogix/dp: add max link rate and lane count limit for RK3288
There are some IP limit on rk3288 that only support 4 physical lanes
of 2.7/1.6 Gbps/lane, so seprate them out by device_type flag.

(am from https://patchwork.kernel.org/patch/8312881/)

Change-Id: Id1432af874eb0a6dec819d7b7e735c1040f4bf5c
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:43:03 +08:00
Yakir Yang
45970584ea FROMLIST: drm: bridge: analogix/dp: add some rk3288 special registers setting
RK3288 need some special registers setting, we can separate
them out by the dev_type of plat_data.

(am from https://patchwork.kernel.org/patch/8312861/)

Change-Id: I422216f58a18f2c2fee187b4f19de7b9d0fcd05a
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:42:17 +08:00
Yakir Yang
2db75bb252 FROMLIST: dt-bindings: add document for rockchip variant of analogix_dp
Rockchip DP driver is a helper driver of analogix_dp coder driver,
so most of the DT property should be descriped in analogix_dp document.

(am from https://patchwork.kernel.org/patch/8312841/)

Change-Id: If7a422554ac09cd3ed40eac8191369df532c58bf
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:41:51 +08:00
Yakir Yang
819efaa852 FROMLIST: drm: rockchip: dp: add rockchip platform dp driver
Rockchip have three clocks for dp controller, we leave pclk_edp
to analogix_dp driver control, and keep the sclk_edp_24m and
sclk_edp in platform driver.

(am from https://patchwork.kernel.org/patch/8615371/)

Change-Id: Ibe22447ab881b7421e999479cbdfd529d183f6b4
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:41:16 +08:00
Yakir Yang
a176865d59 FROMLIST: ARM: dts: exynos/dp: remove some properties that deprecated by analogix_dp driver
After exynos_dp have been split the common IP code into analogix_dp driver,
the analogix_dp driver have deprecated some Samsung platform properties which
could be dynamically parsed from EDID/MODE/DPCD message, so this is an update
for Exynos DTS file for dp-controller.

Beside the backward compatibility is fully preserved, so there are no
bisectability break that make this change in a separate patch.

(am from https://patchwork.kernel.org/patch/8312821/)

Change-Id: I79adafdb4a086d4a357678282cc653a7e3432da9
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:40:42 +08:00
Yakir Yang
623e66a5fc FROMLIST: dt-bindings: add document for analogix display port driver
Analogix dp driver is split from exynos dp driver, so we just
make an copy of exynos_dp.txt, and then simplify exynos_dp.txt

Beside update some exynos dtsi file with the latest change
according to the devicetree binding documents.

(am from https://patchwork.kernel.org/patch/8312811/)

Change-Id: Ia1d47783b735868a4f56231660d8309cf9c75923
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:40:16 +08:00
Yakir Yang
13320df7cf FROMLIST: drm: bridge: analogix/dp: dynamic parse sync_pol & interlace & dynamic_range
Both hsync/vsync polarity and interlace mode can be parsed from
drm display mode, and dynamic_range and ycbcr_coeff can be judge
by the video code.

But presumably Exynos still relies on the DT properties, so take
good use of mode_fixup() in to achieve the compatibility hacks.

(am from https://patchwork.kernel.org/patch/8312791/)

Change-Id: Ia7f37daf40fa2d0516d5c44737ad36b5822c6015
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:39:40 +08:00
Yakir Yang
c4cde23189 FROMLIST: drm: bridge: analogix/dp: remove duplicate configuration of link rate and link count
link_rate and lane_count already configured in analogix_dp_set_link_train(),
so we don't need to config those repeatly after training finished, just
remove them out.

Beside Display Port 1.2 already support 5.4Gbps link rate, the maximum sets
would change from {1.62Gbps, 2.7Gbps} to {1.62Gbps, 2.7Gbps, 5.4Gbps}.

(am from https://patchwork.kernel.org/patch/8312771/)

Change-Id: I8cbf7146d70143bb5d30b3fa971e19f034c30e62
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:39:11 +08:00
Heiko Stuebner
6839192918 FROMLIST: drm: bridge: analogix/dp: fix some obvious code style
Fix some obvious alignment problems, like alignment and line
over 80 characters problems, make this easy to be maintained
later.

(am from https://patchwork.kernel.org/patch/8615381/)

Change-Id: I49198f28156ae5761ba0aa8e8479bbdc963d9b25
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:38:39 +08:00
Heiko Stuebner
5db866f7d6 FROMLIST: drm: bridge: analogix/dp: rename register constants
In the original split we kept the register constants intact to keep the
diff small. Still the constants are Analogix-specific, so rename them now.

(am from https://patchwork.kernel.org/patch/8312781/)

Change-Id: I714d60bc941b7a992dd34d4c0804576bd07ca84d
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-03-21 19:38:13 +08:00