Commit Graph

1058 Commits

Author SHA1 Message Date
Guochun Huang
78779053e9 phy/rockchip: mipi-dphy: support rk3568
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ica831e28362ca89869d951761b8562482d39f7ff
2020-11-03 16:45:43 +08:00
William Wu
def55da6eb phy: rockchip: inno-usb2: add usb2 phy support for rk3568
RK3568 has two USB 2.0 PHYs, and each PHY has two ports, the
OTG port of PHY0 support OTG mode with charging detection
function, they are similar to previous Rockchip SoCs.

However, there are three different designs for RK3568 USB 2.0 PHY.
1. RK3568 uses independent USB GRF module for each USB 2.0 PHY.
2. RK3568 accesses the registers of USB 2.0 PHY IP directly by APB.
3. The two ports of USB 2.0 PHY share one interrupt.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Id05718e25a20abdf9a4cb353b0fb94f0cb8b2d75
2020-10-27 10:33:10 +08:00
William Wu
a7d08921b1 phy: rockchip: inno-usb2: refactor irq init for otg and host ports
Add common helper function rockchip_usb2phy_port_irq_init() for
both otg port and host port to init their own irqs. It can help
to reduce redundant code, and also fix a issue that the id irq
isn't enabled for otg port if the vbus_always_on flag is true.

This patch introduces a combined irq for some inno usb2 phys
which combined the irqs of otg port and host port. We will used
it for RK3568 later.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ifa74ec72e2b9d4ed62ee69e916b8ab2e8ae665b3
2020-10-23 18:02:15 +08:00
Yifeng Zhao
fbf06e6017 phy: rockchip: add naneng combo phy for RK3568
This patch implements a combo phy driver for Rockchip SoCs
with NaNeng IP block. This phy can be used as pcie-phy, usb3-phy,
sata-phy or sgmii-phy.

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I86726e7eee643ea4cb3fadc56b0ee729903afc4f
2020-10-23 14:17:20 +08:00
Ren Jianing
00feea4350 phy: phy-rockchip-naneng-usb2: fix NULL pointer risk
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ib3713c15b7623bba57f0dd55d0096785b6b3f8bd
2020-10-22 15:48:05 +08:00
Shawn Lin
85abcd6ea6 phy: phy-rockchip-snps-pcie3: Initial support
This patch adds initial support for snps pcie 3.0
phy.

Change-Id: I23d0750a60ffde30f434e1c676916d4bc4772400
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-10-22 14:54:14 +08:00
Wang Jie
5928c52b49 phy: phy-rockchip-usb: support to force otg mode for rk3288 soc
usage:
(1) force host mode
    echo 1 > /sys/devices/platform/ff770000.syscon/ff770000.syscon:usbphy/phy/phy-ff770000.syscon:usbphy.2/otg_mode

(2) force device mode
    echo 2 > /sys/devices/platform/ff770000.syscon/ff770000.syscon:usbphy/phy/phy-ff770000.syscon:usbphy.2/otg_mode

Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I44fa1461076e6c0cd8aba1e2e444004cfb3f5271
2020-10-14 09:54:14 +08:00
Tao Huang
0c17cc5fc3 Merge tag 'ASB-2020-10-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-10-01
Fix for CVE-2020-0423 not yet public.

* tag 'ASB-2020-10-05_4.19-stable': (518 commits)
  ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT
  ANDROID: build.config.common: enable LLVM=1
  Linux 4.19.149
  KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
  ata: sata_mv, avoid trigerrable BUG_ON
  ata: make qc_prep return ata_completion_errors
  ata: define AC_ERR_OK
  kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE
  s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
  mm, THP, swap: fix allocating cluster for swapfile by mistake
  kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()
  s390/dasd: Fix zero write for FBA devices
  tracing: fix double free
  KVM: SVM: Add a dedicated INVD intercept routine
  KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
  MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
  regmap: fix page selection for noinc reads
  ALSA: asihpi: fix iounmap in error handler
  bpf: Fix a rcu warning for bpffs map pretty-print
  batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh
  ...

Change-Id: I5af52b9921cfd8b55aba5b7705a8bc1a4f88db74

Conflicts:
	drivers/tty/serial/8250/8250_port.c
	drivers/usb/core/message.c
	drivers/usb/core/quirks.c
2020-10-10 18:38:14 +08:00
Jonathan Bakker
82d16c2351 phy: samsung: s5pv210-usb2: Add delay after reset
[ Upstream commit 05942b8c36 ]

The USB phy takes some time to reset, so make sure we give it to it. The
delay length was taken from the 4x12 phy driver.

This manifested in issues with the DWC2 driver since commit fe369e1826
("usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.")
where the endianness check would read the DWC ID as 0 due to the phy still
resetting, resulting in the wrong endian mode being chosen.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB06605D52502816E500683553A3D10@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 13:14:44 +02:00
Tao Huang
48f4e7f7c2 Merge tag 'ASB-2020-09-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-09-01
CVE-2020-0402
CVE-2020-0404
CVE-2020-0407

* tag 'ASB-2020-09-05_4.19-stable': (3616 commits)
  Linux 4.19.143
  ALSA: usb-audio: Update documentation comment for MS2109 quirk
  HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage()
  tpm: Unify the mismatching TPM space buffer sizes
  usb: dwc3: gadget: Handle ZLP for sg requests
  usb: dwc3: gadget: Fix handling ZLP
  usb: dwc3: gadget: Don't setup more than requested
  btrfs: check the right error variable in btrfs_del_dir_entries_in_log
  usb: storage: Add unusual_uas entry for Sony PSZ drives
  USB: cdc-acm: rework notification_buffer resizing
  USB: gadget: u_f: Unbreak offset calculation in VLAs
  USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()
  USB: gadget: u_f: add overflow checks to VLA macros
  usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()
  USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge
  USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D
  USB: quirks: Add no-lpm quirk for another Raydium touchscreen
  usb: uas: Add quirk for PNY Pro Elite
  USB: yurex: Fix bad gfp argument
  drm/amd/pm: correct Vega12 swctf limit setting
  ...

Change-Id: Iece02c55e9b3446bdda5dc7bdfbe3e310b2dbc83

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	arch/arm64/kernel/cpuinfo.c
	drivers/clk/clk.c
	drivers/clk/rockchip/clk-cpu.c
	drivers/clk/rockchip/clk-rk3228.c
	drivers/devfreq/governor_simpleondemand.c
	drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
	drivers/gpu/drm/drm_edid.c
	drivers/hid/usbhid/hid-core.c
	drivers/media/i2c/ov5695.c
	drivers/media/v4l2-core/v4l2-ioctl.c
	drivers/regulator/core.c
	drivers/thermal/cpu_cooling.c
	drivers/usb/core/quirks.c
	drivers/usb/dwc2/platform.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/ehci-platform.c
	drivers/usb/storage/unusual_uas.h
	include/drm/drm_connector.h
	include/linux/clk-provider.h
	include/linux/devfreq.h
	include/linux/pci_ids.h
	kernel/power/wakeup_reason.c
	mm/memory.c
	mm/swapfile.c
2020-09-24 17:59:50 +08:00
Sivaprakash Murugesan
5214c50296 phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init
commit afd55e6d1b upstream.

There were some problem in ipq8074 Gen2 PCIe phy init sequence.

1. Few register values were wrongly updated in the phy init sequence.
2. The register QSERDES_RX_SIGDET_CNTRL is a RX tuning parameter
   register which is added in serdes table causing the wrong register
   was getting updated.
3. Clocks and resets were not added in the phy init.

Fix these to make Gen2 PCIe port on ipq8074 devices to work.

Fixes: eef243d04b ("phy: qcom-qmp: Add support for IPQ8074")
Cc: stable@vger.kernel.org
Co-developed-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
Link: https://lore.kernel.org/r/1596036607-11877-4-git-send-email-sivaprak@codeaurora.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-17 13:45:30 +02:00
Hu Kejun
64ec71e36c phy: rockchip: mipi-dphy-rx: print data rate mbps to debug
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I010d4c7c6a78413e29a33b5695402be11ffb25da
2020-09-14 19:19:17 +08:00
Hu Kejun
4cdd2bc3a1 phy: rockchip: mipi-dphy-rx: change dphy selection when stream start for rk1126
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Ied1b01617e6ac07ef665a5ad08d31812f98e997b
2020-08-24 10:26:33 +08:00
Marek Szyprowski
84d2717b22 phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY
[ Upstream commit dcbabfeb17 ]

PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling
calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY.

Fixes: d8c80bb3b5 ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200708133800.3336-1-m.szyprowski@samsung.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:14:57 +02:00
Ren Jianing
b6032f4f38 phy: phy-rockchip-usb: add USB external connectors
This patch add EXTCON_USB, EXTCON_USB_HOST and EXTCON_USB_VBUS_EN
to rockchip_usb_phy_extcon_cable. Without these extcons, the probe
of battery charger(such as rk818_charger) will fail when registering
extcon notifier.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I17774f63bc84fc1f5afa11d2ecc9d0eb2469acbc
2020-08-11 15:14:44 +08:00
Colin Ian King
c512de82d6 phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked
[ Upstream commit 38b1927e5b ]

Currently pointer phy0 is being dereferenced via the assignment of
phy on the call to phy_get_drvdata before phy0 is null checked, this
can lead to a null pointer dereference. Fix this by performing the
null check on phy0 before the call to phy_get_drvdata. Also replace
the phy0 == NULL check with the more usual !phy0 idiom.

Addresses-Coverity: ("Dereference before null check")
Fixes: e6f32efb1b ("phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200625124428.83564-1-colin.king@canonical.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:05 +02:00
Ren Jianing
68c654fa7a phy: phy-rockchip-naneng-usb2: add Rref calibrate in tuning
This patch can change phy internal 45 Ohm resistance accord to
reference resistance. The larger the reference resistance, the
greater the internal resistance, and accordingly, high speed
eye diagram amplitude will become lower.

The maximum adjustable range of the reference is +-20% of the
default value (200 Ohm).

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ibd746283c06609b944fa2a148066ba0a661e761a
2020-06-30 14:30:35 +08:00
Jianing Ren
05960109c0 phy: phy-rockchip-naneng-usb2: add vup_gpio for swing calibration
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM. Multiplied
by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high
speed handshake will fail and SoC communicate at full speed. So
swing calibration is necessary.

We use gpio to control the 220 Ohm pull-up resistor to provide additional
current. Experiments show that the voltage of chirpK can be increases
to about 600mV.

Change-Id: I8b41054af4732569dbc8185bc3d3d4a2ba83cd6a
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-30 14:30:35 +08:00
William Wu
1f056007af Revert "phy: add cp_test callback"
This reverts commit 955bb70bf1.

Fix the following changed report by build_abi.sh for GKI

'struct phy_ops at phy.h:56:1' changed:
  type size changed from 512 to 576 (in bits)
  1 data member insertion:
    'int (phy*)* phy_ops::cp_test', at offset 448 (in bits) at phy.h:70:1
  there are data member changes:
    'module* phy_ops::owner' offset changed from 448 to 512 (in bits) (by +64 bits)
  17 impacted interfaces

Change-Id: I5f163b804aaff2fe9c6e3a7c054de3f8df0c791c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-29 16:53:21 +08:00
William Wu
4b955357a9 phy: rockchip-inno-usb3: remove rockchip_u3phy_cp_test
The rockchip_u3phy_cp_test() is used for USB3 compliance
test, and it depends on the cp_test of phy_ops which will
be dropped later, so we remove rockchip_u3phy_cp_test()
directly.

As a side effect, we need to use io commands to set the
USB3 enter compliance test mode instead of host_testmode
for RK3328 USB3 PHY.

Change-Id: Ie756b22f5bb89e146ad971f2668111a4733ff892
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-29 16:53:21 +08:00
William Wu
35ec91bf3a phy: rockchip-inno-combphy: remove combphy_u3_cp_test
The combphy_u3_cp_test() is used for USB3 compliance test,
and it depends on the cp_test of phy_ops which will be
dropped later, so we remove combphy_u3_cp_test directly.

As a side effect, we need to use io commands to set the
USB3 enter compliance test mode instead of host_testmode
for RK1808 USB3 combphy.

Change-Id: Iac7d9a4c6b0d2a74c284586f5dcbb48925691a91
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-06-29 16:53:21 +08:00
Jianing Ren
a35ff85301 phy: phy-rockchip-naneng-usb2: enable id irq when vbus always on
This patch will enable id interrupt for otg port when the property
vbus-always-on is set in dts.

If vbus is always on, bvalid interrupt won't make sense and be
disabled. But we cat change id state to switch drd mode by software.

Change-Id: I69fc3f00430dfd73835c6e99694d8d7c72c60c8c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Jianing Ren
d65989c056 phy: phy-rockchip-naneng-usb2: add low power function for rv1126
By bypass charge detect module, about 140uA current can be saved
on USB_AVDD_1V8 power supply when suspend. Notice that bandgap
current can not be turned off, so there is still about 165uA
current.

This patch also remove the tuning in phy resuming, because the power
of phy is always on and registers does not need to be configured
again.

Change-Id: If13d3741e3b01289c1bd0294d6e6d88278c4654c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Jianing Ren
65b48186c4 phy: phy-rockchip-naneng-usb2: cancel the dynamic management of clks
This patch remove the clks manegement in phy operations and keep the
clks always on. Keep the clks on can avoid many errors such as USB480M
clk abnormal output and EHCI controller error.

Change-Id: If201106d432d05e8fc5f63d595a67524e2183b5c
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-24 18:59:01 +08:00
Cai YiWei
08192186ef phy: rockchip: mipi-dphy-rx: rv1126 support lvds
config bus-type in dts to distinguish between mipi and lvds.
bus-type = <3> for lvds interface.

Change-Id: I5c043bd238522768280e6e117c79476f27118c65
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-06-18 19:20:13 +08:00
Jianing Ren
745529254c phy: phy-rockchip-naneng-usb2: fix bug of io read
Phy internal registers is read by APB bus. If you get phy registers
and APB data at the same time, you will get wrong data which is the
previous value of register. Therefore, pready_cnt must be set bigger
than rden_cnt.

Change-Id: I2e7e5544077170466bdaabc2f7d61f67a06b3283
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-06-11 15:21:42 +08:00
Tao Huang
ada2a1cee3 phy: rockchip: usb: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4593151b2624d2ccfaf477d36ff1f4d331f2ca91
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:28:04 +08:00
Tao Huang
a3b4a03c99 phy: rockchip: naneng-usb2: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: If1fb768aadc89025cccc131441c3aa32045ba382
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:27:31 +08:00
Tao Huang
0482288575 phy: rockchip: inno-video-combo: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I6d958aa57097209165cf32a671f9612752eec4f1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:27:00 +08:00
Tao Huang
a582be6e66 phy: rockchip: inno-usb2: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I382ee237c596e79e29bf6c4b13a4dc6c0c94344f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:26:30 +08:00
Tao Huang
5734d79999 phy: rockchip: inno-mipi-dphy: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Ibe59e24929f89e6124ee0c74195515421625f386
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:26:25 +08:00
Tao Huang
cc5ecc2773 phy: rockchip: inno-hdmi: Initialize in stack clk_init_data to 0
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.

Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4fd81155cfbd6c257d3a52eda25714e07a4e6abb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-06-09 14:22:18 +08:00
Jianing Ren
a55e37ec7e phy: phy-rockchip-naneng-usb2: modify opmode when suspend
According to the Naneng Specifation, opmode should be set
to 2b'01 Non-driving mode when suspend.

Change-Id: Ib43ef64af2e7fc413125f68ebeb72743f23e0050
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-05-25 18:20:33 +08:00
Tao Huang
4616fdae94 phy/rockchip: mipi-dphy: Call inno_mipi_dphy_driver_init() early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Before panel_simple_init().

Change-Id: I9cf38a2b6a2110b9172986d3700fa770f49e6170
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-25 18:20:24 +08:00
Tao Huang
cb0381c832 phy: core: Call phy_core_init early when CONFIG_ROCKCHIP_THUNDER_BOOT=y
Change-Id: I0bbe2e1a02001e2ba97c9dc8be96d651984784ef
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-05-25 18:20:22 +08:00
Cai YiWei
af5596135a phy: rockchip: mipi-dphy-rx: add get selection interface
Change-Id: I44935a607a75eb64092edb0d2402cda654539f01
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-05-25 18:20:20 +08:00
Jianing Ren
890c9b6034 phy: phy-rockchip-naneng-usb2: add Kconfig and Makefile
Change-Id: Ia8e40bda152b7d5d49561509e7cebc43dcf77d0b
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-05-25 18:20:16 +08:00
Jianing Ren
9e3c5ad64f phy: add usb 2.0 phy driver for Rockchip SoCs
This patch implements a usb 2.0 phy driver for Rockchip SoCs with
Naneng IP block.

Change-Id: I2658ce7c77a4bef60c8ab183a687d81468a512f1
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-05-25 18:20:16 +08:00
Cai YiWei
1db66320a3 phy: rockchip: mipi-dphy-rx: add clock inverted
Change-Id: I7103a851ba5ab6044d787139f986da74eb9360d0
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-05-25 18:20:09 +08:00
Cai YiWei
0fff2c5c6c phy: rockchip: mipi-dphy-rx: support for rv1126
Change-Id: Ic67f670d229519a93abf51516fe826016f180251
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-05-25 18:20:01 +08:00
Nickey Yang
5f681bb10f phy/rockchip: mipi-dphy: support rv1126
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I84fb7a922528894c7c14c95902f0e273640834d6
2020-05-25 18:19:57 +08:00
Wang Panzhenzhuan
6cc8f4cd8d phy: rockchip: mipi-rx: fix n4 green issue
add mutex for mipidphy_s_stream to fix n4 green issue

Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I7fe7a5b0369569757e3f3c179e37bb4f5e8967ce
2020-04-10 16:13:24 +08:00
Tao Huang
06a7fcfc9a Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common
* android-4.19: (1190 commits)
  ANDROID: update the ABI xml representation
  ANDROID: GKI: Enable V4L2 hidden configs
  ANDROID: GKI: Enable CONFIG_BACKLIGHT_CLASS_DEVICE in gki_defconfig
  ANDROID: Incremental fs: Add INCFS_IOC_PERMIT_FILL
  ANDROID: Incremental fs: Remove signature checks from kernel
  ANDROID: Incremental fs: Pad hash blocks
  ANDROID: Incremental fs: Make fill block an ioctl
  ANDROID: Incremental fs: Remove all access_ok checks
  Linux 4.19.111
  batman-adv: Avoid free/alloc race when handling OGM2 buffer
  efi: Add a sanity check to efivar_store_raw()
  net/smc: cancel event worker during device removal
  net/smc: check for valid ib_client_data
  ipv6: restrict IPV6_ADDRFORM operation
  i2c: acpi: put device when verifying client fails
  iommu/vt-d: Ignore devices with out-of-spec domain number
  iommu/vt-d: Fix the wrong printing in RHSA parsing
  netfilter: nft_tunnel: add missing attribute validation for tunnels
  netfilter: nft_payload: add missing attribute validation for payload csum flags
  netfilter: cthelper: add missing attribute validation for cthelper
  ...

Conflicts:
	arch/arm64/configs/gki_defconfig
	arch/x86/configs/gki_defconfig
	drivers/devfreq/Kconfig
	drivers/dma-buf/dma-buf.c
	include/linux/usb/quirks.h
	kernel/sched/topology.c

Change-Id: Ibd305c952c16c253b34d822cf68c03f9ff5be7b3
2020-03-21 19:46:46 +08:00
Wyon Bi
f2534b7494 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>
2020-03-18 16:59:05 +08:00
Jianing Ren
d694ac5b08 phy: phy-rockchip-usb: add charge detection for rk3288
Change-Id: I89a2a1868ebf5fcdf09f594f6a9840c97809b3b9
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-03-16 16:42:41 +08:00
Tony Lindgren
b8f6a4a13b phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval
commit 46b7edf1c7 upstream.

I've noticed that when writing data to the modem the writes can time out
at some point eventually. Looks like kicking the modem idle GPIO every
600 ms instead of once a second fixes the issue. Note that this rate is
different from our runtime PM autosuspend rate MDM6600_MODEM_IDLE_DELAY_MS
that we still want to keep at 1 second, so let's add a separate define for
PHY_MDM6600_IDLE_KICK_MS.

Fixes: f7f50b2a7b ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend")
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Michael Scott <hashcode0f@gmail.com>
Cc: NeKit <nekit1000@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-11 14:15:10 +01:00
Tony Lindgren
a7b5d3fe5a phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling
commit be4e3c737e upstream.

We have an interrupt handler for the wake-up GPIO pin, but we're missing
the code to wake-up the system. This can cause timeouts receiving data
for the UART that shares the wake-up GPIO pin with the USB PHY.

All we need to do is just wake the system and kick the autosuspend
timeout to fix the issue.

Fixes: 5d1ebbda03 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Michael Scott <hashcode0f@gmail.com>
Cc: NeKit <nekit1000@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-11 14:15:10 +01:00
WeiYong Bi
f8090e57cc phy: Add support for INNO MIPI D-PHY
The INNO MIPI D-PHY is built in witch a standard digital interface
to talk to any third part Host controller.That is part of Rockchip SoCs,
like rk3368.

Change-Id: I9806882e0e3fb6b20348015d0f34923d1bc46b89
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2020-03-05 19:37:05 +08:00
Wyon Bi
19d3ef2a43 phy/rockchip: dp: Protect the boot logo
Change-Id: Iee1366d77a0a4d046321b34efaa138d61317bc66
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-02-25 15:41:56 +08:00
Wyon Bi
36156156ae phy/rockchip: dp: Add support for RK3368
Add eDP PHY support for RK3368 SoC. RK3368 eDP PHY is similar to
the RK3288.

Change-Id: Ic2134ba719dadba121dc2fcc944662ef06b2ecfa
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-02-25 15:41:56 +08:00