aboutsummaryrefslogtreecommitdiff
path: root/drivers/phy
AgeCommit message (Collapse)AuthorFilesLines
2022-06-09phy: qcom-qmp: switch to new split QMP PHY driverDmitry Baryshkov1-1/+7
Use new split QMP PHY driver and remove all monolith phy-qcom-qmp driver. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-usb: change symbol prefix to qcom_qmp_phy_usbDmitry Baryshkov1-79/+79
Change all symbol names to start with qcom_qmp_phy_usb_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-ufs: change symbol prefix to qcom_qmp_phy_ufsDmitry Baryshkov1-79/+79
Change all symbol names to start with qcom_qmp_phy_ufs_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-pcie: change symbol prefix to qcom_qmp_phy_pcie_msm8996Dmitry Baryshkov1-79/+79
Change all symbol names to start with qcom_qmp_phy_pcie_msm8996_ rather than old qcom_qmp_phy_. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-pcie: change symbol prefix to qcom_qmp_phy_pcieDmitry Baryshkov1-79/+79
Change all symbol names to start with qcom_qmp_phy_pcie_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-combo: change symbol prefix to qcom_qmp_phy_comboDmitry Baryshkov1-82/+82
Change all symbol names to start with qcom_qmp_phy_combo_ rather than old qcom_qmp_phy_ Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-combo: drop all non-combo compatibles supportDmitry Baryshkov1-3598/+9
Drop support for all non-USB+DP compatibles from the new qmp-combo driver. Currently this will result in duplication (both in terms of code and in terms of config tables) with USB PHY support. This will be sorted out later, after fixing the combo PHY init/reinit issues. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-usb: drop all non-USB compatibles supportDmitry Baryshkov1-3032/+4
Drop support for all non-USB compatibles from the new qmp-usb driver. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-ufs: drop all non-UFS compatibles supportDmitry Baryshkov1-4126/+4
Drop support for all non-UFS compatibles from the new qmp-ufs driver. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-pcie-msm8996: drop all compatibles except msm8996-pcie-phyDmitry Baryshkov1-4628/+4
Drop support for all compatibles from the new qmp-pcie driver except the qcom,msm8996-qmp-pcie-phy. This PHY differs from the rest of PCIe PHYs, so it warrants a separate device driver. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp-pcie: drop all non-PCIe compatibles supportDmitry Baryshkov1-3282/+9
Drop support for all non-PCIe compatibles from the new qmp-pcie driver. The MSM8996 compat is also removed, it is going to be handled by a separate driver. Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-09phy: qcom-qmp: create copies of QMP PHY driverDmitry Baryshkov5-0/+31750
In order to split and cleanup the single monstrous QMP PHY driver, create blind copies of the current file. They will be used for: - PCIe (and a separate msm8996 PCIe PHY driver) - UFS - USB - Combo DP + USB Acked-by: Bjorn Andersson <[email protected]> Tested-by: Bjorn Andersson <[email protected]> # UFS, PCIe and USB on SC8180X Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-08phy: samsung: exynosautov9-ufs: correct TSRV register configurationsChanho Park1-9/+9
For exynos auto v9's UFS MPHY, We should use 0x50 offset of TSRV register configurations. So, it must be s/PHY_TRSV_REG_CFG/PHY_TRSV_REG_CFG_AUTOV9/g Fixes: d64519249e1d ("phy: samsung-ufs: support exynosauto ufs phy driver") Signed-off-by: Chanho Park <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-08phy: samsung: ufs: support secondary ufs phyChanho Park1-0/+5
To support secondary ufs phy device, we need to get an offset for phy isolation from the syscon DT node. If the first index argument of the node is existing, we can read the offset value and set it as isol->offset. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Chanho Park <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-08phy: samsung: ufs: remove drvdata from struct samsung_ufs_phyChanho Park2-12/+16
To change an offset of pmu_isol, we need to store its data instead of having drvdata's pointer. The definition of the pmu_isol structure should be extracted from samsung_ufs_phy_drvdata and rename the name with samsung_ufs_phy_ prefix. Suggested-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Chanho Park <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-08phy: samsung: ufs: constify samsung_ufs_phy_cfgChanho Park2-3/+3
Put const qualifier of samsung_ufs_phy_cfg pointer because they will not be changed from drvdata. Signed-off-by: Chanho Park <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-06-08phy: samsung: ufs: rename cfg to cfgs for clarificationChanho Park4-6/+6
Rename **cfg to **cfgs to clarify the naming. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Chanho Park <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-19Merge tag 'phy-for-5.19' of ↵Greg Kroah-Hartman13-124/+935
git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-work-next Vinod writes: phy-for-5.19 - New support: - LVDS configuration support and implementation in fsl driver - Qualcomm UFS phy support for SM6350 and USB PHY for SDX65 - Allwinner D-PHY Rx mode support - Yamilfy Mixel mipi-dsi-phy - Updates: - Documentation for phy ops order - Can transceiver mux support - Qualcomm QMP phy updates - Uniphier phy updates * tag 'phy-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (40 commits) phy: qcom-qmp: rename error labels phy: qcom-qmp: fix pipe-clock imbalance on power-on failure phy: qcom-qmp: switch to explicit reset helpers phy: qcom-qmp: fix reset-controller leak on probe errors phy: qcom-qmp: fix struct clk leak on probe errors dt-bindings: phy: renesas,usb2-phy: Document RZ/G2UL phy bindings dt-bindings: phy: marvell,armada-3700-utmi-host-phy: Fix incorrect compatible in example phy: qcom-qmp: fix phy-descriptor kernel-doc typo phy: rockchip-inno-usb2: Clean up some inconsistent indenting phy: freescale: imx8m-pcie: Handle IMX8_PCIE_REFCLK_PAD_UNUSED phy: core: Warn when phy_power_on is called before phy_init phy: core: Update documentation syntax phy: core: Add documentation of phy operation order phy: rockchip-inno-usb2: Handle ID IRQ phy: rockchip-inno-usb2: Handle bvalid falling phy: rockchip-inno-usb2: Support multi-bit mask properties phy: rockchip-inno-usb2: Do not lock in bvalid IRQ handler phy: rockchip-inno-usb2: Do not check bvalid twice phy: rockchip-inno-usb2: Fix muxed interrupt support phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI CSI-2 ...
2022-05-03phy: qcom-qmp: rename error labelsJohan Hovold1-14/+14
Rename all error labels after what they are used for in order to improve readability and for consistency. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-03phy: qcom-qmp: fix pipe-clock imbalance on power-on failureJohan Hovold1-1/+1
Make sure to disable the pipe clock also if ufs-reset deassertion fails during power on. Note that the ufs-reset is asserted in qcom_qmp_phy_com_exit(). Fixes: c9b589791fc1 ("phy: qcom: Utilize UFS reset controller") Cc: Evan Green <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-03phy: qcom-qmp: switch to explicit reset helpersJohan Hovold1-2/+2
Switch to consistently using the explicit reset-controller API which makes it clear that the reset controllers are used exclusively by the PHY driver. Note that the deprecated of_reset_control_get() and devm_reset_control_get() are just transitional wrappers for the explicit API so there's no functional change. Suggested-by: Philipp Zabel <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-03phy: qcom-qmp: fix reset-controller leak on probe errorsJohan Hovold1-0/+9
Make sure to release the lane reset controller in case of a late probe error (e.g. probe deferral). Note that due to the reset controller being defined in devicetree in "lane" child nodes, devm_reset_control_get_exclusive() cannot be used directly. Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: [email protected] # 4.12 Cc: Vivek Gautam <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-03phy: qcom-qmp: fix struct clk leak on probe errorsJohan Hovold1-1/+1
Make sure to release the pipe clock reference in case of a late probe error (e.g. probe deferral). Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Cc: [email protected] # 4.12 Cc: Vivek Gautam <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-02phy: qcom-qmp: fix phy-descriptor kernel-doc typoJohan Hovold1-1/+1
Fix misspelled "clock" in the description of the pipe_clk field in the PHY-descriptor kernel-doc comment. Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-05-02phy: rockchip-inno-usb2: Clean up some inconsistent indentingJiapeng Chong1-2/+2
Eliminate the follow smatch warning: drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1203 rockchip_usb2phy_probe() warn: inconsistent indenting. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: freescale: imx8m-pcie: Handle IMX8_PCIE_REFCLK_PAD_UNUSEDMarek Vasut1-2/+8
The 'fsl,refclk-pad-mode' DT property used to select clock source for PCIe PHY can have either of three values, IMX8_PCIE_REFCLK_PAD_INPUT, IMX8_PCIE_REFCLK_PAD_OUTPUT, IMX8_PCIE_REFCLK_PAD_UNUSED. The first two options are handled correctly by the driver, the last one is not, this patch implements support for the last option. The IMX8_PCIE_REFCLK_PAD_INPUT means PCIE_RESREF is PHY clock input, the IMX8_PCIE_REFCLK_PAD_OUTPUT means PHY clock are sourced from SoC internal PLL and output to PCIE_RESREF external IO pin. The last IMX8_PCIE_REFCLK_PAD_UNUSED is a combination of previous two, PHY clock are sourced from SoC internal PLL and not output anywhere. Reviewed-by: Richard Zhu <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Cc: Marcel Ziswiler <[email protected]> Cc: NXP Linux Team <[email protected]> Cc: Peng Fan <[email protected]> Cc: Richard Zhu <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Vinod Koul <[email protected]> Cc: [email protected] To: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: core: Warn when phy_power_on is called before phy_initJules Maselbas1-0/+3
A warning when the order of phy operation is mixed up by drivers, this is an atempt to make the phy usage more uniform across (usb) drivers. Signed-off-by: Jules Maselbas <[email protected]> Cc: Ahmad Fatoum <[email protected]> Cc: Amelie DELAUNAY <[email protected]> Cc: Minas Harutyunyan <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: core: Update documentation syntaxJules Maselbas1-3/+3
Update the syntax used by the documentation of phy operation functions. This is to unify the syntax with the newly added documentation. Signed-off-by: Jules Maselbas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: core: Add documentation of phy operation orderJules Maselbas1-0/+35
Add documentation on phy function usage: init function must be called before power_on; power_off must be called before exit. Signed-off-by: Jules Maselbas <[email protected]> Cc: Ahmad Fatoum <[email protected]> Cc: Amelie DELAUNAY <[email protected]> Cc: Minas Harutyunyan <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Handle ID IRQSamuel Holland1-0/+85
This supports detecting host mode for the OTG port without an extcon. The rv1108 properties are not updated due to lack of documentation. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Handle bvalid fallingSamuel Holland1-9/+9
Some SoCs have a bvalid falling interrupt, in addition to bvalid rising. This interrupt can detect OTG cable plugout immediately, so it can avoid the delay until the next scheduled work. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Support multi-bit mask propertiesSamuel Holland1-1/+1
The "bvalid" and "id" interrupts can trigger on either the rising edge or the falling edge, so each interrupt has two enable bits and two status bits. This change allows using a single property for both bits, checking whether either bit is set. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Do not lock in bvalid IRQ handlerSamuel Holland1-4/+0
Clearing the IRQ is atomic, so there is no need to hold the mutex. Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Do not check bvalid twiceSamuel Holland1-6/+4
The bvalid interrupt handler already checks bvalid status. The muxed IRQ handler just needs to call the other handler (plus any other handlers that will be added). Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: rockchip-inno-usb2: Fix muxed interrupt supportSamuel Holland1-2/+8
This commit fixes two issues with the muxed interrupt handler. First, the OTG port has the "bvalid" interrupt enabled, not "linestate". Since only the linestate interrupt was handled, and not the bvalid interrupt, plugging in a cable to the OTG port caused an interrupt storm. Second, the return values from the individual port IRQ handlers need to be OR-ed together. Otherwise, the lack of an interrupt from the last port would cause the handler to erroneously return IRQ_NONE. Fixes: ed2b5a8e6b98 ("phy: phy-rockchip-inno-usb2: support muxed interrupts") Signed-off-by: Samuel Holland <[email protected]> Tested-by: Michael Riesch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe()Heiner Kallweit1-8/+12
If clk_prepare_enable() fails we call clk_disable_unprepare() in the error path what results in a warning that the clock is disabled and unprepared already. And if we fail later in phy_g12a_usb3_pcie_probe() then we bail out w/o calling clk_disable_unprepare(). This patch fixes both errors. Fixes: 36077e16c050 ("phy: amlogic: Add Amlogic G12A USB3 + PCIE Combo PHY Driver") Signed-off-by: Heiner Kallweit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: allwinner: phy-sun6i-mipi-dphy: Support D-PHY Rx mode for MIPI CSI-2Paul Kocialkowski1-4/+162
The Allwinner A31 D-PHY supports both Rx and Tx modes. While the latter is already supported and used for MIPI DSI this adds support for the former, to be used with MIPI CSI-2. This implementation is inspired by Allwinner's V3s Linux SDK implementation, which was used as a documentation base. It uses the direction dt property to distinguish between tx and rx directions. Signed-off-by: Paul Kocialkowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-20phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode supportLiu Ying1-11/+265
i.MX8qxp SoC embeds a Mixel MIPI DPHY + LVDS PHY combo which supports either a MIPI DSI display or a LVDS display. The PHY mode is controlled by SCU firmware and the driver would call a SCU firmware function to configure the PHY mode. The single LVDS PHY has 4 data lanes to support a LVDS display. Also, with a master LVDS PHY and a slave LVDS PHY, they may work together to support a LVDS display with 8 data lanes(usually, dual LVDS link display). Note that this patch supports the LVDS PHY mode only for the i.MX8qxp Mixel combo PHY, i.e., the MIPI DPHY mode is yet to be supported, so for now error would be returned from ->set_mode() if MIPI DPHY mode is passed over to it for the combo PHY. Cc: Guido Günther <[email protected]> Cc: Robert Chiras <[email protected]> Cc: Kishon Vijay Abraham I <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Pengutronix Kernel Team <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: NXP Linux Team <[email protected]> Reviewed-by: Guido Günther <[email protected]> Signed-off-by: Liu Ying <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-14phy: ti: Add missing pm_runtime_disable() in serdes_am654_probeMiaoqian Lin1-1/+1
The pm_runtime_enable() will increase power disable depth. If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable(). Add missing pm_runtime_disable() for serdes_am654_probe(). Fixes: 71e2f5c5c224 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC") Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-14phy: mapphone-mdm6600: Fix PM error handling in phy_mdm6600_probeMiaoqian Lin1-1/+2
The pm_runtime_enable will increase power disable depth. If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable(). And use pm_runtime_dont_use_autosuspend() to undo pm_runtime_use_autosuspend() In the PM Runtime docs: Drivers in ->remove() callback should undo the runtime PM changes done in ->probe(). Usually this means calling pm_runtime_disable(), pm_runtime_dont_use_autosuspend() etc. We should do this in error handling. Fixes: f7f50b2a7b05 ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend") Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy: cadence: Sierra: Add TI J721E specific PCIe multilink lane configurationSwapnil Jakhade1-3/+190
This patch adds workaround for TI J721E errata i2183 (https://www.ti.com/lit/er/sprz455a/sprz455a.pdf). PCIe fails to link up if SERDES lanes not used by PCIe are assigned to another protocol. For example, link training fails if lanes 2 and 3 are assigned to another protocol while lanes 0 and 1 are used for PCIe to form a two lane link. This failure is due to an incorrect tie-off on an internal status signal indicating electrical idle. Status signals going from SERDES to PCIe Controller are tied-off when a lane is not assigned to PCIe. Signal indicating electrical idle is incorrectly tied-off to a state that indicates non-idle. As a result, PCIe sees unused lanes to be out of electrical idle and this causes LTSSM to exit Detect.Quiet state without waiting for 12ms timeout to occur. If a receiver is not detected on the first receiver detection attempt in Detect.Active state, LTSSM goes back to Detect.Quiet and again moves forward to Detect.Active state without waiting for 12ms as required by PCIe base specification. Since wait time in Detect.Quiet is skipped, multiple receiver detect operations are performed back-to-back without allowing time for capacitance on the transmit lines to discharge. This causes subsequent receiver detection to always fail even if a receiver gets connected eventually. The workaround only works for 1-lane PCIe configuration. This workaround involves enabling receiver detect override by setting TX_RCVDET_OVRD_PREG_j register of the lane running PCIe to 0x2. This causes SERDES to indicate successful receiver detect when LTSSM is in Detect.Active state, whether a receiver is actually present or not. If the receiver is present, LTSSM proceeds to link up as expected. However if receiver is not present, LTSSM will time out in Polling.Configuration substate since the expected training sequence packets will not be received. Signed-off-by: Swapnil Jakhade <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy/rockchip: Use of_device_get_match_data()Minghao Chi (CGEL ZTE)1-4/+2
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <[email protected]> Signed-off-by: Minghao Chi (CGEL ZTE) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy/rockchip: Use of_device_get_match_data()Minghao Chi (CGEL ZTE)1-6/+1
Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot <[email protected]> Signed-off-by: Minghao Chi (CGEL ZTE) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocksMiaoqian Lin1-1/+1
The corresponding API for clk_prepare_enable is clk_disable_unprepare. Make sure that the clock is unprepared on exit by changing clk_disable to clk_disable_unprepare. Fixes: ed31ee7cf1fe ("phy: ti: usb2: Fix logic on -EPROBE_DEFER") Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy: qcom-qmp: Add support for SDX65 QMP PHYRohit Agarwal1-0/+76
Add support for USB3 QMP PHY found in SDX65 platform. SDX65 uses version 5.0.0 of the QMP PHY IP. Signed-off-by: Rohit Agarwal <[email protected]> Acked-by: Manivannan Sadhasivam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy: mediatek: phy-mtk-hdmi: Simplify with dev_err_probe()AngeloGioacchino Del Regno1-31/+19
Use the dev_err_probe() helper to simplify error handling during probe. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-13phy: mediatek: phy-mtk-mipi-dsi: Simplify with dev_err_probe()AngeloGioacchino Del Regno1-19/+10
Use the dev_err_probe() helper to simplify error handling during probe. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-11phy: qcom-qmp: Add SM6350 UFS PHY supportLuca Weiss1-0/+3
The SM6350 UFS PHY is compatible with the one from SDM845. Add a compatible for that. Signed-off-by: Luca Weiss <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
2022-04-11phy: ti: tusb1210: Fix an error handling path in tusb1210_probe()Christophe JAILLET1-2/+8
tusb1210_probe_charger_detect() must be undone by a corresponding tusb1210_remove_charger_detect() in the error handling path, as already done in the remove function. Fixes: 48969a5623ed ("phy: ti: tusb1210: Add charger detection") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/07c4926c42243cedb3b6067a241bb486fdda01b5.1648991162.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul <[email protected]>
2022-04-11phy: samsung: exynos5250-sata: fix missing device put in probe error pathsKrzysztof Kozlowski1-6/+14
The actions of of_find_i2c_device_by_node() in probe function should be reversed in error paths by putting the reference to obtained device. Fixes: bcff4cba41bc ("PHY: Exynos: Add Exynos5250 SATA PHY driver") Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>