netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control
@ 2025-07-16  0:28 Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:28 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

The gpio controller on some bcm63xx SoCs has a register for
controlling functionality of the internal fast ethernet phys.
These patches allow the b53 driver to enable/disable phy
power.

The register also contains reset bits which will be set by
a reset driver in another patch series:
https://lore.kernel.org/all/20250715234605.36216-1-kylehendrydev@gmail.com/

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Kyle Hendry (8):
  net: dsa: b53: Add phy_enable(), phy_disable() methods
  net: dsa: b53: mmap: Add reference to bcm63xx gpio controller
  dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property
  net: dsa: b53: Define chip IDs for more bcm63xx SoCs
  net: dsa: b53: mmap: Add register layout for bcm63268
  net: dsa: b53: mmap: Add register layout for bcm6318
  net: dsa: b53: mmap: Add register layout for bcm6368
  net: dsa: b53: mmap: Implement bcm63xx ephy power control

 .../devicetree/bindings/net/dsa/brcm,b53.yaml |   5 +
 drivers/net/dsa/b53/b53_common.c              |  27 ++---
 drivers/net/dsa/b53/b53_mmap.c                | 107 +++++++++++++++++-
 drivers/net/dsa/b53/b53_priv.h                |  15 ++-
 4 files changed, 133 insertions(+), 21 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-17 18:44   ` Florian Fainelli
  2025-07-16  0:29 ` [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller Kyle Hendry
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add phy enable/disable to b53 ops to be called when
enabling/disabling ports.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 6 ++++++
 drivers/net/dsa/b53/b53_priv.h   | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 46978757c972..77acc7b8abfb 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -689,6 +689,9 @@ int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
 
 	cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
 
+	if (dev->ops->phy_enable)
+		dev->ops->phy_enable(dev, port);
+
 	if (dev->ops->irq_enable)
 		ret = dev->ops->irq_enable(dev, port);
 	if (ret)
@@ -727,6 +730,9 @@ void b53_disable_port(struct dsa_switch *ds, int port)
 	reg |= PORT_CTRL_RX_DISABLE | PORT_CTRL_TX_DISABLE;
 	b53_write8(dev, B53_CTRL_PAGE, B53_PORT_CTRL(port), reg);
 
+	if (dev->ops->phy_disable)
+		dev->ops->phy_disable(dev, port);
+
 	if (dev->ops->irq_disable)
 		dev->ops->irq_disable(dev, port);
 }
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index b1b9e8882ba4..f1124f5e50da 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -45,6 +45,8 @@ struct b53_io_ops {
 	int (*phy_write16)(struct b53_device *dev, int addr, int reg, u16 value);
 	int (*irq_enable)(struct b53_device *dev, int port);
 	void (*irq_disable)(struct b53_device *dev, int port);
+	void (*phy_enable)(struct b53_device *dev, int port);
+	void (*phy_disable)(struct b53_device *dev, int port);
 	void (*phylink_get_caps)(struct b53_device *dev, int port,
 				 struct phylink_config *config);
 	struct phylink_pcs *(*phylink_mac_select_pcs)(struct b53_device *dev,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-17 18:44   ` Florian Fainelli
  2025-07-20 22:37   ` Rob Herring
  2025-07-16  0:29 ` [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property Kyle Hendry
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

On bcm63xx SoCs there are registers that control the PHYs in
the GPIO controller. Allow the b53 driver to access them
by passing in the syscon through the device tree.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_mmap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index c687360a5b7f..a0c06d703861 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -21,6 +21,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/io.h>
+#include <linux/mfd/syscon.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/b53.h>
 
@@ -28,6 +29,7 @@
 
 struct b53_mmap_priv {
 	void __iomem *regs;
+	struct regmap *gpio_ctrl;
 };
 
 static int b53_mmap_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
@@ -313,6 +315,8 @@ static int b53_mmap_probe(struct platform_device *pdev)
 
 	priv->regs = pdata->regs;
 
+	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
+
 	dev = b53_switch_alloc(&pdev->dev, &b53_mmap_ops, priv);
 	if (!dev)
 		return -ENOMEM;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-17 18:45   ` Florian Fainelli
  2025-07-20 22:38   ` Rob Herring
  2025-07-16  0:29 ` [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs Kyle Hendry
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add description for bcm63xx gpio-ctrl phandle

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
index d6c957a33b48..c40ebd1ddffb 100644
--- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
@@ -66,6 +66,11 @@ properties:
               - brcm,bcm63268-switch
           - const: brcm,bcm63xx-switch
 
+  brcm,gpio-ctrl:
+    description:
+      A phandle to the syscon node of the bcm63xx gpio controller
+    $ref: /schemas/types.yaml#/definitions/phandle
+
 required:
   - compatible
   - reg
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
                   ` (2 preceding siblings ...)
  2025-07-16  0:29 ` [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-17 18:45   ` Florian Fainelli
  2025-07-16  0:29 ` [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268 Kyle Hendry
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add defines for bcm6318, bcm6328, bcm6362, bcm6368 chip IDs,
update tables and switch init.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 21 ++++++---------------
 drivers/net/dsa/b53/b53_mmap.c   |  8 ++++----
 drivers/net/dsa/b53/b53_priv.h   | 13 +++++++++++--
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 77acc7b8abfb..9942fb6f7f4b 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1410,7 +1410,7 @@ static void b53_adjust_63xx_rgmii(struct dsa_switch *ds, int port,
 	b53_read8(dev, B53_CTRL_PAGE, B53_RGMII_CTRL_P(port), &rgmii_ctrl);
 	rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
 
-	if (is63268(dev))
+	if (is6318_268(dev))
 		rgmii_ctrl |= RGMII_CTRL_MII_OVERRIDE;
 
 	rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII;
@@ -2774,19 +2774,6 @@ static const struct b53_chip_data b53_switch_chips[] = {
 		.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
 		.jumbo_size_reg = B53_JUMBO_MAX_SIZE_63XX,
 	},
-	{
-		.chip_id = BCM63268_DEVICE_ID,
-		.dev_name = "BCM63268",
-		.vlans = 4096,
-		.enabled_ports = 0, /* pdata must provide them */
-		.arl_bins = 4,
-		.arl_buckets = 1024,
-		.imp_port = 8,
-		.vta_regs = B53_VTA_REGS_63XX,
-		.duplex_reg = B53_DUPLEX_STAT_63XX,
-		.jumbo_pm_reg = B53_JUMBO_PORT_MASK_63XX,
-		.jumbo_size_reg = B53_JUMBO_MAX_SIZE_63XX,
-	},
 	{
 		.chip_id = BCM53010_DEVICE_ID,
 		.dev_name = "BCM53010",
@@ -2936,13 +2923,17 @@ static const struct b53_chip_data b53_switch_chips[] = {
 
 static int b53_switch_init(struct b53_device *dev)
 {
+	u32 chip_id = dev->chip_id;
 	unsigned int i;
 	int ret;
 
+	if (is63xx(dev))
+		chip_id = BCM63XX_DEVICE_ID;
+
 	for (i = 0; i < ARRAY_SIZE(b53_switch_chips); i++) {
 		const struct b53_chip_data *chip = &b53_switch_chips[i];
 
-		if (chip->chip_id == dev->chip_id) {
+		if (chip->chip_id == chip_id) {
 			if (!dev->enabled_ports)
 				dev->enabled_ports = chip->enabled_ports;
 			dev->name = chip->dev_name;
diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index a0c06d703861..09631792049c 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -352,16 +352,16 @@ static const struct of_device_id b53_mmap_of_table[] = {
 		.data = (void *)BCM63XX_DEVICE_ID,
 	}, {
 		.compatible = "brcm,bcm6318-switch",
-		.data = (void *)BCM63268_DEVICE_ID,
+		.data = (void *)BCM6318_DEVICE_ID,
 	}, {
 		.compatible = "brcm,bcm6328-switch",
-		.data = (void *)BCM63XX_DEVICE_ID,
+		.data = (void *)BCM6328_DEVICE_ID,
 	}, {
 		.compatible = "brcm,bcm6362-switch",
-		.data = (void *)BCM63XX_DEVICE_ID,
+		.data = (void *)BCM6362_DEVICE_ID,
 	}, {
 		.compatible = "brcm,bcm6368-switch",
-		.data = (void *)BCM63XX_DEVICE_ID,
+		.data = (void *)BCM6368_DEVICE_ID,
 	}, {
 		.compatible = "brcm,bcm63268-switch",
 		.data = (void *)BCM63268_DEVICE_ID,
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index f1124f5e50da..458775f95164 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -73,6 +73,10 @@ enum {
 	BCM53125_DEVICE_ID = 0x53125,
 	BCM53128_DEVICE_ID = 0x53128,
 	BCM63XX_DEVICE_ID = 0x6300,
+	BCM6318_DEVICE_ID = 0x6318,
+	BCM6328_DEVICE_ID = 0x6328,
+	BCM6362_DEVICE_ID = 0x6362,
+	BCM6368_DEVICE_ID = 0x6368,
 	BCM63268_DEVICE_ID = 0x63268,
 	BCM53010_DEVICE_ID = 0x53010,
 	BCM53011_DEVICE_ID = 0x53011,
@@ -220,12 +224,17 @@ static inline int is531x5(struct b53_device *dev)
 static inline int is63xx(struct b53_device *dev)
 {
 	return dev->chip_id == BCM63XX_DEVICE_ID ||
+		dev->chip_id == BCM6318_DEVICE_ID ||
+		dev->chip_id == BCM6328_DEVICE_ID ||
+		dev->chip_id == BCM6362_DEVICE_ID ||
+		dev->chip_id == BCM6368_DEVICE_ID ||
 		dev->chip_id == BCM63268_DEVICE_ID;
 }
 
-static inline int is63268(struct b53_device *dev)
+static inline int is6318_268(struct b53_device *dev)
 {
-	return dev->chip_id == BCM63268_DEVICE_ID;
+	return dev->chip_id == BCM6318_DEVICE_ID ||
+		dev->chip_id == BCM63268_DEVICE_ID;
 }
 
 static inline int is5301x(struct b53_device *dev)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
                   ` (3 preceding siblings ...)
  2025-07-16  0:29 ` [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-17 18:47   ` Florian Fainelli
  2025-07-16  0:29 ` [PATCH net-next 6/8] net: dsa: b53: mmap: Add register layout for bcm6318 Kyle Hendry
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add a structure to describe the ephy control register
and add register info for bcm63268.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_mmap.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 09631792049c..35bf39ab2771 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -27,9 +27,26 @@
 
 #include "b53_priv.h"
 
+struct b53_phy_info {
+	u32 ephy_enable_mask;
+	u32 ephy_port_mask;
+	u32 ephy_bias_bit;
+	const u32 *ephy_offset;
+};
+
 struct b53_mmap_priv {
 	void __iomem *regs;
 	struct regmap *gpio_ctrl;
+	const struct b53_phy_info *phy_info;
+};
+
+static const u32 bcm63268_ephy_offsets[] = {4, 9, 14};
+
+static const struct b53_phy_info bcm63268_ephy_info = {
+	.ephy_enable_mask = GENMASK(4, 0),
+	.ephy_port_mask = GENMASK((ARRAY_SIZE(bcm63268_ephy_offsets) - 1), 0),
+	.ephy_bias_bit = 24,
+	.ephy_offset = bcm63268_ephy_offsets,
 };
 
 static int b53_mmap_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
@@ -316,6 +333,10 @@ static int b53_mmap_probe(struct platform_device *pdev)
 	priv->regs = pdata->regs;
 
 	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
+	if (!IS_ERR(priv->gpio_ctrl)) {
+		if (pdata->chip_id == BCM63268_DEVICE_ID)
+			priv->phy_info = &bcm63268_ephy_info;
+	}
 
 	dev = b53_switch_alloc(&pdev->dev, &b53_mmap_ops, priv);
 	if (!dev)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 6/8] net: dsa: b53: mmap: Add register layout for bcm6318
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
                   ` (4 preceding siblings ...)
  2025-07-16  0:29 ` [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268 Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 7/8] net: dsa: b53: mmap: Add register layout for bcm6368 Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 8/8] net: dsa: b53: mmap: Implement bcm63xx ephy power control Kyle Hendry
  7 siblings, 0 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add ephy register info for bcm6318, which also applies to
bcm6328 and bcm6362.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_mmap.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 35bf39ab2771..51303f075a1f 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -40,6 +40,15 @@ struct b53_mmap_priv {
 	const struct b53_phy_info *phy_info;
 };
 
+static const u32 bcm6318_ephy_offsets[] = {4, 5, 6, 7};
+
+static const struct b53_phy_info bcm6318_ephy_info = {
+	.ephy_enable_mask = BIT(0) | BIT(4) | BIT(8) | BIT(12) | BIT(16),
+	.ephy_port_mask = GENMASK((ARRAY_SIZE(bcm6318_ephy_offsets) - 1), 0),
+	.ephy_bias_bit = 24,
+	.ephy_offset = bcm6318_ephy_offsets,
+};
+
 static const u32 bcm63268_ephy_offsets[] = {4, 9, 14};
 
 static const struct b53_phy_info bcm63268_ephy_info = {
@@ -334,7 +343,11 @@ static int b53_mmap_probe(struct platform_device *pdev)
 
 	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
 	if (!IS_ERR(priv->gpio_ctrl)) {
-		if (pdata->chip_id == BCM63268_DEVICE_ID)
+		if (pdata->chip_id == BCM6318_DEVICE_ID ||
+		    pdata->chip_id == BCM6328_DEVICE_ID ||
+		    pdata->chip_id == BCM6362_DEVICE_ID)
+			priv->phy_info = &bcm6318_ephy_info;
+		else if (pdata->chip_id == BCM63268_DEVICE_ID)
 			priv->phy_info = &bcm63268_ephy_info;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 7/8] net: dsa: b53: mmap: Add register layout for bcm6368
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
                   ` (5 preceding siblings ...)
  2025-07-16  0:29 ` [PATCH net-next 6/8] net: dsa: b53: mmap: Add register layout for bcm6318 Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  2025-07-16  0:29 ` [PATCH net-next 8/8] net: dsa: b53: mmap: Implement bcm63xx ephy power control Kyle Hendry
  7 siblings, 0 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Add ephy register info for bcm6368.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_mmap.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 51303f075a1f..8f5914e2a790 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -49,6 +49,15 @@ static const struct b53_phy_info bcm6318_ephy_info = {
 	.ephy_offset = bcm6318_ephy_offsets,
 };
 
+static const u32 bcm6368_ephy_offsets[] = {2, 3, 4, 5};
+
+static const struct b53_phy_info bcm6368_ephy_info = {
+	.ephy_enable_mask = BIT(0),
+	.ephy_port_mask = GENMASK((ARRAY_SIZE(bcm6368_ephy_offsets) - 1), 0),
+	.ephy_bias_bit = 0,
+	.ephy_offset = bcm6368_ephy_offsets,
+};
+
 static const u32 bcm63268_ephy_offsets[] = {4, 9, 14};
 
 static const struct b53_phy_info bcm63268_ephy_info = {
@@ -347,6 +356,8 @@ static int b53_mmap_probe(struct platform_device *pdev)
 		    pdata->chip_id == BCM6328_DEVICE_ID ||
 		    pdata->chip_id == BCM6362_DEVICE_ID)
 			priv->phy_info = &bcm6318_ephy_info;
+		else if (pdata->chip_id == BCM6368_DEVICE_ID)
+			priv->phy_info = &bcm6368_ephy_info;
 		else if (pdata->chip_id == BCM63268_DEVICE_ID)
 			priv->phy_info = &bcm63268_ephy_info;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH net-next 8/8] net: dsa: b53: mmap: Implement bcm63xx ephy power control
  2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
                   ` (6 preceding siblings ...)
  2025-07-16  0:29 ` [PATCH net-next 7/8] net: dsa: b53: mmap: Add register layout for bcm6368 Kyle Hendry
@ 2025-07-16  0:29 ` Kyle Hendry
  7 siblings, 0 replies; 16+ messages in thread
From: Kyle Hendry @ 2025-07-16  0:29 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Kyle Hendry, Florian Fainelli, netdev,
	devicetree, linux-kernel

Implement the phy enable/disable calls for b53 mmap, and
set the power down registers in the ephy control register
appropriately.

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
---
 drivers/net/dsa/b53/b53_mmap.c | 50 ++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 8f5914e2a790..f06c3e0cc42a 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -24,9 +24,12 @@
 #include <linux/mfd/syscon.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/b53.h>
+#include <linux/regmap.h>
 
 #include "b53_priv.h"
 
+#define BCM63XX_EPHY_REG 0x3C
+
 struct b53_phy_info {
 	u32 ephy_enable_mask;
 	u32 ephy_port_mask;
@@ -38,6 +41,7 @@ struct b53_mmap_priv {
 	void __iomem *regs;
 	struct regmap *gpio_ctrl;
 	const struct b53_phy_info *phy_info;
+	u32 phys_enabled;
 };
 
 static const u32 bcm6318_ephy_offsets[] = {4, 5, 6, 7};
@@ -266,6 +270,50 @@ static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg,
 	return -EIO;
 }
 
+static int bcm63xx_ephy_set(struct b53_device *dev, int port, bool enable)
+{
+	struct b53_mmap_priv *priv = dev->priv;
+	const struct b53_phy_info *info = priv->phy_info;
+	struct regmap *gpio_ctrl = priv->gpio_ctrl;
+	u32 mask, val;
+
+	if (enable) {
+		mask = (info->ephy_enable_mask << info->ephy_offset[port])
+				| BIT(info->ephy_bias_bit);
+		val = 0;
+	} else {
+		mask = (info->ephy_enable_mask << info->ephy_offset[port]);
+		if (!((priv->phys_enabled & ~BIT(port)) & info->ephy_port_mask))
+			mask |= BIT(info->ephy_bias_bit);
+		val = mask;
+	}
+	return regmap_update_bits(gpio_ctrl, BCM63XX_EPHY_REG, mask, val);
+}
+
+static void b53_mmap_phy_enable(struct b53_device *dev, int port)
+{
+	struct b53_mmap_priv *priv = dev->priv;
+	int ret = 0;
+
+	if (priv->phy_info && (BIT(port) & priv->phy_info->ephy_port_mask))
+		ret = bcm63xx_ephy_set(dev, port, true);
+
+	if (!ret)
+		priv->phys_enabled |= BIT(port);
+}
+
+static void b53_mmap_phy_disable(struct b53_device *dev, int port)
+{
+	struct b53_mmap_priv *priv = dev->priv;
+	int ret = 0;
+
+	if (priv->phy_info && (BIT(port) & priv->phy_info->ephy_port_mask))
+		ret = bcm63xx_ephy_set(dev, port, false);
+
+	if (!ret)
+		priv->phys_enabled &= ~BIT(port);
+}
+
 static const struct b53_io_ops b53_mmap_ops = {
 	.read8 = b53_mmap_read8,
 	.read16 = b53_mmap_read16,
@@ -279,6 +327,8 @@ static const struct b53_io_ops b53_mmap_ops = {
 	.write64 = b53_mmap_write64,
 	.phy_read16 = b53_mmap_phy_read16,
 	.phy_write16 = b53_mmap_phy_write16,
+	.phy_enable = b53_mmap_phy_enable,
+	.phy_disable = b53_mmap_phy_disable,
 };
 
 static int b53_mmap_probe_of(struct platform_device *pdev,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods
  2025-07-16  0:29 ` [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
@ 2025-07-17 18:44   ` Florian Fainelli
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2025-07-17 18:44 UTC (permalink / raw)
  To: Kyle Hendry, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Florian Fainelli, netdev, devicetree,
	linux-kernel

On 7/15/25 17:29, Kyle Hendry wrote:
> Add phy enable/disable to b53 ops to be called when
> enabling/disabling ports.
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller
  2025-07-16  0:29 ` [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller Kyle Hendry
@ 2025-07-17 18:44   ` Florian Fainelli
  2025-07-20 22:37   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2025-07-17 18:44 UTC (permalink / raw)
  To: Kyle Hendry, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Florian Fainelli, netdev, devicetree,
	linux-kernel

On 7/15/25 17:29, Kyle Hendry wrote:
> On bcm63xx SoCs there are registers that control the PHYs in
> the GPIO controller. Allow the b53 driver to access them
> by passing in the syscon through the device tree.
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property
  2025-07-16  0:29 ` [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property Kyle Hendry
@ 2025-07-17 18:45   ` Florian Fainelli
  2025-07-20 22:38   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2025-07-17 18:45 UTC (permalink / raw)
  To: Kyle Hendry, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Florian Fainelli, netdev, devicetree,
	linux-kernel

On 7/15/25 17:29, Kyle Hendry wrote:
> Add description for bcm63xx gpio-ctrl phandle
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs
  2025-07-16  0:29 ` [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs Kyle Hendry
@ 2025-07-17 18:45   ` Florian Fainelli
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2025-07-17 18:45 UTC (permalink / raw)
  To: Kyle Hendry, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Florian Fainelli, netdev, devicetree,
	linux-kernel

On 7/15/25 17:29, Kyle Hendry wrote:
> Add defines for bcm6318, bcm6328, bcm6362, bcm6368 chip IDs,
> update tables and switch init.
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268
  2025-07-16  0:29 ` [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268 Kyle Hendry
@ 2025-07-17 18:47   ` Florian Fainelli
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Fainelli @ 2025-07-17 18:47 UTC (permalink / raw)
  To: Kyle Hendry, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Russell King
  Cc: noltari, jonas.gorski, Florian Fainelli, netdev, devicetree,
	linux-kernel

On 7/15/25 17:29, Kyle Hendry wrote:
> Add a structure to describe the ephy control register
> and add register info for bcm63268.
> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
> ---
>   drivers/net/dsa/b53/b53_mmap.c | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)
> 
> diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
> index 09631792049c..35bf39ab2771 100644
> --- a/drivers/net/dsa/b53/b53_mmap.c
> +++ b/drivers/net/dsa/b53/b53_mmap.c
> @@ -27,9 +27,26 @@
>   
>   #include "b53_priv.h"
>   
> +struct b53_phy_info {
> +	u32 ephy_enable_mask;
> +	u32 ephy_port_mask;
> +	u32 ephy_bias_bit;
> +	const u32 *ephy_offset;
> +};
> +
>   struct b53_mmap_priv {
>   	void __iomem *regs;
>   	struct regmap *gpio_ctrl;
> +	const struct b53_phy_info *phy_info;
> +};
> +
> +static const u32 bcm63268_ephy_offsets[] = {4, 9, 14};
> +
> +static const struct b53_phy_info bcm63268_ephy_info = {
> +	.ephy_enable_mask = GENMASK(4, 0),
> +	.ephy_port_mask = GENMASK((ARRAY_SIZE(bcm63268_ephy_offsets) - 1), 0),
> +	.ephy_bias_bit = 24,
> +	.ephy_offset = bcm63268_ephy_offsets,
>   };
>   
>   static int b53_mmap_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
> @@ -316,6 +333,10 @@ static int b53_mmap_probe(struct platform_device *pdev)
>   	priv->regs = pdata->regs;
>   
>   	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
> +	if (!IS_ERR(priv->gpio_ctrl)) {

This check IMHO belongs in patch #2, even though it only starts being 
useful now. Up to you, and depending upon other comments.
-- 
Florian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller
  2025-07-16  0:29 ` [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller Kyle Hendry
  2025-07-17 18:44   ` Florian Fainelli
@ 2025-07-20 22:37   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2025-07-20 22:37 UTC (permalink / raw)
  To: Kyle Hendry
  Cc: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski,
	Conor Dooley, Russell King, noltari, jonas.gorski,
	Florian Fainelli, netdev, devicetree, linux-kernel

On Tue, Jul 15, 2025 at 05:29:01PM -0700, Kyle Hendry wrote:
> On bcm63xx SoCs there are registers that control the PHYs in
> the GPIO controller. Allow the b53 driver to access them
> by passing in the syscon through the device tree.

Bindings go before users of the binding.

More importantly, this patch does nothing on its own. Squash it with 
were you actually use priv->gpio_ctrl.

> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
> ---
>  drivers/net/dsa/b53/b53_mmap.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
> index c687360a5b7f..a0c06d703861 100644
> --- a/drivers/net/dsa/b53/b53_mmap.c
> +++ b/drivers/net/dsa/b53/b53_mmap.c
> @@ -21,6 +21,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/io.h>
> +#include <linux/mfd/syscon.h>
>  #include <linux/platform_device.h>
>  #include <linux/platform_data/b53.h>
>  
> @@ -28,6 +29,7 @@
>  
>  struct b53_mmap_priv {
>  	void __iomem *regs;
> +	struct regmap *gpio_ctrl;
>  };
>  
>  static int b53_mmap_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
> @@ -313,6 +315,8 @@ static int b53_mmap_probe(struct platform_device *pdev)
>  
>  	priv->regs = pdata->regs;
>  
> +	priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl");
> +
>  	dev = b53_switch_alloc(&pdev->dev, &b53_mmap_ops, priv);
>  	if (!dev)
>  		return -ENOMEM;
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property
  2025-07-16  0:29 ` [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property Kyle Hendry
  2025-07-17 18:45   ` Florian Fainelli
@ 2025-07-20 22:38   ` Rob Herring
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring @ 2025-07-20 22:38 UTC (permalink / raw)
  To: Kyle Hendry
  Cc: Florian Fainelli, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Krzysztof Kozlowski,
	Conor Dooley, Russell King, noltari, jonas.gorski,
	Florian Fainelli, netdev, devicetree, linux-kernel

On Tue, Jul 15, 2025 at 05:29:02PM -0700, Kyle Hendry wrote:
> Add description for bcm63xx gpio-ctrl phandle

That's obvious. Please say why you need it. What is it used for?

> 
> Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
> ---
>  Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> index d6c957a33b48..c40ebd1ddffb 100644
> --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
> @@ -66,6 +66,11 @@ properties:
>                - brcm,bcm63268-switch
>            - const: brcm,bcm63xx-switch
>  
> +  brcm,gpio-ctrl:
> +    description:
> +      A phandle to the syscon node of the bcm63xx gpio controller
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-07-20 22:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16  0:28 [PATCH net-next 0/8] net: dsa: b53: mmap: Add bcm63xx EPHY power control Kyle Hendry
2025-07-16  0:29 ` [PATCH net-next 1/8] net: dsa: b53: Add phy_enable(), phy_disable() methods Kyle Hendry
2025-07-17 18:44   ` Florian Fainelli
2025-07-16  0:29 ` [PATCH net-next 2/8] net: dsa: b53: mmap: Add reference to bcm63xx gpio controller Kyle Hendry
2025-07-17 18:44   ` Florian Fainelli
2025-07-20 22:37   ` Rob Herring
2025-07-16  0:29 ` [PATCH net-next 3/8] dt-bindings: net: dsa: b53: Document brcm,gpio-ctrl property Kyle Hendry
2025-07-17 18:45   ` Florian Fainelli
2025-07-20 22:38   ` Rob Herring
2025-07-16  0:29 ` [PATCH net-next 4/8] net: dsa: b53: Define chip IDs for more bcm63xx SoCs Kyle Hendry
2025-07-17 18:45   ` Florian Fainelli
2025-07-16  0:29 ` [PATCH net-next 5/8] net: dsa: b53: mmap: Add register layout for bcm63268 Kyle Hendry
2025-07-17 18:47   ` Florian Fainelli
2025-07-16  0:29 ` [PATCH net-next 6/8] net: dsa: b53: mmap: Add register layout for bcm6318 Kyle Hendry
2025-07-16  0:29 ` [PATCH net-next 7/8] net: dsa: b53: mmap: Add register layout for bcm6368 Kyle Hendry
2025-07-16  0:29 ` [PATCH net-next 8/8] net: dsa: b53: mmap: Implement bcm63xx ephy power control Kyle Hendry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).