Johan Hovold
64e1f12b26
phy: qcom-qmp-usb: drop redundant clock allocation
...
Since the QMP driver split, there is no reason to allocate the
fixed-rate pipe clock structure separately from the driver data.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221111094239.11547-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-24 22:55:17 +05:30
Johan Hovold
905abf1229
phy: qcom-qmp: drop unused type header
...
The PHY type defines are no longer used in the PCIe, UFS and USB QMP
drivers so drop the corresponding include.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221111094239.11547-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-24 22:55:17 +05:30
Johan Hovold
3b41b61a2f
phy: qcom-qmp-usb: drop sc8280xp reference-clock source
...
The source clock for the reference clock is not used by the PHY directly
and should not be described by the devicetree (instead this relationship
should be modelled in the clock driver).
Drop the driver management of the reference-clock source for SC8280XP.
Once the other clock drivers have been updated, the corresponding change
can be done also for the other QMP v4 platforms.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Bjorn Andersson <andersson@kernel.org >
Link: https://lore.kernel.org/r/20221111093857.11360-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-11-24 22:53:57 +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
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
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
38cd167d1f
phy: qcom-qmp-usb: drop power-down delay config
...
The power-down delay was included in the first version of the QMP driver
as an optional delay after powering on the PHY (using
POWER_DOWN_CONTROL) and just before starting it. Later changes modified
this sequence by powering on before initialising the PHY, but the
optional delay stayed where it was (i.e. before starting the PHY).
The vendor driver does not use a delay before starting the PHY and this
is likely not needed on any platform unless there is a corresponding
delay in the vendor kernel init sequence tables (i.e. in devicetree).
Let's keep the delay for now, but drop the redundant delay period
configuration while increasing the unnecessarily low timer slack
somewhat.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012081241.18273-15-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:42:29 +05:30
Johan Hovold
898ab85d6b
phy: qcom-qmp-usb: drop sc8280xp power-down delay
...
The SC8280XP PHY does not need a delay before starting the PHY (which is
what the has_pwrdn_delay config option really controls) so drop the
unnecessary delay.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012081241.18273-14-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:42:29 +05:30
Johan Hovold
9d452c3ac2
phy: qcom-qmp-usb: drop unused in-layout configuration
...
The QMP USB PHY driver does not use the "in-layout" configuration macro
to configure registers that are typically accessed using "regs_layout"
arrays (e.g. QPHY_START_CTRL) so drop this unused feature.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20221012081241.18273-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:42:28 +05:30
Johan Hovold
17302d3630
phy: qcom-qmp: drop superfluous comments
...
Drop some unnecessary or incorrect comments.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012081241.18273-3-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:42:28 +05:30
Johan Hovold
28d74fc36a
phy: qcom-qmp: drop regulator error message
...
Regulator core already logs an error message in case requesting a
regulator fails so drop the mostly redundant error message from probe.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221012081241.18273-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-28 17:42:28 +05:30
Johan Hovold
645d3d0470
phy: qcom-qmp-usb: clean up power-down handling
...
Always define the POWER_DOWN_CONTROL register instead of falling back to
the v2 (and v3) offset during power on and power off.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20221017065013.19647-10-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-17 13:45:47 +05:30
Johan Hovold
8d3bf72497
phy: qcom-qmp: fix obsolete lane comments
...
All QMP drivers but the MSM8996 and combo ones handle exactly one PHY
and the corresponding memory resources are not per-lane, but per PHY.
Update the obsolete comments.
Reviewed-by: Neil Armstrong <neil.armstrong@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/20221017065013.19647-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-10-17 13:45:46 +05:30
Yuan Can
add7000bdd
phy: qcom-qmp-usb: Use dev_err_probe() to simplify code
...
In the probe path, dev_err() can be replaced with dev_err_probe()
which will check if error code is -EPROBE_DEFER and prints the
error name. It also sets the defer probe reason which can be
checked later through debugfs.
Signed-off-by: Yuan Can <yuancan@huawei.com >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Andrew Halaney <ahalaney@redhat.com >
Link: https://lore.kernel.org/r/20220924070300.25080-5-yuancan@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 13:03:49 +05:30
Johan Hovold
a73a19ea38
phy: qcom-qmp-usb: consolidate lane config
...
For legacy reasons, there are two configuration parameters that appear
to describe the number of lanes a PHY has, even if "nlanes" was actually
used for a different purpose.
Replace them both with a new field simply named "lanes".
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-17-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
b4e9da4d96
phy: qcom-qmp: drop unused index field
...
Only the MSM8996 PCIe QMP driver uses the index field so drop it from
the other drivers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:57 +05:30
Johan Hovold
ec1f303b3e
phy: qcom-qmp: drop unused forward declarations
...
Only the combo QMP driver needs a forward declaration of struct qmp_phy.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-8-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
fe2da191f1
phy: qcom-qmp-usb: drop init and exit wrappers
...
Drop the unnecessary PHY init and exit callback wrappers.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-7-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
44d1b5ad17
phy: qcom-qmp-usb: drop unused type from config
...
The configuration PHY type is no longer needed since the QMP driver
split so drop it from the configuration and suspend callbacks.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org >
Link: https://lore.kernel.org/r/20220920073826.20811-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-24 10:59:56 +05:30
Johan Hovold
264dac74e7
phy: qcom-qmp-usb: drop legacy DT workaround
...
Commit 5e17b95d98 ("phy: qcom-qmp: Utilize fully-specified DT
registers") added a workaround for legacy devicetrees which did not
specify register regions for the second lane of some dual-lane PHYs.
At the time, the only two dual-lane PHYs supported by mainline were
"qcom,sdm845-qmp-usb3-phy" and "qcom,sdm845-qmp-ufs-phy" and they had
been added to the binding less than six months before the binding was
fixed.
Presumably no one is using four-year old SDM845 dtbs with mainline
anymore so drop the workaround for malformed devicetrees. In the
unlikely event that anyone complains, we can consider reverting.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Link: https://lore.kernel.org/r/20220916102340.11520-12-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-09-20 11:31:17 +05:30
Johan Hovold
a5d6b1ac56
phy: qcom-qmp-usb: 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.
Two bindings currently rely on overlapping mappings for the PCS region
so fallback to non-exclusive mappings for those for now.
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-7-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
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
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
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
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
Dmitry Baryshkov
c1ab64aaac
phy: qcom-qmp-usb: define QPHY_V2_PCS_PLL_LOCK_CHK_DLY_TIME register
...
Other PHYs tables directly reference QPHY_PLL_LOCK_CHK_DLY_TIME register
without using reglayout. Define corresponding register to be used by
msm8996 PHY tables and use it directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220705094320.1313312-29-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-07 10:36:01 +05:30
Dmitry Baryshkov
d36e341a17
phy: qcom-qmp-usb: replace FLL layout writes for msm8996
...
Other PHYs tables directly reference FLL registers without using
reglayout. Define corresponding registers to be used by msm8996 PHY
tables and use them directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220705094320.1313312-28-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-07 10:36:01 +05:30
Dmitry Baryshkov
fc270d136a
phy: qcom-qmp: split PCS_UFS V3 symbols to separate header
...
Several registers defined in the PCS V3 namespace in reality belong to
the PCS_UFS V3 register space. Move them to the separate header and
rename them to explicitly mention PCS_UFS. While we are at it, correct
one register in the msm8998_usb3_pcs_tbl table to use PCS register name.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220705094320.1313312-21-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-07 10:36:00 +05:30
Dmitry Baryshkov
6cad29831d
phy: qcom-qmp: rename QMP V2 PCS registers
...
Rename QMP V2 PCS registers to follow the usual pattern of
QPHY_V2_PCS_*.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220705094320.1313312-7-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-07 10:35:59 +05:30
Dmitry Baryshkov
fc64623637
phy: qcom-qmp-combo,usb: add support for separate PCS_USB region
...
Different QMP USB PHYs might have different offset from PCS to PCS_USB
register space, but the same PCS_USB register layout. Add separate
PCS_USB region space and merge related PCS_USB definitions.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220705094320.1313312-4-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-07 10:35:58 +05:30
Johan Hovold
5d5b7d509f
phy: qcom-qmp-usb: clean up pipe clock handling
...
Clean up the pipe clock handling by using dev_err_probe() to handle
probe deferral and dropping the obsolete comment that claimed that the
pipe clock was optional for some other PHY types.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org >
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220623113314.29761-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-07-05 12:33:26 +05:30
Dmitry Baryshkov
e991c2ee65
phy: qcom-qmp-usb: use bulk reset_control API
...
Switch qcom-qmp-usb driver to use reset_control_bulk_assert / _deassert
functions rather than hardcoding the loops in the driver itself.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org > # UFS, PCIe and USB on SC8180X
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220607213203.2819885-31-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-06-09 23:49:42 +05:30
Dmitry Baryshkov
65753f38f5
phy: qcom-qmp-usb: drop multi-PHY support
...
Each USB QMP PHY device provides just a single UFS PHY. Drop support
for handling multiple child PHYs. Use phy->init_count to check if the
PHY was initialized rather than duplicating this count.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org > # UFS, PCIe and USB on SC8180X
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220607213203.2819885-27-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-06-09 23:49:42 +05:30
Dmitry Baryshkov
faf83af5d5
phy: qcom-qmp-usb: cleanup the driver
...
Remove the conditionals and options that are not used by any of USB PHY
devices.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org > # UFS, PCIe and USB on SC8180X
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220607213203.2819885-24-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-06-09 23:49:42 +05:30
Dmitry Baryshkov
86f5ddddcd
phy: qcom-qmp-usb: drop support for non-USB PHY types
...
Drop remaining support for PHY types other than USB.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org > # UFS, PCIe and USB on SC8180X
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org >
Link: https://lore.kernel.org/r/20220607213203.2819885-19-dmitry.baryshkov@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org >
2022-06-09 23:49:41 +05:30