Commit Graph

603643 Commits

Author SHA1 Message Date
Shashank Sharma
69963a31db UPSTREAM: drm/edid: parse YCBCR420 videomodes from EDID
HDMI 2.0 spec adds support for YCBCR420 sub-sampled output.
CEA-861-F adds two new blocks in EDID's CEA extension blocks,
to provide information about sink's YCBCR420 output capabilities.

These blocks are:

- YCBCR420vdb(YCBCR 420 video data block):
This block contains VICs of video modes, which can be sopported only
in YCBCR420 output mode (Not in RGB/YCBCR444/422. Its like a normal
SVD block, valid for YCBCR420 modes only.

- YCBCR420cmdb(YCBCR 420 capability map data block):
This block gives information about video modes which can support
YCBCR420 output mode also (along with RGB,YCBCR444/422 etc) This
block contains a bitmap index of normal svd videomodes, which can
support YCBCR420 output too.
So if bit 0 from first vcb byte is set, first video mode in the svd
list can support YCBCR420 output too. Bit 1 means second video mode
from svd list can support YCBCR420 output too, and so on.

This patch adds two bitmaps in display's hdmi_info structure, one each
for VCB and VDB modes. If the source is HDMI 2.0 capable, this patch
adds:
- VDB modes (YCBCR 420 only modes) in connector's mode list, also makes
  an entry in the vdb_bitmap per vic.
- VCB modes (YCBCR 420 also modes) only entry in the vcb_bitmap.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>

V2: Addressed
    Review comments from Emil:
    - Use 1ULL<<i instead of 1<<i to make sure the output is 64bit.
    - Use the suggested method for updating dbmap.
    - Add documentation for YCBCR420_vcb_map to fix kbuild warning.

    Review comments from Ville:
    - Do not expose the YCBCR420 flags in uabi layer, keep it internal.
    - Save a map of YCBCR420 modes for future reference.
    - Check db length before trying to parse extended tag.
    - Add a warning if there are > 64 modes in capability map block.
    - Use y420cmdb in function names and macros while dealing with vcb
      to be aligned with spec.
    - Move the display information parsing block ahead of mode parsing
      blocks.

V3: Addressed design/review comments from Ville
    - Do not add flags in video modes, else we have to expose them to user
    - There should not be a UABI change, and kernel should detect the
      choice of the output based on type of mode, and the bitmaps.
    - Use standard bitops from kernel bitmap header, instead of calculating
      bit positions manually.

V4: Addressed review comments from Ville:
    - s/ycbcr_420_vdb/y420vdb
    - s/ycbcr_420_vcb/y420cmdb
    - Be less verbose on description of do_y420vdb_modes
    - Move newmode variable in the loop scope.
    - Use svd_to_vic() to get a VIC, instead of 0x7f
    - Remove bitmap description for CMDB modes & VDB modes
    - Dont add connector->ycbcr_420_allowed check for cmdb modes
    - Remove 'len' variable, in is_y420cmdb function, which is used
      only once
    - Add length check in is_y420vdb function
    - Remove unnecessary if (!db) check in function parse_y420cmdb_bitmap
    - Do not add print about YCBCR 420 modes
    - Fix indentation in few places
    - Move ycbcr420_dc_modes in next patch, where its used
    - Add a separate patch for movement of drm_add_display_info()

V5: Addressed review comments from Ville:
    - Add the patch which cleans up the current EXTENDED_TAG usage
    - Make y420_cmdb_map u64
    - Do not block ycbcr420 modes while parsing the EDID, rather
      add a separate helper function to prune ycbcr420-only modes from
      connector's probed modes.

V6: Rebase
V7: Move this patch after the 420_only validation patch (Ville)
V8: Addressed review comments from Ville
    - use cea_vic_valid check before adding cmdb/vdb modes
    - add check for i < 64 while adding cmdb modes
    - use 1ULL while checking bitmap

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1500028426-14883-1-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix checkpatch complaints and indentation]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: Id99fd280375445ff5ec93e19283fa7e3c2e715f7
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 832d4f2f41)
2017-09-13 15:18:39 +08:00
Shashank Sharma
12f0da6649 UPSTREAM: drm: add helper to validate YCBCR420 modes
YCBCR420 modes are supported only on HDMI 2.0 capable sources.
This patch adds:
- A drm helper to validate YCBCR420-only mode on a particular
  connector. This function will help pruning the YCBCR420-only
  modes from the connector's modelist.
- A bool variable (ycbcr_420_allowed) in the drm connector structure.
  While handling the EDID from HDMI 2.0 sinks, its important to know
  if the source is capable of handling YCBCR420 output, so that no
  YCBCR 420 modes will be listed for sources which can't handle it.
  A driver should set this variable if it wants to see YCBCR420 modes
  in the modedb.

V5: Introduced the patch in series.
V6: Squashed two patches (validate YCBCR420 and add YCBCR420
	   identifier)
V7: Addressed review comments from Vile:
    - Move this patch before we add 420 modes from EDID.
    - No need for drm_valid_cea_vic() check, function back to non-static.
    - Update MODE_STATUS with NO_420 condition.
    - Introduce y420_vdb_modes variable in this patch

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-6-git-send-email-shashank.sharma@intel.com
[vsyrjala: Drop the now bogus EXPORT_SYMBOL(drm_valid_cea_vic)]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: Ia5ef115a54ee522d4c44544ee3abe4247a54f9c0
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit d85231530b)
2017-09-13 15:18:39 +08:00
Shashank Sharma
9460b2bf90 UPSTREAM: drm/edid: cleanup patch for CEA extended-tag macro
CEA-861-F introduces extended tag codes for EDID extension blocks,
which indicates the actual type of the data block. The code for
using exteded tag is 0x7, whereas in the existing code, the
corresponding macro is named as "VIDEO_CAPABILITY_BLOCK"

This patch renames the macro and usages from "VIDEO_CAPABILITY_BLOCK"
to "USE_EXTENDED_TAG"

V2: Add extended tag code check for video capabilitiy block (ville)
V3: Ville:
	- Use suggested names for macros
	- Check the block length first, before checking the extended tag
V4: Fix commit message (David)
V5: Introduced this patch into HDMI-YCBCR-output series
V6: Rebase
V7: Rebase

Change-Id: I7564a9fd9b5a44be0a10394b14ff3d21d9b1e0d5
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-5-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 87563fc030)
2017-09-13 15:18:39 +08:00
Shashank Sharma
7bc1cf6e81 UPSTREAM: drm/edid: parse sink information before CEA blocks
CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
This block contains a map of indexes of CEA modes, which can
support YCBCR 420 output also. To avoid multiple parsing of same
CEA block, let's parse the sink information and get this map, before
parsing CEA modes.

This patch moves the call to drm_add_display_info function, before the
mode parsing block.

V4: Introduced new patch in the series
V5: Move this patch before 4:2:0 parsing patch (ville)
    Added r-b from Ville
V6: Rebase
V7: Rebase

Change-Id: Icf1a68daa1d7b63ceb28fee152d8a605d613c13a
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-4-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 0f0f870830)
2017-09-13 15:18:39 +08:00
Shashank Sharma
35b4954a74 UPSTREAM: drm/edid: complete CEA modedb(VIC 1-107)
CEA-861-F specs defines new video modes to be used with
HDMI 2.0 EDIDs. The VIC range has been extended from 1-64 to
1-107.

Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now
to be able to parse new CEA modes using the existing methods, we have
to complete the modedb (VIC=65 onwards).

This patch adds:
- Timings for existing CEA video modes (from VIC=65 till VIC=92)
- Newly added 4k modes (from VIC=93 to VIC=107).

The patch was originaly discussed and reviewed here:
https://patchwork.freedesktop.org/patch/135810/

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: Harry Wentland <harry.wentland@amd.com>

V2: Rebase
V3: Rebase
V4: Added native bit handling as per CEA-861-F spec (Ville)
V5: Fix timings for VIC 77:1920x1080 and 104:3840x2160p (Ville)
    Remove unnecessary paranthesis from function svd_to_vic (Ville)
    Added r-b (Neil)
V6: Rebase
V7: Fix indentation for modes from VIC 80

Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-3-git-send-email-shashank.sharma@intel.com
[vsyrjala: Fix up remaining formatting/indentation issues]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Change-Id: I77cbad4d83814726da803f0da0004818d4029744
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 8ec6e07555)
2017-09-13 15:18:39 +08:00
Shashank Sharma
5690766636 UPSTREAM: drm: handle HDMI 2.0 VICs in 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 if the connected display is HDMI 2.0.
- HDMI infoframes carry one of this two type of information:
	- VIC for 4K modes for HDMI 1.4 sinks
	- S3D information for S3D modes
  As CEA-861-F has already defined VICs for 4K videomodes, this
  patch doesn't allow sending HDMI infoframes for HDMI 2.0 sinks,
  until the mode is 3D.

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

V2: Rebase, Added r-b from Andrzej
V3: Addressed review comment from Ville:
	- Do not send VICs in both AVI-IF and HDMI-IF
	  send only one of it.
V4: Rebase
V5: Added r-b from Neil.
    Addressed review comments from Ville
    - Do not block HDMI vendor IF, instead check for VIC while
      handling AVI infoframes
V6: Rebase
V7: Rebase

Change-Id: I4a8e9ed2f292d3db6512e29e43661a21bb0b2a48
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499960000-9232-2-git-send-email-shashank.sharma@intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 0c1f528cb1)
2017-09-13 15:18:39 +08:00
Huang jianzhi
9ddbd9e7bb input: touchscreen: vtl_ts: fix compilation error
Change-Id: Ifdf10c3bb1a776389685388a0695fb1df90dcd70
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-13 09:34:58 +08:00
Zheng Yang
cafa8ebd5f drm: bridge: dw-hdmi: support workaround to clear the overflow condition on rockchip platform
Under some circumstances the Frame Composer arithmetic unit can miss
an FC register write due to being busy processing the previous one.

The issue can be worked around by issuing a TMDS software reset and
then write one of the FC registers several times. After tested, the
number of iterations of RK3399/RK3328(v2.11a), RK3368(v2.01a),
RK3288(v2.00a) is one.

Change-Id: Iba209e25d56aff84a8cc90b4d8dcb87369c9ae52
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-12 19:15:54 +08:00
Zheng Yang
5037a7f174 Revert "drm: bridge: dw-hdmi: Reorder HDMI Initialization Step"
This reverts commit 508e51e0b2.

Change-Id: I10a1a96f40b94eb2655184cf6f3a6b557afaa7ff
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2017-09-12 19:15:49 +08:00
Tang Yun ping
032b9b5b9e PM / devfreq: clk-ddr: fix bug of get lcdc type deadlock
When lcdc status changing and ddr frequency changing at the same time,
it may deadlock. Use list_for_each_entry to avoid this bug.

Change-Id: I461e705c19079ccb288e10bd4f616b0b4e5869b1
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-09-12 19:13:53 +08:00
Tang Yun ping
df885baaac PM / devfreq: rockchip-dmc: fix bug of get lcdc type deadlock
When lcdc status changing and ddr frequency changing at the same time,
it may deadlock. Use list_for_each_entry to avoid this bug.

Change-Id: I8074dc60b71650ea1afc300282f90ae8ff1ae97b
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2017-09-12 19:13:11 +08:00
zhoupeng
3565b1e7e8 media: rk-isp10: support bt656 signal interlace
odd and even field interlace generating a frame image.
fix cif_isp10_img_src_v4l2_subdev_enum_strm_fmts defrect info get error.
fix cif_isp10_rk3399 cif_clk_pll info doesn't match with dts config.

Change-Id: I44159c0dd4e676334221b5d5682e29d3280aa9fd
Signed-off-by: zhoupeng <benjo.zhou@rock-chips.com>
2017-09-12 19:09:55 +08:00
Huang jianzhi
49418c68f6 ARM: dts: rk3288: add the boot logo display for rk3288 act8846
Change-Id: I075db48841db504f15a15489b6b71ed20b17a015
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-12 19:09:35 +08:00
Alex Zhao
4f58925005 net: wireless: rockchip_wlan: Automatically set bcm wifi fw path
Change-Id: Iabea49eec3b9285ec1b98de6bee8b0d6d7b2dbe0
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-09-12 19:08:29 +08:00
Tao Huang
9ffa4f916a rtc: class: rockchip: print time spent in suspend
Log likes:
[   28.043238] Suspending console(s) (use no_console_suspend to debug)
INFO:    sleep mode config[0xfe]:
...
[   28.246039] PM: suspend of devices complete after 201.289 msecs
[   28.260911] PM: late suspend of devices complete after 3.238 msecs
[   28.262877] PM: noirq suspend of devices complete after 1.949 msecs
[   28.262885] Disabling non-boot CPUs ...
...
[   28.494444] Enabling non-boot CPUs ...
...
[   28.603791] PM: noirq resume of devices complete after 1.982 msecs
[   28.606132] PM: early resume of devices complete after 1.713 msecs
...
[   28.696963] Suspended for 2.265 seconds

Change-Id: If6887e62c5319f7fd39455db54190c84e5eb366b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-11 18:46:58 +08:00
Finley Xiao
21d227bdc2 MALI: utgard: support sharing regulator with other devices
If the regulator is shared between several devices then the lowest
request voltage that meets the system constraints will be used.

Change-Id: I68536a8e9cc5a78c21b55564a2ed540b9c184cb8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-11 18:37:27 +08:00
Finley Xiao
002c83bd47 MALI: utgard: Avoid GPU voltage domain keeping the initial voltage
If there is only one opp whose frequency is equal to the initial value
in opp table list, the GPU voltage domain will keep the initial voltage,
it may be too large.

Change-Id: I3dd97fe252a15b789f218f44b8fbc7d4143f7085
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-11 18:37:17 +08:00
Alex Zhao
d35fac33e5 net: wireless: rockchip_wlan: add rtl8723bu support
update rtl8723bu wifi driver to version v4.4.2_18635.20161006_BTCOEX20151228-664a

Change-Id: I7053c211228a48fd45f9084da86d97a74e82ac79
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-09-08 19:23:09 +08:00
Wyon Bi
7ba25eea80 drm/panel: simple: Add support for BOE MV238QUM-N20
This adds support for the BOE Corporation MV238QUM-N20 23.8"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: I5ec47bf4864899ab437a8aea4fa0d58d338b709a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-09-08 15:29:44 +08:00
Wyon Bi
8b76818914 drm/panel: simple: Add support for LG LM238WR2-SPA1
This adds support for the LG Corporation LM238WR2-SPA1 23.8"
eDP(HBR2, 5.4Gbps) UHD TFT LCD panel, which can be supported
by the simple panel driver.

Change-Id: I586684ba893be54fbf664a8fa4dad0fe5eb999a0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-09-08 15:29:39 +08:00
Huang jianzhi
77abd2ca87 ARM: rockchip_defconfig: enable TOUCHSCREEN_VTL_CT36X
Change-Id: I6bea6696efb1d3e9ed27977e5d425357a5ddbefb
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-08 15:29:22 +08:00
Meng Dongyang
ce21864e42 usb: dwc2: skip L2 state of hcd if controller work in device mode
In the case hcd autosuspend is enabled, the hcd will enter L2 state
if no device connected. But if the controller works in otg mode, the
gadget driver still works in L0 state if connected with host. This
may result in transfer fail when gadget enqueue new request but the
hcd driver has set the global state into L2. This patch prevent the
hcd enter L2 state if the controller work in device mode.

Change-Id: If31873bebf05c100cf74e49c7d2813160a808f1e
Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
2017-09-08 15:28:52 +08:00
Huang jianzhi
e7cd2221ad ARM: dts: rockchip: add rk3288-evb-android-act8846-edp.dts file
Change-Id: I7e9670d92db339a8db1afdfc4fdb04d83e267533
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-08 15:23:32 +08:00
Huang jianzhi
ae33923b3d input: touchscreen: vtl_ts: tp firmware dts move to tp_fw.h
Change-Id: I6279d91f17ecca0c9dcc2355c22737746faee7d4
Signed-off-by: Huang jianzhi <jesse.huang@rock-chips.com>
2017-09-08 15:23:15 +08:00
Wu Liang feng
390cb1444d usb: dwc_otg_310: remove files exec bit
This patch chmod 0755 -> 0644 for dwc_otg_310 driver files.

Change-Id: Icda0db1cbc475ac7d67e8686f7a46aafabbd42df
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2017-09-08 14:51:33 +08:00
zhangyunlong
3c55c008d0 camera: rockchip: camsys_drv: v0.0x22.4
enable SYS_STATUS_ISP status

Change-Id: If3d941c12ac15f586ad58aad30b58b8ed3d386ca
Signed-off-by: zhangyunlong <dalon.zhang@rock-chips.com>
2017-09-08 11:40:35 +08:00
Wu Liang feng
70d2d7f530 phy: rockchip-inno-usb2: avoid calling sleeping func from invalid context
Commit 4f519feed0 ("phy: rockchip-inno-usb2: delay suspending
phy if plug out device"), introduced the following issue:

BUG: sleeping function called from invalid context at kernel/workqueue.c:2717
in_atomic(): 1, irqs_disabled(): 128, pid: 4, name: kworker/0:0
INFO: lockdep is turned off.
irq event stamp: 19674
hardirqs last  enabled at (19673): [<ffffff8008cd8818>] _raw_spin_unlock_irqrestore+0x40/0x70
hardirqs last disabled at (19674): [<ffffff8008cd8690>] _raw_spin_lock_irq+0x1c/0x60
softirqs last  enabled at (19664): [<ffffff80088dd1c0>] dw_mci_request+0xe0/0xf0
softirqs last disabled at (19660): [<ffffff80088dd140>] dw_mci_request+0x60/0xf0
CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 4.4.83 #69
Hardware name: Rockchip RK3399 Evaluation Board v3 (Android) (DT)
Workqueue: fusb302_wq fusb302_work_func
Call trace:
[<ffffff8008089f78>] dump_backtrace+0x0/0x1cc
[<ffffff800808a158>] show_stack+0x14/0x1c
[<ffffff80083ca33c>] dump_stack+0xb8/0xf4
[<ffffff80080cec40>] ___might_sleep+0x1b8/0x1c8
[<ffffff80080cecc0>] __might_sleep+0x70/0x80
[<ffffff80080becbc>] flush_work+0x74/0x270
[<ffffff80080bf09c>] __cancel_work_timer+0x12c/0x1bc
[<ffffff80080bf154>] cancel_delayed_work_sync+0x10/0x18
[<ffffff80083f9de8>] rockchip_otg_event+0x18/0x3c
[<ffffff80080c6380>] notifier_call_chain+0x54/0x88
[<ffffff80080c63dc>] raw_notifier_call_chain+0x14/0x1c
[<ffffff80089a5354>] extcon_sync+0x74/0x1c4
[<ffffff80085ab980>] platform_fusb_notify+0x184/0x204
[<ffffff80085ac4ac>] set_state_unattached+0x5c/0x90
[<ffffff80085ac85c>] fusb302_work_func+0x288/0x1904
[<ffffff80080bdfa4>] process_one_work+0x354/0x6d0
[<ffffff80080bf4a4>] worker_thread+0x2f8/0x414
[<ffffff80080c4e58>] kthread+0xf0/0xf8
[<ffffff80080828d0>] ret_from_fork+0x10/0x40

Actually, we don't need to cancel the otg_sm_work in the
event EXTCON_USB_HOST notifier_call. So just remove the
cancel_delayed_work_sync() in the rockchip_otg_event().

With this patch, we may get USB BC1.2 detection error
if plug in USB peripheral/host cable alternately and
quickly. So we need to reinit chg_state and chg_type
if OTG host cable plug in.

Change-Id: I349d59de3188d39707c527acb858a7be20a999ac
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2017-09-07 16:59:20 +08:00
Liang Chen
325c08fcda ARM: dts: enable some devices for rk3126-evb
RK3126-evb use andriod as system, so we put the common nodes for
andriod into rk312x-andriod.dtsi. This patch enable devices:
emmc/sdmmc/sdio/fiq-debugger/ramoops/cpufreq/ddrfreq.

Change-Id: I24993486711dd5b6050c03667545c9cb147e1b64
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-09-06 10:49:22 +08:00
Liang Chen
85884ca6a0 ARM: dts: add more device nodes for rk3126/rk3128 soc in dtsi
Include nodes: sdmmc/emmc/sdio/nand/watchdog/efuse/pmu/grf/cpufreq.

Change-Id: Iad03c39ac5ab9b3b89026222a0949de5d2610d19
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-09-06 10:48:03 +08:00
Liang Chen
2602179cc4 PM / devfreq: event: add support for rk3128 dfi
This adds the necessary data for handling dfi on the rk3128.
Access the dfi via registers provided by GRF (general register
files) module.

Change-Id: Ife9e9987224088434e878102b7d1c3b132e761ad
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-09-05 18:25:01 +08:00
Liang Chen
978c6b1a46 nvmem: rockchip-efuse: add support for rk3128-efuse
This adds the necessary data for handling efuse on the rk3128.

Change-Id: Ieda973675ff959b3157bb4afe6e1dcdfac65506c
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-09-05 18:24:43 +08:00
Liang Chen
400617b950 PM / devfreq: rockchip_dmc: add support for rk3128 dmc
This adds the necessary data for handling dmcfreq on the rk3128.

Change-Id: I6aeae7103c1eaed0b4515d8d11863c4b190b6918
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-09-05 18:24:33 +08:00
Zhou weixin
0d5567697f touchscreen: gt9xx: add tp config-file config by dts
Change-Id: I0d8d1b16920906f26d911c03eaaba25e8480ebe2
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-09-05 18:04:36 +08:00
Yankun Zheng
355c07bd7b ARM: dts: rk3229-echo-v10: fix the writing error
Modify the pinctrl-names in the rk805 node

Change-Id: Ic4b0d8886828c4db25a636b94b76c0852b8e97d4
Signed-off-by: Yankun Zheng <zyk@rock-chips.com>
2017-09-05 18:04:03 +08:00
Wu Liang feng
1722cf3653 phy: rockchip-inno-usb2: support usb BC1.2 for rk3399 Type-C1
rk3399 Type-C1 USB 2.0 PHY supports USB BC1.2. This patch
adds registers configuration for Type-C1 USB BC1.2.

With this patch, and set dr_mode of Type-C1 USB to "otg" or
"peripheral" in the DTS, then the Type-C1 USB can detect USB
battery charger.

Change-Id: I2f07ae675cc6066db46e428e6e27045b911a0773
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
2017-09-05 18:03:12 +08:00
shengfei Xu
c5a4fd5954 ARM: dts: rk3288: switch sysclk to 32k and disable 24M OSC when system suspend
Change-Id: I77b0b066fc296952df1bc73d59c96b7bdc649a4d
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-09-05 18:02:12 +08:00
Shunqing Chen
3edb9fff71 arm64: dts: rockchip: sapphire-excavator: add cw2015
Change-Id: I7b4ffb8e9ea73aa5b15e852864480a7375ded710
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-09-05 09:30:01 +08:00
Zhou weixin
995ea72fa4 arm64: dts: rockchip: add gt9xx config for rk3368-xikp.dts
Change-Id: I541772537aec1513037afba6ce6dadc5c08e7e7c
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
2017-09-05 09:28:35 +08:00
Wyon Bi
962673b7d8 drm/panel: simple-panel: get physical size from DT when available
Change-Id: I914c56c1d8491700f8270ce8f6454e549930722f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2017-09-05 09:28:07 +08:00
Tao Huang
66e8304656 ipv6: ip6_output: fix for Android 7.1 CTS
After commit 23287661af ("ipv6: Inhibit IPv4-mapped src address on the wire.")
Android failed to pass DatagramSocketTest#test_getRemoteSocketAddress:
fail: java.net.ConnectException: Address family not supported by protocol

Android side has patch "Fix DatagramSocketTest#test_getRemoteSocketAddress".
Unfortunately, which may not merge to Android 7.1 branch, so we have to fixes
it on kernel side.

Change-Id: I7444c7636f02485abf6ddd4d7b9cad1f4e6d06e1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-04 16:30:00 +08:00
Tao Huang
6a1a092749 soc: rockchip: add android version support
Add config ANDROID_VERSION, default is Android 7.1.
And add ANDROID_VERSION macro.

Change-Id: I6309ea9118c1d847224f329f6c2d6ab7e073ee5a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-04 16:29:48 +08:00
Tao Huang
ce10498ca2 ARM: rockchip_defconfig: update by savedefconfig
Change-Id: Iada7d1b8beee5b8ba9faa86c79486850a15a93b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-04 16:29:06 +08:00
Tao Huang
12bc67cfc2 arm64: rockchip_defconfig: update by savedefconfig
Change-Id: Ia2317032c2357c93374212aecf08e24558147adc
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2017-09-04 16:25:41 +08:00
rimon.xu
1b974395a8 video: rockchip: vpu: Add support video secure access
Change-Id: Ie00c65d7849a5301a86630fe29872a9cab59e22f
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2017-09-04 10:13:57 +08:00
rimon.xu
9cd2814250 arm64: dts: rockchip: rk3399-android: add secure memory for drm.
Change-Id: Ida014845970d979844ad55704c3bdbf1ed53853b
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2017-09-04 09:55:33 +08:00
Tao Huang
dc6b994588 Merge tag 'lsk-v4.4-17.08-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 17.08 v4.4-android

* tag 'lsk-v4.4-17.08-android': (451 commits)
  Linux 4.4.83
  pinctrl: samsung: Remove bogus irq_[un]mask from resource management
  pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
  pnfs/blocklayout: require 64-bit sector_t
  iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
  usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
  usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
  usb: core: unlink urbs from the tail of the endpoint's urb_list
  USB: Check for dropped connection before switching to full speed
  uag: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
  iio: light: tsl2563: use correct event code
  iio: accel: bmc150: Always restore device to normal mode after suspend-resume
  staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
  USB: hcd: Mark secondary HCD as dead if the primary one died
  usb: musb: fix tx fifo flush handling again
  USB: serial: pl2303: add new ATEN device id
  USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
  USB: serial: option: add D-Link DWM-222 device ID
  nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
  fuse: initialize the flock flag in fuse_file on allocation
  ...
2017-09-01 18:56:00 +08:00
Finley Xiao
46f2872208 PM / devfreq: rockchip_dmc: Limit ddr rate when system_status is dualview
If two vops are working, one of screens will flicker when change ddr
frequency.

Change-Id: I6e31ac1b7a2bfb0d57ec4507c2da1ee714e59c35
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-01 18:48:08 +08:00
Finley Xiao
99f7803b5e PM / devfreq: rockchip_dmc: Fix min_freq
Auto_min_rate is used to instead of normal_rate, if other sys_status is
exist, use status_rate as min_freq, otherwise use auto_min_rate.

Change-Id: If2df35396ec9e6038f18b173a78ff1a248ab87eb
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2017-09-01 18:47:36 +08:00
Mark Yao
6cced012bc drm/rockchip: vop: set system_status when mode changed
Change-Id: Ibee99a6a91bc4abc303c2fbf7c423dc4c13a696f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-09-01 18:47:30 +08:00
Shunqing Chen
b2bb272f56 arm64: rockchip_defconfig: enable cw2015
Change-Id: Ib442df8aa172d9ca21a280e5c1e537bb9fb45476
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2017-09-01 17:44:08 +08:00