phy: qcom: add the SGMII SerDes PHY for firmware-managed systems
v18 cover phy: qcom: add the SGMII SerDes PHY for firmware-managed systems
Vinod: Sorry for the noise but sashiko pointed out I forgot about one comment from Krzysztof. This still should be good to go, there were no more sashiko comments and this is just a rebase + a commit message tweak.
Add support for the firmware-managed variant of the Serdes PHY present on the Qualcomm sa8255p platforms.
---
Changes in v18:
- Drop power-domain-names (Krzysztof)
- Link to v17: https://patch.msgid.link/[email protected]
Changes in v17:
- Extended the commit message for patch 2 (Manivannan)
- Rebased on top of v7.4-rc1
- Link to v16: https://patch.msgid.link/[email protected]
Changes in v16:
- Split out the PHY patches into a separate series
- Set the SerDes line rate through the OPP API
- Link to v15: https://patch.msgid.link/[email protected]
Changes in v15:
- Squash patches 6 and 7 to avoid a potential hang-on-resume regression
(Sashiko)
- Fix the AUTONEG_DISABLE early return path in forced mode (Sashiko)
- Fix Kconfig dependencies on generic power domains (Sashiko)
- Set the performance level back to 0 on unbind in the PHY driver
(Sashiko)
- Use devm_pm_runtime_enable() where applicable
- Link to v14: https://patch.msgid.link/[email protected]
Changes in v14:
- let genpd's own runtime suspend/resume callbacks own the perf state entirely
by calling dev_pm_genpd_set_performance_state() in set_mode()
unconditionally in the sgmii PHY driver
- drop usleep_range() from the PHY driver when setting the state as the level
setting is already synchronous
- add missing power-domains limits for ma35d1/k3-dwmac
- fix ordering of clearing the sgmii loopback
- configure the wrapper clocks synchronously in scmi setup
- Link to v13: https://patch.msgid.link/[email protected]
Changes in v13:
- Reapply OPP on speed change in the PHY driver
- Use linux/device-id/of.h instead of mod_devicetable.h
- Fix the "invalid PTP clock rate" warning on sa8255p
- Add commits necessary to allow correct link speed change with SCMI
- Link to v12: https://patch.msgid.link/[email protected]
Changes in v12:
- Drop the power-domain-names from the SGMII PHY DT bindings
- Add missing Kconfig dependency on PM for the new SGMII PHY driver
- Link to v11: https://patch.msgid.link/[email protected]
Changes in v11:
- Take a new approach: add a dedicated driver for the firmware-managed
SGMII PHY and simplify changes made to the MAC driver
- Link to v10: https://patch.msgid.link/[email protected]
Changes in v10:
- Fix unit address in DT example
- Link to v9: https://patch.msgid.link/[email protected]
Changes in v9:
- Rebase on top of current linux-next again
- Link to v8: https://patch.msgid.link/[email protected]
Changes in v8:
- Rebase on top of recent changes in linux-next which required an
extensive rework
- Drop partial R-b tags
- Link to v7: https://patch.msgid.link/[email protected]
Changes in v7:
- Restored the correct authorship after learning git uses .mailmap for
the --author switch
- Rebased on top of changes from Russell
- Fixed resource management issues in error paths
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v6:
- Fix $id value in the bindings
- Drop patch 3/8 from the series
- Update init/exit callback signatures
- Link to v5: https://lore.kernel.org/r/[email protected]
- Link to v6: https://lore.kernel.org/r/[email protected]
Changes in v5:
- Name the DT binding document after the new compatbile
- Add missing space
- Make the power-domains limits stricter
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Remove the phys property from the SCMI bindings
- Mark the power-domain-names property as required
- Set maxItems for power-domains to 1 for all existing bindings to
maintain the current requirements after modifying the value in the
top-level document
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Drop 'power' and 'perf' prefixes from power domain names
- Rebase on top of Russell's changes to dwmac
- Rebase on top of even more changes from Russell that are not yet
in next ([email protected])
- Link to v2: https://lore.kernel.org/all/[email protected]/
Changes in v2:
- Fix the power-domains property in DT bindings
- Rework the DT bindings example
- Drop the DTS patch, it will go upstream separately
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Bartosz Golaszewski (2):
dt-bindings: phy: document the serdes PHY on sa8255p
phy: qcom: add the SGMII SerDes PHY driver for SCMI systems
.../bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml | 45 ++++++++ drivers/phy/qualcomm/Kconfig | 11 ++ drivers/phy/qualcomm/Makefile | 1 + drivers/phy/qualcomm/phy-qcom-sgmii-eth-scmi.c | 113 +++++++++++++++++++++ 4 files changed, 170 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261002-sa8255p-eth-phy-6a0699f98a7a
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>
PATCH v18 1/2 dt-bindings: phy: document the serdes PHY on sa8255p
Describe the SGMII/SerDes PHY present on the Qualcomm sa8255p platforms. This is essentially the same hardware as sa8775p rev3 but the PHY is managed by firmware over SCMI.
--- .../bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+)
Documentation/devicetree/bindings/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,sa8255p-dwmac-sgmii-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SerDes/SGMII ethernet PHY controller (firmware managed) + +maintainers: + - Bartosz Golaszewski <[email protected]> + +description: + The SerDes PHY sits between the MAC and the external PHY and provides + separate Rx Tx lines. + +properties: + compatible: + const: qcom,sa8255p-dwmac-sgmii-phy + + reg: + items: + - description: serdes + + power-domains: + maxItems: 1 + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - "#phy-cells" + - power-domains + +additionalProperties: false + +examples: + - | + phy@8901000 { + compatible = "qcom,sa8255p-dwmac-sgmii-phy"; + reg = <0x08901000 0xe10>; + #phy-cells = <0>; + power-domains = <&scmi7_dvfs 0>; + };
Signature · 1 line
2.47.3
PATCH v18 2/2 phy: qcom: add the SGMII SerDes PHY driver for SCMI systems
In reply to Bartosz GolaszewskiImplement support for the firmware-managed SGMII/SerDes PHY present on Qualcomm platforms. Do this as a separate driver from the HLOS-managed variant as they don't share almost any code. The OPP table is added by the SCMI DVFS perf power domain driver after being fetched from the firmware.
--- drivers/phy/qualcomm/Kconfig | 11 +++ drivers/phy/qualcomm/Makefile | 1 + drivers/phy/qualcomm/phy-qcom-sgmii-eth-scmi.c | 113 +++++++++++++++++++++++++ 3 files changed, 125 insertions(+)
drivers/phy/qualcomm/Kconfig +11 -0
@@ -260,3 +260,14 @@ config PHY_QCOM_SGMII_ETH help Enable this to support the internal SerDes/SGMII PHY on various Qualcomm chipsets. + +config PHY_QCOM_SGMII_ETH_SCMI + tristate "Qualcomm DWMAC SGMII SerDes/PHY driver (firmware managed)" + depends on OF && (ARCH_QCOM || COMPILE_TEST) + depends on PM_GENERIC_DOMAINS + depends on PM_OPP + select GENERIC_PHY + help + Enable this to support the internal SerDes/SGMII PHY on Qualcomm + chipsets where the SerDes hardware (clocks and registers) is owned + by the firmware.
drivers/phy/qualcomm/Makefile +1 -0
@@ -31,3 +31,4 @@ obj-$(CONFIG_PHY_QCOM_USB_SS) += phy-qcom-usb-ss.o obj-$(CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2)+= phy-qcom-snps-femto-v2.o obj-$(CONFIG_PHY_QCOM_IPQ806X_USB) += phy-qcom-ipq806x-usb.o obj-$(CONFIG_PHY_QCOM_SGMII_ETH) += phy-qcom-sgmii-eth.o +obj-$(CONFIG_PHY_QCOM_SGMII_ETH_SCMI) += phy-qcom-sgmii-eth-scmi.o
drivers/phy/qualcomm/phy-qcom-sgmii-eth-scmi.c new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
2.47.3
Quoted 9 lines · Bartosz Golaszewski
Vinod: Sorry for the noise but sashiko pointed out I forgot about one comment from Krzysztof. This still should be good to go, there were no more sashiko comments and this is just a rebase + a commit message tweak.
Add support for the firmware-managed variant of the Serdes PHY present on the Qualcomm sa8255p platforms.
Signed-off-by Bartosz Golaszewski <[email protected]>---
Hi Vinod!
This is now reviewed and has no sashiko comments, could you please queue this in next to allow us to proceed with associated DTS changes making use of this driver?
Thanks,
Bartosz
Quoted 8 lines · Bartosz Golaszewski
Vinod: Sorry for the noise but sashiko pointed out I forgot about one comment from Krzysztof. This still should be good to go, there were no more sashiko comments and this is just a rebase + a commit message tweak.
Add support for the firmware-managed variant of the Serdes PHY present on the Qualcomm sa8255p platforms.
[...]
Applied, thanks!
[1/2] dt-bindings: phy: document the serdes PHY on sa8255p
commit: 0eeaa6e65318b14cfecb3e7e4338f4eca7070c48
[2/2] phy: qcom: add the SGMII SerDes PHY driver for SCMI systems
commit: 4cc9f70c3dc187cd45eac2815117ea81b101a1eeBest regards,
Signature · 1 line
~Vinod