Justin Chen
700c44b508
phy: usb: Use slow clock for wake enabled suspend
...
The logic was incorrect when switching to slow clock. We want the slow
clock if wake_enabled is set.
Fixes: ae532b2b7a ("phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers")
Signed-off-by: Justin Chen <justinpopo6@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/1665005418-15807-6-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-07 10:20:25 +05:30
Justin Chen
833c173eba
phy: usb: Disable phy auto-suspend
...
The BDC block requires the PLL lock in order to grab the PLL clock.
The phy auto-suspend feature turns off the phy when nothing is attached
leading to the PLL to not lock. This leads the BDC block to grab the AUX
clock instead of the PLL clock. This is not ideal, so lets turn this
feature off.
Signed-off-by: Justin Chen <justinpopo6@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/1665005418-15807-5-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-07 10:20:24 +05:30
Justin Chen
7e81153d0f
phy: usb: Migrate to BIT and BITMASK macros
...
Using BIT and BITMASK macros makes it much easier to read and make
modifications. Also reordered some constants to be in numerical order.
Signed-off-by: Justin Chen <justinpopo6@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/1665005418-15807-4-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-07 10:20:24 +05:30
Al Cooper
f7fc5b7090
phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices
...
The PHY's "wakeup_count" is not incrementing when waking from
WoL. The wakeup count can be found in sysfs at:
/sys/bus/platform/devices/rdb/*.usb-phy/power/wakeup_count.
The problem is that the system wakup event handler was being passed
the wrong "device" by the PHY driver.
Fixes: f1c0db40a3 ("phy: usb: Add "wake on" functionality")
Signed-off-by: Al Cooper <alcooperx@gmail.com >
Signed-off-by: Justin Chen <justinpopo6@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/1665005418-15807-3-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-07 10:20:04 +05:30
Justin Chen
32fb07f356
phy: usb: Improve port mode selection
...
Split port modes into two different variables. Supported port modes
is what the hardware supports. While port mode is how the hardware
is currently configured and can be dynamically changed through the
sysfs. We initialize all supported port modes on init even though
the port mode may not be selected because we cannot guarantee the
downstream interface from the phy will be active or not.
This also fixes an issue where port modes selected via sysfs were
not being saved through suspend/resume.
Signed-off-by: Justin Chen <justinpopo6@gmail.com >
Acked-by: Florian Fainelli <f.fainelli@gmail.com >
Link: https://lore.kernel.org/r/1665005418-15807-2-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 13:12:55 +05:30
John Thomson
819b885cd8
phy: ralink: mt7621-pci: add sentinel to quirks table
...
With mt7621 soc_dev_attr fixed to register the soc as a device,
kernel will experience an oops in soc_device_match_attr
This quirk test was introduced in the staging driver in
commit 9445ccb371 ("staging: mt7621-pci-phy: add quirks for 'E2'
revision using 'soc_device_attribute'"). The staging driver was removed,
and later re-added in commit d87da32372 ("phy: ralink: Add PHY driver
for MT7621 PCIe PHY") for kernel 5.11
Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com
Fixes: d87da32372 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au >
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com >
Link: https://lore.kernel.org/r/20221104205242.3440388-2-git@johnthomson.fastmail.com.au
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 13:01:25 +05:30
Johan Hovold
c0a6c25283
phy: qcom-qmp-usb: add support for updated sc8280xp binding
...
Add support for the new SC8280XP binding.
Note that the binding does not try to describe every register subregion
and instead the driver holds the corresponding offsets. This includes
the PCS_USB region which was initially overlooked.
Note that the driver will no longer accept the old binding due to the
fixed "phy_phy" reset name.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-14-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
183462e8c9
phy: qcom-qmp-usb: restructure PHY creation
...
In preparation for supporting devicetree bindings which do not use a
child node, move the PHY creation to probe() proper and parse the serdes
and dp_com resources in what is now the legacy devicetree helper.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-13-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
876420fb7b
phy: qcom-qmp-usb: clean up PHY init
...
Clean up the PHY initialisation somewhat by programming both tx and rx
for the second lane after the first lane.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
8fe2b2b745
phy: qcom-qmp-usb: rename PHY ops structure
...
Rename the PHY operation structure so that it has a "phy_ops" suffix and
move it next to the implementation.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-9-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
413db06c05
phy: qcom-qmp-usb: clean up probe initialisation
...
Stop abusing the driver data pointer and instead pass the driver state
structure directly to the initialisation helpers during probe.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
8ec02ba849
phy: qcom-qmp-usb: clean up device-tree parsing
...
Since the QMP driver split there will be at most a single child node so
drop the obsolete iteration construct.
While at it, drop the verbose error logging that would have been
printed also on probe deferrals.
Note that there's no need to check if there are additional child nodes
(the kernel is not a devicetree validator), but let's return an error if
there are no child nodes at all for now.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:42 +05:30
Johan Hovold
2a55ec4f0a
phy: qcom-qmp-usb: merge driver data
...
The USB QMP PHY driver only manages a single PHY so merge the old
qcom_qmp and qmp_phy structures and drop the PHY array.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:41 +05:30
Johan Hovold
9c9beef111
phy: qcom-qmp-usb: move pm ops
...
Move the PM ops structure next to the implementation to keep the driver
callbacks grouped.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:41 +05:30
Johan Hovold
95dd63b898
phy: qcom-qmp-usb: move device-id table
...
Move the device-id table below probe() and next to the driver structure
to keep the driver callback functions grouped together.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:41 +05:30
Johan Hovold
9fe6b4e87c
phy: qcom-qmp-usb: sort device-id table
...
Sort the device-id table by compatible string to make it easier to find
and add new entries.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:41 +05:30
Johan Hovold
4c6b3af390
phy: qcom-qmp-usb: fix sc8280xp PCS_USB offset
...
The PCS_USB register block lives at an offset of 0x1000 from the PCS
region on SC8280XP so add the missing offset to avoid corrupting
unrelated registers on runtime suspend.
Note that the current binding is broken as it does not describe the
PCS_USB region and the PCS register size does not cover PCS_USB and the
regions in between. As Linux currently maps full pages, simply adding
the offset to driver works until the binding has been fixed.
Fixes: c0c7769cda ("phy: qcom-qmp: Add SC8280XP USB3 UNI phy")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221028160435.26948-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 12:59:41 +05:30
Peng Wu
6e59419fd0
phy: sunplus: Fix an IS_ERR() vs NULL bug in sp_usb_phy_probe
...
The devm_ioremap() function returns NULL on error, it doesn't return
error pointers.
Fixes: 99d9ccd973 ("phy: usb: Add USB2.0 phy driver for Sunplus SP7021")
Signed-off-by: Peng Wu <wupeng58@huawei.com >
Link: https://lore.kernel.org/r/20220911060053.123594-1-wupeng58@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-05 00:29:57 +05:30
Vinod Koul
25dcaf9444
Merge branch 'fixes' into next
...
Merge the fixes to next as both carry qmp-phy patches
2022-10-28 18:39:28 +05:30
Johan Hovold
0e089bb8b3
phy: qcom-qmp-ufs: add support for updated sc8280xp binding
...
Add support for the new SC8280XP binding.
Note that the binding does not try to describe every register subregion
and instead the driver holds the corresponding offsets.
Also note that the driver will continue to accept the old binding, at
least for the time being.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-11-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
c64d39b403
phy: qcom-qmp-ufs: restructure PHY creation
...
In preparation for supporting devicetree bindings which do not use a
child node, move the PHY creation to probe() proper and parse the serdes
resource in what is now the legacy devicetree helper.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
e0a0c761d2
phy: qcom-qmp-ufs: clean up PHY init
...
Clean up the PHY initialisation somewhat programming both tx and rx for
the second lane after the first lane.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
b98e44e608
phy: qcom-qmp-ufs: rename PHY ops structure
...
Rename the PHY operation structure so that it has a "phy_ops" suffix and
move it next to the implementation.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
018dfc99ae
phy: qcom-qmp-ufs: clean up probe initialisation
...
Stop abusing the driver data pointer and instead pass the driver state
structure directly to the initialisation helpers during probe.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
cb2c3d2ee4
phy: qcom-qmp-ufs: clean up device-tree parsing
...
Since the QMP driver split there will be at most a single child node so
drop the obsolete iteration construct.
While at it, drop the verbose error logging that would have been
printed also on probe deferrals.
Note that there's no need to check if there are additional child nodes
(the kernel is not a devicetree validator), but let's return an error if
there are no child nodes at all for now.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:30 +05:30
Johan Hovold
a36032db30
phy: qcom-qmp-ufs: merge driver data
...
The UFS QMP PHY driver only manages a single PHY so merge the old
qcom_qmp and qmp_phy structures and drop the PHY array.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:29 +05:30
Johan Hovold
d907774ed5
phy: qcom-qmp-ufs: move device-id table
...
Move the device-id table below probe() and next to the driver structure
to keep the driver callback functions grouped together.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221024090041.19574-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:30:29 +05:30
Johan Hovold
04948e7571
phy: qcom-qmp-combo: fix NULL-deref on runtime resume
...
Commit fc64623637 ("phy: qcom-qmp-combo,usb: add support for separate
PCS_USB region") started treating the PCS_USB registers as potentially
separate from the PCS registers but used the wrong base when no PCS_USB
offset has been provided.
Fix the PCS_USB base used at runtime resume to prevent dereferencing a
NULL pointer on platforms that do not provide a PCS_USB offset (e.g.
SC7180).
Fixes: fc64623637 ("phy: qcom-qmp-combo,usb: add support for separate PCS_USB region")
Cc: stable@vger.kernel.org # 5.20
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Andrew Halaney <ahalaney@redhat.com >
Link: https://lore.kernel.org/r/20221026162116.26462-1-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:25:50 +05:30
Dmitry Baryshkov
922adfd59e
phy: qcom-qmp-usb: correct registers layout for IPQ8074 USB3 PHY
...
According to the kernel 4.4 sources from NHSS.QSDK.9.0.2 and according
to hardware docs, the PHY registers layout used for IPQ8074 USB3 PHY is
incorrect. This platform uses offset 0x174 for the PCS_STATUS register,
0xd8 for PCS_AUTONOMOUS_MODE_CTRL, etc.
Correct the PHY registers layout.
Fixes: 94a407cc17 ("phy: qcom-qmp: create copies of QMP PHY driver")
Fixes: 507156f5a9 ("phy: qcom-qmp: Add USB QMP PHY support for IPQ8074")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Kathiravan T<quic_kathirav@quicinc.com >
Link: https://lore.kernel.org/r/20220929190017.529207-1-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 18:11:36 +05:30
Johan Hovold
47b009db54
phy: qcom-qmp-usb: drop start and pwrdn-ctrl abstraction
...
Drop the start and pwrdn-ctrl abstractions which are no longer needed
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/20221012085002.24099-20-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
cb4a982fa9
phy: qcom-qmp-ufs: drop start and pwrdn-ctrl abstraction
...
Drop the start and pwrdn-ctrl abstractions which are no longer needed
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/20221012085002.24099-19-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
3d3db6f024
phy: qcom-qmp-pcie-msm8996: drop start and pwrdn-ctrl abstraction
...
Drop the start and pwrdn-ctrl abstractions which are no longer needed
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/20221012085002.24099-18-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
73ad6a9dd5
phy: qcom-qmp-pcie: add config sanity checks
...
The driver expects every configuration to set the pwrdn_ctrl and
phy_status masks. Add some probe WARN_ON_ONCE() to probe to catch any
new driver support that fails to provide them.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-17-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
5806b87dea
phy: qcom-qmp-pcie: drop start-ctrl abstraction
...
All PCIe PHYs need to start and stop the SerDes and PCS so drop the
start-ctrl abstraction which is no longer needed 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/20221012085002.24099-16-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
d4b81490fe
phy: qcom-qmp-combo: drop start and pwrdn-ctrl abstraction
...
All USB PHYs need to start and stop the SerDes and PCS so drop the
start-ctrl abstraction which is no longer needed since the QMP driver
split.
Similarly, drop the pwrdn-ctrl abstraction which also is not needed
since the split.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-15-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
7612890b9d
phy: qcom-qmp-usb: increase status polling period
...
It typically takes between one and two milliseconds for the PHY to
become ready after starting it. Increase the tight 3--10 us polling
period to the more reasonable 51--200 us.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012085002.24099-14-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:05 +05:30
Johan Hovold
f5ef85adec
phy: qcom-qmp-usb: clean up status polling
...
Clean up the PHY status polling by dropping the configuration mask which
is no longer needed 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/20221012085002.24099-13-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
7516edbfaf
phy: qcom-qmp-ufs: increase ready polling period
...
It typically takes between one and two milliseconds for the PHY to
become ready after starting it. Increase the tight 3--10 us polling
period to the more reasonable 51--200 us.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012085002.24099-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
2f561b687c
phy: qcom-qmp-ufs: clean up ready polling
...
Clean up the PHY ready polling by dropping the mask variables which are
no longer needed 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/20221012085002.24099-11-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
c8f5c18815
phy: qcom-qmp-ufs: drop unused phy-status config
...
Drop the unused phy-status configuration mask which has never been used
for UFS PHYs.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
0c1154d695
phy: qcom-qmp-combo: increase status polling period
...
It typically takes between one and two milliseconds for the PHY to
become ready after starting it. Increase the tight 3--10 us polling
period to the more reasonable 51--200 us.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012085002.24099-9-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
f7075f4905
phy: qcom-qmp-combo: clean up status polling
...
Clean up the PHY status polling by dropping the configuration mask which
is no longer needed 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/20221012085002.24099-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
3894f6d03c
phy: qcom-qmp-pcie-msm8996: increase status polling period
...
It typically takes between one and two milliseconds for the PHY to
become ready after starting it. Increase the tight 3--10 us polling
period to the more reasonable 51--200 us.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012085002.24099-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
1a3ae97c24
phy: qcom-qmp-pcie-msm8996: clean up ready and status polling
...
Clean up the PHY ready and status polling by dropping the configuration
masks which are no longer needed 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/20221012085002.24099-6-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
5cbeb75a36
phy: qcom-qmp-pcie: increase status polling period
...
It typically takes between one and two milliseconds for the PHY to
become ready after starting it. Increase the tight 3--10 us polling
period to the more reasonable 51--200 us.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012085002.24099-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:04 +05:30
Johan Hovold
2577ba8c39
phy: qcom-qmp-pcie: clean up status polling
...
Clean up the status polling by dropping the ready bit mask which is no
longer needed 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/20221012085002.24099-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:03 +05:30
Johan Hovold
30518b1989
phy: qcom-qmp-pcie: fix ipq6018 initialisation
...
The phy_status mask was never set for IPQ6018 which meant that the
driver would not wait for the PHY to be initialised during power-on and
would never detect PHY initialisation timeouts.
Fixes: 520264db3b ("phy: qcom-qmp: add QMP V2 PCIe PHY support for ipq60xx")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:03 +05:30
Johan Hovold
94b7288ead
phy: qcom-qmp-pcie: fix ipq8074-gen3 initialisation
...
The phy_status mask was never set for IPQ8074 (gen3) which meant that
the driver would not wait for the PHY to be initialised during power-on
and would never detect PHY initialisation timeouts.
Fixes: 334fad1854 ("phy: qcom-qmp-pcie: add IPQ8074 PCIe Gen3 QMP PHY support")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:03 +05:30
Johan Hovold
4a9eac5ae2
phy: qcom-qmp-pcie: fix sc8180x initialisation
...
The phy_status mask was never set for SC8180X which meant that the
driver would not wait for the PHY to be initialised during power-on and
would never detect PHY initialisation timeouts.
Fixes: f839f14e24 ("phy: qcom-qmp: Add sc8180x PCIe support")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012085002.24099-1-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:55:03 +05:30
Vidya Sagar
0983529d75
phy: tegra: p2u: Set ENABLE_L2_EXIT_RATE_CHANGE in calibration
...
Set ENABLE_L2_EXIT_RATE_CHANGE register bit to request UPHY PLL rate change
to Gen1 during initialization. This helps in the below surprise link down
cases,
- Surprise link down happens at Gen3/Gen4 link speed.
- Surprise link down happens and external REFCLK is cut off, which causes
UPHY PLL rate to deviate to an invalid rate.
Signed-off-by: Vidya Sagar <vidyas@nvidia.com >
Link: https://lore.kernel.org/r/20221013183854.21087-9-vidyas@nvidia.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:43:12 +05:30