Commit Graph

600592 Commits

Author SHA1 Message Date
Huang, Tao
77bab04357 Merge tag 'lsk-v4.4-17.03-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.03 v4.4-android

* tag 'lsk-v4.4-17.03-android': (166 commits)
  Linux 4.4.55
  ext4: don't BUG when truncating encrypted inodes on the orphan list
  dm: flush queued bios when process blocks to avoid deadlock
  nfit, libnvdimm: fix interleave set cookie calculation
  s390/kdump: Use "LINUX" ELF note name instead of "CORE"
  KVM: s390: Fix guest migration for huge guests resulting in panic
  mvsas: fix misleading indentation
  serial: samsung: Continue to work if DMA request fails
  USB: serial: io_ti: fix information leak in completion handler
  USB: serial: io_ti: fix NULL-deref in interrupt callback
  USB: iowarrior: fix NULL-deref in write
  USB: iowarrior: fix NULL-deref at probe
  USB: serial: omninet: fix reference leaks at open
  USB: serial: safe_serial: fix information leak in completion handler
  usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
  usb: host: xhci-dbg: HCIVERSION should be a binary number
  usb: gadget: function: f_fs: pass companion descriptor along
  usb: dwc3: gadget: make Set Endpoint Configuration macros safe
  usb: gadget: dummy_hcd: clear usb_gadget region before registration
  powerpc: Emulation support for load/store instructions on LE
  ...

Change-Id: I4db95bbe5b2523e19ddf22b3f65863f7f6d46632
2017-03-31 11:43:47 +08:00
Jianqun Xu
1bc30438ca arm64: dts: rockchip: rk3368 emmc add property 'caps2-mmc-hs200'
Change-Id: I5735f2168de63abe2a00ef550495f6561bfde1cb
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-31 10:40:43 +08:00
Zheng Yang
52b44d8051 ARM64: dts: rk3399-android: set ddc scl clock rate to 50KHz
Change-Id: I2549164b5b8e0e255b87445082e173ae809ab49c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-31 10:21:25 +08:00
Zheng Yang
a0b524450b drm: bridge: dw-hdmi: set ddc scl clock rate according to dts
To set dw hdmi i2c bus adapter scl clock rate, we introduce two device
tree parameter, ddc-i2c-scl-high-time-ns and ddc-i2c-scl-low-time-ns.

ddc-i2c-scl-high-time-ns: how many ns SCL hold high
ddc-i2c-scl-low-time-ns: how many ns SCL hold low

After measurement, 50KHz scl clock rate recommended configuration is:

&hdmi {
	ddc-i2c-scl-high-time-ns = <9625>;
	ddc-i2c-scl-low-time-ns = <10000>;
};

100KHz recommended configuration is:
&hdmi {
        ddc-i2c-scl-high-time-ns = <4708>;
        ddc-i2c-scl-low-time-ns = <4916>;
};

If dts parameter is not available, the default scl rate is 100KHz.

Change-Id: I6f6b0bf1694ab59e70da789ead99e15a53c93e4d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-31 10:20:45 +08:00
Frank Wang
eee051ca31 usb: dwc_otg_310: add rk3288 usb otg support
This adds amend usb otg driver to support rk3328-evb board.

Change-Id: I152bedb64367ddf9c556e330b31c018f385c3fd7
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-31 10:18:35 +08:00
Sugar Zhang
43021997f6 ARM64: dts: rk3328: add pdm node
Change-Id: Ib3ae44d970e889d512cb89a738b2dd633dbc9a7f
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-03-31 10:10:18 +08:00
Sugar Zhang
74bb3ab4ff ASoC: rockchip: add support for pdm controller
Change-Id: Id031c9a1b29fbf7b67d9feb7c8e20daabb0d32d9
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-03-31 10:09:12 +08:00
Mark Yao
f72e284b22 video/rockchip: rga2: retry 10 times when timeout
Change-Id: I06b55f282c73735e4a0a5fa4e96f042f8b017646
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-31 09:09:26 +08:00
Mark Yao
325807d0a8 video/rockchip: rga2: reduce work timeout to 100ms
100ms timeout is enough, 2 second timeout is too long.

Change-Id: I02f37280733dae307e81b417d9f3f547ba50259d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-03-31 09:09:25 +08:00
Frank Wang
d66445638b arm: dts: rk3288-evb: add rockchip-relinquish-port quirk for ehci
This adds force abnormal ohci relinquish port owner
and back to ehci on rk3288 SoC.

Change-Id: I33be55c08762be7e8a239f741a8c8dbb28522306
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-30 20:00:04 +08:00
Frank Wang
cfe6f1dd57 usb: ehci: add rockchip relinquishing port quirk support
Add a quirk to support rockchip relinquishing port from abnormal ohci
to ehci when FS/LS devices plug in.

To support this function, the rockchip-relinquish-port property must be
specified in ehci node of dt.

Change-Id: I91b58905132282ef2a836d54a1c7ace1e334d119
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-30 19:59:44 +08:00
Frank Wang
e3b77467de Revert "usb: ehci-platform: support no relinquishing port quirk"
This reverts commit 0fd1853df0.

We found this commit just work well for HS devices, however,
ehci_hub_control will set port owner to companion according line
status bits when FS/LS device is plugged in, so revert this one
and introduce a new workaround.

Change-Id: Ifa856620672191c845abc53a76370cd5bf4097dc
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-30 19:59:37 +08:00
Sugar Zhang
5ac21bd8d8 ASoC: rockchip: add support for rk3328 spdif
Change-Id: Ia5eceaafed507e141d0de198839134c8c379d42b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2017-03-30 19:57:37 +08:00
Shawn Lin
3964634a6b mmc: core: use default generic cmd6 timeout for flushing cache
We need a luxury timeout once needing some extra time to
wait for flushing cache.

Change-Id: I8cd4015f30fa45cacdb984f0461b1ad8ee6cba7d
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2017-03-30 14:43:18 +08:00
chenjh
cccd331ae7 power: rk818-battery: fix charge voltage table define error
Change-Id: Ica6f1a11846a93485847406fdcd914d76662eda4
Signed-off-by: chenjh <chenjh@rock-chips.com>
2017-03-30 14:37:12 +08:00
Ville Syrjälä
79ae01aa89 UPSTREAM: drm/edid: Extract SADs properly from multiple audio data blocks
SADs may span multiple CEA audio data blocks in the EDID.

CEA-861-E says:
"The order of the Data Blocks is not constrained. It is also possible
to have more than one of a specific type of data block if necessary to
include all of the descriptors needed to describe the sink’s capabilities."

Each audio data block can carry up to 10 SADs, whereas the ELD SAD limit
is 15 according to HDA 1.0a spec. So we should support at least two data
blocks. And apparently some devices take a more liberal interpretation
and stuff only one SAD per data block even when they would fit into one.

So let's try to extract all the SADs we can fit into the ELD even when
they span multiple data blocks.

While at it, toss in a comment to explain the 13 byte monitor name
string limit which confused me at first.

Cc: Arturo Pérez <artur999555@gmail.com>
Tested-by: Arturo Pérez <artur999555@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94197
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1457554066-8739-1-git-send-email-ville.syrjala@linux.intel.com

(cherry picked from commit 7c01878254)
Change-Id: I18c5c64b69802a6a50de624d55b4b5217943b76e
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-30 14:34:07 +08:00
WeiYong Bi
621fa3942d arm64: rockchip_defconfig: enable CONFIG_PHY_ROCKCHIP_DP
Change-Id: Icdaad2e5aa8b54b0b27a6770e9d6354b13822900
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-30 10:55:09 +08:00
Zheng Yang
3cea98c11a drm: bridge: dw-hdmi: add debugfs node
Create two debugfs node to debug hdmi controller and phy.

Use following command to debug:
Read hdmi controller register:
	cat /d/dw-hdmi/ctrl
Read hdmi phy register:
	cat /d/dw-hdmi/phy
Write hdmi controller register:
	echo <reg> <val> > /d/dw-hdmi/ctrl
Write hdmi phy register:
	echo <reg> <val> > /d/dw-hdmi/phy

<reg> and <val> is hexadecimal.

Change-Id: I02e40cc94aa651ff0734feddbfa7d816edcf222f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-29 18:53:20 +08:00
Jung Zhao
68e343df50 video: rockchip: vpu: clear mmu status when vpu reset
Change-Id: I9c8f02e5275b2a5e286b4306a2390b8cbfdcbbe5
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-03-29 16:14:58 +08:00
Jacob Chen
b73eddef6e ARM: dts: rk3288: set simple_ondemand parameter for gpu
Change-Id: If69037b42d424521abd9fb1f0826441068cfd94f
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-03-29 13:08:49 +08:00
Jacob Chen
916b289ede MALI: midgard: Linux: support custom ondemand_data
get parameter from dts

Change-Id: Id1b11e3d6a5809cbd4f6f52b1595562e0fa66f70
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-03-29 13:06:58 +08:00
Finley Xiao
fe99293b22 clk: rockchip: add SCLK_DDRC id for rk3368 ddrc
Add the needed id for the ddr clock.

Change-Id: Ib2a4d8dffef5b393e294df49a925577f14306e72
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-03-29 10:51:59 +08:00
dalon.zhang
b27172de1e camera: rockchip: camsys version 0.0x21.0xb
some log is so boring, set print level more high.

Change-Id: I8cfe16f535718a130fa03ee7173e4ef325239e06
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
2017-03-29 10:50:31 +08:00
Zheng Yang
ae25660f35 drm: bridge/dw_hdmi: check is_hdmi2 in hdmi_config_AVI
If a display support HDMI2.0, it must support SCDC or YCbCr420.
So we check the connector->scdc_present and mode->flags to
check the connected display is HDMI 2.0.

Change-Id: I3b868d43791089fcdef77f99ec90396553008b9a
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-29 10:50:04 +08:00
Zheng Yang
d4686ea76b FROMLIST: drm: Add HDMI 2.0 VIC support for AVI info-frames
HDMI 1.4b support the CEA video modes as per range of CEA-861-D (VIC 1-64).
For any other mode, the VIC filed in AVI infoframes should be 0.
HDMI 2.0 sinks, support video modes range as per CEA-861-F spec, which is
extended to (VIC 1-107).

This patch adds a bool input variable, which indicates if the connected
sink is a HDMI 2.0 sink or not. This will make sure that we don't pass a
HDMI 2.0 VIC to a HDMI 1.4 sink.

This patch touches all drm drivers, who are callers of this function
drm_hdmi_avi_infoframe_from_display_mode but to make sure there is
no change in current behavior, is_hdmi2 is kept as false.

In case of I915 driver, this patch checks the connector->display_info
to check if the connected display is HDMI 2.0.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <jose.abreu@synopsys.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>

PS: This patch touches a few lines in few files, which were
already above 80 char, so checkpatch gives 80 char warning again.
- gpu/drm/omapdrm/omap_encoder.c
- gpu/drm/i915/intel_sdvo.c

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
(am from https://patchwork.kernel.org/patch/9641449)
Change-Id: I364cd0aed7eea0384ea9eddfff20c3fa86eb9ba2
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-29 10:49:54 +08:00
Viresh Kumar
7c08334e41 UPSTREAM: devfreq: rk3399_dmc: Remove dangling rcu_read_unlock()
This call never had the rcu_read_lock() counterpart. Remove the unlock
part as well.

Change-Id: Ifc5abfd7cea9a245b6edc0f50e362963ac045b7f
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
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 d8323de3d4)
2017-03-29 10:42:52 +08:00
Chanwoo Choi
07e5bac825 UPSTREAM: PM / devfreq: rk3399_dmc: Use the resource-managed function to add devfreq dev
This patch uses the resource-managed to add the devfreq device.
This function will make it easy to handle the devfreq device.

- struct devfreq *devm_devfreq_add_device(struct device *dev,
				  struct devfreq_dev_profile *profile,
				  const char *governor_name,
				  void *data);

Conflicts:
        drivers/devfreq/rk3399_dmc.c

Change-Id: I2ba2779a1b944931dc240f0593824f0316d11985
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 927b75a628)
2017-03-29 10:41:33 +08:00
Javier Martinez Canillas
c7f2c5a670 UPSTREAM: PM / devfreq: rk3399_dmc: Fix module autoload
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
alias:          of:N*T*Crockchip,rk3399-dmcC*
alias:          of:N*T*Crockchip,rk3399-dmc

Change-Id: I4bffd86067bb487619ce8365532123938a0ca964
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit 2f3f1a261c)
2017-03-29 10:33:13 +08:00
Axel Lin
aa28f75e56 UPSTREAM: PM / devfreq: rk3399_dmc: Remove explictly regulator_put call in .remove
Current code uses devm_regulator_get() in .probe so a regulator_put() will
be automatically called when unload the module. Remove the explictly
regulator_put() call and then we can also remove rk3399_dmcfreq_remove().

Change-Id: I56a62a76f06403aff9ad0478e7701862084a90b3
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
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 da4a64481b)
2017-03-29 10:24:17 +08:00
Frank Wang
696b3f25a2 clk: rockchip: rk3288: add gate id of hclk_usb_peri for usb otg
Change-Id: Ib45f6d97ec81329ec9a4a19e9e836efa0ea61fe2
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-28 17:27:01 +08:00
Zheng Yang
3034764350 drm: bridge: dw-hdmi-i2s-audio: enable INSERT_PCUV bit for LPCM
dw-hdmi introduced insert_pcuv bit in version 2.10a. When
set (1'b1), this bit enables the insertion of the PCUV
(Parity, Channel Status, User bit and Validity) bits on the
incoming audio stream (support limited to Linear PCM audio).

Change-Id: Ib12a50bf7064ac78dbf143f1ea35d7f68f861877
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-03-28 15:48:36 +08:00
William Wu
c0bb035a35 ARM: rockchip_defconfig: enable dwc2 driver
Change-Id: Ie84fb1d496f18114da988f52e1a9e4b240013844
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-03-28 15:24:20 +08:00
hero.huang
978876cc44 arm64: rockchip_linux_defconfig: enable PCIe config
Change-Id: I7be6a725eb0043d135d166939ecde3c6f47b24f9
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
2017-03-28 11:16:57 +08:00
Elaine Zhang
3a45555460 rk808: rtc: set rtc stopped by default
set rtc stopped by default, start rtc in rtc device probe.
add rtc node, whether RTC need to initialize.

Change-Id: Ifab269786f316d33149a50a18e23af1b6206d57d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-28 11:14:53 +08:00
hero.huang
70b8fe2af3 arm64: dts: rockchip: enable pcie_phy for Sapphire board
Change-Id: Ia59a697ee27d4f4848f3fceb344f362b7fdcae73
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
2017-03-28 11:14:19 +08:00
Huang, Tao
9ac22e5d44 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: I642605f12bb453b9b09dea3d199923a314fec844
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-03-28 11:08:32 +08:00
WeiYong Bi
1cba569fb5 phy: rockchip-dp: fix unexpected reset 24m clock
Reset_control_assert/reset_control_deassert will not check whether
the incoming pointer is NULL, so we need to check it before using it.

Change-Id: Ib2aeeefcb2d5d7429031bc21bf7e3df1d897a6c9
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-28 09:53:31 +08:00
Jianqun Xu
54be7ce59b arm: dts: rk3288-evb: add ion support
Change-Id: Icbdba5ef01681e4ab107a5af295cfa9e51215288
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-28 09:40:44 +08:00
Jacob Chen
ef2c18d228 drm/rockchip: rga: replace primitive api with dma sync api
Since rga is a dma-coherent device, we have to use drm bus
 device to call sync api.

Change-Id: Ia12062293fabba083c8ab9c4f7457e3167807bb9
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-03-27 19:00:41 +08:00
William Wu
267df77d1d usb: dwc_otg_310: remove unused configs
The USB20_HOST_EN and USB20_OTG_EN configs are used
for rockchip dwc2 legacy driver, they are not needed
for dwc_otg_310 driver.

Change-Id: I4c16f0be5276b3c07429ab88cb063508b34ce007
Signed-off-by: William Wu <wulf@rock-chips.com>
2017-03-27 18:32:51 +08:00
Frank Wang
737d3f335a arm: rockchip_defconfig: enable dwc_otg_310 usb driver
This adds enable dwc_otg_310 driver for dwc otg and host.

Change-Id: I779c663992b270015515d45a94e3fa4187368a93
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-27 18:32:15 +08:00
Frank Wang
c2897ccc70 usb: dwc_otg_310: fixed compilation error
Change-Id: I5f501184c11d25493f6855d994e32c1043371161
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-03-27 18:31:46 +08:00
Chen Liang
ae1b1b362d ARM64: dts: rockchip: configure EAS data for rk3368
Change-Id: I3154b1ae060553b7919c213420782f7a1f5d36fc
Signed-off-by: Chen Liang <cl@rock-chips.com>
2017-03-27 18:07:55 +08:00
WeiYong Bi
35416e15a4 arm64: dts: rk3368-android: Add eDP route node
Change-Id: I824d7a1c15cf7cddcb2e3f080498bd23e269be40
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:59:04 +08:00
WeiYong Bi
a381e19663 arm64: dts: rockchip: Add eDP node for rk3368
Change-Id: I0fa5ddc12cdbb2bf1d9fb0667222ead15071bdec
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:43:11 +08:00
WeiYong Bi
2404f87aa5 phy: rockchip-dp: Add support for rk3368 Display Port PHY
Change-Id: Ic2134ba719dadba121dc2fcc944662ef06b2ecfa
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:40:39 +08:00
WeiYong Bi
d6fdc92e0c drm/rockchip: analogix_dp: Add support for RK3368 eDP
Change-Id: I738ddf122776081cf41adef2921644ddfc6e07dd
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
2017-03-27 17:38:47 +08:00
Elaine Zhang
5fa933c874 clk: rockchip: rk3368: set hclk_vio_noc as critical clock
to fix up the display shaking when uboot to kernel show.

Change-Id: I5f85028921d76a2dea752aafe7420b05b041bc8e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2017-03-27 17:28:04 +08:00
Jianqun Xu
f1616f236f arm: dts: rk3288-evb: add support for GSL3673
GSL3673 is a touchscreen device, let support it.

Change-Id: I4bf302c395491ca49a1874c8984caa0b49cfb326
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 17:13:10 +08:00
Jianqun Xu
5211012f3b arm: dts: rk3288: move i2c0 to the front of other i2c
Change-Id: I822622fc1f1ed41729851294858246cf6da8c202
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-03-27 16:53:34 +08:00