Skip to contentSkip to conversation

reset: bcm6345: add support for internal ephy resets on bcm63xx

PATCH Applied Kyle Hendry 4 participants 12 messages Jul 9, 2025 – Aug 14, 2025

Subsystems (2)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover reset: bcm6345: add support for internal ephy resets on bcm63xx

bcm63xx SoCs have a register in the gpio controller that controls some of the phy functionality. Some of the bits reset individual phys and need a driver to set.

The other fields in the register configure phy power and will be set by the network device driver.

Kyle Hendry (6):
reset: bcm6345: add support for bcm63xx ephy control register
dt-bindings: reset: add compatible for bcm63xx ephy control
dt-bindings: reset: add BCM63268 ephy reset definitions
dt-bindings: reset: add BCM6318 ephy reset definitions
dt-bindings: reset: add BCM6362 ephy reset definitions
dt-bindings: reset: add BCM6328 ephy reset definitions

 .../devicetree/bindings/reset/brcm,bcm6345-reset.yaml        | 4 +++-
 drivers/reset/reset-bcm6345.c                                | 1 +
 include/dt-bindings/reset/bcm6318-reset.h                    | 5 +++++
 include/dt-bindings/reset/bcm63268-reset.h                   | 4 ++++
 include/dt-bindings/reset/bcm6328-reset.h                    | 5 +++++
 include/dt-bindings/reset/bcm6362-reset.h                    | 5 +++++
 6 files changed, 23 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/6 reset: bcm6345: add support for bcm63xx ephy control register

The ephy control register on bcm63xx SoCs contain bits for resetting individual internal phys. Use the existing bcm6345-reset driver to set bits.

---
 drivers/reset/reset-bcm6345.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-bcm6345.c +1 -0
index aa9353439e70..56518f7bfbb3 100644
@@ -119,6 +119,7 @@ static int bcm6345_reset_probe(struct platform_device *pdev)
 
 static const struct of_device_id bcm6345_reset_of_match[] = {
 	{ .compatible = "brcm,bcm6345-reset" },
+	{ .compatible = "brcm,bcm63xx-ephy-ctrl" },
 	{ /* sentinel */ },
 };
 
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/6] reset: bcm6345: add support for bcm63xx ephy control register

Quoted 14 lines · Kyle Hendry

The ephy control register on bcm63xx SoCs contain bits for resetting individual internal phys. Use the existing bcm6345-reset driver to set bits.

---
 drivers/reset/reset-bcm6345.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-bcm6345.c +0 -0
index aa9353439e70..56518f7bfbb3 100644

drivers/reset/reset-bcm6345.c static int bcm6345_reset_probe(struct platform_device *pdev) · line 122

Quoted 4 lines
drivers/reset/reset-bcm6345.c +1 -0
@@ -119,6 +119,7 @@ static int bcm6345_reset_probe(struct platform_device *pdev)
 
 static const struct of_device_id bcm6345_reset_of_match[] = {
 	{ .compatible = "brcm,bcm6345-reset" },
+	{ .compatible = "brcm,bcm63xx-ephy-ctrl" },

So devices are compatible?

Best regards,
Krzysztof

#3 lore raw

PATCH 2/6 dt-bindings: reset: add compatible for bcm63xx ephy control

In reply to Kyle Hendry

Add compatible string for bcm63xx ephy control.

---
 .../devicetree/bindings/reset/brcm,bcm6345-reset.yaml         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml +3 -1
index 00150b93fca0..b8a320bb1776 100644
@@ -13,7 +13,9 @@ maintainers:
 
 properties:
   compatible:
-    const: brcm,bcm6345-reset
+    enum:
+      - brcm,bcm6345-reset
+      - brcm,bcm63xx-ephy-ctrl
 
   reg:
     maxItems: 1
Signature · 1 line
2.43.0
#5 lore raw

Re: [PATCH 2/6] dt-bindings: reset: add compatible for bcm63xx ephy control

In reply to Kyle Hendry
Quoted 12 lines · Kyle Hendry

Add compatible string for bcm63xx ephy control.

---
 .../devicetree/bindings/reset/brcm,bcm6345-reset.yaml         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml +0 -0
index 00150b93fca0..b8a320bb1776 100644

Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml maintainers: · line 18

Quoted 7 lines
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml +3 -1
@@ -13,7 +13,9 @@ maintainers:
 
 properties:
   compatible:
-    const: brcm,bcm6345-reset
+    enum:
+      - brcm,bcm6345-reset
+      - brcm,bcm63xx-ephy-ctrl

Don't use wildcards.

Best regards,
Krzysztof

#6 lore raw

PATCH 3/6 dt-bindings: reset: add BCM63268 ephy reset definitions

In reply to Kyle Hendry

Add definitions for resets in the ephy control register.

---
 include/dt-bindings/reset/bcm63268-reset.h | 4 ++++
 1 file changed, 4 insertions(+)
include/dt-bindings/reset/bcm63268-reset.h +4 -0
index d87a7882782a..676a62c9777b 100644
@@ -27,4 +27,8 @@
 #define BCM63268_TRST_HW	30
 #define BCM63268_TRST_POR	31
 
+#define BCM63268_RST_EPHY1 0
+#define BCM63268_RST_EPHY2 1
+#define BCM63268_RST_EPHY3 2
+
 #endif /* __DT_BINDINGS_RESET_BCM63268_H */
Signature · 1 line
2.43.0
maintainer
#7 lore raw

Re: [PATCH 3/6] dt-bindings: reset: add BCM63268 ephy reset definitions

Quoted 12 lines · Kyle Hendry

Add definitions for resets in the ephy control register.

---
 include/dt-bindings/reset/bcm63268-reset.h | 4 ++++
 1 file changed, 4 insertions(+)
include/dt-bindings/reset/bcm63268-reset.h +0 -0
index d87a7882782a..676a62c9777b 100644

include/dt-bindings/reset/bcm63268-reset.h line 32

Quoted 6 lines
include/dt-bindings/reset/bcm63268-reset.h +3 -0
@@ -27,4 +27,8 @@
 #define BCM63268_TRST_HW	30
 #define BCM63268_TRST_POR	31
 
+#define BCM63268_RST_EPHY1 0
+#define BCM63268_RST_EPHY2 1
+#define BCM63268_RST_EPHY3 2

These are kind of pointless IMO. The provider is only for the EPHYs and your number is just index+1.

Rob

#8 lore raw

PATCH 4/6 dt-bindings: reset: add BCM6318 ephy reset definitions

In reply to Kyle Hendry

Add definitions for resets in the ephy control register.

---
 include/dt-bindings/reset/bcm6318-reset.h | 5 +++++
 1 file changed, 5 insertions(+)
include/dt-bindings/reset/bcm6318-reset.h +5 -0
index f882662505ea..33d06b45704f 100644
@@ -17,4 +17,9 @@
 #define BCM6318_RST_PHYMIPS	11
 #define BCM6318_RST_HOSTMIPS	12
 
+#define BCM6318_RST_EPHY1 0
+#define BCM6318_RST_EPHY2 1
+#define BCM6318_RST_EPHY3 2
+#define BCM6318_RST_EPHY4 3
+
 #endif /* __DT_BINDINGS_RESET_BCM6318_H */
Signature · 1 line
2.43.0
#9 lore raw

PATCH 5/6 dt-bindings: reset: add BCM6362 ephy reset definitions

In reply to Kyle Hendry

Add definitions for resets in the ephy control register.

---
 include/dt-bindings/reset/bcm6362-reset.h | 5 +++++
 1 file changed, 5 insertions(+)
include/dt-bindings/reset/bcm6362-reset.h +5 -0
index 7ebb0546e0ab..503fd651eba7 100644
@@ -19,4 +19,9 @@
 #define BCM6362_RST_FAP		13
 #define BCM6362_RST_WLAN_UBUS	14
 
+#define BCM6362_RST_EPHY1 0
+#define BCM6362_RST_EPHY2 1
+#define BCM6362_RST_EPHY3 2
+#define BCM6362_RST_EPHY4 3
+
 #endif /* __DT_BINDINGS_RESET_BCM6362_H */
Signature · 1 line
2.43.0
#10 lore raw

PATCH 6/6 dt-bindings: reset: add BCM6328 ephy reset definitions

In reply to Kyle Hendry

Add definitions for resets in the ephy control register.

---
 include/dt-bindings/reset/bcm6328-reset.h | 5 +++++
 1 file changed, 5 insertions(+)
include/dt-bindings/reset/bcm6328-reset.h +5 -0
index 0f3df87d47af..f0a164af4105 100644
@@ -15,4 +15,9 @@
 #define BCM6328_RST_PCIE_EXT	9
 #define BCM6328_RST_PCIE_HARD	10
 
+#define BCM6328_RST_EPHY1 0
+#define BCM6328_RST_EPHY2 1
+#define BCM6328_RST_EPHY3 2
+#define BCM6328_RST_EPHY4 3
+
 #endif /* __DT_BINDINGS_RESET_BCM6328_H */
Signature · 1 line
2.43.0
maintainer Applied
#11 lore raw
In reply to Kyle Hendry
Quoted 10 lines · Kyle Hendry

bcm63xx SoCs have a register in the gpio controller that controls some of the phy functionality. Some of the bits reset individual phys and need a driver to set.

The other fields in the register configure phy power and will be set by the network device driver.

Kyle Hendry (6):
reset: bcm6345: add support for bcm63xx ephy control register
dt-bindings: reset: add compatible for bcm63xx ephy control

[...]

Applied patches 1 and 2 to reset/next (in inverse order), thanks!

[2/6] dt-bindings: reset: add compatible for bcm63xx ephy control

      https://git.pengutronix.de/cgit/pza/linux/commit/?id=a341bcfbfa74
[1/6] reset: bcm6345: add support for bcm63xx ephy control register
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=6e273caeacf0

Do you agree that patches 2-6 are not necessary?

regards
Philipp