Johan Hovold
ef74a97f0d
phy: qcom-qmp-ufs: fix memleak on probe deferral
...
Switch to using the device-managed of_iomap helper to avoid leaking
memory on probe deferral and driver unbind.
Note that this helper checks for already reserved regions and may fail
if there are multiple devices claiming the same memory.
Fixes: e78f3d15e1 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30
Johan Hovold
2de8a325b1
phy: qcom-qmp-combo: fix memleak on probe deferral
...
Switch to using the device-managed of_iomap helper to avoid leaking
memory on probe deferral and driver unbind.
Note that this helper checks for already reserved regions and may fail
if there are multiple devices claiming the same memory.
Fixes: e78f3d15e1 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30
Johan Hovold
1f69ededf8
phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferral
...
Switch to using the device-managed of_iomap helper to avoid leaking
memory on probe deferral and driver unbind.
Note that this helper checks for already reserved regions and may fail
if there are multiple devices claiming the same memory.
Fixes: e78f3d15e1 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30
Johan Hovold
4be26f695f
phy: qcom-qmp-pcie: fix memleak on probe deferral
...
Switch to using the device-managed of_iomap helper to avoid leaking
memory on probe deferral and driver unbind.
Note that this helper checks for already reserved regions and may fail
if there are multiple devices claiming the same memory.
Fixes: e78f3d15e1 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30
Johan Hovold
ecd5507e72
phy: qcom-qmp-pcie: add pcs_misc sanity check
...
Make sure that the (otherwise) optional pcs_misc IO region has been
provided in case the configuration specifies a corresponding
initialisation table to avoid crashing with malformed device trees.
Note that the related debug message is now superfluous as the region is
only used when the configuration has a pcs_misc table.
Fixes: 421c9a0e97 ("phy: qcom: qmp: Add SDM845 PCIe QMP PHY support")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:16 +05:30
Johan Hovold
b767dedc05
phy: qcom-qmp-usb: shorten function prefixes
...
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-17-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:09 +05:30
Johan Hovold
4412817b12
phy: qcom-qmp-ufs: shorten function prefixes
...
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-16-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:09 +05:30
Johan Hovold
c577468c77
phy: qcom-qmp-pcie-msm8996: shorten function prefixes
...
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-15-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
d0eec88b38
phy: qcom-qmp-pcie-msm8996: drop unused secondary init tables
...
Drop the secondary register initialisation tables which aren't used by
this driver.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-14-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
e5cedefa72
phy: qcom-qmp-combo: shorten function prefixes
...
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-13-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
d44c3e1a1e
phy: qcom-qmp: silence noisy probe
...
Drivers should in general not log anything during unless there are
errors.
Drop the pointless registration info message from the QMP drivers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
613b30244b
phy: qcom-qmp-usb: drop unused defines
...
Drop defines and enums that are unused since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220907110728.19092-11-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
e57655e668
phy: qcom-qmp-usb: disable runtime PM on unbind
...
Make sure to disable runtime PM also on driver unbind.
Fixes: ac0d239936 ("phy: qcom-qmp: Add support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
6d07bd6f46
phy: qcom-qmp-ufs: drop unused defines
...
Drop defines and enums that are unused since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220907110728.19092-9-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
b3a467d9c6
phy: qcom-qmp-ufs: drop unused runtime PM implementation
...
Drop the unused and incomplete runtime PM implementation, which was
only used by USB PHYs before splitting the QMP driver.
Note that the runtime PM was never disabled (and state restored) on
driver unbind.
This effectively reverts commit ac0d239936 ("phy: qcom-qmp: Add
support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:08 +05:30
Johan Hovold
7936e5f32f
phy: qcom-qmp-pcie-msm8996: drop unused defines
...
Drop defines and enums that are unused since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220907110728.19092-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Johan Hovold
cec61c070d
phy: qcom-qmp-pcie-msm8996: drop unused runtime PM implementation
...
Drop the unused and incomplete runtime PM implementation, which was
only used by USB PHYs before splitting the QMP driver.
Note that the runtime PM was never disabled (and state restored) on
driver unbind.
This effectively reverts commit ac0d239936 ("phy: qcom-qmp: Add
support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Johan Hovold
52d8d441a8
phy: qcom-qmp-pcie: drop unused defines
...
Drop defines and enums that are unused since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Johan Hovold
9062e92a24
phy: qcom-qmp-pcie: drop unused runtime PM implementation
...
Drop the unused and incomplete runtime PM implementation, which was
only used by USB PHYs before splitting the QMP driver.
Note that the runtime PM was never disabled (and state restored) on
driver unbind.
This effectively reverts commit ac0d239936 ("phy: qcom-qmp: Add
support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Johan Hovold
beee6ed1d6
phy: qcom-qmp-combo: drop unused defines
...
Drop defines and enums that are unused since the QMP driver split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Johan Hovold
4382d518d1
phy: qcom-qmp-combo: disable runtime PM on unbind
...
Make sure to disable runtime PM also on driver unbind.
Fixes: ac0d239936 ("phy: qcom-qmp: Add support for runtime PM").
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220907110728.19092-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:28:07 +05:30
Siddharth Vadapalli
af96579dc3
phy: ti: gmii-sel: Add support for CPSW5G GMII SEL in J7200
...
Each of the CPSW5G ports in J7200 support additional modes like QSGMII.
Add a new compatible for J7200 to support the additional modes.
In TI's J7200, each of the CPSW5G ethernet interfaces can act as a
QSGMII or QSGMII-SUB port. The QSGMII interface is responsible for
performing auto-negotiation between the MAC and the PHY while the rest of
the interfaces are designated as QSGMII-SUB interfaces, indicating that
they will not be taking part in the auto-negotiation process.
To indicate the interface which will serve as the main QSGMII interface,
add a property "ti,qsgmii-main-ports", whose value indicates the
port number of the interface which shall serve as the main QSGMII
interface. The rest of the interfaces are then assigned QSGMII-SUB mode by
default. The property "ti,qsgmii-main-ports" is used to configure the
CTRLMMR_ENETx_CTRL register.
Depending on the device, it is possible for more than one QSGMII main port
to exist. Thus, the property "ti,qsgmii-main-ports" is defined as an array
of values in order to reuse the property for other devices.
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com >
Link: https://lore.kernel.org/r/20220912085650.83263-4-s-vadapalli@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 23:10:26 +05:30
Wei Yongjun
677c577e17
phy: usb: sunplus: Fix return value check in update_disc_vol()
...
In case of error, the function nvmem_cell_read() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Fixes: 99d9ccd973 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com >
Link: https://lore.kernel.org/r/20220909094709.1790970-1-weiyongjun@huaweicloud.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 20:58:33 +05:30
Krishna Kurapati
df2217ff17
phy: qcom-snps: Add support for overriding phy tuning parameters
...
Add support for overriding electrical signal tuning parameters for
SNPS HS Phy.
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Link: https://lore.kernel.org/r/1662480933-12326-3-git-send-email-quic_kriskura@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 20:43:55 +05:30
Johan Hovold
ac439ce88e
phy: qcom-qmp: drop dual-lane comments
...
Drop the obsolete and misleading dual-lane comments which gave the
impression that only combo PHYs have a second lane.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220906074550.4383-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 20:23:36 +05:30
Johan Hovold
278786153b
phy: qcom-qmp-pcie: shorten function prefixes
...
The driver function prefix has gotten unnecessarily long and hurts
readability.
Shorten "qcom_qmp_phy_" to "qmp_" (which likely stands for "Qualcomm
Multi PHY" or similar anyway).
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220906074550.4383-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 20:23:36 +05:30
Dmitry Baryshkov
95153de6b9
phy: qcom-qmp-pcie: drop if (table) conditions
...
Drop unused if (table) conditions, since the function
qcom_qmp_phy_pcie_configure_lane() has this check anyway.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220906074550.4383-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 20:23:36 +05:30
Horatiu Vultur
b013110733
phy: Add RGMII support on lan966x
...
The serdes driver contains also a mux to decide which interface type to
use. Currently the driver supports GMII/SGMII/QSGMII and partially RGMII.
As it doesn't support all the other RGMII interfaces like
RGMII_TXID/RXID/ID and it could run only at 1G.
Therefore extend this for all the other speeds(10/100) and also allow
the other interfaces.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com >
Link: https://lore.kernel.org/r/20220901121455.245103-1-horatiu.vultur@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-13 19:14:53 +05:30
Peter Geis
f340ed8664
phy: rockchip-inno-usb2: Return zero after otg sync
...
The otg sync state patch reuses the ret variable, but fails to set it to
zero after use. This leads to a situation when the otg port is in
peripheral mode where the otg phy aborts halfway through setup. It also
fails to account for a failure to register the extcon notifier. Fix this
by using our own variable and skipping otg sync in case of failure.
Fixes: 8dc60f8da2 ("phy: rockchip-inno-usb2: Sync initial otg state")
Reported-by: Markus Reichl <m.reichl@fivetechno.de >
Reported-by: Michael Riesch <michael.riesch@wolfvision.net >
Signed-off-by: Peter Geis <pgwipeout@gmail.com >
Tested-by: Michael Riesch <michael.riesch@wolfvision.net >
Tested-by: Markus Reichl <m.reichl@fivetechno.de >
Reviewed-by: Samuel Holland <samuel@sholland.org >
Link: https://lore.kernel.org/r/20220902184543.1234835-1-pgwipeout@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-04 20:53:40 +05:30
Heiner Kallweit
766ab0ded4
phy: amlogic: use devm_clk_get_enabled() to simplify the code
...
Simplify the code by using devm_clk_get_enabled().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com >
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com >
Link: https://lore.kernel.org/r/9308a2a3-e828-bd9d-ab83-a68376aab5c3@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-04 20:49:12 +05:30
Shawn Lin
2e9bffc4f7
phy: rockchip: Support PCIe v3
...
RK3568 supports PCIe v3 using not Combphy like PCIe v2 on rk3566.
It use a dedicated PCIe-phy. Add support for this.
Initial support by Shawn Lin, modifications by Peter Geis and Frank
Wunderlich.
Add data-lanes property for splitting pcie-lanes across controllers.
The data-lanes is an array where x=0 means lane is disabled and x > 0
means controller x is assigned to phy lane.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com >
Suggested-by: Peter Geis <pgwipeout@gmail.com >
Signed-off-by: Frank Wunderlich <frank-w@public-files.de >
Link: https://lore.kernel.org/r/20220825193836.54262-4-linux@fw-web.de
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-04 20:35:48 +05:30
Michael Riesch
29c99fb085
phy: rockchip: add support for the rk356x variant to rockchip-inno-csidphy
...
This adds support for variant found in Rockchip RK356x SoCs. Note that
only the basic operating mode is supported, in which all four CSI lines
are controlled by the Rockchip ISP.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net >
Reviewed-by: Heiko Stuebner <heiko@sntech.de >
Link: https://lore.kernel.org/r/20220720091527.1270365-3-michael.riesch@wolfvision.net
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-02 23:00:47 +05:30
Bjorn Andersson
f2e35c7589
phy: qcom: edp: Postpone clk_set_rate until the PLL is up
...
When the platform was booted with the involved clocks enabled the
clk_set_rate() of the link and pixel clocks will perculate to the
children, which will fail to update because the PHY driver has just shut
down the PLL.
Postpone the clock rate updates until the PLL is back online to avoid
reconfiguring the clocks while the PLL is not ticking.
Fixes: f199223cb4 ("phy: qcom: Introduce new eDP PHY driver")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220805154432.546740-1-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-02 22:27:12 +05:30
Vincent Shih
99d9ccd973
phy: usb: Add USB2.0 phy driver for Sunplus SP7021
...
Add USB2.0 phy driver for Sunplus SP7021
Signed-off-by: Vincent Shih <vincent.sunplus@gmail.com >
Link: https://lore.kernel.org/r/1658717052-26142-2-git-send-email-vincent.sunplus@gmail.com
[vkoul: remove trailing line in driver file]
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-02 21:01:24 +05:30
Johan Hovold
c8c5d5e89a
phy: qcom-qmp-usb: drop pipe clock lane suffix
...
The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has
been deprecated by instead requesting the clock by index.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-31-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:23 +05:30
Johan Hovold
5337b248ad
phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
...
The lane reset is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the reset name.
Update driver to support the new binding where the "lane" reset name has
been deprecated by instead requesting the reset by index.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-30-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:23 +05:30
Johan Hovold
302db46033
phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix
...
The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has
been deprecated by instead requesting the clock by index.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-29-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:22 +05:30
Johan Hovold
70e25cac53
phy: qcom-qmp-combo: drop pipe clock lane suffix
...
The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has
been deprecated by instead requesting the clock by index.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-28-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:22 +05:30
Johan Hovold
27759490cf
phy: qcom-qmp-combo: drop unused lane reset
...
Drop the unused lane reset pointer which isn't used by any combo PHY.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-27-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:22 +05:30
Johan Hovold
f8432544f9
phy: qcom-qmp-pcie: drop pipe clock lane suffix
...
The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.
Update driver to support the new binding where the pipe clock name has
been deprecated by instead requesting the clock by index.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220830112923.3725-26-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 18:56:22 +05:30
Wolfram Sang
71351b0e56
phy: move from strlcpy with unused retval to strscpy
...
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com >
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com >
Link: https://lore.kernel.org/r/20220818210056.7205-1-wsa+renesas@sang-engineering.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 13:12:38 +05:30
Bjorn Andersson
a2e927b0e5
phy: qcom-qmp-combo: Add sc8280xp USB/DP combo phys
...
The SC8280P has two copies of an USB/DP compbo PHY, add support for this
to the Qualcomm QMP PHY driver.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810042303.3583194-5-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 13:08:03 +05:30
Bjorn Andersson
c0c7769cda
phy: qcom-qmp: Add SC8280XP USB3 UNI phy
...
The SC8280XP platform has two instances of the 5nm USB3 UNI phy attached
to the multi-port USB controller, add definition for these.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810042303.3583194-4-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 13:08:03 +05:30
Bjorn Andersson
712e5dffe9
phy: qcom-qmp-combo: Parameterize swing and pre_emphasis tables
...
The swing and pre-emphasis tables differ between different PHY versions,
or perhaps between different platforms. In particular in order to
introduce SC8280XP these tables needs to be replaced.
Make it possible to specify these tables per PHY config.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810042303.3583194-3-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 13:08:03 +05:30
Dmitry Baryshkov
d88497fb6b
phy: qualcomm: phy-qcom-qmp: add support for combo USB3+DP phy on SDM845
...
Define configuration to be used by combo USB3 + DisplayPort phy on
SDM845 SoC family. It closely follows sc7180, however like the main USB3
phy it uses the qmp_v3_usb3phy_cfg config.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810030926.2794179-1-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 13:07:34 +05:30
Uwe Kleine-König
533e13305c
phy: tegra: xusb: Only warn once about reset problems in .remove()
...
The single difference between returning 0 and returning an error code in
a platform remove callback is that in the latter case the platform core
emits a warning about the error being ignored.
If reset_control_assert() fails there is already a warning, so suppress
the more generic (and less helpful) by returning 0 in
tegra_xusb_padctl_remove().
This is a preparation for making platform remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Link: https://lore.kernel.org/r/20220716145403.107703-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 12:59:58 +05:30
Bjorn Andersson
3b7267dec4
phy: qcom: edp: Add SC8280XP eDP and DP PHYs
...
The Qualcomm SC8280XP platform has a number of eDP and DP PHY instances,
add support for these.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810040745.3582985-6-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 11:01:23 +05:30
Bjorn Andersson
2300d1cb24
phy: qcom: edp: Introduce support for DisplayPort
...
The eDP phy can be used to drive either eDP or DP output, with some
minor variations in some of the configuration and seemingly a need for
implementing swing and pre_emphasis calibration.
Introduce a config object, indicating if the phy is operating in eDP or
DP mode and swing/pre-emphasis calibration to support this.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810040745.3582985-5-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 11:01:23 +05:30
Bjorn Andersson
5894ff12c7
phy: qcom: edp: Perform lane configuration
...
The TRANSCIEVER_BIAS_EN, HIGHZ_DRVR_EN and PHY_CFG_1 registers are used
for lane configuration, with the currently hard coded configuration
being a mix of 2 and 4 lane (effectively 2-lane).
Properly implement lane configuration for 1, 2 and 4 lanes.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810040745.3582985-4-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 11:01:23 +05:30
Bjorn Andersson
317e00bbf9
phy: qcom: edp: Generate unique clock names
...
With multiple Displayport PHYs the hard coded clock names collides,
generate unique clock names based on the device name instead.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Link: https://lore.kernel.org/r/20220810040745.3582985-3-bjorn.andersson@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-08-30 11:01:23 +05:30