Skip to contentSkip to conversation

net: mdio: Add IPQ MDIO reset related function

PATCH Applied Luo Jie 3 participants 8 messages Aug 12, 2021 – Aug 16, 2021

Subsystems (5)
lore
Share & tools
lore

Luo Jie

author
#0 lore raw

v3 cover net: mdio: Add IPQ MDIO reset related function

This patch series add the MDIO reset features, which includes configuring MDIO clock source frequency and indicating CMN_PLL that ethernet LDO has been ready, this ethernet LDO is dedicated in the IPQ5018 platform.

Specify more chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx supported by this MDIO driver.

Changes in v3:
* simplify the function ipq_mdio_reset.

Changes in v2:
* Addressed review comments (Andrew Lunn).
* Remove the IS_ERR().
* make binding patch part of series.
* document the property 'reg' and 'clock'.

Changes in v1:
* make MDIO_IPQ4019 unchanged for backwards compatibility.
* remove the PHY reset functions

Luo Jie (3):
net: mdio: Add the reset function for IPQ MDIO driver
MDIO: Kconfig: Specify more IPQ chipset supported
dt-bindings: net: Add the properties for ipq4019 MDIO

 .../bindings/net/qcom,ipq4019-mdio.yaml       | 15 ++++++-
 drivers/net/mdio/Kconfig                      |  3 +-
 drivers/net/mdio/mdio-ipq4019.c               | 44 +++++++++++++++++++
 3 files changed, 60 insertions(+), 2 deletions(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
author
#1 lore raw

PATCH v3 1/3 net: mdio: Add the reset function for IPQ MDIO driver

1. configure the MDIO clock source frequency.
2. the LDO resource is needed to configure the ethernet LDO available for CMN_PLL.

---
 drivers/net/mdio/Kconfig        |  1 +
 drivers/net/mdio/mdio-ipq4019.c | 43 +++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
drivers/net/mdio/Kconfig +1 -0
index 99a6c13a11af..a94d34cc7dc1 100644
@@ -169,6 +169,7 @@ config MDIO_OCTEON
 config MDIO_IPQ4019
 	tristate "Qualcomm IPQ4019 MDIO interface support"
 	depends on HAS_IOMEM && OF_MDIO
+	depends on COMMON_CLK
 	help
 	  This driver supports the MDIO interface found in Qualcomm
 	  IPQ40xx series Soc-s.
drivers/net/mdio/mdio-ipq4019.c +43 -0

76 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
author
#3 lore raw

PATCH v3 2/3 MDIO: Kconfig: Specify more IPQ chipset supported

In reply to Luo Jie

The IPQ MDIO driver currently supports the chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx.

Add the compatible 'qcom,ipq5018-mdio' because of ethernet LDO dedicated to the IPQ5018 platform.

---
 drivers/net/mdio/Kconfig        | 2 +-
 drivers/net/mdio/mdio-ipq4019.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/mdio/Kconfig +1 -1
index a94d34cc7dc1..6da1fcb25847 100644
@@ -172,7 +172,7 @@ config MDIO_IPQ4019
 	depends on COMMON_CLK
 	help
 	  This driver supports the MDIO interface found in Qualcomm
-	  IPQ40xx series Soc-s.
+	  IPQ40xx, IPQ60xx, IPQ807x and IPQ50xx series Soc-s.
 
 config MDIO_IPQ8064
 	tristate "Qualcomm IPQ8064 MDIO interface support"
drivers/net/mdio/mdio-ipq4019.c +1 -0
index e14d437e42a8..14e08b786334 100644
@@ -258,6 +258,7 @@ static int ipq4019_mdio_remove(struct platform_device *pdev)
 
 static const struct of_device_id ipq4019_mdio_dt_ids[] = {
 	{ .compatible = "qcom,ipq4019-mdio" },
+	{ .compatible = "qcom,ipq5018-mdio" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ipq4019_mdio_dt_ids);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer Reviewed-by on v3 2/3
#4 lore raw

Re: [PATCH v3 2/3] MDIO: Kconfig: Specify more IPQ chipset supported

Quoted 7 lines · Luo Jie

The IPQ MDIO driver currently supports the chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx.

Add the compatible 'qcom,ipq5018-mdio' because of ethernet LDO dedicated to the IPQ5018 platform.

Andrew

author
#5 lore raw

PATCH v3 3/3 dt-bindings: net: Add the properties for ipq4019 MDIO

In reply to Luo Jie

The new added properties resource "reg" is for configuring ethernet LDO in the IPQ5018 chipset, the property "clocks" is for configuring the MDIO clock source frequency.

---
 .../bindings/net/qcom,ipq4019-mdio.yaml           | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml +14 -1
index 0c973310ada0..2af304341772 100644
@@ -14,7 +14,9 @@ allOf:
 
 properties:
   compatible:
-    const: qcom,ipq4019-mdio
+    enum:
+      - qcom,ipq4019-mdio
+      - qcom,ipq5018-mdio
 
   "#address-cells":
     const: 1
@@ -23,7 +25,18 @@ properties:
     const: 0
 
   reg:
+    minItems: 1
+    maxItems: 2
+    description:
+      the first Address and length of the register set for the MDIO controller.
+      the second Address and length of the register for ethernet LDO, this second
+      address range is only required by the platform IPQ50xx.
+
+  clocks:
     maxItems: 1
+    description: |
+      MDIO clock source frequency fixed to 100MHZ, this clock should be specified
+      by the platform IPQ807x, IPQ60xx and IPQ50xx.
 
 required:
   - compatible
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer Reviewed-by on v3 3/3
#6 lore raw

Re: [PATCH v3 3/3] dt-bindings: net: Add the properties for ipq4019 MDIO

Quoted 6 lines · Luo Jie

The new added properties resource "reg" is for configuring ethernet LDO in the IPQ5018 chipset, the property "clocks" is for configuring the MDIO clock source frequency.

---

Andrew

#7 lore raw
In reply to Luo Jie
This series was applied to netdev/net-next.git (refs/heads/master):

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Thu, 12 Aug 2021 18:06:39 +0800 you wrote:

This patch series add the MDIO reset features, which includes configuring MDIO clock source frequency and indicating CMN_PLL that ethernet LDO has been ready, this ethernet LDO is dedicated in the IPQ5018 platform.

Specify more chipset IPQ40xx, IPQ807x, IPQ60xx and IPQ50xx supported by this MDIO driver.

[...]

Here is the summary with links:
- [v3,1/3] net: mdio: Add the reset function for IPQ MDIO driver

    https://git.kernel.org/netdev/net-next/c/23a890d493e3
  - [v3,2/3] MDIO: Kconfig: Specify more IPQ chipset supported
    https://git.kernel.org/netdev/net-next/c/c76ee26306b2
  - [v3,3/3] dt-bindings: net: Add the properties for ipq4019 MDIO
    https://git.kernel.org/netdev/net-next/c/2a4c32e767ad

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html