Commit Graph

595128 Commits

Author SHA1 Message Date
Yakir Yang
8d0bd2f35f FROMLIST: dt-bindings: Add support for LG LP079QX1-SP0V 1536x2048 panel
The LG LP079QX1-SP0V is an 7.9" QXGA TFT with LED Backlight unit and
32 pins eDP interface. This module supports 1536x2048 mode.

Change-Id: I3f56b58935e47bb062d62521a019f36baae4be7a
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9201795/)
2016-06-29 11:16:52 +08:00
Yakir Yang
435280a07d FROMLIST: drm/panel: simple: Add support for LG LP079QX1-SP0V 1536x2048 panel
The LG LP079QX1-SP0V is an 7.9" QXGA TFT with LED Backlight unit and
32 pins eDP interface. This module supports 1536x2048 mode.

Change-Id: Ib42185ffce772160133a3edf3c3cf61bff4b85c5
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9201799/)
2016-06-29 11:16:20 +08:00
Zhangbin Tong
ce737531a4 iio: imu: inv-mpu6xxx: Fix interrupt pin assignment
When add spi support, introduce a new bug that
i2c intrerupt pin assignment after request_irq.

Change-Id: Id41a953c8c7ea8a94a584c584ee012025a4a6921
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-06-29 10:16:51 +08:00
Mark Yao
806c448dc1 FROMLIST: drm/rockchip: vop: correct the source size of uv scale factor setting
When the input color format is YUV, we need to do some external scale
for CBCR. Like,
 * In YUV420 data format:
     cbcr_xscale = dst_w / src_w * 2;
     cbcr_yscale = dst_h / src_h * 2;
 * In YUV422 data format:
     cbcr_xscale = dst_w / src_w * 2;
     cbcr_yscale = dst_h / src_h;
 * In YUV444 data format
     cbcr_xscale = dst_w / src_w;
     cbcr_yscale = dst_h / src_h;

Change-Id: I73e0423d3662bd340b5d155996f13d31c22dcc29
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9157353/)
2016-06-28 18:41:00 +08:00
Yakir Yang
a93e4c6028 FROMLIST: drm/rockchip: vop: add uv_vir register field for RK3036 VOP
The WIN0 of RK3036 VOP could support YUV data format, but driver
forget to add the uv_vir register field for it.

Change-Id: Ie27216d0612d41fec02346ce65412207ed26d4a1
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9157349/)
2016-06-28 18:40:59 +08:00
Elaine Zhang
828fabe949 soc: rockchip: power-domain: fix up the PMU_GPU_PWRDW/UP_CNT for RK3399
According to the advice of the IC,
setting the PMU_GPU_PWRDW/PWRUP_CNT regs 6 cycel(250ns) for RK3399 SOC.

Change-Id: I0449069a3b5035bd0442fcd74b645de9480a1d89
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-06-28 18:40:58 +08:00
Finley Xiao
0eab8138e9 ARM64: dts: rockchip: rk3366: assign parent for i2s_src
As the 750MHz cpll can't produce accurate frequancy for i2s,
for example 11289600Hz, so assign their parents to the 576MHz gpll.

Change-Id: I430bce21ae69b47e561a95e691276d0c921a702c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-06-28 18:40:58 +08:00
Finley Xiao
c32d8b0ebe clk: rockchip: add clock ids for i2s_src on RK3366
Set the newly added id for i2s_src, so that they can be called
in other parts.

Change-Id: Ie4ecc4d19e3ae64a07d1f2a80aa08d40f38d09ad
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-06-28 18:40:57 +08:00
Yakir Yang
006efbdf39 FIXUP: drm/bridge: analogix_dp: misc update to upstream version
This misc update would try to fix below comments from my eDP thread[0],
and lucky to say this version is stable, and i'm start to perpare the
pull request to David with this version. So i guess it's time to create
a misc FIXUP patch to address the comments.

[0]: https://patchwork.kernel.org/patch/9175613/

- Correct the misspell of "marcos" in commit message (Dominik, reviewed at Google Gerrit)
- Write a kerneldoc-style comment explaining the chips data fields (Tomasz, reviewed at Google Gerrit)
- Drop the '.lcdcsel_mask' number in chips data field (Tomasz, reviewed at Google Gerrit)
- Make this hack code more clear (Tomasz, reviewed at Google Gerrit)
  reg = ~reg & REF_CLK_MASK;  --->  reg ^= REF_CLK_MASK;
- Give the "rk3399-edp" a separate line for clarity in document (Tomasz, reviewed at Google Gerrit)
- Move 'output_type' setting before the return statement (Tomasz, reviewed at Google Gerrit)
- Avoid to change any internal driver state in .mode_valid interface. (Tomasz, reviewed at Google Gerrit)
- Hook the connector's color_formats in .get_modes directly. (Tomasz, reviewed at Google Gerrit)

Change-Id: Ic35f166ebac04e417ff3d135e7bf4573bbca2004
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-06-28 18:40:56 +08:00
Heiko Stuebner
e98876dd41 UPSTREAM: ARM: dts: rockchip: add rk3288-veyron-minnie backlight and panel settings
The pwm for Minnie's backlight needs to be above 1%, so adapt the start
of non-zero brightness accordingly. Minnie is also using a different
panel, so re-set the compatible property.

Change-Id: I4fd13be0a848ca7a33213e07864637bf3792f9af
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
(cherry pick from commit 712e6051c4)
2016-06-28 18:40:55 +08:00
Heiko Stuebner
0dba5c342f UPSTREAM: ARM: dts: rockchip: add core rk3288-veyron backlight and panel nodes
Many Veyron chromebooks share the same panel type, so define the core
settings for all of them and allow the few runaways to override it later.

Change-Id: I48668b9fa156f02de94a2ac8c0a20a3407a201b0
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
(cherry pick from commit dfb2146efc)
2016-06-28 18:40:54 +08:00
Heiko Stuebner
46c1071bcf UPSTREAM: ARM: dts: rockchip: move edp-hpd pin definition into common location
The edp hotplug pin is fixed on the soc side, anybody wanting to use it
will need the same definition anyway, so move it to a common location.

Change-Id: I49a424eeb755d6bfaf38b91cadfd6d8ff7be8ccf
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
(cherry pick from commit a4e00345b2)
2016-06-28 18:40:52 +08:00
Heiko Stuebner
b6a7c5c710 UPSTREAM: ARM: dts: rockchip: add rk3288 displayport controller node
Add the rk3288 edp node and its hooks into the display-subsystem.

Change-Id: I1bd7617203e9c36c426bd69fd23f99c1e10a8c99
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
(cherry pick from commit 6df7ec6186)
2016-06-28 18:40:50 +08:00
Heiko Stuebner
125cec433e UPSTREAM: ARM: dts: rockchip: add rk3288 edp-phy node
Add the core device node of the edp-phy on rk3288 socs.

Change-Id: I34d23617abfaeefa5ec527c7b2ce67bc3b614c68
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
(cherry pick from commit f5663969d8)
2016-06-28 18:40:47 +08:00
Philipp Zabel
d99137fef1 UPSTREAM: drm/rockchip: remove rockchip_drm_encoder_get_mux_id
It is replaced by drm_of_encoder_active_endpoint_id.

Change-Id: I0d09b768951192cd781d0b5c3e5652f66dc4cdaa
Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Yakir Yang <ykk@rock-chips.com>
[for dw_hdmi-rockchip]
Acked-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
(cherry-pick from commit 1645061679)
2016-06-28 18:40:46 +08:00
Philipp Zabel
4534670757 UPSTREAM: drm: add drm_of_encoder_active_endpoint helpers
This patch adds a helper to parse the encoder endpoint connected to the
encoder's crtc and two helpers to return its id and port id.

This can be used to determine input mux setting from endpoint or port ids.

Change-Id: I48eb7c66edb951af40085e4e388afbd5d4b2c77b
Suggested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
(cherry pick from commit 4cacf91fcb)
2016-06-28 18:40:44 +08:00
Yakir Yang
37d23cecaa UPSTREAM: phy: Add driver for rockchip Display Port PHY
Add phy driver for the Rockchip DisplayPort PHY module. This
is required to get DisplayPort working in Rockchip SoCs.

Change-Id: Ied28937c12584aee9654af775d4cf0cac4eddec5
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
(cherry pick from commit fd968973de)
2016-06-28 18:40:43 +08:00
Shawn Lin
87a54369b8 mmc: dw_mmc: fix unmap sg twice when finding data err
DATA_OVER(the same for RI/TI of IDMAC) interrupt may come
up together with data error interrupts. If so, the interrupt
routine set EVENT_DATA_ERR to the pending_events and schedule
the tasklet but we may still fallback to the IDMAC interrupt
case as the tasklet may come up a little late, namely right
after the IDMAC interrupt checking. This will casue dw_mmc
unmap sg twice. We can easily see it with CONFIG_DMA_API_DEBUG
enabled.

WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1096 check_unmap+0x7bc/0xb38
dwmmc_exynos 12200000.mmc: DMA-API: device driver tries to free DMA memory it
has not allocated [device address=0x000000006d9d2200]
[size=128 bytes]
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.7.0-rc4 #26
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[<c0112b4c>] (unwind_backtrace) from [<c010d888>] (show_stack+0x20/0x24)
[<c010d888>] (show_stack) from [<c03fab0c>] (dump_stack+0x80/0x94)
[<c03fab0c>] (dump_stack) from [<c0123548>] (__warn+0xf8/0x110)
[<c0123548>] (__warn) from [<c01235a8>] (warn_slowpath_fmt+0x48/0x50)
[<c01235a8>] (warn_slowpath_fmt) from [<c042ac90>] (check_unmap+0x7bc/0xb38)
[<c042ac90>] (check_unmap) from [<c042b25c>] (debug_dma_unmap_sg+0x118/0x148)
[<c042b25c>] (debug_dma_unmap_sg) from [<c077512c>] (dw_mci_dma_cleanup+0x7c/0xb8)
[<c077512c>] (dw_mci_dma_cleanup) from [<c0773f24>] (dw_mci_stop_dma+0x40/0x50)
[<c0773f24>] (dw_mci_stop_dma) from [<c0777d04>] (dw_mci_tasklet_func+0x130/0x3b4)
[<c0777d04>] (dw_mci_tasklet_func) from [<c0129760>] (tasklet_action+0xb4/0x150)
[<c0129760>] (tasklet_action) from [<c0101674>] (__do_softirq+0xe4/0x3cc)
[<c0101674>] (__do_softirq) from [<c0129030>] (irq_exit+0xd0/0x10c)
[<c0129030>] (irq_exit) from [<c01778a0>] (__handle_domain_irq+0x90/0xfc)
[<c01778a0>] (__handle_domain_irq) from [<c0101548>] (gic_handle_irq+0x64/0xa8)
[<c0101548>] (gic_handle_irq) from [<c010e3d4>] (__irq_svc+0x54/0x90)
Exception stack(0xc1101ef8 to 0xc1101f40)
1ee0:                                                       00000001 00000000
1f00: 00000000 c011b600 c1100000 c110753c 00000000 c11c3984 c11074d4 c1107548
1f20: 00000000 c1101f54 c1101f58 c1101f48 c010a1fc c010a200 60000013 ffffffff
[<c010e3d4>] (__irq_svc) from [<c010a200>] (arch_cpu_idle+0x48/0x4c)
[<c010a200>] (arch_cpu_idle) from [<c01669d8>] (default_idle_call+0x30/0x3c)
[<c01669d8>] (default_idle_call) from [<c0166d3c>] (cpu_startup_entry+0x358/0x3b4)
[<c0166d3c>] (cpu_startup_entry) from [<c0aa6ab8>] (rest_init+0x94/0x98)
[<c0aa6ab8>] (rest_init) from [<c1000d58>] (start_kernel+0x3a4/0x3b0)
[<c1000d58>] (start_kernel) from [<4000807c>] (0x4000807c)
---[ end trace 256f83eed365daf0 ]---

Change-Id: Idc1b46aeac92d715e368533352b2bb75d65d4bbd
Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-06-27 14:39:44 +08:00
Xing Zheng
cff10dbc0d UPSTREAM: net: stmmac: dwmac-rk: add rk3228-specific data
Add constants and callback functions for the dwmac on rk3228/rk3229 socs.
As can be seen, the base structure is the same, only registers and the
bits in them moved slightly.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
master commit e7ffd81233)

Conflicts:

	Documentation/devicetree/bindings/net/rockchip-dwmac.txt
[zx: conflict with rk3366 and rk3399 that have not been sent to upstream.]

Change-Id: Ibae845ded567e11a8428f6f45510cd5443845e17
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-27 14:38:46 +08:00
Jianqun Xu
f484a8a4cb ARM64: dts: rk3399-evb2: remove 1.8G support for A72
Some RK3399 evb2 cannot support 1.8G for A72, maybe caused by
current limit, but remove it anyway for evb2.

Change-Id: Ibaa940696ccbdc59131c49e9a643a63863768ea2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-06-27 14:36:42 +08:00
Huibin Hong
e0a1e9b7cd spi: rockchip: set tx burst len 16, rx burst len 1.
Set ROCKCHIP_SPI_DMATDLR (rs->fifo_len - 16 - 1), which
can keep spi transferring. By the way, rx burst len must be
set 1, because it is hard to deal with the unaligned length.
Such as burst leng 16, ROCKCHIP_SPI_DMARDLR 16, when rx fifo
reaches 16, dma receive 16 bytes. But if the last bytes is less
than 16, dma will miss the bytes left in the rx fifo.

Change-Id: I846db94a87955453e617620ade32f2e68f01c01d
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-23 11:35:59 +08:00
Huibin Hong
c66ecf19b9 dmaengine: pl330: support transfer that doesn't align with (burst len * burst size)
Below code transfers 0x10002 bytes:
First loop 256*16*16=0x10000, burst size is 1, burst length is 16.
Then the second loop 2 bytes, burst size is 1, burst length is 1.

f0041000:        DMAMOV CCR 0xbc02f1
f0041006:        DMAMOV SAR 0xdd6c0000
f004100c:        DMAMOV DAR 0xff1d0400
f0041012:        DMALP_0 15
f0041014:        DMALP_1 255
f0041016:        DMAWFPB 12
f0041018:        DMALDA
f0041019:        DMASTPB 12
f004101b:        DMAFLUSHP 12
f004101d:        DMALPENDA_1 bjmpto_7
f004101f:        DMALPENDA_0 bjmpto_b
f0041021:        DMAMOV CCR 0x800201
f0041027:        DMALP_1 1
f0041029:        DMAWFPB 12
f004102b:        DMALDA
f004102c:        DMASTPB 12
f004102e:        DMAFLUSHP 12
f0041030:        DMALPENDA_1 bjmpto_7
f0041032:        DMASEV 0
f0041034:        DMAEND

Change-Id: I97ef33aeac8ebe18c63201cf4c1c04f5548e9a4a
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-23 11:33:09 +08:00
Arnd Bergmann
691d13010d UPSTREAM: ASoC: hdmi-codec: select CONFIG_HDMI
SND_SOC_HDMI_CODEC can be enabled without HDMI support, leading
to a link error:

In function `hdmi_codec_hw_params':
sound/soc/codecs/hdmi-codec.c:188: undefined reference to `hdmi_audio_infoframe_init'
sound/built-in.o:(.debug_addr+0x1a5c0): undefined reference to `hdmi_audio_infoframe_init'

This changes the Kconfig file to select HDMI, as the other codec using
hdmi_audio_infoframe_init already does.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git fix/hdmi
 commit 6de7df8d1b)

Change-Id: Iddf276cef778db8cb28e5ea86dec146136887056
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:12:34 +08:00
Philipp Zabel
19993a9b14 UPSTREAM: ASoC: hdmi-codec: Add ELD control
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit db71336b9e)

Change-Id: Ie82a1f72c3601b64c61b2d17f5849f892010f5ef
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:11:57 +08:00
Philipp Zabel
c09637550f UPSTREAM: ASoC: hdmi-codec: Add ELD control
ALSA doesn't know about all the different compressed audio formats,
so there is no interface to let userspace enumerate the formats that
are supported by the connected sink. Exporting the raw ELD bytes to
userspace allows an application to select the appropriate audio format
depending on the current capabilities of the connected HDMI sink device.
Usually userspace then just pretends to ALSA that the data is in one of
the raw 16-bit PCM audio formats and relies on the IEC controls to tell
the sink how to interpret the data.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 81151cfb6b)

Change-Id: I37a90865af97be1c1e21b5e677aa7d8ce58bdf23
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:11:38 +08:00
Jyri Sarha
0f0acce3cc UPSTREAM: ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders
The hdmi-codec is a platform device driver to be registered from
drivers of external HDMI encoders with I2S and/or spdif interface. The
driver in turn registers an ASoC codec for the HDMI encoder's audio
functionality.

The structures and definitions in the API header are mostly redundant
copies of similar structures in ASoC headers. This is on purpose to
avoid direct dependencies to ASoC structures in video side driver.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Acked-by: PC Liao <pc.liao@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 09184118a8)

Change-Id: I4fc0651b732c2604df58cb2e0ec5f5edeecdf412
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:11:20 +08:00
Jyri Sarha
b465564318 UPSTREAM: ALSA: pcm: Allow 32 bit sample format in IEC958 channel status helper
Treat 32 bit sample width as if it was 24 bits when generating IEC958
channel status bits. On some platforms 24 sample width is problematic
and to get full 24 bit precision a 32 bit format, using only the 24
most significant bits, may have to be used.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 4a462ce084)

Change-Id: I26461c0d8b92bfc6547f81006dacb7a7b3068782
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:09:03 +08:00
Jyri Sarha
3d51558969 UPSTREAM: ALSA: pcm: add IEC958 channel status helper for hw_params
Add IEC958 channel status helper that gets the audio properties from
snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to
produce the channel status bits already in audio stream configuration
phase.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 4a4436573a)

Change-Id: Ie19500cd63fb311ec273035c336acc8c568d84db
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-06-23 11:08:28 +08:00
Huang, Tao
63e5c8e831 UPSTREAM: clocksource/drivers/rockchip: Add support for the rk3399 SoC
The only difference between the rk3399 SoC and the other ones is the control
register offset which is different.

Add a new field to store the control register address depending on the SoC
and use it instead of the <base> + <control offset>.

BUG=chrome-os-partner:54522
TEST=Tested on gru, cat /proc/interrupts |grep timer

Change-Id: I37f4d30a8b4609887b175ab7e9b1117b2ac436e4
Signed-off-by: Huang Tao <huangtao@rock-chips.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Tested-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from git.linaro.org/people/daniel.lezcano/linux.git clockevents/next
 commit d0e2b96b2f723cb2d3ca992eaa2fe643367830f8)
Reviewed-on: https://chromium-review.googlesource.com/353977
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2016-06-22 19:55:45 +08:00
Huang, Tao
37a084a635 UPSTREAM: clocksource/drivers/rockchip: Add the dynamic irq flag to the timer
The rockchip timer is a broadcast timer. Add the CLOCK_EVT_FEAT_DYNIRQ flag
and set the cpumask to all possible cpus to save power by avoiding
unnecessary wakeups and IPIs.

BUG=chrome-os-partner:54522
TEST=Tested on gru, cat /proc/interrupts |grep timer

Change-Id: Ic7de570f35921a292e4687c2bcf408b37334f781
Signed-off-by: Huang Tao <huangtao@rock-chips.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Tested-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from git.linaro.org/people/daniel.lezcano/linux.git clockevents/next
 commit 11932c2ac6f8c0f20f12a38569a36f0d1b5cfd6b)
Reviewed-on: https://chromium-review.googlesource.com/353976
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2016-06-22 19:54:13 +08:00
Huang, Tao
142baf7d61 Revert "clocksource: rockchip: remove unnecessary clear irq before request_irq"
This reverts commit c380160aea.

Change-Id: I435f0989976627e9892ff2bdba91cf41b8b77ef9
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-06-22 19:52:44 +08:00
Huang, Tao
7a73ecd246 Revert "clocksource: rockchip: add dynamic irq flag to the timer"
This reverts commit fb50410985.

Change-Id: I1d04b207ae34a15688c1dc77f08525a45541e39e
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-06-22 19:52:31 +08:00
Huang, Tao
5fdc2552c5 Revert "clocksource: rockchip: add support for rk3399 SoC"
This reverts commit b7355e9f62.

Change-Id: If04877735b4b99e3f1f6a691480413872a0a9562
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-06-22 19:52:05 +08:00
xubilv
cc93de373b video: rockchip: mipi: modify judgment condition for rk32_dsi_set_bits
Change-Id: I71a2515f871dc3d8bbcd8567565fc412c39d9a81
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-06-22 19:45:46 +08:00
Zhangbin Tong
a9f2203134 arm64: dts: rockchip: add rk3399 box 0505 board support
Add minimal DT files for the rockchip box board, based on
the rockchip rk3399 SoC.

Change-Id: I6b63e9d4e217412cc6e1a01a4cb9e0be58ff3d6f
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-06-22 19:40:35 +08:00
Xing Zheng
1c4e444287 UPSTREAM: clk: rockchip: export rk3228 MAC clocks
This patch exports related MAC clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit af5cf5deb074d9011209d3979096620d1dadf44a)

Change-Id: I12d60a82b08ba528b3e0ac3f45dc437514df6f8a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:31:53 +08:00
Xing Zheng
0c5d88321b UPSTREAM: clk: rockchip: rename rk3228 sclk_macphy_50m to sclk_mac_extclk
The sclk_macphy_50m is confusing, the sclk_mac_extclk describes
a external clock  clearly.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit 24449885d79d79ae22a5ee2cb749161ccb5a141e)

Change-Id: I81aaed6cb9d766d9c558eaf8659eb9943290f409
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:31:26 +08:00
Xing Zheng
70c17fd110 UPSTREAM: clk: rockchip: export rk3228 audio clocks
This patch exports related i2s/spdif clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit c64032c5026f55cf496adc4281b9356b713ee56f)

Change-Id: Id979feaf98be2879b23b1759bbcb5fa022b71be6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:30:57 +08:00
Xing Zheng
ff62cb1312 UPSTREAM: clk: rockchip: add clock-ids for rk3228 MAC clocks
This patch exports related MAC clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-shared/clkids commit 9ff59360b8)

Change-Id: Ib6f5f2a0ccd19a8b71c384abddacadbd4da291bb
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:30:36 +08:00
Xing Zheng
a9eec456a1 UPSTREAM: clk: rockchip: add clock-ids for rk3228 audio clocks
This patch exports related i2s/spdif clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-shared/clkids commit 5f6d71044f)

Change-Id: I85e535307b0fa479b50a66bc25e9c3c5132deaa0
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:29:39 +08:00
Xing Zheng
a896890434 UPSTREAM: clk: rockchip: include rk3288 downstream muxes into fractional dividers
During the initial conversion to the newly introduced combined fractional
dividers+muxes the rk3228 clocks were left out, so convert them now.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit c73f689eea9f1e1706a600a506ba89f82bd84349)

Change-Id: Iea91d23ec1fa09c4777f7ccdb016514c301f90ec
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:29:19 +08:00
Xing Zheng
3eca3e3613 UPSTREAM: clk: rockchip: fix incorrect rk3228 clock registers
Due to copy and paste carelessly, RK3288_CLKxxx references are incorrect,
we need to fix them.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit 67de7901c4)

Change-Id: I3910b05343e0f8353ee277f969e4ab32ed94ad6d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:28:17 +08:00
Shawn Lin
d22154750c UPSTREAM: clk: rockchip: release io resource when failing to init clk
We should call iounmap to relase reg_base since it's not going
to be used any more if failing to init clk.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit 1d003eb080)

Change-Id: Ia0161885786d6504fee7e76c6620df98bb2cdb21
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:27:46 +08:00
Shawn Lin
08b7fcf33d UPSTREAM: clk: rockchip: fix wrong mmc phase shift for rk3228
mmc sample shift is 0 for rk3228 refer to user manaul.
So it's broken if we enable mmc tuning for rk3228.

Fixes: 307a2e9ac ("clk: rockchip: add clock controller for rk3228")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit bb07698fc8)

Change-Id: I9bb7e18fe8c1cdb5661219f078f4992de7ad06bd
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:27:14 +08:00
Yakir Yang
a3c96e83f7 UPSTREAM: clk: rockchip: set the clock ids for RK3228 HDMI
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next from commit bdc7deec2f)

Change-Id: I33e4850717853d3ea94479b087d32f114e5b1a59
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:21:56 +08:00
Yakir Yang
91d69ac517 UPSTREAM: clk: rockchip: set the clock ids for RK3228 VOP
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next from commit 0a9d4ac08e)

Change-Id: I9e995f3e1fe35d5b3b44adec174fd58df9b90380
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:21:30 +08:00
Yakir Yang
e589829fa3 UPSTREAM: clk: rockchip: add the new clock ids for RK3228 HDMI
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-shared/clkids commit 2d2671ea4b)

Change-Id: I670ae08d8cac91e0cf4985ca50e3f64916d527ba
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:20:56 +08:00
Yakir Yang
f1f0f97bf5 UPSTREAM: clk: rockchip: add the new clock ids for RK3228 VOP
There are four clocks that vop module would need to operate:
    DCLK_VOP,  HCLK_VOP,  SCLK_VOP,  ACLK_VOP,

Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-shared/clkids commit 31b1fed36e)

Change-Id: Iea57109b85928c4139283e366ce5d60430e8984b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:20:22 +08:00
Caesar Wang
5e4caa836d UPSTREAM: clk: rockchip: add the tsadc clocks found on rk3228 SoCs
This patch adds the needed clocks for rk3228 tsadc.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Acked-by: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit a3cb9aa4ba)

Change-Id: Ie7328cc5de2e3909360e5655acb93d4f0eff025c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:19:51 +08:00
Caesar Wang
c291e8dc4b UPSTREAM: clk: rockchip: add id of the tsadc clock found on rk3228 SoCs
This patch adds 'SCLK_TSADC' and 'PCLK_TSADC' id found on rk3228 SoCs.
That will be needed by TSADC controller.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Acked-by: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
v4.8-clk/next commit 3629e70b8c)

Change-Id: Ia4c926d4decc9affd63510a794d7f2553f6be3a5
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-22 19:17:55 +08:00