Commit Graph

615185 Commits

Author SHA1 Message Date
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
Shunqian Zheng
a22801bdf9 arm64: defconfig: enable pvtm config for px30
Enable pvtm and nvmem_otp for px30.

Change-Id: I9b79429bdefb80a6ce672142c88cc4ca234fe83e
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2019-01-07 15:10:23 +08:00
Lin Huang
c0cc9bafe4 FROMLIST: drm/rockchip: cnd-dp: adjust spdif register setting
We use jitter bypass mode for spdif, so do not need to set jitter mode
related bit in SPDIF_CTRL_ADDR register. Also, we need to enable
SPDIF_ENABLE bit.

(am from https://patchwork.kernel.org/patch/10417647/)
Change-Id: Ieab2803435d8747ebc3890edaf9682dca9e3a3f3
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Lin Huang <hl@rock-chips.com>
2019-01-07 12:50:21 +08:00
Shengfei Xu
34eb464a24 arm64: dts: rockchip: fix iomux function of the gpio0_a4 for rk1808-evb
The rk809 sleep pin connect to rk1808 gpio0_a4.
The reserved function of the gpio0_a4 caused rk809 reset.

Change-Id: Iee36da1f67831b7e58076a614929cfac6675a99d
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2019-01-07 11:29:43 +08:00
William Wu
8a5c4862c4 Revert "HACK: usb: devio: add delay to fix ss bulk transfer issue"
This reverts commit f26098251d.

Change-Id: Ieda0de52a8852f5efb991a1f71a882c8855c662b
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-04 20:57:03 +08:00
William Wu
fdc8aea2c0 arm64: dts: rockchip: add xhci trb ent quirk for rockchip SoCs
This patch adds "snps,xhci-trb-ent-quirk" for DWC3 controllers
in RK1808/RK3328/RK3399/RK3399pro-npu.

Change-Id: I708f62747150316d66459f02b399d7c9b2667636
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-04 20:57:03 +08:00
William Wu
302fae181d usb: dwc3: add a new xhci trb ent quirk for xHCI
On some xHCI controllers (e.g. Rockchip RK3399/RK3328/RK1808),
which are integrated in DWC3 IP, need to enable the Evaluate
Next TRB(ENT) flag in the TRB data structure to force xHC to
pre-fetch the next TRB of a TD. It's useful for the stability
of xHCI when transfer large data.

I have verify this patch on the following three cases:

Case 1:
On RK3399/RK3399Pro platforms, I found that when USB 3.0
read/write at the same time in the following test case,
it may easily fail without this patch.

Host transfer: 1024B, 4MB, 4MB, 4MB
Device transfer: 1024B, 4MB, 4MB, 4MB

Both Host and Device transfer "24B, 4MB, 4MB, 4M" Repeatedly
until transfer fail.

Case 2:
On RK3399 platform, Type-C1 USB 3.0 port connects with HUB
and Orbbec USB 3.0 Camera with the enumeration information:

usb 5-1: new high-speed USB device number 2 using xhci-hcd
usb 5-1: New USB device found, idVendor=05e3, idProduct=0610
usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-1: Product: USB2.1 Hub
usb 5-1: Manufacturer: GenesysLogic
hub 5-1:1.0: USB hub found
hub 5-1:1.0: 2 ports detected
usb 6-1: new SuperSpeed USB device number 2 using xhci-hcd
usb 6-1: New USB device found, idVendor=05e3, idProduct=0620
usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 6-1: Product: USB3.1 Hub
usb 6-1: Manufacturer: GenesysLogic
hub 6-1:1.0: USB hub found
hub 6-1:1.0: 2 ports detected
usb 5-1.2: new high-speed USB device number 3 using xhci-hcd
usb 5-1.2: New USB device found, idVendor=2bc5, idProduct=050d
usb 5-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
usb 5-1.2: Product: USB
usb 5-1.2: Manufacturer: USB
usb 5-1.2: SerialNumber: USB
uvcvideo: Found UVC 1.00 device USB (2bc5:050d)
usb 6-1.2: new SuperSpeed USB device number 3 using xhci-hcd
usb 6-1.2: New USB device found, idVendor=2bc5, idProduct=060d
usb 6-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 6-1.2: Product: Orbbec(R) Astra(TM)
usb 6-1.2: Manufacturer: Orbbec(R)

Without this patch, it's possible to fail to open the Orbbec USB 3.0
camera or fail to preview image.

Case3:
On RK3399Pro platform, transfer the NPU data between the NPU USB 3.0
device and RK3399 USB 3.0 host.

Change-Id: I87b1d8b8b6912d77b988362f2f6dcd7766da8b0e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-04 20:57:03 +08:00
William Wu
c0bd48bb3e usb: xhci: set xhci trb ent quirk based on platform data
If an xhci platform needs to enable the ENT flag in the TRB
to force the xHC to pre-fetch the next TRB of a TD, then
add the XHCI_TRB_ENT_QUIRK flag.

Change-Id: Ib7cc095a848f0846ad995529ad703ae4e4ee4d44
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-04 20:57:03 +08:00
William Wu
18bd7e7c4d usb: xhci: set the trb max transfer length to 4KB
According to the "6.4 Transfer Request Block (TRB)" in xHCI
Specification, the max transfer length of a TRB is 64KB.
However, on Rockchip platforms which support xHCI in DWC3 IP
have problem if transfer more then 4KB in one TRB.

We don't know the root cause, maybe it's the DWC3 Tx/Rx FIFO
related, such as RK3399, it only support Tx FIFO 4136 Bytes
and Rx FIFO 3072 Bytes for SS Bus instance.

With the patch, it can make the xHCI transfer more stable on
Rockchip platforms, but it also cause transfer performance
loss. I test on RK3399 EVB Type-C USB 3.0 port with UAS USB 3.0
SSD, it cause 10% performance loss when use dd command to read/
write the UAS USB 3.0 SSD (350MBps -> 315MBps).

Change-Id: I11b10f6618d54d4cb0a778e5c0b4216227184e47
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-04 20:57:03 +08:00
Wyon Bi
a21125375e dt-bindings: phy: phy-rockchip-inno-mipi-dphy: Remove support for rk3128
Change-Id: I3b09d88daa5864a9343a730f5f5ef850d0f168f6
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
ec3e26f716 phy/rockchip: mipi-dphy: Remove support for rk3128
Change-Id: Ib4cc4e1f25e37a40bc975a796bd92c92ce56a89a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
7b0aa89214 ARM: dts: rockchip: rk3126-bnd-m88-emmc: Update display nodes
Change-Id: Ib465fea01ba83df0b8c6f9d4b39c3de6cae671fe
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
6985ae269c ARM: dts: rockchip: rk3126-evb: Update display nodes
Change-Id: Iba1dd8143d28c2e9a27f7ef7b826562f60f6667e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
9ec34b4f6c ARM: dts: rockchip: rk312x-android: enable video phy
Change-Id: I52f8fc367839ae9f4b26bc1aefde52f94fcea379
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
51dd34c75b ARM: dts: rockchip: rk312x: Add support for video phy
Change-Id: I5f1ecd780a4bc8b1cf9cecf12b279bdfc102761e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
b5aaea950e ARM: dts: rockchip: Update and clean up display nodes for rk3126/rk3128/px3se boards
Change-Id: Ia9f5cf9db93e14e5539b2f0c91470c62b52a2b3d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
a11d7cbb6d drm/rockchip: lvds: clean up rk3126 phy code
Change-Id: Ie4b39acb18b2a99f4fa37eb283ad2dbe34cfa99f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
c0a4f82de1 ARM: rockchip_defconfig: enable CONFIG_ROCKCHIP_RGB
Change-Id: I0d6219c57bee9dd30eca228c4882c820117b428f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
9a3c18fbb8 ARM: rockchip_defconfig: enable CONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY
Change-Id: I06321bb4d6ea229bd8dae3f8314bd299c630e281
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
0d4b66f493 drm/rockchip: rgb: Add support for rk3128
Change-Id: I567b3f559ea94842445c1ca703dc8a70f37a150c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
445e6f3f2c dt-bindings: display: rockchip: rgb: add rk3128 compatible string
Change-Id: I600ff82678d8de1158071936704a8cff783730c7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-04 20:42:53 +08:00
Wyon Bi
3dbac6ed7e arm64: dts: rockchip: px30-evb-ext-rk618: Update display nodes
Change-Id: I67abbc5206d2bd06beb3eb93223ce0f67ccdb20a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-03 23:31:44 +08:00
Wyon Bi
9a17c25478 arm64: dts: rockchip: px30-z7-a0-rk618-dsi: Update display nodes
Change-Id: I525b47446abe480c14175f6ea43226d298f71648
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-03 20:41:56 +08:00
Wyon Bi
68d1bdc962 arm64: dts: rockchip: px30-ad-r35-mb: Move common nodes into dtsi
Change-Id: I4b8332cdc51f9dc0033da1c2318defd968c2578c
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2019-01-03 20:38:45 +08:00