# \[PATCH v2 0/2\] phy: ath79-usb: support the AR934x+ analog reset

- Subsystems: GENERIC PHY FRAMEWORK, ARM/QUALCOMM MAILING LIST, ATHEROS 71XX/9XXX USB PHY DRIVER, OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, THE REST
- Maintainers: Vinod Koul, Alban Bedel, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds
- Series: 2 patches touching 2 files, +67/-4
- List: linux-phy
- 4 messages, 2 authors
- Page: https://ratatoskr.run/linux-phy/2026/11/17894607/t

## \[PATCH v2 0/2\] phy: ath79-usb: support the AR934x+ analog reset

- From: Rosen Penev \<hidden\>
- Date: 2026-11-09 04:05:14 
- Message: https://ratatoskr.run/linux-phy/2026/11/17894607.md

```text
From AR934x on, the analog part of the ath79 USB PHY has its own reset,
which the old platform code handled outside the PHY driver. Patch 1
adds the optional third "phy-analog" reset to the binding, along with
AR9340 and QCA9550 compatibles that require it. Patch 2 makes the
driver take and sequence that reset.

Changes in v2:
- Send the binding and driver changes together as one series. v1 sent
  the driver patch alone, so it used a "phy-analog" reset name that the
  binding on the list did not yet document.
- No code changes.

Claude Code (Claude Opus 5.5) was used while preparing this series.
I reviewed and tested every change and take responsibility for it.

Rosen Penev (2):
  dt-bindings: phy: qca,ar7100-usb-phy: add AR9340, QCA9550 and the
    analog reset
  phy: ath79-usb: support the analog reset

 .../bindings/phy/qca,ar7100-usb-phy.yaml      | 38 ++++++++++++++++++-
 drivers/phy/qualcomm/phy-ath79-usb.c          | 33 ++++++++++++++--
 2 files changed, 67 insertions(+), 4 deletions(-)

-- 
2.56.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
```

## \[PATCH v2 1/2\] dt-bindings: phy: qca,ar7100-usb-phy: add AR9340, QCA9550 and the analog reset

- From: Rosen Penev \<hidden\>
- Date: 2026-11-09 04:05:15 
- Message: https://ratatoskr.run/linux-phy/2026/11/17894608.md

```text
From AR934x on, the analog part of the USB PHY has its own reset,
which has to be released along with the PHY one. Add it as a third,
optional reset, and add compatibles for AR934x and QCA955x, which need
it.

Signed-off-by: Rosen Penev <redacted>
---
 .../bindings/phy/qca,ar7100-usb-phy.yaml      | 38 ++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/phy/qca,ar7100-usb-phy.yaml b/Documentation/devicetree/bindings/phy/qca,ar7100-usb-phy.yaml
index 029665530829..358b3f345c12 100644
--- a/Documentation/devicetree/bindings/phy/qca,ar7100-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qca,ar7100-usb-phy.yaml
@@ -11,8 +11,13 @@ maintainers:
 
 properties:
   compatible:
-    items:
+    oneOf:
       - const: qca,ar7100-usb-phy
+      - items:
+          - enum:
+              - qca,ar9340-usb-phy
+              - qca,qca9550-usb-phy
+          - const: qca,ar7100-usb-phy
 
   reset-names:
     description: Names of reset lines in order.
@@ -20,6 +25,7 @@ properties:
     items:
       - const: phy
       - const: suspend-override
+      - const: phy-analog
 
   resets:
     description: References to the reset controllers.
@@ -27,6 +33,7 @@ properties:
     items:
       - description: Reset controller for phy
       - description: Reset controller for suspend-override
+      - description: Reset controller for the analog part of the phy
 
   '#phy-cells':
     const: 0
@@ -37,6 +44,27 @@ required:
   - resets
   - '#phy-cells'
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qca,ar9340-usb-phy
+              - qca,qca9550-usb-phy
+    then:
+      properties:
+        resets:
+          minItems: 3
+        reset-names:
+          minItems: 3
+    else:
+      properties:
+        resets:
+          maxItems: 2
+        reset-names:
+          maxItems: 2
+
 additionalProperties: false
 
 examples:
@@ -47,3 +75,11 @@ examples:
         resets = <&rst 4>, <&rst 3>;
         #phy-cells = <0>;
     };
+
+  - |
+    usb-phy {
+        compatible = "qca,qca9550-usb-phy", "qca,ar7100-usb-phy";
+        reset-names = "phy", "suspend-override", "phy-analog";
+        resets = <&rst 4>, <&rst 3>, <&rst 11>;
+        #phy-cells = <0>;
+    };
-- 
2.56.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
```

## \[PATCH v2 2/2\] phy: ath79-usb: support the analog reset

- From: Rosen Penev \<hidden\>
- Date: 2026-11-09 04:05:17 
- Message: https://ratatoskr.run/linux-phy/2026/11/17894616.md

```text
From AR934x on, the analog part of the USB PHY has its own reset. The
old platform code released it after the PHY reset on AR934x, and left
it to the bootloader on QCA955x.

Take it as an optional "phy-analog" reset, release it after the PHY one
when powering on, and assert it first when powering off. This is the
reset handling OpenWrt has used on its AR934x, QCA955x and QCA956x
boards.

Signed-off-by: Rosen Penev <redacted>
---
 drivers/phy/qualcomm/phy-ath79-usb.c | 33 +++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-ath79-usb.c b/drivers/phy/qualcomm/phy-ath79-usb.c
index 8e9565846b2f..1e7868fc0b5f 100644
--- a/drivers/phy/qualcomm/phy-ath79-usb.c
+++ b/drivers/phy/qualcomm/phy-ath79-usb.c
@@ -12,6 +12,7 @@
 
 struct ath79_usb_phy {
 	struct reset_control *reset;
+	struct reset_control *analog_reset;
 	/* The suspend override logic is inverted, hence the no prefix
 	 * to make the code a bit easier to understand.
 	 */
@@ -30,7 +31,19 @@ static int ath79_usb_phy_power_on(struct phy *phy)
 	}
 
 	err = reset_control_deassert(priv->reset);
-	if (err && priv->no_suspend_override)
+	if (err)
+		goto err_suspend_override;
+
+	err = reset_control_deassert(priv->analog_reset);
+	if (err) {
+		reset_control_assert(priv->reset);
+		goto err_suspend_override;
+	}
+
+	return 0;
+
+err_suspend_override:
+	if (priv->no_suspend_override)
 		reset_control_deassert(priv->no_suspend_override);
 
 	return err;
@@ -41,14 +54,22 @@ static int ath79_usb_phy_power_off(struct phy *phy)
 	struct ath79_usb_phy *priv = phy_get_drvdata(phy);
 	int err = 0;
 
-	err = reset_control_assert(priv->reset);
+	err = reset_control_assert(priv->analog_reset);
 	if (err)
 		return err;
 
+	err = reset_control_assert(priv->reset);
+	if (err) {
+		reset_control_deassert(priv->analog_reset);
+		return err;
+	}
+
 	if (priv->no_suspend_override) {
 		err = reset_control_deassert(priv->no_suspend_override);
-		if (err)
+		if (err) {
 			reset_control_deassert(priv->reset);
+			reset_control_deassert(priv->analog_reset);
+		}
 	}
 
 	return err;
@@ -78,6 +99,12 @@ static int ath79_usb_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->no_suspend_override))
 		return PTR_ERR(priv->no_suspend_override);
 
+	/* AR934x and later also hold the analog part in reset */
+	priv->analog_reset = devm_reset_control_get_optional(&pdev->dev,
+							     "phy-analog");
+	if (IS_ERR(priv->analog_reset))
+		return PTR_ERR(priv->analog_reset);
+
 	phy = devm_phy_create(&pdev->dev, NULL, &ath79_usb_phy_ops);
 	if (IS_ERR(phy))
 		return PTR_ERR(phy);
-- 
2.56.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
```

## Re: \[PATCH v2 1/2\] dt-bindings: phy: qca,ar7100-usb-phy: add AR9340, QCA9550 and the analog reset

- From: Krzysztof Kozlowski \<krzk@kernel.org\>
- Date: 2026-11-09 13:11:01 
- Message: https://ratatoskr.run/linux-phy/2026/11/17897192.md

```text
On Sun, Nov 08, 2026 at 08:04:50PM -0800, Rosen Penev wrote:
> >From AR934x on, the analog part of the USB PHY has its own reset,
> which has to be released along with the PHY one. Add it as a third,
> optional reset, and add compatibles for AR934x and QCA955x, which need
> it.
> 
> Signed-off-by: Rosen Penev <redacted>
> ---
>  .../bindings/phy/qca,ar7100-usb-phy.yaml      | 38 ++++++++++++++++++-
>  1 file changed, 37 insertions(+), 1 deletion(-)

Reviewed-by: Krzysztof Kozlowski <redacted>

Best regards,
Krzysztof


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
```
