Commit Graph

595832 Commits

Author SHA1 Message Date
Jacob Chen
bbb79b294d ARM: dts: rk3288: add missing regulator-ramp-delay for act8846
Change-Id: I587baf113846aaede89121c739e6edc869623c2d
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-21 14:14:00 +08:00
Yakir Yang
406d86638f ARM: configs: enable dw-hdmi audio with i2s interface
Default enable CONFIG_DRM_DW_HDMI_I2S_AUDIO.

Change-Id: I317f90e622ab65aaf66c9199e070a14fd1877f13
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-21 14:13:30 +08:00
Yakir Yang
61f62907bd ARM: dts: rk3288: add asoc simple card for DW-HDMI audio for EVB board
HDMI use the I2S0 as the audio input source, and DW-HDMI audio function
is based on generic hdmi-codec driver.

Change-Id: I6c85ffe7c214b17a3b5b319e4cd20e95a1b46398
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-21 14:13:09 +08:00
Kuninori Morimoto
5722368760 FROMLIST: drm: bridge: add DesignWare HDMI I2S audio support
Current dw-hdmi is supporting sound via AHB bus, but it has
I2S audio feature too. This patch adds I2S audio support to dw-hdmi.
This HDMI I2S is supported by using ALSA SoC common HDMI encoder
driver.

Change-Id: I32e95f66838883ac44a45f95c55583184a0a1b46
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am form https://patchwork.kernel.org/patch/9196453/)
2016-07-20 17:35:41 +08:00
Yakir Yang
31e0ac720b drm/rockchip: inno_hdmi: add the missing parameter in struct hdmi_codec_ops
Commit b360d3748e ("ASoC: hdmi-codec: callback function will be called
with private data") have introduced an external parameter in struct
hdmi_codec_ops, so need to fix the old interfaces.

Change-Id: Iaebd49ba7eb7fc0d857ff8aa8f9af39ea4678143
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-20 10:26:28 +08:00
Kuninori Morimoto
63de7b7516 FROMLIST: ASoC: hdmi-codec: callback function will be called with private data
Current hdmi-codec driver is assuming that it will be registered
from HDMI driver. Because of this assumption, each callback function
has struct device pointer which is parent device (= HDMI).
Then, it can use dev_get_drvdata() to get private data.

OTOH, on some SoC/HDMI case, SoC has VIDEO/SOUND and HDMI IPs.
This case, it needs SoC VIDEO, SoC SOUND and HDMI video, HDMI codec
driver. In DesignWare HDMI IP case, SoC VIDEO (= DRM/KMS) driver tries
to bind DesignWare HDMI video driver, and HDMI codec driver
(= hdmi-codec). This case, above "parent device" of HDMI codec driver
is DRM/KMS driver and its "device" already has private data.

And, from DT and ASoC CPU/Codec/Card binding point of view, HDMI codec
(= hdmi-codec) needs to have "parent device" (= DRM/KMS), otherwise,
it never detect sound card.

Because of these reasons, some driver can't use dev_get_drvdata() to
get private data on hdmi-codec driver. This patch add new void pointer
on hdmi_codec_pdata for private data, and callback function will be
called with it.

Change-Id: Ic7f4bb6cc06b5f7ce9a5a60f54566a780ddf1f65
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am form https://patchwork.kernel.org/patch/9196459/)
2016-07-20 10:26:21 +08:00
Jianqun Xu
9b93e8d7b6 ARM64: dts: rk3399: move hdmi-sound nodes to rk3399-evb.dtsi
Change-Id: I63f1c8b6c2bbdcb78ec6f5324f6b02105063832a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-20 09:10:35 +08:00
Mark Yao
3d5e59a720 arm64: dts: rockchip: support use drm on android
Change-Id: Ibc89e731c6eceac05cd3b013a5b05d7be5396efb
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2016-07-20 09:08:31 +08:00
chenzhen
5444e2e68b MALI: rockchip: upgrade midgard DDK to r12p0-04rel0
Signed-off-by: chenzhen <chenzhen@rock-chips.com>

Conflicts:

	drivers/gpu/arm/midgard/mali_kbase_core_linux.c

Change-Id: I17d67d066f6e029c2d8f1711002c347002a48399
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-07-19 19:56:45 +08:00
jerry.zhang
dbc9efa814 arm64: dts: rockchip: add touch panel gslx680 for 3399 vr board
Change-Id: I8d106b2146c01371bae8952e3926e44d86df464a
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-07-19 17:33:04 +08:00
jerry.zhang
415907edfd arm64: rockchip_defconfig: add CONFIG_TOUCHSCREEN_GSLX680_VR=y
Change-Id: I9f34d60eec83ab6a8480caa5142805e5ae1f92f0
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-07-19 17:29:03 +08:00
jerry.zhang
4a1212fde9 Input: add gslx680 touch panel for 3399 VR
Change-Id: I89c3dd181324f6b39e50c40fd404743eab43fe52
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-07-19 17:28:39 +08:00
jerry.zhang
ba1978bc30 arm64: dts: rockchip: add saradc and key for 3399 VR board
Change-Id: I8f331ffc30fe900afbe669c504b96350dd4de79e
Signed-off-by: jerry.zhang <jerry.zhang@rock-chips.com>
2016-07-19 17:27:07 +08:00
Rocky Hao
7f0ee6456f thermal: rockchip: rk3399: enhance the tsadc's bandgap feature
Due to the voltage ripple, the sensing data of the tsadc is not accurate.
And in this patch, the bandgap feature is enhanced to remove the voltage
ripple, and then the tsadc can sense the temperature more precisely.

Obsolete codes are removed as well.

Change-Id: Ifdd98def63212bc13306e7d5befee5eb32dbbc2f
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
2016-07-19 17:25:42 +08:00
Yakir Yang
01240c217a CHROMIUM: drm: rockchip/dw_hdmi: introduce werid audio tmds_n table
There are some rates that would be ranged for better clock jitter at
Chrome OS tree, like 25.175Mhz would range to 25.170732Mhz.

But due to the clock is aglined to KHz in struct drm_display_mode,
this would bring some inaccurate error if we still run the compute_n
math, so let's just code an const table for it until we can actually
get the right clock rate.

Change-Id: Ief14b7c9bffa95ff3b173925f3e1bd795625320d
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/316280
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2016-07-19 15:25:46 +08:00
Yakir Yang
d46288cf0b CHROMIUM: drm: bridge/dw_hdmi: improved the hdmi audio N/CTS cacluate math
The original math would bring some inaccurate to N/CTS that would
caused those magic number won't fit the HDMI 1.4 Spec request:
	128 * SampleRate = Tmds * N / CTS;

So this time we try to improved to math of N that would find the
minimal inaccurate with the HDMI 1.4 Spec.

Change-Id: Ied3cde3c352d955ae6f15d5e7fb172e92316c2a5
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/315424
Reviewed-by: Douglas Anderson <dianders@chromium.org>
2016-07-19 15:24:47 +08:00
Yakir Yang
329f1b1ff7 CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Fixup the clock to be what we expect
We allow some amount of slop in dw_hdmi_rockchip_mode_valid().  That's
a good thing since allowing a little bit of slop lets us support a
bunch of extra resolutions.

Originally, we also made a change to the VOP code to add the concept
of slop in there.  That was reasonable, but there was a problem: it
would tend to request clock rates that weren't _exactly_ clock rates
that we thought about.  It's possible that the common clock framework
would map these to PLL rates that we haven't thought about and we
haven't tested for jitter.

Instead of changing VOP, we should probably adjust the clock ourselves
in the mode_fixup function.  That way we'll request the exact clock we
tested and we'll know how the common clock framework will map it.

Change-Id: I56c2b046f76d554aab5eaed7a6b171ea074d6a62
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/284376
Reviewed-by: Alexandru Stan <amstan@chromium.org>
2016-07-19 15:23:31 +08:00
Yakir Yang
8974d5e9bd CHROMIUM: drm: rockchip/dw_hdmi-rockchip: Protect against > 2GHz pixel clocks
Add a check just to make sure that someone doesn't try to give us a
pixel clock that is > 2GHz.  If they did that, some of our math might
overflow, so it's good to make sure we don't do it.

Change-Id: I451602f0d771bb16b399b43e376e1054b7ee060f
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/284642
Reviewed-by: Alexandru Stan <amstan@chromium.org>
2016-07-19 15:22:51 +08:00
Yakir Yang
bc29e00861 CHROMIUM: drm: rockchip/dw_hdmi-rockchip: refactor the mode table
This cleanup will allow the following patch to implement slop easier.

25175000-40000000 and a few other ranges use the same settings.
And the rest of the driver already snaps to the next highest
frequency when it gets the settings. So this patch removes
a lot of the duplicates. It should be a noop change.

And frequencies within 0.1% should be close enough, let's redo
rockchip hdmi to allow slop.

Change-Id: Ic4865b2825de9b6c3b3e8d029066a8964e8ede6b
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-19 15:22:07 +08:00
Yakir Yang
15fe5755d5 media: rockchip-vpu: fix compiled warning about uninitialized 'ret'
rockchip_vpu_hw.c:251:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Change-Id: Ia5564c2da345c5922341b818961b18d2b1419013
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-19 15:21:45 +08:00
Jianqun Xu
fbc7e569aa ARM64: dts: rk3399: modify i2s node in rk3399-evb.dtsi
Change-Id: I2c96c537792d5981afcbdc88d8d5dcf57155b977
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-07-19 14:38:58 +08:00
Shawn Lin
b28bf5b3aa phy: rockchip-emmc: enable internal pull-down for strobe line
We enable it by default as we could see the usage of PCB layout
will not stuff this registor. For currently boards which soldered
it already, there should be no harmful.

Change-Id: Idc05c244dbaeebb1028e4828aa7a7d655899beb8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-07-19 10:16:26 +08:00
Jacob Chen
bc8729e53c UPSTREAM: ASoC: rt5616: add missing mute control for HPVOL
Add missing kcontrol for HPVOL mute control.

Signed-off-by: John Lin <john.lin@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 25923642

(cherry picked from git.kernel.org broonie/sound.git for-next
 commit d7fcd13663)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I75951c4b67474951e6c033e0dece5134c51dc233
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 12:01:08 +08:00
Jacob Chen
e328f0ad8c UPSTREAM: ASoC: rt5616: Add support sample rate to 192KHz
Reference the TRM, the ALC5616 support one 24bit/8KHz ~ 192KHz
I2S/PCM Interface for stereo DAC and stereo ADC.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 27307957
Patchset: fetch the upstream ASoC for rk3036 kylin board.

(cherry picked from git.kernel.org broonie/sound.git for-next
 commit 4e26ad80cb)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>

Change-Id: I1751e2c663689d4a45cd94d609c0b61d1ac9237b
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 12:00:32 +08:00
Jacob Chen
5016ece3a1 UPSTREAM: ASoC: rt5616: add the mclk for the codec driver
This patch adds the code to enable the clock to the CODEC driver
if it needs the clock enabled.

In some case, We need to claim the clock which is driving the codec
so that when we enable clock gating, we continue to clock the codec
when needed.

if mclk provided, to enable and disable the clock source.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 27307957
Patchset: fetch the upstream ASoC for rk3036 kylin board.

(cherry picked from git.kernel.org broonie/sound.git for-next
 commit 76d3204eaa)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>

Change-Id: Iaa1b07a1ff729f3b84c1e32cd0fdd0f36d9a8889
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:58:41 +08:00
Jacob Chen
b140453d85 UPSTREAM: ASoC: rt5616: trivial: fix the typo
This patch try to fix the trivial typo.

Run "scripts/checkpatch.pl -f --subjective xxx"
The enable more subjective tests.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 27307957
Patchset: fetch the upstream ASoC for rk3036 kylin board.
(Note: match the Kconfig for rt5616)

(cherry picked friom git.kernel.org broonie/sound.git for-next
 commit 99081589c5)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>

Change-Id: Ied09a6f69a7364daa68309fa9a0a4cd2e4a368e6
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:58:23 +08:00
Jacob Chen
cbf9b1209c UPSTREAM: ASoC: rt5616: rename some alsa control names
Rename some alsa control name as what they should be.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 25923642
Patchset: rt5616 audio

(cherry picked from broonie/sound.git#for-next e2133b6482)
Signed-off-by: Kees Cook <keescook@chromium.org>

Change-Id: I1d81031ddbe7ce5c38602c38ab643f893f436ef0
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:55:57 +08:00
Jacob Chen
91d231b3ca UPSTREAM: ASoC: rt5616: add an of_match table
Add a device tree match table. This serves to make the driver's support
of device tree more explicit.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 25923642
Patchset: rt5616 audio

(cherry picked from broonie/sound.git#for-next e17ff2de82)
Signed-off-by: Kees Cook <keescook@chromium.org>

Change-Id: I7ee1967a3cdf9583942c0d75b5e4d0125d31cd0c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:53:30 +08:00
Jacob Chen
57ab3becfe UPSTREAM: ASoC: rt5616: Return error if device ID mismatch
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 25923642
Patchset: rt5616 audio

(cherry picked from broonie/sound.git#for-next 36ddd489b0)
Signed-off-by: Kees Cook <keescook@chromium.org>

Change-Id: I55e15dfb42bf5022a976451311214980c4897aa5
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:52:10 +08:00
Jacob Chen
89301d7512 UPSTREAM: ASoC: rt5616: add rt5616 codec driver
This is the initial codec driver for rt5616.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 25923642
Patchset: rt5616 audio

(cherry picked from broonie/sound.git#for-next b1d1505995)
Signed-off-by: Kees Cook <keescook@chromium.org>

Change-Id: I17f99e549cb59a3788b257f63e51a84b3e9d4162
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:51:29 +08:00
Jacob Chen
fc78567750 sound: rockchip: remove rk's 5616 code
Change-Id: Ie48539c64500509ed19b6f13e8e30e864b8c6072
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:49:46 +08:00
Jacob Chen
e79d3dcc9a ARM: configs: rokchip: enable RT5616 support for linux defconfig
Quick way to test rt5616 on RK3036 Kylin board, you need bellow
commands:
  tinymix "HP Playback Switch" 1
  tinymix "HPVOL Playback Switch" 1
  tinymix "HP Playback Volume" 10
  tinymix "HPO MIX HPVOL Switch" 1
  tinymix "OUT MIXR DAC R1 Switch" 1
  tinymix "OUT MIXL DAC L1 Switch" 1
  tinymix "Stereo DAC MIXR DAC R1 Switch" 1
  tinymix "Stereo DAC MIXL DAC L1 Switch" 1

Test command:
root@linaro-alip:~#  aplay -D plughw:CARD=rockchiprt5616c,DEV=0 /opt/Third_Eye.wav

Change-Id: Ic4d44ed1a373869d5e0e670701b06f58f0e6399c
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:48:51 +08:00
Jacob Chen
2914f876af ARM: dts: rockchip: merge the hdmi-audio card with rt5616-codec card
Change-Id: I2888cbb7df9d4cd9d270f7fd81f34b27b40997cc
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:44:23 +08:00
Jacob Chen
9bd4a895b7 drm/rockchip: select hdmi codec when enable inno_hdmi
Change-Id: I33462d7677cec7e774f6901b5af3f25e402c3358
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2016-07-18 11:11:41 +08:00
Kever Yang
d2fd3cf7a7 arm64: dts: rockchip: add usb typec phy node for rk3399
Change-Id: I0313f7812bad02136abbd8868a201cf4409620d6
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2016-07-15 19:01:10 +08:00
Chris Zhong
6603214645 drm/rockchip: dw-mipi: add dw-mipi power domain support
Reference the power domain incase dw-mipi power down when
in use.

Change-Id: I54a0f418f20299a744f87c1337f06ff3341dfac5
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2016-07-15 18:43:17 +08:00
Yakir Yang
846bed49c0 arm64: dts: rockchip: add HDMI device node for RK3399
Change-Id: Ibfdf59eed0f055900d9409f6ceab20d0ec8f480c
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-15 15:59:27 +08:00
Huang, Tao
ce436daca4 arm64: dts: rockchip: rk3399-evb: merge common part
dtbs is same as before.

Change-Id: I0381607627905b98dee7962f8e62844c877fcd54
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-15 14:47:57 +08:00
Huang Jiachai
015d218fd2 video: rockchip: 3399 vop: add support DP output and YUV422 output mode
Change-Id: Ia01db8ae24f3e35e9a84b48cb2276463dd26bfb3
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-07-15 14:42:38 +08:00
Huang Jiachai
3ecaca341d video: rockchip: fb: add DP and yuv422 define
Change-Id: Iaaf52ff234444874ac730f8b75fa56308515f8f7
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-07-15 14:41:56 +08:00
Huang Jiachai
0adc053831 video: rockchip: vop: 3399: fix polarity config error
Change-Id: I136d602e384a6e73278e30be3c3bb6d58086285c
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-07-15 14:41:33 +08:00
Huang Jiachai
ea077662da video: rockchip: fb: no need close all win when hdmi switch screen at first time
Change-Id: I6dff985f3c2b44c6b461e0ee039823e59839b52c
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-07-15 14:41:19 +08:00
Huang Jiachai
061f1c665a ARM64: dts: rk3399-box-808-android: add disp policy for box product
Change-Id: Ic191bc7ff0540fa073face6bcd2be8f6de18fcc0
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
2016-07-15 14:03:03 +08:00
Mark Yao
a05932da07 drm/rockchip: gem: import dma_buf to gem
We want to display a buffer allocated by other driver, need import
the buffer to gem.

Change-Id: Ifd5fef3fbf2b4daea6d624ed2a250c2fe626309d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-07-15 11:35:35 +08:00
Wu Liang feng
63c6ce27ba power_supply: Add new type for USB chargers
This adds a power supply type for special USB charger,
this kind of USB charger is similar to Dedicated Charging
Port, but not a standard DCP because of D+/D- not short.

Change-Id: I7c478da642b43465a9de65c8b5d7b8250c0da037
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-14 15:04:49 +08:00
Wu Liang feng
0d47c1d85b arm64: dts: rockchip: add u2phy0 and u2phy0_otg node for rk3399
RK3399 SoC usb2 PHY comprises with one host-port and
one otg-port, we support otg-port for the time being.

Change-Id: I7d6a464372603e54c3a06d994e18d80eb84fa5a5
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2016-07-14 14:11:18 +08:00
Yakir Yang
16736f12f9 FROMLIST: drm/rockchip: dw_hdmi: introduce the pclk for grf
For RK3399's GRF module, if we want to operate the graphic related grf
registers, we need to enable the pclk_vio_grf which supply power for VIO
GRF IOs, so it's better to introduce an optional grf clock in driver.

Change-Id: I8f43e5c46c8559d6b6fe96a12cd026319b1d84e5
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9223317/)
2016-07-14 14:04:52 +08:00
Yakir Yang
b9984b0b91 FROMLIST: drm/rockchip: dw_hdmi: introduce the VPLL clock setting
For RK3399 HDMI, there is an external clock need for HDMI PHY,
and it should keep the same clock rate with VOP DCLK.

VPLL have supported the clock for HDMI PHY, but there is no
clock divider bewteen VPLL and HDMI PHY. So we need to set the
VPLL rate manually in HDMI driver.

Change-Id: I73abc382ff43bfa93d150c3449693f207029549f
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9223327/)
2016-07-14 14:04:23 +08:00
Yakir Yang
4cd228c82e FROMLIST: drm/rockchip: dw_hdmi: add RK3399 HDMI support
RK3399 and RK3288 shared the same HDMI IP controller, only some light
difference with GRF configure.

Change-Id: Ic404ff3df6004a87b709f00552d91eb546c78450
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9223315/)
2016-07-14 14:03:10 +08:00
Douglas Anderson
f4a1b61d1d FROMLIST: drm/rockchip: dw_hdmi: Use auto-generated tables
The previous tables for mpll_cfg and curr_ctrl were created using the
20-pages of example settings provided by the PHY vendor.  Those
example settings weren't particularly dense, so there were places
where we were guessing what the settings would be for 10-bit and
12-bit (not that we use those anyway).  It was also always a lot of
extra work every time we wanted to add a new clock rate since we had
to cross-reference several tables.

In <http://crosreview.com/285855> I've gone through the work to figure
out how to generate this table automatically.  Let's now use the
automatically generated table and then we'll never need to look at it
again.

We only support 8-bit mode right now and only support a small number
of clock rates and and I've verified that the only 8-bit rate that was
affected was 148.5.  That mode appears to have been wrong in the old
table.

Change-Id: I42b260300880f2bab6732c5ee3b11bc78e87500c
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
(am from https://patchwork.kernel.org/patch/9223325)
2016-07-14 14:02:12 +08:00