firefly-linux-kernel-4.4.55.git
8 years agophy: rockchip-emmc: enable ctrl-base before waiting pll
Shawn Lin [Mon, 9 May 2016 08:11:25 +0000 (16:11 +0800)]
phy: rockchip-emmc: enable ctrl-base before waiting pll

Need to control phy's digital block before enabling pll and
waiting for it into locked state.

Change-Id: I04037f5496fd5c1ef4e24853eb32b43ce326ff01
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoDocumentation: rockchip-emmc-phy: add ctrl-base support
Shawn Lin [Mon, 9 May 2016 08:04:59 +0000 (16:04 +0800)]
Documentation: rockchip-emmc-phy: add ctrl-base support

This patch adds ctrl-base which points to the digital block
to setup phy pll enabling.

Change-Id: I922dd7574229fda6b2ee51ca6ed1d7852ef87d30
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoHACK: mmc: core: disable sending status when switching to hs from hs200
Shawn Lin [Mon, 9 May 2016 03:36:57 +0000 (11:36 +0800)]
HACK: mmc: core: disable sending status when switching to hs from hs200

To slove the issue found on evb2 for hs400

[    1.526008] sdhci: Secure Digital Host Controller Interface driver
[    1.526558] sdhci: Copyright(c) Pierre Ossman
[    1.527899] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.529967] sdhci-arasan fe330000.sdhci: No vmmc regulator found
[    1.530501] sdhci-arasan fe330000.sdhci: No vqmmc regulator found
[    1.568710] mmc0: SDHCI controller on fe330000.sdhci [fe330000.sdhci]
using ADMA
[    1.627552] mmc0: switch to high-speed from hs200 failed, err:-84
[    1.628108] mmc0: error -84 whilst initialising MMC card

[PATCH reviewing: https://patchwork.kernel.org/patch/9010851/]

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I7641a3c095bb893a56f18fa3faa88ca179f3dae3

8 years agoUPSTREAM: thermal: power_allocator: req_range multiplication should be a 64 bit type
Javi Merino [Wed, 6 Apr 2016 18:30:18 +0000 (19:30 +0100)]
UPSTREAM: thermal: power_allocator: req_range multiplication should be a 64 bit type

req_range is declared as a u64 to cope with overflows in the
multiplication of two u32.  As both req_power and power_range are u32,
we need to make sure the multiplication is done with u64 types.

Change-Id: I1aea92f12e48338be2681a9b2ba84756b6cc8cf8
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit f9d038144a171d42e057143b247ff7a12a5b06f5)

8 years agoUPSTREAM: thermal: use %d to print S32 parameters
Leo Yan [Tue, 29 Mar 2016 11:24:15 +0000 (19:24 +0800)]
UPSTREAM: thermal: use %d to print S32 parameters

Power allocator's parameters are S32 type, so use %d to print them.

Change-Id: Iae45ef17e4375320a0f4b2fdeab034ae76763ff6
Acked-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 15333e3af1de37b1b214b28c85fe9a7b257fb92c)

8 years agoUPSTREAM: thermal: consistently use int for trip temp
Wei Ni [Thu, 3 Mar 2016 09:33:46 +0000 (17:33 +0800)]
UPSTREAM: thermal: consistently use int for trip temp

The commit 17e8351a7739 consistently use int for temperature,
however it missed a few in trip temperature and thermal_core.

In current codes, the trip->temperature used "unsigned long"
and zone->temperature used"int", if the temperature is negative
value, it will get wrong result when compare temperature with
trip temperature.

This patch can fix it.

Change-Id: I4b31f577a6142bc02f8e0deae79ab2ff7c8bd978
Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 1d0fd42fa31d18ba0a3e0dd008c9e93e1cebe451)

8 years agoUPSTREAM: devicetree: bindings: Add optional dynamic-power-coefficient property
Punit Agrawal [Tue, 17 Nov 2015 12:06:21 +0000 (12:06 +0000)]
UPSTREAM: devicetree: bindings: Add optional dynamic-power-coefficient property

The dynamic power consumption of a device is proportional to the
square of voltage (V) and the clock frequency (f). It can be expressed as

Pdyn = dynamic-power-coefficient * V^2 * f.

The coefficient represents the running time dynamic power consumption in
units of mw/MHz/uVolt^2 and can be used in the above formula to
calculate the dynamic power in mW.

Change-Id: Ib208ff2f83ee45911e846f940952d765ae8c974e
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 3be3f8f36e7349006f19c8c8f0d686e98462a993)

8 years agoARM64: dts: rk3399-evb: add sd3.0 support
xiaoyao [Thu, 12 May 2016 08:07:31 +0000 (16:07 +0800)]
ARM64: dts: rk3399-evb: add sd3.0 support

Change-Id: I4a7c440a6ca8026b7aed5aa26b9ef2624cc7afd0
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
8 years agovideo: rockchip: fb: add DUAL_LCD mode
Huang Jiachai [Tue, 10 May 2016 02:53:41 +0000 (10:53 +0800)]
video: rockchip: fb: add DUAL_LCD mode

this mode is used for the case just like two LCD output and display
kernel logo when power on.

Change-Id: I188b95bc638a66338de3401fd7b9eec049d7071a
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
8 years agovideo: rockchip: fb: don't set vop win state when switch screen
Huang Jiachai [Mon, 9 May 2016 01:30:58 +0000 (09:30 +0800)]
video: rockchip: fb: don't set vop win state when switch screen

because hwc will open fb0 to fb5, so the logic state is enable,
this will lead to iommu page fault when switch screen.

Change-Id: I8bc34887a62338049d1d526e37a2595122265046
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
8 years agoclk: rockchip: rk3399: To prevent the dclk_vopx below the FRAC clock
Xing Zheng [Mon, 9 May 2016 01:29:32 +0000 (09:29 +0800)]
clk: rockchip: rk3399: To prevent the dclk_vopx below the FRAC clock

In most case, we use the VPLL directly for HDMI or DP, and the
the frac dclk will bring the big jitter for dclk. So we don't need
to use the dclk_vopx_frac.

Change-Id: I0d27e5fcb8b4c9a28c0102074c1d6da9426386f4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoFROMLIST: clk: rockchip: make rk3399 vop dclks keep their rate on parent rate changes
Heiko Stuebner [Mon, 2 May 2016 16:36:22 +0000 (18:36 +0200)]
FROMLIST: clk: rockchip: make rk3399 vop dclks keep their rate on parent rate changes

The rk3399 hdmi phy is supplied by the vpll directly and needs to adapt
that frequency depending on the selected resolution on the hdmi output.
For the hdmi-phy the vpll frequency is supplied unchanged without
any dividers being present there.

The vpll also is one of the sources the general display clock of the
visual output processor (vop) and as it is somewhat special for
display operations possibly also the preferred pll source. Here a divider
is available between the pll-mux and the vop clock, so that this part
can adapt the resulting frequency if needed.

So to keep the vop clock in line with the target rate, set the newly
introduced CLK_KEEP_REQ_RATE flag for the dclk_vop clocks on rk3399.

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

Change-Id: Iba9a179b764472f22d7531eb0c662dcd982433d4
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoFROMLIST: clk: adjust clocks to their requested rate after parent changes
Heiko Stuebner [Mon, 2 May 2016 16:36:21 +0000 (18:36 +0200)]
FROMLIST: clk: adjust clocks to their requested rate after parent changes

Given a hirarchy of clk1 -> [div] -> clk2, when the rate of clk1 gets
changed, clk2 changes as well as the divider stays the same. There may
be cases where a user of clk2 needs it at a specific rate, so clk2
needs to be readjusted for the changed rate of clk1.

So if a rate was requested for the clock, and its rate changed during
the underlying rate-change, with this change the clock framework now
tries to readjust the rate back to/near the requested one.

The whole process is protected by a new clock-flag to not force this
behaviour change onto every clock defined in the ccf.

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

Change-Id: Ie2636710cb4e66815ee45b28ec86eeaaa47c55c7
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoFROMLIST: clk: fix inconsistent use of req_rate
Heiko Stuebner [Mon, 2 May 2016 16:36:20 +0000 (18:36 +0200)]
FROMLIST: clk: fix inconsistent use of req_rate

The req_rate property seems to be made to hold the rate requested through
clk_set_rate. Currently it gets initialized in clk_init to the clocks
current rate and then adapted in clk_set_rate calls. Orphan clocks and
their children get initialized to a rate of 0 and req_rate never gets
re-set when these lose their orphan-status.

Initializing req_rate to the clocks rate also is unintuitive as it just
copies the value that is already in the rate property and also looses the
information if a component actually requested a specific rate.

So separate the requested rate and only set it in clk_core_set_rate_nolock
when a real rate gets requested. The users of the req_rate __clk_put and
clk_set_rate_range that adjust a clock based on that value use req_rate
at first and fall back to rate if no rate had been requested now.

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

Change-Id: I9e345e1e9d0c101d5c3c7064b6c2d2724f9eac4f
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoarm64: dts: rk3399: disabled the edp on evb2 cros
Caesar Wang [Tue, 10 May 2016 03:23:46 +0000 (11:23 +0800)]
arm64: dts: rk3399: disabled the edp on evb2 cros

As the pervious discussed, disabled the edp node for dts. Otherwise
you connected the mipi panel will show white since the edp will force
to use the extend screen.

Change-Id: I3e716f4a9d92d4faae5d7a12d792c71fe16f489e
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: rockchip_cros_defconfig: enable the regulator LP8752
Caesar Wang [Tue, 10 May 2016 03:18:45 +0000 (11:18 +0800)]
ARM64: rockchip_cros_defconfig: enable the regulator LP8752

The gpu can't work with chromeos since the regulator has not enabled.
Okay, the gpu can work for chromeos with rk3399 evb2 on now.

Change-Id: If23affff151a99206b86c2a3f40c21752bdc2d54
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: rockchip_defconfig: enable THERMAL_GOV_USER_SPACE
Finley Xiao [Tue, 10 May 2016 03:26:13 +0000 (11:26 +0800)]
ARM64: rockchip_defconfig: enable THERMAL_GOV_USER_SPACE

Change-Id: I572ef6030ec1e72b7f46bc00d887d91e94c12c0c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
8 years agovideo: rockchip: hdmi: fix compile warning
Zheng Yang [Tue, 10 May 2016 03:09:35 +0000 (11:09 +0800)]
video: rockchip: hdmi: fix compile warning

Change-Id: I3573f4d42074b656420cc5567d73e660232f2b84
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
8 years agodrm/rockchip: vop: fix compile warning
Mark Yao [Tue, 10 May 2016 05:59:57 +0000 (13:59 +0800)]
drm/rockchip: vop: fix compile warning

fix warning:
    warning: 'ret' may be used uninitialized in this function

Change-Id: I743ed9788366322beeceddd556fae0c2a7cdd463
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: rga: fix 'ret' may be used uninitialized in probe time
Yakir Yang [Tue, 10 May 2016 08:10:47 +0000 (16:10 +0800)]
drm/rockchip: rga: fix 'ret' may be used uninitialized in probe time

Change-Id: I3eeb2abf2b5f098d3c2298673eeecd130ad99cb7
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
8 years agovideo: rockchip: hdmi: v2: solve 480i/576i 10bit output abnormal
xuhuicong [Mon, 9 May 2016 03:42:27 +0000 (11:42 +0800)]
video: rockchip: hdmi: v2: solve 480i/576i 10bit output abnormal

Change-Id: I60ee3b8882bc16bab48a51530635f50958bacfd3
Signed-off-by: xuhuicong <xhc@rock-chips.com>
8 years agoARM64: dts: rk3399-android: add HDMI device node support
xuhuicong [Thu, 28 Apr 2016 09:31:54 +0000 (17:31 +0800)]
ARM64: dts: rk3399-android: add HDMI device node support

Change-Id: I29b46d097351c55df66782d55c004c356049fb37
Signed-off-by: xuhuicong <xhc@rock-chips.com>
8 years agoARM64: dts: rk3399: add HDMI DDC/CEC pinctrl
xuhuicong [Thu, 28 Apr 2016 09:31:03 +0000 (17:31 +0800)]
ARM64: dts: rk3399: add HDMI DDC/CEC pinctrl

Change-Id: Ic3417a5153ceabad3f9c69ffe5b6fa542e7a84c1
Signed-off-by: xuhuicong <xhc@rock-chips.com>
8 years agovideo: rockchip: hdmi: misc clean up to hdmi driver
xuhuicong [Thu, 28 Apr 2016 07:22:45 +0000 (15:22 +0800)]
video: rockchip: hdmi: misc clean up to hdmi driver

remove unused dts properties parsed code and print an error message
when enable hdmi clk error

Change-Id: I92f37f5c1dc2cd8dbf18744f4fd17a52bc25080f
Signed-off-by: xuhuicong <xhc@rock-chips.com>
8 years agovideo: rockchip: hdmi: support rk3399 hdmi
xuhuicong [Tue, 12 Apr 2016 01:16:30 +0000 (09:16 +0800)]
video: rockchip: hdmi: support rk3399 hdmi

RK3399 hdmi register layout is similar with rk3288 and rk3368, so most
code can reuse. but hdmi resign is upgrade from 20 to 21 so it has a
little diffrence. and the hdmi phy clk is Independent from dclk too.

Change-Id: I83b30c92d9572fc9ceaf52777d224e5cec1823be
Signed-off-by: xuhuicong <xhc@rock-chips.com>
8 years agoregulator: rockchip: lp8752: fix up the compile warning
Elaine Zhang [Mon, 9 May 2016 09:46:14 +0000 (17:46 +0800)]
regulator: rockchip: lp8752: fix up the compile warning

fix up the warning:
drivers/regulator/lp8752.c: In function 'lp8752_buck_set_mode':
drivers/regulator/lp8752.c:93:2: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

Change-Id: Iee9f69791bbcea2e6b3a16713b76e93cfc0a2b67
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
8 years agovideo: rockchip: fix compile warning: may be used uninitialized
Huang Jiachai [Mon, 9 May 2016 09:03:15 +0000 (17:03 +0800)]
video: rockchip: fix compile warning: may be used uninitialized

Change-Id: Ia162b79443e8361d93575963c6603999ffc3e405
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
8 years agodrivers: video: rockchip: rga2: Fix compile warning
Zhiqin Wei [Mon, 9 May 2016 08:02:30 +0000 (16:02 +0800)]
drivers: video: rockchip: rga2: Fix compile warning

Change-Id: I3622b70a5b15014ccb5fb9fc09bced97db194dc8
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
8 years agoiommu: rk-iommu: fix build warning when enable CONFIG_CC_OPTIMIZE_FOR_SIZE
Simon [Mon, 9 May 2016 07:25:28 +0000 (15:25 +0800)]
iommu: rk-iommu: fix build warning when enable CONFIG_CC_OPTIMIZE_FOR_SIZE

Change-Id: Iff20759a625df9f6c6138eaa8d963d67a483c01d
Signed-off-by: Simon <xxm@rock-chips.com>
8 years agoASoC: es8316: fix warning: 'val' may be used uninitialized
Sugar Zhang [Mon, 9 May 2016 06:15:50 +0000 (14:15 +0800)]
ASoC: es8316: fix warning: 'val' may be used uninitialized

Change-Id: If7bdba3cd7a23879a2cf41202d21fadaef614f23
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
8 years agorockchip/vcodec: seperate power-on timer for independent hw
Alpha Lin [Fri, 6 May 2016 01:18:13 +0000 (09:18 +0800)]
rockchip/vcodec: seperate power-on timer for independent hw

Seperate power-on timer for rkvdec and vpu when they are not
in combo mode (definitly independence).

Before this patch, h/w power off schedule will be interrupted
by the other h/w, and power off will be triggered when h/w
still running a task.

Change-Id: I29124e90afccc727d2e7a04098727aa4a2c3e8bb
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
8 years agoARM64: rockchip_cros_defconfig: enable the GOV_POWER_ALLOCATOR
Caesar Wang [Tue, 3 May 2016 10:53:08 +0000 (18:53 +0800)]
ARM64: rockchip_cros_defconfig: enable the GOV_POWER_ALLOCATOR

Enable the GOV_POWER_ALLOCATOR for rk3399.

Change-Id: I8f7e457a09543d730e30c1ce74a9b5dffba57e10
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: config: enable the devfreq_thermal for rockchip
Caesar Wang [Mon, 2 May 2016 07:05:38 +0000 (15:05 +0800)]
ARM64: config: enable the devfreq_thermal for rockchip

It will enable the devfreq thermal that's generic devfreq cooling
mechanism through frequency reduction for devices using devfreq.
This will throttle the device by limiting the maximum allowed DVFS
frequency corresponding to the cooling level.

Change-Id: Ia017ecf46599700382b9604e375193135f7d1d24
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoMALI: rockchip: add "platform specific code" of rk platform
chenzhen [Mon, 25 Apr 2016 11:56:37 +0000 (19:56 +0800)]
MALI: rockchip: add "platform specific code" of rk platform

Change-Id: Ia58cba15b43f875ac572a3b35807b5ec48e3df01
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
8 years agoARM64: dts: rk3399-android: set usbdrd_dwc3_0 in peripheral mode
Wu Liang feng [Thu, 5 May 2016 10:41:01 +0000 (18:41 +0800)]
ARM64: dts: rk3399-android: set usbdrd_dwc3_0 in peripheral mode

Change-Id: I775283d3b3c8180e352281568d1b77ab5c5a544c
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
8 years agommc: sdhci-of-arasan: fix using sleep function whthin spinlock
Shawn Lin [Thu, 5 May 2016 03:03:22 +0000 (11:03 +0800)]
mmc: sdhci-of-arasan: fix using sleep function whthin spinlock

Let's use unlock/lock around phy APIs as them will call
mutex which is sleepable casuing failure of kernel debug
check.

Change-Id: Ic7670bfc9ed763cc9bdec53f85f553bc0be1416c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agodrm/rockchip: vop: fix pin_pol config
Mark Yao [Thu, 5 May 2016 03:09:17 +0000 (11:09 +0800)]
drm/rockchip: vop: fix pin_pol config

rgb/edp/hdmi/mipi pin_pol is removed after (e5683dd FROMLIST:
drm/rockchip: get rid of rockchip_drm_crtc_mode_config), that
is wrong.

This patch re-add those pin_pol config.

Change-Id: I46f3e32ad405f4b6e2f76110757248e8516693c4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agoregulator: mp8865: update mp8865 enable_time
Zain Wang [Wed, 4 May 2016 01:04:39 +0000 (09:04 +0800)]
regulator: mp8865: update mp8865 enable_time

enable_time is controlled by capacitance connected to Pin SS,
it described more detailedly in mp8865 datasheet Page 15.
Capacitance is 12nF now.

Change-Id: Ib604a4e109db7ab125104e5cf3067864fefb6fe0
Signed-off-by: Zain Wang <wzz@rock-chips.com>
8 years agoARM64: dts: rk3399: support bluetooth for rk3399-evb
xiaoyao [Wed, 27 Apr 2016 06:00:17 +0000 (14:00 +0800)]
ARM64: dts: rk3399: support bluetooth for rk3399-evb

Change-Id: Id1eb05cc4cc39d026b6c26f1635760eed38c8968
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
8 years agodrm/rockchip: vop: Initialize vskiplines to zero
Mark Yao [Fri, 29 Apr 2016 07:08:24 +0000 (15:08 +0800)]
drm/rockchip: vop: Initialize vskiplines to zero

There is a path that use vskiplines with non-initialize.
That would cause vop abnormal behavior.

Change-Id: I53c6c575d6acc16aeae761dbb4867f3bc8bfe5ce
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: vop: fix iommu crash with async atomic
Mark Yao [Fri, 29 Apr 2016 03:37:20 +0000 (11:37 +0800)]
drm/rockchip: vop: fix iommu crash with async atomic

On Async atomic_commit callback, drm_atomic_clean_old_fb will
clean all old fb, but because async, the old fb may be also on
the vop hardware, dma will access the old fb buffer, clean old
fb will cause iommu page fault.

Reference the fb and unreference it when the fb actuall swap out
from vop hardware.

Change-Id: I585786884295060efdaef0a00c3cbd75244399d7
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: vop: support plane zpos property
Mark Yao [Wed, 27 Apr 2016 08:18:07 +0000 (16:18 +0800)]
drm/rockchip: vop: support plane zpos property

Change-Id: Idd0265020a591ce5b34d117442104f625e331119
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: vop: rk3399: add area plane
Mark Yao [Wed, 27 Apr 2016 01:57:36 +0000 (09:57 +0800)]
drm/rockchip: vop: rk3399: add area plane

Change-Id: Ia6f77353363e25423ac29129372bc510565682f8
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: vop: rk3288: add area plane
Mark Yao [Wed, 27 Apr 2016 01:56:16 +0000 (09:56 +0800)]
drm/rockchip: vop: rk3288: add area plane

Change-Id: Iac8fde019020d8f1a671d52c1a4d91ad2d050d43
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm/rockchip: vop: support multi area plane
Mark Yao [Wed, 27 Apr 2016 00:52:06 +0000 (08:52 +0800)]
drm/rockchip: vop: support multi area plane

The series vop of VOP_FULL framework support area plane, such as
RK3288 and RK3399, one group of area planes share same hardware,
reuse the hardware on different scanout time, this design is
useful to support mulit planes with low hardware consume.

Change-Id: Ie53211ce9ed22d03f7668637efbb7c95d9a8eb5b
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agodrm: introduce share plane
Mark Yao [Tue, 26 Apr 2016 11:46:57 +0000 (19:46 +0800)]
drm: introduce share plane

The plane hardware is used when the display scanout run into plane active
scanout, that means we can reuse the plane hardware resources on plane
non-active scanout.

Because resource share, There are some limit on share plane: one group
of share planes need use same zpos, can't not overlap, etc.

We assume share plane is a universal plane with some limit flags.
people who use the share plane need know the limit, should call the ioctl
DRM_CLIENT_CAP_SHARE_PLANES, and judge the planes limit before use it.

Change-Id: Iecc3d8e7f1ce29d567cdbad689ba4dbad3d594e1
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
8 years agoFROMLIST: drm/rockchip: get rid of rockchip_drm_crtc_mode_config
Mark Yao [Wed, 20 Apr 2016 02:13:30 +0000 (10:13 +0800)]
FROMLIST: drm/rockchip: get rid of rockchip_drm_crtc_mode_config

We need to take care of the vop status when use
rockchip_drm_crtc_mode_config, if vop is disabled,
the function would failed, that is terrible.

Save output_type and output_mode into rockchip_crtc_state,
it's nice to make them into atomic.

Conflicts:

drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
drivers/gpu/drm/rockchip/inno_hdmi.c
drivers/gpu/drm/rockchip/rockchip_drm_drv.h
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

Change-Id: I43c49a92b2b9df02ce8a055bd16948b400ab0f47
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(am from https://patchwork.kernel.org/patch/8844321/)

8 years agoUPSTREAM: arm64: Enable the timer on Rockchip architecture
Caesar Wang [Fri, 25 Sep 2015 02:14:57 +0000 (10:14 +0800)]
UPSTREAM: arm64: Enable the timer on Rockchip architecture

On the RK3368 SoC, support the APB timers for rockchip platform.

Change-Id: I2bee09c4140994d3d2e23f1820663230d82547de
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit c840f28bbf643c361c463bcb8fb815d0b2dad4e8)

8 years agoUPSTREAM: clocksource/drivers/rockchip: Add err handle for rk_timer_init
Shawn Lin [Mon, 15 Feb 2016 01:02:09 +0000 (09:02 +0800)]
UPSTREAM: clocksource/drivers/rockchip: Add err handle for rk_timer_init

Currently rockchip_timer doesn't do some basic cleanup work when
failing to init the timer. Let's add err handle routine to deal
with all the err cases.

Change-Id: I73bbd32592e6fe157a8d166743db3fc130d0004c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit 522ed95c26cd03b768018e441bbc0ff656e30fe4)

8 years agoUPSTREAM: clocksource/drivers/rockchip: Add COMPILE_TEST option
Daniel Lezcano [Fri, 30 Oct 2015 16:58:47 +0000 (17:58 +0100)]
UPSTREAM: clocksource/drivers/rockchip: Add COMPILE_TEST option

Increase the compilation test coverage by adding the COMPILE_TEST option.

Due to the dsb() usage in the driver, this driver is only compilable on
ARM and ARM64.

Change-Id: I5f2c1a5353a7b20c80dcfc3cd3900510f56a0729
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 40ada2aac5e3a3c38f295d4e37b182fc4feff723)

8 years agoUPSTREAM: clocksource/drivers/rockchip: Remove dsb() usage
Caesar Wang [Fri, 25 Sep 2015 02:14:55 +0000 (10:14 +0800)]
UPSTREAM: clocksource/drivers/rockchip: Remove dsb() usage

The dsb() instruction is pointless in this code.

Remove it.

That also fixes the ARM64 compilation issue.

Change-Id: I0c8e33abe0d976714f4df288fe5ac52ffb8ded5b
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 23b8f81f3890edd06bcabdaac33ff5c087114c59)

8 years agoUPSTREAM: clocksource/drivers/rockchip: Make the driver more readable
Caesar Wang [Fri, 25 Sep 2015 02:14:56 +0000 (10:14 +0800)]
UPSTREAM: clocksource/drivers/rockchip: Make the driver more readable

Let's checkstyle to clean up the macros with such trivial details.

Change-Id: I6cf0c7cf5e48bcb4d52a483fdba7c4ce26677f06
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit a0d2216ec0d04ec6bf2a7282774338d5ffb3ff0b)

8 years agoarm64: dts: rk3399: fix the incorrect crit temperture
Caesar Wang [Tue, 3 May 2016 07:46:53 +0000 (15:46 +0800)]
arm64: dts: rk3399: fix the incorrect crit temperture

Fix the incorrect critial temperture for gpu thermal.

Change-Id: I9ecfc107afcdbb421ae40cc796c40a39d6d68677
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: dts: rk3399: support for evb rev1 and evb rev2
Elaine Zhang [Tue, 26 Apr 2016 12:49:35 +0000 (20:49 +0800)]
ARM64: dts: rk3399: support for evb rev1 and evb rev2

For evb1
- rk3399-evb-rev1-android.dts
- rk3399-evb-rev1-cros.dts

For evb2
- rk3399-evb-rev2-android.dts
- rk3399-evb-rev2-cros.dts

Change-Id: I95a2d4229c0a7581ca5ae777340f4d26e86503ba
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
8 years agoARM64: rockchip_defconfig: enable THERMAL_DEFAULT_GOV_FAIR_SHARE
Huang, Tao [Tue, 3 May 2016 08:34:49 +0000 (16:34 +0800)]
ARM64: rockchip_defconfig: enable THERMAL_DEFAULT_GOV_FAIR_SHARE

Change-Id: Ide2ca2361cb13454d0e3269a929a57463da53985
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
8 years agoARM64: dts: rk3399: android: Enable rga device
Zhiqin Wei [Wed, 13 Apr 2016 10:41:10 +0000 (18:41 +0800)]
ARM64: dts: rk3399: android: Enable rga device

Change-Id: I7c348158c410b8bd32a574a607a975fe5e8b74a5
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
8 years agoARM64: dts: rk3399-evb: add mmc-hs400-enhanced-strobe support
Shawn Lin [Wed, 27 Apr 2016 02:50:50 +0000 (10:50 +0800)]
ARM64: dts: rk3399-evb: add mmc-hs400-enhanced-strobe support

This patch enables mmc-hs400-enhanced-strobe for rk3399-evb, so
enhanced strobe function will be used if any eMMC 5.1 is probed.

Change-Id: If5f30e0d759f7a9850bec82c3d53d9bb26ba8c3d
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agommc: add hs400 enhanced strobe support for mmc subsystem
Shawn Lin [Wed, 27 Apr 2016 02:53:33 +0000 (10:53 +0800)]
mmc: add hs400 enhanced strobe support for mmc subsystem

HS400 enhanced strobe is a new feature introduced by eMMC
spec 5.1, let's implement it and enjoy it!

please note that currently I have no much bandwith to split this
big patch into patchset. So please use, test and applied! Thanks.

Change-Id: I874f18a617a1b69e3ff56f5c134feb817b6985b9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoDocumentation: mmc: add mmc-hs400-enhanced-strobe
Shawn Lin [Wed, 27 Apr 2016 02:47:59 +0000 (10:47 +0800)]
Documentation: mmc: add mmc-hs400-enhanced-strobe

Let's add some description of mmc-hs400-enhanced-strobe
which can be used to support hs400 enhanced strobe function
introduced by eMMC spec 5.1

Change-Id: I03b8e803071dc7034bddf655892b12eabcaa852a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agonetfilter: xt_qtaguid: fix crash on non-full sks
Huang, Tao [Wed, 27 Apr 2016 10:34:13 +0000 (18:34 +0800)]
netfilter: xt_qtaguid: fix crash on non-full sks

If sock is request_sock then kernel will crash. So use
skb_to_full_sk() and sk_fullsock() helper to make sure
we get full sock.

Change-Id: Iefd548e0591055b1a8031f0835c4dca7b9d42b61
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
8 years agoARM64: rockchip_cros_defconfig: cleanup and use HZ=1000 for cros
Caesar Wang [Wed, 27 Apr 2016 08:01:03 +0000 (16:01 +0800)]
ARM64: rockchip_cros_defconfig: cleanup and use HZ=1000 for cros

At least for the cros, we have previously kept ARM and ARM64 common
configs on HZ=1000, but at least on ARM64, each individual ARM64 kernel
config.

Also, cleanup for cros config.

Change-Id: I1f4470a01b409e212bd60b6fd885a8f2b53d8850
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoclk: rockchip: rk3399: fix the incorrect parent for c/gpll_aclk_perihp_src
Xing Zheng [Wed, 27 Apr 2016 08:50:24 +0000 (16:50 +0800)]
clk: rockchip: rk3399: fix the incorrect parent for c/gpll_aclk_perihp_src

Change-Id: I9cacddcaa637d46a96c7c70c8d0938688561b187
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoARM64: rockchip_cros_defconfig: Don't force the command line
Douglas Anderson [Tue, 26 Apr 2016 17:53:17 +0000 (10:53 -0700)]
ARM64: rockchip_cros_defconfig: Don't force the command line

There's no reason to force the command line at this point.

Forcing the command like makes it pretty hard to switch between eMMC and
SD card boots because the old command line forced the root filesystem to
/dev/mmcblk0p3 vs. depthcharge automatically inserting the right UUID
based on where it found the kernel.

BUG=None
TEST=I see my command line now.

Change-Id: I5f76b60b9726aee2152c09fbd6460b2b973b0b20
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: rockchip_defconfig: enable lp8752 regulator
Elaine Zhang [Tue, 26 Apr 2016 08:06:32 +0000 (16:06 +0800)]
ARM64: rockchip_defconfig: enable lp8752 regulator

Change-Id: Id3281624c80bb56fb8fd939f14edfdd59bc0393a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
8 years agoregulator: rockchip: lp8752: support lp8752 regulator
Elaine Zhang [Tue, 26 Apr 2016 08:03:58 +0000 (16:03 +0800)]
regulator: rockchip: lp8752: support lp8752 regulator

updata lp8752 driver.
add devicetree bindings for lp8752.

Change-Id: I21cdbde985d4663862b56c28429c41d9d3c38c36
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
8 years agoARM64: dts: rk3399: add trackpad for gru/kevin boards
Douglas Anderson [Fri, 22 Apr 2016 18:32:48 +0000 (11:32 -0700)]
ARM64: dts: rk3399: add trackpad for gru/kevin boards

The trackpad bits in the DTS needed some love.  This adds some basic
infrastructure support in the main gru dts file and then adds the
specific trackpad used on kevin-r0 and kevin-r1.  For now just duplicate
between kevin-r0 and kevin-r1 and we'll decide if we want to share
later (perhaps we want an "atmel" snippet?).

Note that gpio-keymap here makes the driver appear as a trackpad rather
than a touchscreen (driver assumes that anything with buttons is a
trackpad).  Input entry corresponding to the button on the trackpad was
found by experimentation as suggested in the device tree bindings.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: Ia62cff90449625778fd99054b914e22a55c13550
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256510
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: rockchip_cros_defconfig: Turn on atmel touchscreen driver
Douglas Anderson [Fri, 22 Apr 2016 18:28:46 +0000 (11:28 -0700)]
ARM64: rockchip_cros_defconfig: Turn on atmel touchscreen driver

The touchscreen driver is used for both atmel trackpads (AKA touchpads)
and touchscreens.  Turn it on so we can use it.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: I316a8411c35ab7b48182cbe704c9f80114a5afcf
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256511
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: dts: rockchip: kevin: enable HS400 mode on kevin board
Lin Huang [Tue, 26 Apr 2016 09:48:42 +0000 (17:48 +0800)]
ARM64: dts: rockchip: kevin: enable HS400 mode on kevin board

enable HS400 mode on kevin, if found it is not stable, just
remove "mmc-hs400-1_8v" property, it will use HS200 mode instead.

Change-Id: I7c5d162de1f15bcc069134ffa228d833be2b8a02
Signed-off-by: Lin Huang <hl@rock-chips.com>
8 years agoARM64: dts: rockchip: kevin: add configure for emmc phy
Lin Huang [Tue, 26 Apr 2016 09:26:32 +0000 (17:26 +0800)]
ARM64: dts: rockchip: kevin: add configure for emmc phy

assign freq-sel, dr-sel, opdelay value to meet the hardware
requirement of kevin.

Change-Id: Ibb410c607e69c966a9f2949846ef95ec34e15e79
Signed-off-by: Lin Huang <hl@rock-chips.com>
8 years agoARM64: dts: rk3399: support arm64 cpuidle-dt
xxx [Mon, 25 Apr 2016 11:28:21 +0000 (19:28 +0800)]
ARM64: dts: rk3399: support arm64 cpuidle-dt

Change-Id: I5506a6647985f44de352f097cf809b31f1917e6a
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
8 years agoARM64: dts: rk3399: change for thermal zone
Caesar Wang [Fri, 22 Apr 2016 07:19:00 +0000 (15:19 +0800)]
ARM64: dts: rk3399: change for thermal zone

Let's control the power more be effective.We should make the big clusters
cpu throttle firstly.

Change-Id: I8f055f5856ce0239f9bf8bb5b5f2705b3151ba03
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: rockchip: fixes the period time for tsadc
Caesar Wang [Tue, 19 Apr 2016 11:41:05 +0000 (19:41 +0800)]
thermal: rockchip: fixes the period time for tsadc

we should increase the period cycles to save power since the rk3399 has
the high frequency for tsadc clock.

Change-Id: Ia9481515cac6dd6026d3312ac930329a3e906436
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: rockchip: add the set_trips function
Caesar Wang [Mon, 11 Apr 2016 06:08:26 +0000 (14:08 +0800)]
thermal: rockchip: add the set_trips function

Whenever the current temperature is updated, the trip points immediately
below and above the current temperature are found. A sensor driver
callback `set_trips' is then called with the temperatures.
Lastly, The sensor will trigger the hardware high temperature interrupts
to increase the sampleing rate and throttle frequency to limit the temperature
rising When performing passive cooling.

Change-Id: I16b2ab4f8fb85425aab5cd3777ca600bd4cace20
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: bang-bang governor: act on lower trip boundary
Sascha Hauer [Wed, 20 May 2015 13:20:41 +0000 (15:20 +0200)]
thermal: bang-bang governor: act on lower trip boundary

With interrupt driven thermal zones we pass the lower and upper temperature
on which shall be acted, so in the governor we have to act on the exact lower
temperature to be consistent. Otherwise an interrupt may be generated on the
exact lower temperature, but the bang bang governor does not react.

Change-Id: Ic9dd855b0767d34b15505c1ff12ea99b76cdcea7
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: streamline get_trend callbacks
Sascha Hauer [Fri, 22 Apr 2016 02:22:06 +0000 (10:22 +0800)]
thermal: streamline get_trend callbacks

The .get_trend callback in struct thermal_zone_device_ops has the prototype:
        int (*get_trend) (struct thermal_zone_device *, int,
                          enum thermal_trend *);
whereas the .get_trend callback in struct thermal_zone_of_device_ops has:

        int (*get_trend)(void *, long *);

Streamline both prototypes and add the trip argument to the OF callback
aswell and use enum thermal_trend * instead of an integer pointer.

While the OF prototype may be the better one, this should be decided at
framework level and not on OF level.

Change-Id: I39c5a38a22c7a2177a35338bc63c8ba36983a7b0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: of: implement .set_trips for device tree thermal zones
Sascha Hauer [Wed, 20 May 2015 13:20:43 +0000 (15:20 +0200)]
thermal: of: implement .set_trips for device tree thermal zones

Change-Id: I566c468165c35e54a17663888539817246d0f0ed
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agothermal: Add support for hardware-tracked trip points
Sascha Hauer [Wed, 20 May 2015 13:20:42 +0000 (15:20 +0200)]
thermal: Add support for hardware-tracked trip points

This adds support for hardware-tracked trip points to the device tree
thermal sensor framework.

The framework supports an arbitrary number of trip points. Whenever
the current temperature is updated, the trip points immediately
below and above the current temperature are found. A .set_trips
callback is then called with the temperatures. If there is no trip
point above or below the current temperature, the passed trip
temperature will be -INT_MAX or INT_MAX respectively. In this callback,
the driver should program the hardware such that it is notified
when either of these trip points are triggered. When a trip point
is triggered, the driver should call `thermal_zone_device_update'
for the respective thermal zone. This will cause the trip points
to be updated again.

If .set_trips is not implemented, the framework behaves as before.

This patch is based on an earlier version from Mikko Perttunen
<mikko.perttunen@kapsi.fi>

Change-Id: I8c33f9859909704583ba8b6632b91ffd58a9628e
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoRevert "CHROMIUM: thermal: of: Add support for hardware-tracked trip points"
Caesar Wang [Fri, 22 Apr 2016 01:02:08 +0000 (09:02 +0800)]
Revert "CHROMIUM: thermal: of: Add support for hardware-tracked trip points"

This reverts commit 2f8e5324ef44d0842f3db3af5fc4da761440abfb.
Since there are the perfect patches in fromlist to instead of it.

Change-Id: I9f15478d0b0b94805d1bb9539a1cbea42a7af6a1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoRevert "thermal: rockchip: add the set_trips function"
Caesar Wang [Fri, 22 Apr 2016 08:44:01 +0000 (16:44 +0800)]
Revert "thermal: rockchip: add the set_trips function"

This reverts commit ec24f1ae50a370c9ef7b7166156b79b4d4feee5f.

Change-Id: I1fa579309691ac20d22bebf9f9cea1cd2243440f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoclk: rockchip: rk3399: keep the pclk_vio is CLK_IGNORE_UNUSED and critical
Xing Zheng [Fri, 22 Apr 2016 07:26:55 +0000 (15:26 +0800)]
clk: rockchip: rk3399: keep the pclk_vio is CLK_IGNORE_UNUSED and critical

When we use the MIPI screen, the driver will unprepare and disable
the phy_cfg, it will diable its parent pclk_vio:
dw_mipi_dsi_phy_init
  --> clk_disable_unprepare
    --> clk_disable
      --> clk_core_disable(core->parent)

The pclk_vio supply power for pclk_vio_grf, hence, disable pclk_vio_grf will
cause other drivers failed to operate GRF.

Change-Id: I6d5bd27b9478da09209130f1fd5a62c0d4bb1785
Reported-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
8 years agoARM64: dts: rk3399-evb: enable HS400 mode for emmc
Shawn Lin [Mon, 25 Apr 2016 02:48:00 +0000 (10:48 +0800)]
ARM64: dts: rk3399-evb: enable HS400 mode for emmc

We now enable HS400 mode for rk3399-evb for rk folks
to do more test for hs400. If any problem, please remove
mmc-hs400-1_8v from rk3399-evb.dtsi and any reports are
welcomed.

Change-Id: If7d9d291351a075fbb258bd04fce2a2f9cb81be3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoARM64: dts: rk3399-evb: add some configure for emmc phy
Shawn Lin [Mon, 25 Apr 2016 02:39:31 +0000 (10:39 +0800)]
ARM64: dts: rk3399-evb: add some configure for emmc phy

This patch assign freq-sel, dr-sel, opdelay to meet the
hw requirement of rk3399-evb.

Change-Id: I1ef98645b5414bcffa0b5711bc9eb63f077a5dc3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoARM64: dts: rk3399-evb: remove freq limit for sdhci
Shawn Lin [Mon, 25 Apr 2016 02:37:40 +0000 (10:37 +0800)]
ARM64: dts: rk3399-evb: remove freq limit for sdhci

Change-Id: Ib5916869b79016f6dd4f99389bf723d82355bca3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoARM64: dts: rk3399: assign clk parent and rate for SCLK_EMMC
Shawn Lin [Mon, 25 Apr 2016 02:35:23 +0000 (10:35 +0800)]
ARM64: dts: rk3399: assign clk parent and rate for SCLK_EMMC

Let's assign clk parent and rate for SCLK_EMMC to meet the
requiremen.

Change-Id: I3730a2124494da51717b1756f488f9df5bcd6423
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agommc: sdhci-of-arasan: refactor set_clock callback
Shawn Lin [Mon, 25 Apr 2016 02:08:27 +0000 (10:08 +0800)]
mmc: sdhci-of-arasan: refactor set_clock callback

commit 61b914eb81f8 ("mmc: sdhci-of-arasan: add phy support for
sdhci-of-arasan") introduce phy support for arasan. According to
the vendor's databook, we should make sure the phy is in poweroff
stat before we configure the clk stuff. Otherwise it may cause
some IO sample timing issue from the test. But we don't need this
extra operation while running in non HS200/HS400 mode since phy
doesn't trigger sampling block.

Change-Id: I5506f99e5a3b4d9a4356ad485ceac900c6d754aa
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agophy: rockchip-emmc: fix dllrdy timeout issue
Shawn Lin [Mon, 25 Apr 2016 01:59:14 +0000 (09:59 +0800)]
phy: rockchip-emmc: fix dllrdy timeout issue

According to the databook, 10.2us is the max time for
dll to be ready to work. However from the test, some chips
need 20us for dll to ready. So this patch add some extra
margin for dllrdy to be ready to meet the reality.

Change-Id: Ie5362b4403309d260ac621b8b20a0f5b579d3153
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoDocumentation: bindings: add more configuration for rockchip emmc phy
Shawn Lin [Mon, 25 Apr 2016 01:50:16 +0000 (09:50 +0800)]
Documentation: bindings: add more configuration for rockchip emmc phy

This patch add some optional configuration for dt. freq-sel can be used
to decide the phy sample clk in order to match the real freq of emmc
controller. dr-sel can be configured to match the requirement of different
drive strength of phy IO. opdelay should be used to adjust the output
delay for clk IO and data IO, which is useful for sloving timing issue.

Change-Id: I0b4da111581c76fbb96b15cd6be653aaa4843c33
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agophy: rockchip-emmc: add some setup configuration
Shawn Lin [Mon, 25 Apr 2016 01:46:37 +0000 (09:46 +0800)]
phy: rockchip-emmc: add some setup configuration

Let's expose the freq-sel, dr-sel, opdalay to dt for user
to decide how to configure their phy.

Change-Id: Ib9ef40b263d3fd669c7bbda666d28c0c55ff6d8e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
8 years agoARM64: dts: rockchip: Tiny comment cleanups for kevin-r0
Douglas Anderson [Fri, 22 Apr 2016 18:31:57 +0000 (11:31 -0700)]
ARM64: dts: rockchip: Tiny comment cleanups for kevin-r0

I was having a hard time figuring out where to put new things in
kevin-r0.  Add some comments to explain the sort order.

BUG=None
TEST=Build and boot

Change-Id: I9fb8c200f934542ebed984566bab039d4ec3fd13
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256509
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: dts: rockchip: Remove 'veyron' in kevin/gru compatible
Douglas Anderson [Fri, 22 Apr 2016 21:27:39 +0000 (14:27 -0700)]
ARM64: dts: rockchip: Remove 'veyron' in kevin/gru compatible

Veyron was an rk3288 board.  Having it in the compatible doesn't make a
ton of sense.  We'll stick 'gru' in the kevin name, though, since that
sorta makes sense.  Not that we ever really fall back to this stuff.

BUG=None
TEST=Build and boot

Change-Id: Ia4b6e02bd9b160c0b20e5459ca441047add2c0bd
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256508
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: dts: rockchip: Fixup revisions for kevin
Douglas Anderson [Fri, 22 Apr 2016 21:23:43 +0000 (14:23 -0700)]
ARM64: dts: rockchip: Fixup revisions for kevin

Turns out that we got mixed up.  Old stuff should just be rev 0.  New
stuff should be rev 1+.  Fix all that.

BUG=None
TEST=Boot rev 0.

Change-Id: I41b38893f1e4224df4e3646cd268179307b3476b
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256507
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoarm64: dts: add kevin r1 and r2
Stephen Barber [Thu, 21 Apr 2016 03:18:07 +0000 (20:18 -0700)]
arm64: dts: add kevin r1 and r2

Some pinctrl stuff has moved around and will be identical between gru
and kevin going forward, so kevin r1-specific things will be stored
in the kevin-r1 dts file.

BUG=none
TEST=kernel still boots on kevin-r1

Change-Id: If3e88a57acc40367afca34b5310a59efd70287f6
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256345
Commit-Ready: Stephen Barber <smbarber@google.com>
Tested-by: Stephen Barber <smbarber@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoFROMLIST: mfd: cros_ec: Allow building for ARM64
Brian Norris [Mon, 11 Apr 2016 17:27:32 +0000 (10:27 -0700)]
FROMLIST: mfd: cros_ec: Allow building for ARM64

There are platforms using the ChromeOS embeded controller on ARM64 now,
so let's allow using this driver (without having to use COMPILE_TEST).

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
BUG=none
TEST=make sure we can enable cros_ec for ARM64

Change-Id: I828fec4a2022ea50f10c269ee88ae92c30f48337
Reviewed-on: https://chromium-review.googlesource.com/339540
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <groeck@google.com>
Reviewed-on: https://chrome-internal-review.googlesource.com/256311
Commit-Ready: Brian Norris <briannorris@google.com>
Tested-by: Brian Norris <briannorris@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoFROMLIST: platform/chrome: cros_ec_dev - Populate compat_ioctl
Guenter Roeck [Fri, 15 Apr 2016 02:35:29 +0000 (19:35 -0700)]
FROMLIST: platform/chrome: cros_ec_dev - Populate compat_ioctl

compat_ioctl has to be populated for 32 bit userspace applications to work
with 64 bit kernels.

BUG=chrome-os-partner:52276
TEST=Build and test with ectool on kevin

Change-Id: I3955d4cf869e4ad4b9f48cdc3b5901cf49dbbe83
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
(am from https://patchwork.kernel.org/patch/8844321/)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256310
Commit-Ready: Brian Norris <briannorris@google.com>
Tested-by: Brian Norris <briannorris@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
8 years agoARM64: dts: gru: fix pwm regulator supplies
Stephen Barber [Sat, 16 Apr 2016 08:08:31 +0000 (01:08 -0700)]
ARM64: dts: gru: fix pwm regulator supplies

The vin-supply binding is valid only for fixed regulators. pwm-supply
should be used for PWM regulators.

Change-Id: I6b65eac6ddc424bb97ba9133b0d67286252b8568
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/255731
Tested-by: Stephen Barber <smbarber@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
8 years agoRevert "ARM64: dts: rk3399: gru: Let VOP Big first to select connector device"
Yakir Yang [Fri, 22 Apr 2016 09:51:39 +0000 (17:51 +0800)]
Revert "ARM64: dts: rk3399: gru: Let VOP Big first to select connector device"

We must not to adjust the port order, cause the port id is mapping
to VOP type. Current driver just hardcode that VOP Lit is ID 0, and
VOP Big is ID 1.

        ret = rockchip_drm_encoder_get_mux_id(dp->dev->of_node, encoder);
        if (ret)
                val = dp->data->lcdsel_lit | dp->data->lcdsel_mask;
        else
                val = dp->data->lcdsel_big | dp->data->lcdsel_mask;

Besides eDP could work well with VOP Lit, so we need to revert this
hack. Just revert commit 602f4f79c8f2a833069cd32cb0cc80984e6febb6.

Change-Id: I69badf2860c83c8211ea23b9f490fd4837dcf22e
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
8 years agoARM64: dts: rk3399: gpu: add subnode for mali-simple-power-model
chenzhen [Fri, 22 Apr 2016 08:08:47 +0000 (16:08 +0800)]
ARM64: dts: rk3399: gpu: add subnode for mali-simple-power-model

Change-Id: I0bd03634631ed30556cc45455582b075692cceba
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
8 years agodrm/rockchip: analogix_dp: Hack the vop out mode for RK3399 chip
Yakir Yang [Fri, 22 Apr 2016 08:29:21 +0000 (16:29 +0800)]
drm/rockchip: analogix_dp: Hack the vop out mode for RK3399 chip

For RK3999 chip, VOP Big/Lit must configure different display out
mode for eDP controller.
  - VOP Lit should output RGB888
  - Vop Big should output RGB10

Change-Id: I85bac6c25a990404682483c62a731681d19eca29
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
8 years agodrm/rockchip: analogix_dp: distinguish chip type for each chips
Yakir Yang [Fri, 22 Apr 2016 08:13:00 +0000 (16:13 +0800)]
drm/rockchip: analogix_dp: distinguish chip type for each chips

Driver could check the chip type to do some special things.

Change-Id: I2a33da466db0aa5133868c200a122df675f4c925
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
8 years agodrm/rockchip: analogix_dp: rename analogix_dp_data to rockchip_dp_chip_data
Yakir Yang [Fri, 22 Apr 2016 08:15:06 +0000 (16:15 +0800)]
drm/rockchip: analogix_dp: rename analogix_dp_data to rockchip_dp_chip_data

Make the data structure name more exactly.

Change-Id: I3d7826ef86d2059cd1557bf4d31b7281377e9fae
Signed-off-by: Yakir Yang <ykk@rock-chips.com>