Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
@ 2026-09-15 12:52 Christian Marangi
  2026-09-15 12:52 ` [PATCH v2 1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port Christian Marangi
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Christian Marangi @ 2026-09-15 12:52 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Christian Marangi,
	Felix Fietkau, linux-clk, devicetree, linux-kernel

This small series is a split from the Airoha AN7581 USB PHY series [1].

[1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/

Changes v2:
- Rebase on top of linux-next
- Add review tag for Documentation patch

Changes v10 (from previous series):
- Rework if condition and reject #phy-cells for
  econet,en751221-scu compatible.

Christian Marangi (2):
  dt-bindings: clock: airoha: Add PHY binding for Serdes port
  clk: en7523: Add support for selecting the Serdes port in SCU

 .../bindings/clock/airoha,en7523-scu.yaml     |  24 +-
 drivers/clk/Kconfig                           |   1 +
 drivers/clk/clk-en7523.c                      | 218 +++++++++++++++++-
 include/dt-bindings/soc/airoha,scu-ssr.h      |  11 +
 4 files changed, 248 insertions(+), 6 deletions(-)
 create mode 100644 include/dt-bindings/soc/airoha,scu-ssr.h

-- 
2.53.0


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

* [PATCH v2 1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
  2026-09-15 12:52 [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Christian Marangi
@ 2026-09-15 12:52 ` Christian Marangi
  2026-09-15 12:52 ` [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU Christian Marangi
  2026-09-21 15:34 ` [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Brian Masney
  2 siblings, 0 replies; 10+ messages in thread
From: Christian Marangi @ 2026-09-15 12:52 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Christian Marangi,
	Felix Fietkau, linux-clk, devicetree, linux-kernel

Add PHY cell property for Serdes port selection. Currently supported only
for Airoha AN7581 SoC, that support up to 4 Serdes port.

The Serdes port can support both PCIe, USB3 or Ethernet mode.

- PCIe1 Serdes can support PCIe or Ethernet mode.
- PCIe2 Serdes can support PCIe or Ethernet mode.
- USB1 Serdes can support USB3 or HSGMII mode.
- USB2 Serdes can support USB3 or PCIe mode.

Add bindings to permit correct reference of the Serdes ports in DT.
Values are just symbolic and enumerates the Serdes port with a specific
number for precise reference.

The available Serdes port can be selected following the dt-binding header
in [2].

[2] <include/dt-bindings/soc/airoha,scu-ssr.h>

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/clock/airoha,en7523-scu.yaml     | 24 ++++++++++++++++---
 include/dt-bindings/soc/airoha,scu-ssr.h      | 11 +++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 include/dt-bindings/soc/airoha,scu-ssr.h

diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
index eb24a5687639..fc37786ac7ed 100644
--- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
+++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
@@ -23,6 +23,7 @@ description: |
 
   All these identifiers can be found in:
   [1]: <include/dt-bindings/clock/en7523-clk.h>.
+  [2]: <include/dt-bindings/soc/airoha,scu-ssr.h>.
 
   The clocks are provided inside a system controller node.
 
@@ -50,6 +51,12 @@ properties:
     description: ID of the controller reset line
     const: 1
 
+  '#phy-cells':
+    description:
+      The first cell indicates the serdes phy number, see [2] for the
+      available serdes port.
+    const: 1
+
 required:
   - compatible
   - reg
@@ -65,12 +72,23 @@ allOf:
         reg:
           minItems: 2
 
+        '#phy-cells': false
+
+  - if:
+      properties:
+        compatible:
+          const: econet,en751221-scu
+    then:
+      properties:
+        reg:
+          maxItems: 1
+
+        '#phy-cells': false
+
   - if:
       properties:
         compatible:
-          enum:
-            - airoha,en7581-scu
-            - econet,en751221-scu
+          const: airoha,en7581-scu
     then:
       properties:
         reg:
diff --git a/include/dt-bindings/soc/airoha,scu-ssr.h b/include/dt-bindings/soc/airoha,scu-ssr.h
new file mode 100644
index 000000000000..33c64844ada3
--- /dev/null
+++ b/include/dt-bindings/soc/airoha,scu-ssr.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef __DT_BINDINGS_AIROHA_SCU_SSR_H
+#define __DT_BINDINGS_AIROHA_SCU_SSR_H
+
+#define AIROHA_SCU_SERDES_PCIE1		0
+#define AIROHA_SCU_SERDES_PCIE2		1
+#define AIROHA_SCU_SERDES_USB1		2
+#define AIROHA_SCU_SERDES_USB2		3
+
+#endif /* __DT_BINDINGS_AIROHA_SCU_SSR_H */
-- 
2.53.0


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

* [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU
  2026-09-15 12:52 [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Christian Marangi
  2026-09-15 12:52 ` [PATCH v2 1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port Christian Marangi
@ 2026-09-15 12:52 ` Christian Marangi
  2026-09-15 13:02   ` sashiko-bot
  2026-09-21 15:34 ` [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Brian Masney
  2 siblings, 1 reply; 10+ messages in thread
From: Christian Marangi @ 2026-09-15 12:52 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Christian Marangi,
	Felix Fietkau, linux-clk, devicetree, linux-kernel
  Cc: Brian Masney

In the SCU register for clock and reset, there are also some register to
select the Serdes port mode. The Airoha AN7581 SoC have 4 different Serdes
that can switch between PCIe, USB or Ethernet mode.

Add a simple PHY provider that expose the .set_mode OP to toggle the
requested mode for the Serdes port.

Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/clk/Kconfig      |   1 +
 drivers/clk/clk-en7523.c | 218 ++++++++++++++++++++++++++++++++++++++-
 2 files changed, 216 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 252f6a1f21b8..e0cc4ebafb5e 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -221,6 +221,7 @@ config COMMON_CLK_EN7523
 	bool "Clock driver for Airoha/EcoNet SoC system clocks"
 	depends on OF
 	depends on ARCH_AIROHA || ECONET || COMPILE_TEST
+	select GENERIC_PHY
 	default ARCH_AIROHA
 	help
 	  This driver provides the fixed clocks and gates present on Airoha
diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
index 5c45aacb6409..24fdec2e6198 100644
--- a/drivers/clk/clk-en7523.c
+++ b/drivers/clk/clk-en7523.c
@@ -6,14 +6,18 @@
 #include <linux/io.h>
 #include <linux/mfd/syscon.h>
 #include <linux/platform_device.h>
+#include <linux/phy.h>
+#include <linux/phy/phy.h>
 #include <linux/property.h>
 #include <linux/regmap.h>
 #include <linux/reset-controller.h>
+#include <linux/spinlock.h>
 #include <dt-bindings/clock/en7523-clk.h>
 #include <dt-bindings/reset/airoha,en7523-reset.h>
 #include <dt-bindings/reset/airoha,en7581-reset.h>
 #include <dt-bindings/clock/econet,en751221-scu.h>
 #include <dt-bindings/reset/econet,en751221-scu.h>
+#include <dt-bindings/soc/airoha,scu-ssr.h>
 
 #define RST_NR_PER_BANK			32
 
@@ -40,9 +44,22 @@
 #define   REG_HIR_MASK			GENMASK(31, 16)
 /* EN7581 */
 #define REG_NP_SCU_PCIC			0x88
+#define REG_NP_SCU_SSR3			0x94
+#define REG_SSUSB_HSGMII_SEL_MASK	BIT(29)
+#define REG_SSUSB_HSGMII_SEL_HSGMII	FIELD_PREP_CONST(REG_SSUSB_HSGMII_SEL_MASK, 0x0)
+#define REG_SSUSB_HSGMII_SEL_USB	FIELD_PREP_CONST(REG_SSUSB_HSGMII_SEL_MASK, 0x1)
 #define REG_NP_SCU_SSTR			0x9c
 #define REG_PCIE_XSI0_SEL_MASK		GENMASK(14, 13)
+#define REG_PCIE_XSI0_SEL_PCIE		FIELD_PREP_CONST(REG_PCIE_XSI0_SEL_MASK, 0x0)
+#define REG_PCIE_XSI0_SEL_XFI		FIELD_PREP_CONST(REG_PCIE_XSI0_SEL_MASK, 0x1)
+#define REG_PCIE_XSI0_SEL_HSGMII	FIELD_PREP_CONST(REG_PCIE_XSI0_SEL_MASK, 0x2)
 #define REG_PCIE_XSI1_SEL_MASK		GENMASK(12, 11)
+#define REG_PCIE_XSI1_SEL_PCIE		FIELD_PREP_CONST(REG_PCIE_XSI1_SEL_MASK, 0x0)
+#define REG_PCIE_XSI1_SEL_XFI		FIELD_PREP_CONST(REG_PCIE_XSI1_SEL_MASK, 0x1)
+#define REG_PCIE_XSI1_SEL_HSGMII	FIELD_PREP_CONST(REG_PCIE_XSI1_SEL_MASK, 0x2)
+#define REG_USB_PCIE_SEL_MASK		BIT(3)
+#define REG_USB_PCIE_SEL_PCIE		FIELD_PREP_CONST(REG_USB_PCIE_SEL_MASK, 0x0)
+#define REG_USB_PCIE_SEL_USB		FIELD_PREP_CONST(REG_USB_PCIE_SEL_MASK, 0x1)
 #define REG_CRYPTO_CLKSRC2		0x20c
 /* EN751221 */
 #define EN751221_REG_SPI_DIV		0x0cc
@@ -82,6 +99,8 @@ enum en_hir {
 	HIR_MAX		= 14,
 };
 
+#define EN_SERDES_PHY_NUM		4
+
 struct en_clk_desc {
 	int id;
 	const char *name;
@@ -114,6 +133,18 @@ struct en_rst_data {
 	struct reset_controller_dev rcdev;
 };
 
+struct en_serdes_phy_instance {
+	struct phy *phy;
+	unsigned int serdes_port;
+};
+
+struct en_clk_priv {
+	void __iomem *base;
+	/* protect SCU register */
+	spinlock_t lock;
+	struct en_serdes_phy_instance *serdes_phys[EN_SERDES_PHY_NUM];
+};
+
 struct en_clk_soc_data {
 	u32 num_clocks;
 	const struct clk_ops pcie_ops;
@@ -847,12 +878,179 @@ static int en7581_reset_register(struct device *dev, void __iomem *base,
 	return devm_reset_controller_register(dev, &rst_data->rcdev);
 }
 
+static int en7581_serdes_phy_set_mode(struct phy *phy, enum phy_mode mode,
+				      int submode)
+{
+	struct en_serdes_phy_instance *instance = phy_get_drvdata(phy);
+	struct en_clk_priv *priv = dev_get_drvdata(phy->dev.parent);
+	u32 reg, mask, sel, val;
+	unsigned long flags;
+
+	switch (instance->serdes_port) {
+	case AIROHA_SCU_SERDES_PCIE1:
+		reg = REG_NP_SCU_SSTR;
+		mask = REG_PCIE_XSI0_SEL_MASK;
+
+		if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_PCIE)
+			return -EINVAL;
+
+		if (mode == PHY_MODE_ETHERNET) {
+			switch (submode) {
+			case PHY_INTERFACE_MODE_USXGMII:
+			case PHY_INTERFACE_MODE_10GBASER:
+				sel = REG_PCIE_XSI0_SEL_XFI;
+				break;
+			case PHY_INTERFACE_MODE_SGMII:
+			case PHY_INTERFACE_MODE_1000BASEX:
+			case PHY_INTERFACE_MODE_2500BASEX:
+				sel = REG_PCIE_XSI0_SEL_HSGMII;
+				break;
+			default:
+				return -EINVAL;
+			}
+		} else {
+			sel = REG_PCIE_XSI0_SEL_PCIE;
+		}
+
+		break;
+	case AIROHA_SCU_SERDES_PCIE2:
+		reg = REG_NP_SCU_SSTR;
+		mask = REG_PCIE_XSI1_SEL_MASK;
+
+		if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_PCIE)
+			return -EINVAL;
+
+		if (mode == PHY_MODE_ETHERNET) {
+			switch (submode) {
+			case PHY_INTERFACE_MODE_USXGMII:
+			case PHY_INTERFACE_MODE_10GBASER:
+				sel = REG_PCIE_XSI1_SEL_XFI;
+				break;
+			case PHY_INTERFACE_MODE_SGMII:
+			case PHY_INTERFACE_MODE_1000BASEX:
+			case PHY_INTERFACE_MODE_2500BASEX:
+				sel = REG_PCIE_XSI1_SEL_HSGMII;
+				break;
+			default:
+				return -EINVAL;
+			}
+		} else {
+			sel = REG_PCIE_XSI1_SEL_PCIE;
+		}
+
+		break;
+	case AIROHA_SCU_SERDES_USB1:
+		reg = REG_NP_SCU_SSR3;
+		mask = REG_SSUSB_HSGMII_SEL_MASK;
+
+		if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_USB_DEVICE &&
+		    mode != PHY_MODE_USB_DEVICE_SS)
+			return -EINVAL;
+
+		if (mode == PHY_MODE_ETHERNET)
+			sel = REG_SSUSB_HSGMII_SEL_HSGMII;
+		else
+			sel = REG_SSUSB_HSGMII_SEL_USB;
+
+		break;
+	case AIROHA_SCU_SERDES_USB2:
+		reg = REG_NP_SCU_SSTR;
+		mask = REG_USB_PCIE_SEL_MASK;
+
+		if (mode != PHY_MODE_PCIE && mode != PHY_MODE_USB_DEVICE &&
+		    mode != PHY_MODE_USB_DEVICE_SS)
+			return -EINVAL;
+
+		if (mode == PHY_MODE_PCIE)
+			sel = REG_USB_PCIE_SEL_PCIE;
+		else
+			sel = REG_USB_PCIE_SEL_USB;
+
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	spin_lock_irqsave(&priv->lock, flags);
+	val = readl(priv->base + reg);
+	val &= ~mask;
+	val |= sel;
+	writel(val, priv->base + reg);
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	return 0;
+}
+
+static const struct phy_ops en7581_serdes_phy_ops = {
+	.set_mode	= en7581_serdes_phy_set_mode,
+	.owner		= THIS_MODULE,
+};
+
+static struct phy *en7581_serdes_phy_xlate(struct device *dev,
+					   const struct of_phandle_args *args)
+{
+	struct en_clk_priv *priv = dev_get_drvdata(dev);
+	struct en_serdes_phy_instance *instance;
+	unsigned int serdes_port;
+
+	if (args->args_count != 1) {
+		dev_err(dev, "invalid number of cells in 'phy' property\n");
+		return ERR_PTR(-EINVAL);
+	}
+
+	serdes_port = args->args[0];
+	if (serdes_port >= EN_SERDES_PHY_NUM) {
+		dev_err(dev, "invalid serdes port: %d\n", serdes_port);
+		return ERR_PTR(-EINVAL);
+	}
+
+	instance = priv->serdes_phys[serdes_port];
+	if (!instance) {
+		dev_err(dev, "failed to find appropriate serdes phy\n");
+		return ERR_PTR(-EINVAL);
+	}
+
+	return instance->phy;
+}
+
+static int en7581_serdes_phy_register(struct device *dev)
+{
+	struct en_clk_priv *priv = dev_get_drvdata(dev);
+	struct phy_provider *phy_provider;
+	int i;
+
+	for (i = 0; i < EN_SERDES_PHY_NUM; i++) {
+		struct en_serdes_phy_instance *instance;
+
+		instance = devm_kzalloc(dev, sizeof(*instance),
+					GFP_KERNEL);
+		if (!instance)
+			return -ENOMEM;
+
+		instance->phy = devm_phy_create(dev, NULL,
+						&en7581_serdes_phy_ops);
+		if (IS_ERR(instance->phy))
+			return dev_err_probe(dev, PTR_ERR(instance->phy), "failed to create phy\n");
+
+		instance->serdes_port = i;
+		priv->serdes_phys[i] = instance;
+
+		phy_set_drvdata(instance->phy, instance);
+	}
+
+	phy_provider = devm_of_phy_provider_register(dev, en7581_serdes_phy_xlate);
+
+	return PTR_ERR_OR_ZERO(phy_provider);
+}
+
 static int en7581_clk_hw_init(struct platform_device *pdev,
 			      struct clk_hw_onecell_data *clk_data)
 {
+	struct en_clk_priv *priv = platform_get_drvdata(pdev);
 	struct regmap *map;
 	void __iomem *base;
 	u32 val;
+	int ret;
 
 	map = syscon_regmap_lookup_by_compatible("airoha,en7581-chip-scu");
 	if (IS_ERR(map))
@@ -862,6 +1060,8 @@ static int en7581_clk_hw_init(struct platform_device *pdev,
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
+	priv->base = base;
+
 	en7581_register_clocks(&pdev->dev, clk_data, map, base);
 
 	val = readl(base + REG_NP_SCU_SSTR);
@@ -876,9 +1076,12 @@ static int en7581_clk_hw_init(struct platform_device *pdev,
 	val &= ~REG_PCIE_HB_RST;
 	writel(val, base + REG_RST_CTRL1);
 
-	return en7581_reset_register(&pdev->dev, base, en7581_rst_map,
-				     ARRAY_SIZE(en7581_rst_map),
-				     en7581_rst_ofs);
+	ret = en7581_reset_register(&pdev->dev, base, en7581_rst_map,
+				    ARRAY_SIZE(en7581_rst_map), en7581_rst_ofs);
+	if (ret)
+		return ret;
+
+	return en7581_serdes_phy_register(&pdev->dev);
 }
 
 static enum en_hir get_hw_id(void __iomem *np_base)
@@ -985,16 +1188,25 @@ static int en7523_clk_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	const struct en_clk_soc_data *soc_data;
 	struct clk_hw_onecell_data *clk_data;
+	struct en_clk_priv *priv;
 	int r;
 
 	soc_data = device_get_match_data(&pdev->dev);
 
+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	spin_lock_init(&priv->lock);
+
 	clk_data = devm_kzalloc(&pdev->dev,
 				struct_size(clk_data, hws, soc_data->num_clocks),
 				GFP_KERNEL);
 	if (!clk_data)
 		return -ENOMEM;
 
+	platform_set_drvdata(pdev, priv);
+
 	clk_data->num = soc_data->num_clocks;
 	r = soc_data->hw_init(pdev, clk_data);
 	if (r)
-- 
2.53.0


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

* Re: [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU
  2026-09-15 12:52 ` [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU Christian Marangi
@ 2026-09-15 13:02   ` sashiko-bot
  0 siblings, 0 replies; 10+ messages in thread
From: sashiko-bot @ 2026-09-15 13:02 UTC (permalink / raw)
  To: Christian Marangi; +Cc: conor+dt, devicetree, robh, linux-clk

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] clk: en7523: en7581_serdes_phy_set_mode() rejects USB Host PHY modes
--

commit e4c0888a17c4cf69587dbf3077fe8a5e2ed19ae7
Author: Christian Marangi <ansuelsmth@gmail.com>

clk: en7523: Add support for selecting the Serdes port in SCU

In the SCU register for clock and reset, there are also some register to
select the Serdes port mode. The Airoha AN7581 SoC have 4 different Serdes
that can switch between PCIe, USB or Ethernet mode.

> diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
> index 5c45aacb6409e..24fdec2e6198c 100644
> --- a/drivers/clk/clk-en7523.c
> +++ b/drivers/clk/clk-en7523.c
[ ... ]
> @@ -847,12 +878,179 @@ static int en7581_reset_register(struct device *dev, void __iomem *base,
[ ... ]
> +	case AIROHA_SCU_SERDES_USB1:
> +		reg = REG_NP_SCU_SSR3;
> +		mask = REG_SSUSB_HSGMII_SEL_MASK;
> +
> +		if (mode != PHY_MODE_ETHERNET && mode != PHY_MODE_USB_DEVICE &&
> +		    mode != PHY_MODE_USB_DEVICE_SS)
> +			return -EINVAL;

[Severity: High]
Does this validation check in en7581_serdes_phy_set_mode() in
drivers/clk/clk-en7523.c incorrectly reject standard USB Host PHY modes for
the USB1 Serdes port?

When a USB controller driver (such as dwc3) is configured in Host mode, it
typically calls phy_set_mode() with PHY_MODE_USB_HOST or PHY_MODE_USB_HOST_SS
during initialization.

Returning -EINVAL here prevents the PHY multiplexer from switching to USB
mode, leaving the Serdes pins disconnected from the USB controller and
breaking USB Host functionality.

Should PHY_MODE_USB_HOST and PHY_MODE_USB_HOST_SS also be allowed here?

> +
> +		if (mode == PHY_MODE_ETHERNET)
> +			sel = REG_SSUSB_HSGMII_SEL_HSGMII;
> +		else
> +			sel = REG_SSUSB_HSGMII_SEL_USB;
> +
> +		break;
> +	case AIROHA_SCU_SERDES_USB2:
> +		reg = REG_NP_SCU_SSTR;
> +		mask = REG_USB_PCIE_SEL_MASK;
> +
> +		if (mode != PHY_MODE_PCIE && mode != PHY_MODE_USB_DEVICE &&
> +		    mode != PHY_MODE_USB_DEVICE_SS)
> +			return -EINVAL;

[Severity: High]
Similarly, does this logic incorrectly reject standard USB Host PHY modes
for the USB2 Serdes port?

If a USB controller initializes in Host or OTG mode, it will request
PHY_MODE_USB_HOST or PHY_MODE_USB_HOST_SS. Without explicitly allowing these
modes, USB Host operations might be completely non-functional on this SoC.

> +
> +		if (mode == PHY_MODE_PCIE)
> +			sel = REG_USB_PCIE_SEL_PCIE;
> +		else
> +			sel = REG_USB_PCIE_SEL_USB;
> +
> +		break;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260915125226.20579-1-ansuelsmth@gmail.com?part=2

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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-09-15 12:52 [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Christian Marangi
  2026-09-15 12:52 ` [PATCH v2 1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port Christian Marangi
  2026-09-15 12:52 ` [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU Christian Marangi
@ 2026-09-21 15:34 ` Brian Masney
  2026-10-06 11:23   ` Christian Marangi (Ansuel)
  2 siblings, 1 reply; 10+ messages in thread
From: Brian Masney @ 2026-09-21 15:34 UTC (permalink / raw)
  To: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Felix Fietkau, linux-clk,
	devicetree, linux-kernel, Christian Marangi


On Tue, 15 Sep 2026 14:52:22 +0200, Christian Marangi wrote:
> clk: en7523: Add support for selecting SCU serdes
> 
> This small series is a split from the Airoha AN7581 USB PHY series [1].
> 
> [1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/
> 
> Changes v2:
> - Rebase on top of linux-next
> - Add review tag for Documentation patch
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
      commit: 11952173d8a180ac05641775f80bd6946327478f
[2/2] clk: en7523: Add support for selecting the Serdes port in SCU
      commit: 4e39820b601221997cb2220edc830f92367cdfc2

Best regards,
-- 
Brian Masney <bmasney@redhat.com>


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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-09-21 15:34 ` [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Brian Masney
@ 2026-10-06 11:23   ` Christian Marangi (Ansuel)
  2026-10-07 13:06     ` Brian Masney
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Marangi (Ansuel) @ 2026-10-06 11:23 UTC (permalink / raw)
  To: Brian Masney
  Cc: Stephen Boyd, Brian Masney, Jerome Brunet, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Felix Fietkau, linux-clk,
	devicetree, linux-kernel, Vinod Koul

Il giorno lun 21 set 2026 alle ore 17:34 Brian Masney
<bmasney@redhat.com> ha scritto:
>
>
> On Tue, 15 Sep 2026 14:52:22 +0200, Christian Marangi wrote:
> > clk: en7523: Add support for selecting SCU serdes
> >
> > This small series is a split from the Airoha AN7581 USB PHY series [1].
> >
> > [1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/
> >
> > Changes v2:
> > - Rebase on top of linux-next
> > - Add review tag for Documentation patch
> >
> > [...]
>
> Applied, thanks!
>
> [1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
>       commit: 11952173d8a180ac05641775f80bd6946327478f
> [2/2] clk: en7523: Add support for selecting the Serdes port in SCU
>       commit: 4e39820b601221997cb2220edc830f92367cdfc2
>

Hi Brian,

is it possible to have a stable branch/signed tag for phy subsystem?
Commit 11952173d8a180ac05641775f80bd6946327478f is needed
to permit correct compilation of a airoha usb phy driver.

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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-10-06 11:23   ` Christian Marangi (Ansuel)
@ 2026-10-07 13:06     ` Brian Masney
  2026-10-09 16:33       ` Brian Masney
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Masney @ 2026-10-07 13:06 UTC (permalink / raw)
  To: Christian Marangi (Ansuel)
  Cc: Brian Masney, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	linux-clk, devicetree, linux-kernel, Vinod Koul

On Tue, Oct 06, 2026 at 01:23:36PM +0200, Christian Marangi (Ansuel) wrote:
> Il giorno lun 21 set 2026 alle ore 17:34 Brian Masney
> <bmasney@redhat.com> ha scritto:
> >
> >
> > On Tue, 15 Sep 2026 14:52:22 +0200, Christian Marangi wrote:
> > > clk: en7523: Add support for selecting SCU serdes
> > >
> > > This small series is a split from the Airoha AN7581 USB PHY series [1].
> > >
> > > [1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/
> > >
> > > Changes v2:
> > > - Rebase on top of linux-next
> > > - Add review tag for Documentation patch
> > >
> > > [...]
> >
> > Applied, thanks!
> >
> > [1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
> >       commit: 11952173d8a180ac05641775f80bd6946327478f
> > [2/2] clk: en7523: Add support for selecting the Serdes port in SCU
> >       commit: 4e39820b601221997cb2220edc830f92367cdfc2
> >
> 
> is it possible to have a stable branch/signed tag for phy subsystem?
> Commit 11952173d8a180ac05641775f80bd6946327478f is needed
> to permit correct compilation of a airoha usb phy driver.

Yes. I'll have to rebase the clk-next tree but it's no big deal.

I'm at Linux Plumbers right now and I'll send out an immutable tag in a
day or two.

Brian

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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-10-07 13:06     ` Brian Masney
@ 2026-10-09 16:33       ` Brian Masney
  2026-10-09 17:22         ` Christian Marangi (Ansuel)
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Masney @ 2026-10-09 16:33 UTC (permalink / raw)
  To: Christian Marangi (Ansuel)
  Cc: Brian Masney, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	linux-clk, devicetree, linux-kernel, Vinod Koul

Hi Christian and Vinod,

On Wed, Oct 07, 2026 at 03:06:55PM +0200, Brian Masney wrote:
> On Tue, Oct 06, 2026 at 01:23:36PM +0200, Christian Marangi (Ansuel) wrote:
> > Il giorno lun 21 set 2026 alle ore 17:34 Brian Masney
> > <bmasney@redhat.com> ha scritto:
> > >
> > >
> > > On Tue, 15 Sep 2026 14:52:22 +0200, Christian Marangi wrote:
> > > > clk: en7523: Add support for selecting SCU serdes
> > > >
> > > > This small series is a split from the Airoha AN7581 USB PHY series [1].
> > > >
> > > > [1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/
> > > >
> > > > Changes v2:
> > > > - Rebase on top of linux-next
> > > > - Add review tag for Documentation patch
> > > >
> > > > [...]
> > >
> > > Applied, thanks!
> > >
> > > [1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
> > >       commit: 11952173d8a180ac05641775f80bd6946327478f
> > > [2/2] clk: en7523: Add support for selecting the Serdes port in SCU
> > >       commit: 4e39820b601221997cb2220edc830f92367cdfc2
> > >
> > 
> > is it possible to have a stable branch/signed tag for phy subsystem?
> > Commit 11952173d8a180ac05641775f80bd6946327478f is needed
> > to permit correct compilation of a airoha usb phy driver.
> 
> Yes. I'll have to rebase the clk-next tree but it's no big deal.
> 
> I'm at Linux Plumbers right now and I'll send out an immutable tag in a
> day or two.

I looked into creating an immutable branch, however as I mentioned it's
going to require rebasing clk-next (actually clk-pile). I'm willing to
do that, however I realized after I sent my last email that the laptop
I'm working on right now in Europe only has access to my kernel.org
account. So I'd have to rebase all of the prior commits and add my korg
Signed-off-by since it's going to change the committer on lots of
commits from my Red Hat to korg account.  I don't want to do that.

Given that we're this close to the merge window, I'd like to avoid any
kind of risky operations on the tree this close to assembling a pull for
Linus. If I can be convinced this is particularly pressing for v7.4 I'm
willing to entertain the request, but I wouldn't be able to do it until
Monday when I'm back in the US.

Brian

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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-10-09 16:33       ` Brian Masney
@ 2026-10-09 17:22         ` Christian Marangi (Ansuel)
  2026-10-10  9:30           ` Vinod Koul
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Marangi (Ansuel) @ 2026-10-09 17:22 UTC (permalink / raw)
  To: Brian Masney
  Cc: Brian Masney, Stephen Boyd, Brian Masney, Jerome Brunet,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Felix Fietkau,
	linux-clk, devicetree, linux-kernel, Vinod Koul

Il giorno ven 9 ott 2026 alle ore 18:33 Brian Masney
<masneyb@kernel.org> ha scritto:
>
> Hi Christian and Vinod,
>
> On Wed, Oct 07, 2026 at 03:06:55PM +0200, Brian Masney wrote:
> > On Tue, Oct 06, 2026 at 01:23:36PM +0200, Christian Marangi (Ansuel) wrote:
> > > Il giorno lun 21 set 2026 alle ore 17:34 Brian Masney
> > > <bmasney@redhat.com> ha scritto:
> > > >
> > > >
> > > > On Tue, 15 Sep 2026 14:52:22 +0200, Christian Marangi wrote:
> > > > > clk: en7523: Add support for selecting SCU serdes
> > > > >
> > > > > This small series is a split from the Airoha AN7581 USB PHY series [1].
> > > > >
> > > > > [1] https://lore.kernel.org/all/20260702093812.15918-1-ansuelsmth@gmail.com/
> > > > >
> > > > > Changes v2:
> > > > > - Rebase on top of linux-next
> > > > > - Add review tag for Documentation patch
> > > > >
> > > > > [...]
> > > >
> > > > Applied, thanks!
> > > >
> > > > [1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port
> > > >       commit: 11952173d8a180ac05641775f80bd6946327478f
> > > > [2/2] clk: en7523: Add support for selecting the Serdes port in SCU
> > > >       commit: 4e39820b601221997cb2220edc830f92367cdfc2
> > > >
> > >
> > > is it possible to have a stable branch/signed tag for phy subsystem?
> > > Commit 11952173d8a180ac05641775f80bd6946327478f is needed
> > > to permit correct compilation of a airoha usb phy driver.
> >
> > Yes. I'll have to rebase the clk-next tree but it's no big deal.
> >
> > I'm at Linux Plumbers right now and I'll send out an immutable tag in a
> > day or two.
>
> I looked into creating an immutable branch, however as I mentioned it's
> going to require rebasing clk-next (actually clk-pile). I'm willing to
> do that, however I realized after I sent my last email that the laptop
> I'm working on right now in Europe only has access to my kernel.org
> account. So I'd have to rebase all of the prior commits and add my korg
> Signed-off-by since it's going to change the committer on lots of
> commits from my Red Hat to korg account.  I don't want to do that.
>
> Given that we're this close to the merge window, I'd like to avoid any
> kind of risky operations on the tree this close to assembling a pull for
> Linus. If I can be convinced this is particularly pressing for v7.4 I'm
> willing to entertain the request, but I wouldn't be able to do it until
> Monday when I'm back in the US.
>

Thanks a lot for the effort. No, no need to hurry on this.

It was ideal to have as it's currently blocking 2 other driver for
submission but it's not worth to cause all these rebase and resign.

If minimal changes are possible, it's totally ok to wait for Monday.

If not possible, then rc1 it is.

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

* Re: [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes
  2026-10-09 17:22         ` Christian Marangi (Ansuel)
@ 2026-10-10  9:30           ` Vinod Koul
  0 siblings, 0 replies; 10+ messages in thread
From: Vinod Koul @ 2026-10-10  9:30 UTC (permalink / raw)
  To: Christian Marangi (Ansuel)
  Cc: Brian Masney, Brian Masney, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Felix Fietkau, linux-clk, devicetree, linux-kernel

On 09-10-26, 19:22, Christian Marangi (Ansuel) wrote:

> > > >
> > > > is it possible to have a stable branch/signed tag for phy subsystem?
> > > > Commit 11952173d8a180ac05641775f80bd6946327478f is needed
> > > > to permit correct compilation of a airoha usb phy driver.
> > >
> > > Yes. I'll have to rebase the clk-next tree but it's no big deal.
> > >
> > > I'm at Linux Plumbers right now and I'll send out an immutable tag in a
> > > day or two.
> >
> > I looked into creating an immutable branch, however as I mentioned it's
> > going to require rebasing clk-next (actually clk-pile). I'm willing to
> > do that, however I realized after I sent my last email that the laptop
> > I'm working on right now in Europe only has access to my kernel.org
> > account. So I'd have to rebase all of the prior commits and add my korg
> > Signed-off-by since it's going to change the committer on lots of
> > commits from my Red Hat to korg account.  I don't want to do that.
> >
> > Given that we're this close to the merge window, I'd like to avoid any
> > kind of risky operations on the tree this close to assembling a pull for
> > Linus. If I can be convinced this is particularly pressing for v7.4 I'm
> > willing to entertain the request, but I wouldn't be able to do it until
> > Monday when I'm back in the US.

I would be on same lines. Considering we are _very_ close to merge
windows, I would be very hesitant to rebase my tree
> >
> 
> Thanks a lot for the effort. No, no need to hurry on this.
> 
> It was ideal to have as it's currently blocking 2 other driver for
> submission but it's not worth to cause all these rebase and resign.
> 
> If minimal changes are possible, it's totally ok to wait for Monday.
> 
> If not possible, then rc1 it is.

Yes lets postpone this to rc1.

Also, in future it is strongly recommended that people request folks for
immutable tags when patches are picked (ideally mention in cover) so
that dependencies are taken care of.

Thanks
-- 
~Vinod

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

end of thread, other threads:[~2026-10-10  9:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 12:52 [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Christian Marangi
2026-09-15 12:52 ` [PATCH v2 1/2] dt-bindings: clock: airoha: Add PHY binding for Serdes port Christian Marangi
2026-09-15 12:52 ` [PATCH v2 2/2] clk: en7523: Add support for selecting the Serdes port in SCU Christian Marangi
2026-09-15 13:02   ` sashiko-bot
2026-09-21 15:34 ` [PATCH v2 0/2] clk: en7523: Add support for selecting SCU serdes Brian Masney
2026-10-06 11:23   ` Christian Marangi (Ansuel)
2026-10-07 13:06     ` Brian Masney
2026-10-09 16:33       ` Brian Masney
2026-10-09 17:22         ` Christian Marangi (Ansuel)
2026-10-10  9:30           ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox