Commit Graph

615208 Commits

Author SHA1 Message Date
Zorro Liu
6395f07d89 driver: input: sensors: fix mma8452 gsensor data convert err
Change-Id: Icd754e9606dc8b0d1d44e932dd19cf113c79c3d6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2019-01-10 16:33:00 +08:00
Finley Xiao
62b7ebee85 arm64: dts: rockchip: rk3399-evb-rev3-android-lp4: Add vop-bw-dmc-freq
This patch also enables dmc auto freq.

Change-Id: Ic9de96c38190490dee2bdbdf86a2d8e8844ba9d5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-10 16:31:34 +08:00
Zheng Yang
e514e77bdc drm/bridge: synopsys: dw-hdmi: audio software reset after setup
When playing NLPCM audio, such as AC3, HDMI is pluged in, it's
better to reset audio fifo and sync audio clock by reselect
audio input interface. Or sink may not recognize NLPCM format.

Change-Id: I9112bc9aa1f57041e15b5be563ecb96c44644807
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2019-01-10 16:17:55 +08:00
Lin Huang
2c300d471c arm64: rk1808_x4_linux_defconfig: enable CONFIG_REGULATOR_RK808
enable rk808 related config, so we can adjust voltage on rk1808x4
board.

Change-Id: I28ba4da20176a4e7f10afeb4e7c1389f4aa920ed
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-01-10 11:04:55 +08:00
Wyon Bi
a6bfa021e8 drm/rockchip: dsi: Add dpi_pld_wr_err error handling for esd recovery
Change-Id: Id9302aab7f73d1661ccbf2e3329cdd44b22df59b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-09 19:00:07 +08:00
Zorro Liu
581df2cde9 arm64: dts: rockchip: add nandc node for rk3368-xikp and rk3368-p9 boards
default disabled

Change-Id: Iff9a32f4a9ba93ea76f07afcadfb683bac81c9cc
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2019-01-09 15:39:19 +08:00
Zorro Liu
eee8a63698 arm64: dts: rockchip: update bootargs for rk3368-xikp-avb and rk3368-p9-avb boards
Change-Id: I49f2348a8e2774c58afd743a6f7de4706aa10360
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2019-01-09 15:38:06 +08:00
Longjian Lin
5f582e90ef bluetooth: rfkill-bt: fix bt irq cannot wake host.
This issue is  caused by set wake_host_gpio to out put,
 so cancel set wake_host_gpio to out put

Change-Id: If776c1a9f54914cf0da728925fb8c8bbb5886155
Signed-off-by: Longjian Lin <llj@rock-chips.com>
2019-01-09 14:58:05 +08:00
Simon Xue
7ec0b63a75 PCI: rockchip: Support reset PCIe device dynamically
Now we have a way retraining the link in case link broken
during PCIe transfer by uDMA

Change-Id: Ica4a2dfff432515bd8d32e79b8fb9504de56e82d
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2019-01-09 14:37:03 +08:00
William Wu
6c2dc17d1e usb: dwc3: rockchip: use sysfs instead of debugfs
Debugfs may not support on some platforms. So remove
the debugfs and add sysfs interface. This patch also
change the name "rk_usb_force_mode" to "dwc3_mode".

Change-Id: I461919a02b1ee126c494f43f74af5295bb20c0a4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-09 14:34:17 +08:00
Jeffy Chen
0b8c593910 BACKPORT: drm/bridge: analogix: Do not use device's drvdata
The driver that instantiates the bridge should own the drvdata, as all
driver model callbacks (probe, remove, shutdown, PM ops, etc.) are also
owned by its driver struct. Moreover, storing two different pointer
types in driver data depending on driver initialization status is barely
a good practice and in fact has led to many bugs in this driver.

Let's clean up this mess and change Analogix entry points to simply
accept some opaque struct pointer, adjusting their users at the same
time to avoid breaking the compilation.

Change-Id: Ie06ce63a5daae532df69d2447b0673b91032d61c
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Acked-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20180110162348.22765-2-thierry.escande@collabora.com
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry-picked from 6b2d8fd98d)
2019-01-09 10:47:48 +08:00
William Wu
c8b8e8bd39 phy: rockchip-inno-usb2: fix some coding style issues
This patch fix some coding style issues reported by checkpatch.pl.

Change-Id: I6a0163fb849203e722dc0e462ddaf3f96cd080a7
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-09 10:22:32 +08:00
Finley Xiao
982038bc24 cpufreq: governor: userspace: Fix frequency error when suspend and resume
As policy->cur may be changed by thermal and cpufreq_suspend, the setspeed
may be changed after resume.

Change-Id: I6d4e0672ff39127c522f305719afd52806c31f48
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2019-01-09 10:21:16 +08:00
Wyon Bi
fd31310414 drm/bridge: lt8912: Use drm_add_modes_noedid instead of hard-coded mode
Change-Id: I7420a455c3e1928482e27f7ef9e3c996afe0c8a1
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-09 09:41:24 +08:00
Sandy Huang
15ee2dc07a drm/rockchip: vop: add hdmi pol config for px3se
if miss this commit will appear hdmi display abnormal at
some TV.

Change-Id: I09833db307dae9622319940ac4f773836db1de81
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-08 21:07:01 +08:00
Wyon Bi
a6a25fa17d arm64: dts: rockchip: Update lvds panel node
Change-Id: Iaa40aa73e3486d967c804e95c02bb27b8a27ff61
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
e8f6fef95a ARM: dts: rockchip: Update lvds panel node
Change-Id: Ibe8e87a41d531f3efad7fccfc0de8dc4b34a73e7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
43d37874c0 dt-bindings: display: rockchip: lvds: support "dual-channel" property
Change-Id: I21c8f4a727b41eed6be39a10169c41bfd4c0e887
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
157f85929e drm/rockchip: lvds: Set lvds dual channel according to "dual-channel" property from DT
Change-Id: I5ee46c0fe197fe9b22e3485e973875f81e2f2f9e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
b46f1487be dt-bindings: display: rockchip: lvds: support "rockchip,data-swap" property
Change-Id: I904bae259c02b445472c278043b4dc33f15f4273
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
ff7ff0d3d1 drm/rockchip: lvds: Allow to configure the odd/even data swap in dual channel mode
Change-Id: I4aa769345118cf8f7c976314af3edde5da3bb965
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
90af1b098e dt-bindings: display: rockchip: lvds: remove unused property
The bus format is therefore retrieved from the connected panel
information.

Change-Id: Ie8489f75f828f25d6bdd59e8d1efb7959a3a6a28
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
232d9c30be drm/rockchip: lvds: Convert to use MEDIA_BUS_FMT_*
On LVDS buses, usually each sample is transferred serialized in seven
time slots per pixel clock, on three (18-bit) or four (24-bit) differential
data pairs at the same time. The remaining bits are used for control signals
as defined by SPWG/PSWG/VESA or JEIDA standards. The 24-bit RGB format
serialized in seven time slots on four lanes using JEIDA defined bit mapping
will be named MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA, for example.

LVDS RGB formats
-----------------------------------------------------------------------
Identifier                       Code                 Data organization
                                        Timeslot Lane 3   2   1   0
MEDIA_BUS_FMT_RGB666_1X7X3_SPWG  0x1010    0              d   b1  g0
                                           1              d   b0  r5
                                           2              d   g5  r4
                                           3              b5  g4  r3
                                           4              b4  g3  r2
                                           5              b3  g2  r1
                                           6              b2  g1  r0

MEDIA_BUS_FMT_RGB888_1X7X4_SPWG  0x1011    0          d   d   b1  g0
                                           1          b7  d   b0  r5
                                           2          b6  d   g5  r4
                                           3          g7  b5  g4  r3
                                           4          g6  b4  g3  r2
                                           5          r7  b3  g2  r1
                                           6          r6  b2  g1  r0

MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA 0x1012    0          d   d   b3  g2
                                           1          b1  d   b2  r7
                                           2          b0  d   g7  r6
                                           3          g1  b7  g6  r5
                                           4          g0  b6  g5  r4
                                           5          r1  b5  g4  r3
                                           6          r0  b4  g3  r2

Change-Id: I7ca6442a761ac6ff29eb8b23d57647bf14d734ba
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Wyon Bi
c1d682b065 drm/rockchip: lvds: code style clean up and fixes
Change-Id: I54784b2a61435d8e70cc1189f180b41dbcea0e4f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-08 17:22:57 +08:00
Sandy Huang
d871daad8c drm/rockchip: vop: add support lvds vesa and jeida bus format
Change-Id: I5b6efbc3d7f7f07a2ef726584a7d5d00e099415a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-08 17:15:05 +08:00
Chen Lei
1a0b991f71 phy/rockchip: phy-rockchip-emmc: Change EMMC calibration timeout to 500us
This modification prevents the emmc from issuing calibration timeout
errors at low temperatures

Change-Id: I5c3fddb8ea0ecf32d43e8e8190297638a1040a98
Signed-off-by: Chen Lei <lei.chen@rock-chips.com>
2019-01-08 16:39:04 +08:00
Shengfei Xu
fd3eabbd40 arm64: dts: rockchip: fix system reboot in suspend for rk3399pro evb
Change-Id: I3c1c7d6a5a9bead6df2d81d9edd7fbfc3f3ac647
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-01-08 14:59:13 +08:00
Sandy Huang
eb8526de3b arm64: rockchip_linux_defconfig: enable drm debug and disable fb console
Change-Id: I4d6784acb369817667086698d2ef490e86e3c933
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-08 14:28:34 +08:00
Sandy Huang
a27137d5bd ARM: dts: rk3288-android: set ddr freq to 528M when play 4k video
Change-Id: Ie3bbcc1ddc7e8d23cab14826510e2465e7bc8422
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2019-01-08 14:27:35 +08:00
Mathias Nyman
0f94e5ce35 UPSTREAM: xhci: Don't show incorrect WARN message about events for empty rings
xHC can generate two events for a short transfer if the short TRB and
last TRB in the TD are not the same TRB.

The driver will handle the TD after the first short event, and remove
it from its internal list. Driver then incorrectly prints a warning
for the second event:

"WARN Event TRB for slot x ep y with no TDs queued"

Fix this by not printing a warning if we get a event on a empty list
if the previous event was a short event.

Change-Id: I3398d06f692e0744d051d89e3e7b876255fdaeed
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit e4ec40ec4b)
2019-01-07 20:32:38 +08:00
David Wu
05a05ca8da phy: rockchip-inno-combphy: support u3 to work on u2 only mode
This patch adds a kernel node "u3phy_mode" in sysfs to config
USB 2.0 only or USB 2.0/3.0 mode for combphy USB mode. This
method is only used for USB Host mode.

It needs to reinit the xHCI when switch between USB 2.0 only
and USB 2.0/3.0 mode dynamically. In order to reinit the xHCI,
we use the "otg_mode" node in sysfs to remove/add xHCI HCD.

<How to use>
1. Default is USB 3.0 OTG mode, config to USB 2.0 only mode
   echo u2 > /sys/devices/platform/<u3phy dev name>/u3phy_mode
   echo host > /sys/devices/platform/<u2phy dev name>/otg_mode

2. Default is USB 3.0 Host mode, config to USB 2.0 only mode
   echo otg > /sys/devices/platform/<u2phy dev name>/otg_mode
   echo u2 > /sys/devices/platform/<u3phy dev name>/u3phy_mode
   echo host > /sys/devices/platform/<u2phy dev name>/otg_mode

3. Default is USB 2.0 only Host mode, config to USB 3.0 mode
   echo otg > /sys/devices/platform/<u2phy dev name>/otg_mode
   echo u3 > /sys/devices/platform/<u3phy dev name>/u3phy_mode
   echo host > /sys/devices/platform/<u2phy dev name>/otg_mode

Change-Id: Ia7d00ba4718da0e04dae38a9a50eea8c464fbbad
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-07 19:54:35 +08:00
Andreas Klinger
f65a3417e6 UPSTREAM: iio: distance: add devantech us ranger srf04
This patch adds support for the ultrasonic ranger srf04 of devantech.

This device is measuring the distance of objects in a range between 1 cm
and 3 meters and a theoretical resolution of 3 mm.

There are two GPIOs used:
  - trigger: set as output to the device when the measurement should start
  - echo: set by the device when the ultrasonic wave is sent out and reset
    when the echo is recognized; this needs to be an interrupt input

The time between setting and resetting the echo pin is the time the
waveform needed for one round trip. This time is recorded in the interrupt
handler.

The distance is calculated in the read function by using the ultrasonic
speed at 20 degrees celsius which is about 343 m/s.

 Conflicts:
	drivers/iio/proximity/Makefile

Change-Id: I570e4008e1db87c7af9a9107260fda48bfb6542a
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
(cherry picked from commit feda284004)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-01-07 17:59:09 +08:00
Andreas Klinger
e2f45cba7b UPSTREAM: iio: distance: add dt binding for devantech-srf04
This patch adds dt binding for devantech ultrasonic ranger srf04.

The vendor "devantech" was already added to the vendor list with
        "[PATCH v4 1/3] iio: distance: srf08: add trivial DT binding"

Change-Id: I31278852798c6688f16902e3cc5222d503857667
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
(cherry picked from commit 2fb5904d92)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2019-01-07 17:59:09 +08:00
Bin Yang
61a6eb94f0 arm64: dts: rockchip: vcc5v0_usb power on in suspend for rk3399pro evb
Some USB devices does not support power off during suspend, so the vbus
of the USB host port should be kept on during suspend.

Change-Id: Ia3b054f9c53c33b637a02629e8cb3f050a5158b6
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2019-01-07 16:02:55 +08:00
Wyon Bi
09b7763707 ARM: rockchip_linux_defconfig: enable video phy support
Change-Id: I46bc61ce11d86e3bc47583cdb710b68b4d9f8216
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
72875e4559 ARM: rockchip_linux_defconfig: enable CONFIG_ROCKCHIP_RGB
Change-Id: I2a0fa7e25c79d4e0f4474c756137f7741b174706
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
ea4657e523 arm64: rockchip_linux_defconfig: enable CONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY
Change-Id: Ie294dca4274392e98a5d99011ac6bbc89984042a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
33a4993184 arm64: rockchip_linux_defconfig: enable CONFIG_ROCKCHIP_RGB
Change-Id: Iab068040874fd23f2b4710d5fd7110f7e41f8783
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
c432c0b560 dt-bindings: display: rockchip: lvds: remove unused property
Change-Id: I52e547b1fe19f7055ee407a8289807e1dec809e8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
fe215b9836 drm/rockchip: lvds: Remove rk3288 phy code
Change-Id: I3e76a471378a6ae31397fcf1a85a017dbb3520a9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
8a142d3813 ARM: dts: rockchip: Update display nodes for rk3288 boards
Change-Id: I2ba2964ff7b2c8316be53ecfe2f093c41359e226
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
4b12a02279 ARM: dts: rockchip: rk3288-linux: enable video phy node
Change-Id: I0c9e28ce423de48cb99ed0720517498520dde060
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
85495f2245 ARM: dts: rockchip: rk3288-android: enable video phy node
Change-Id: Ifc95e3a9191229c8a5d8b95db9706aa8837b9663
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
09f511332a ARM: dts: rockchip: rk3288: Add support for video phy
Change-Id: I07d0c74278cb60338251e5ea8bae421858b71c8e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
497e97cf7e ARM: dts: rockchip: clean up display nodes for rk3288 boards
Change-Id: I6f954dd48fb5674db03477941ed0481bf2e698ab
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
e884748723 drm/rockchip: rgb: add support for rk3288
Change-Id: Ic1e3fe80cc649f39e09a707d8ead889b6c047384
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
3e7f3dd468 dt-bindings: display: rockchip: rgb: add support for rk3288
Change-Id: I6018ef786191c1e82a6a8181c9b4e026a4da0b7a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
e81b7ecd1e ARM: rockchip_defconfig: enable CONFIG_PHY_ROCKCHIP_INNO_VIDEO_PHY
Change-Id: I919a667c6958e51053a1f3af1be741c5ab053c56
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
c80c769157 phy/rockchip: Add support for INNOSILICON LVDS/TTL PHY
Innosilicon LVDS/TTL PHY implements LVDS TIA/EIA protocol.
Normally, Innosilicon LVDS/TTL PHY contains four 7-bit
parallel-load serial-out shift registers, a 7X clock PLL,
and five Low-Voltage Differential Signaling (LVDS) line drivers
in a single integrated circuit. These functions allow 28 bits
of single-ended LVTTL data to be synchronously transmitted over
five balanced-pair conductors for receipt by a compatible receiver.

In addition, Innosilicon LVDS/TTL PHY could extend from 4 lanes
to N lanes (N is required by the customer). Therefore, the TTL
lines extend respectively.

Change-Id: Ib48537c49dec919e2ed5bc6347217fe83be07371
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00
Wyon Bi
c2a21bac28 dt-bindings: phy: Document INNOSILICON LVDS/TTL video PHY bindings
Change-Id: I022306b4fe4c283b5196582b1af95c70954656ad
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-07 15:29:29 +08:00