* [PATCH v2 0/2] phy: Add the Siflower SF19A2890 USB 2.0 PHY
@ 2026-11-17 0:31 Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 1/2] dt-bindings: phy: Add " Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver Joseph Telaak via B4 Relay
0 siblings, 2 replies; 4+ messages in thread
From: Joseph Telaak via B4 Relay @ 2026-11-17 0:31 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Chuanhong Guo, linux-mips, linux-phy, devicetree, linux-kernel,
Conor Dooley, Joseph Telaak
This series adds a binding and a driver for the USB 2.0 PHY of the
Siflower SF19A2890, a MIPS SoC for home routers. The PHY takes its
reference clock and its two resets from the USB block's clock and reset
manager, which goes to the clk tree.
The driver is Chuanhong Guo's, from his SF19A2890 branch [1], with my
changes noted.
The SoC support itself (MACH_SIFLOWER_MIPS) goes through the MIPS tree;
until then the driver builds with COMPILE_TEST. The DWC2 part goes to
the USB tree.
Tested on a GL.iNet GL-SFT1200 with the DWC2 patches. With v1 on
v7.4-rc1, a USB stick enumerates at 480 Mb/s and reads at 5.6 MB/s
(5.0 MB/s with the same stick on OpenWrt's 6.18 kernel), and comes back
after unplugging and replugging it twice. v2 takes the resets with the
bulk API, so it was run again, on OpenWrt's 6.18 kernel with the driver
backported: the stick enumerates at 480 Mb/s after a cold and a warm
boot and after reloading dwc2, which powers the PHY off and on, and
comes back after a replug.
[1] https://github.com/981213/linux/commits/siflower-7.1
---
Changes in v2:
- Write my note on Chuanhong's patch as a list.
- Add a MAINTAINERS entry for the driver and its binding, naming the
driver's file, since drivers/phy/siflower/ will also hold the SF21
PHY drivers.
- Get and toggle both resets with the reset_control_bulk API (Philipp).
- Word the error messages the same way, name the error labels, include
<linux/device-id/of.h> instead of <linux/of.h>, and use GPL-2.0-only,
not the deprecated GPL-2.0 SPDX identifier.
- Patch 1: add Conor's Ack.
- Link to v1: https://patch.msgid.link/20261104-sf19a2890-usb-phy-v1-0-db0cad937614@telaak.dev
---
Chuanhong Guo (1):
phy: siflower: Add SF19A2890 USB 2.0 PHY driver
Joseph Telaak (1):
dt-bindings: phy: Add Siflower SF19A2890 USB 2.0 PHY
.../bindings/phy/siflower,sf19a2890-usb-phy.yaml | 58 +++++++++
MAINTAINERS | 7 ++
drivers/phy/Kconfig | 1 +
drivers/phy/Makefile | 1 +
drivers/phy/siflower/Kconfig | 12 ++
drivers/phy/siflower/Makefile | 2 +
drivers/phy/siflower/phy-sf19a2890-usb.c | 132 +++++++++++++++++++++
7 files changed, 213 insertions(+)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261102-sf19a2890-usb-phy-5bb644992750
Best regards,
--
Joseph Telaak <joseph@telaak.dev>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] dt-bindings: phy: Add Siflower SF19A2890 USB 2.0 PHY
2026-11-17 0:31 [PATCH v2 0/2] phy: Add the Siflower SF19A2890 USB 2.0 PHY Joseph Telaak via B4 Relay
@ 2026-11-17 0:31 ` Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver Joseph Telaak via B4 Relay
1 sibling, 0 replies; 4+ messages in thread
From: Joseph Telaak via B4 Relay @ 2026-11-17 0:31 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Chuanhong Guo, linux-mips, linux-phy, devicetree, linux-kernel,
Conor Dooley, Joseph Telaak
From: Joseph Telaak <joseph@telaak.dev>
The USB 2.0 PHY of the Siflower SF19A2890 serves its DWC2 controller.
It takes a reference clock and two resets, power-on and PHY, from the
USB block's clock and reset manager.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Joseph Telaak <joseph@telaak.dev>
---
.../bindings/phy/siflower,sf19a2890-usb-phy.yaml | 58 ++++++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 64 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/siflower,sf19a2890-usb-phy.yaml b/Documentation/devicetree/bindings/phy/siflower,sf19a2890-usb-phy.yaml
new file mode 100644
index 000000000000..77b8e35d8017
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/siflower,sf19a2890-usb-phy.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/siflower,sf19a2890-usb-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Siflower SF19A2890 USB 2.0 PHY
+
+maintainers:
+ - Joseph Telaak <joseph@telaak.dev>
+
+description:
+ The USB 2.0 PHY of the Siflower SF19A2890, used by its DWC2 controller.
+
+properties:
+ compatible:
+ const: siflower,sf19a2890-usb-phy
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+ description: PHY reference clock
+
+ resets:
+ items:
+ - description: power-on reset
+ - description: PHY reset
+
+ reset-names:
+ items:
+ - const: por
+ - const: phy
+
+ "#phy-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - reset-names
+ - "#phy-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ usb-phy@19e0c040 {
+ compatible = "siflower,sf19a2890-usb-phy";
+ reg = <0x19e0c040 0x60>;
+ clocks = <&usb_crm 2>;
+ resets = <&usb_crm 1>, <&usb_crm 2>;
+ reset-names = "por", "phy";
+ #phy-cells = <0>;
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 93abbb315065..7033d9b6152d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25698,6 +25698,12 @@ N: sifive
K: fu[57]40
K: [^@]sifive
+SIFLOWER SF19A2890 USB PHY DRIVER
+M: Joseph Telaak <joseph@telaak.dev>
+L: linux-phy@lists.infradead.org
+S: Maintained
+F: Documentation/devicetree/bindings/phy/siflower,sf19a2890-usb-phy.yaml
+
SILEAD TOUCHSCREEN DRIVER
M: Hans de Goede <hansg@kernel.org>
L: linux-input@vger.kernel.org
--
Git-155)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver
2026-11-17 0:31 [PATCH v2 0/2] phy: Add the Siflower SF19A2890 USB 2.0 PHY Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 1/2] dt-bindings: phy: Add " Joseph Telaak via B4 Relay
@ 2026-11-17 0:31 ` Joseph Telaak via B4 Relay
2026-11-17 0:53 ` sashiko-bot
1 sibling, 1 reply; 4+ messages in thread
From: Joseph Telaak via B4 Relay @ 2026-11-17 0:31 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Philipp Zabel
Cc: Chuanhong Guo, linux-mips, linux-phy, devicetree, linux-kernel,
Joseph Telaak
From: Chuanhong Guo <gch981213@gmail.com>
Add a driver for the USB 2.0 PHY of the Siflower SF19A2890. Powering it
on enables its reference clock, releases its two resets and takes it
out of sleep.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
[Joseph Telaak:
- take the SF19A2890 PHY only, from Chuanhong's siflower-7.1 branch
- name the resets "por" and "phy"
- get and toggle the two resets with the bulk reset API
- dev_err_probe() for the resets
- drop the unused includes and drvdata
- Kconfig dependencies and help, commit message and subject]
Signed-off-by: Joseph Telaak <joseph@telaak.dev>
---
MAINTAINERS | 1 +
drivers/phy/Kconfig | 1 +
drivers/phy/Makefile | 1 +
drivers/phy/siflower/Kconfig | 12 +++
drivers/phy/siflower/Makefile | 2 +
drivers/phy/siflower/phy-sf19a2890-usb.c | 132 +++++++++++++++++++++++++++++++
6 files changed, 149 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7033d9b6152d..b9d5cfd3e30b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25703,6 +25703,7 @@ M: Joseph Telaak <joseph@telaak.dev>
L: linux-phy@lists.infradead.org
S: Maintained
F: Documentation/devicetree/bindings/phy/siflower,sf19a2890-usb-phy.yaml
+F: drivers/phy/siflower/phy-sf19a2890-usb.c
SILEAD TOUCHSCREEN DRIVER
M: Hans de Goede <hansg@kernel.org>
diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 105fbe408aa2..8ba351e23c09 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -194,6 +194,7 @@ source "drivers/phy/realtek/Kconfig"
source "drivers/phy/renesas/Kconfig"
source "drivers/phy/rockchip/Kconfig"
source "drivers/phy/samsung/Kconfig"
+source "drivers/phy/siflower/Kconfig"
source "drivers/phy/socionext/Kconfig"
source "drivers/phy/sophgo/Kconfig"
source "drivers/phy/spacemit/Kconfig"
diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
index c6dd02003bbe..8c917c4c5531 100644
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_GENERIC_PHY) += allwinner/ \
renesas/ \
rockchip/ \
samsung/ \
+ siflower/ \
socionext/ \
sophgo/ \
spacemit/ \
diff --git a/drivers/phy/siflower/Kconfig b/drivers/phy/siflower/Kconfig
new file mode 100644
index 000000000000..5ae1f83d1449
--- /dev/null
+++ b/drivers/phy/siflower/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config PHY_SF19A2890_USB
+ tristate "Siflower SF19A2890 USB 2.0 PHY driver"
+ depends on MACH_SIFLOWER_MIPS || COMPILE_TEST
+ depends on OF
+ select GENERIC_PHY
+ help
+ Enable this to support the USB 2.0 PHY of the Siflower SF19A2890,
+ used by its DWC2 controller. Its reference clock and its resets
+ come from the USB block's clock and reset manager.
+ Say M or Y if the kernel is to run on this SoC.
diff --git a/drivers/phy/siflower/Makefile b/drivers/phy/siflower/Makefile
new file mode 100644
index 000000000000..a12383193429
--- /dev/null
+++ b/drivers/phy/siflower/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_PHY_SF19A2890_USB) += phy-sf19a2890-usb.o
diff --git a/drivers/phy/siflower/phy-sf19a2890-usb.c b/drivers/phy/siflower/phy-sf19a2890-usb.c
new file mode 100644
index 000000000000..a7de66e54cba
--- /dev/null
+++ b/drivers/phy/siflower/phy-sf19a2890-usb.c
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include <linux/array_size.h>
+#include <linux/clk.h>
+#include <linux/device-id/of.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/phy/phy.h>
+#include <linux/platform_device.h>
+#include <linux/reset.h>
+
+#define USB_SLEEPM 0x4
+
+struct sf19a2890_usb_phy {
+ struct device *dev;
+ struct clk *phy_clk;
+ /* Asserted in this order, deasserted in reverse */
+ struct reset_control_bulk_data resets[2];
+ void __iomem *base;
+};
+
+static int sf19a2890_usb_phy_power_on(struct phy *phy)
+{
+ struct sf19a2890_usb_phy *p_phy = phy_get_drvdata(phy);
+ int ret;
+
+ ret = clk_prepare_enable(p_phy->phy_clk);
+ if (ret) {
+ dev_err(p_phy->dev, "failed to enable the PHY clock: %d\n",
+ ret);
+ return ret;
+ }
+
+ ret = reset_control_bulk_deassert(ARRAY_SIZE(p_phy->resets),
+ p_phy->resets);
+ if (ret)
+ goto err_disable_clk;
+
+ writel(1, p_phy->base + USB_SLEEPM);
+ return 0;
+
+err_disable_clk:
+ clk_disable_unprepare(p_phy->phy_clk);
+ return ret;
+}
+
+static int sf19a2890_usb_phy_power_off(struct phy *phy)
+{
+ struct sf19a2890_usb_phy *p_phy = phy_get_drvdata(phy);
+
+ writel(0, p_phy->base + USB_SLEEPM);
+ reset_control_bulk_assert(ARRAY_SIZE(p_phy->resets), p_phy->resets);
+ clk_disable_unprepare(p_phy->phy_clk);
+ return 0;
+}
+
+static const struct phy_ops sf19a2890_usb_phy_ops = {
+ .power_on = sf19a2890_usb_phy_power_on,
+ .power_off = sf19a2890_usb_phy_power_off,
+ .owner = THIS_MODULE,
+};
+
+static int sf19a2890_usb_phy_probe(struct platform_device *pdev)
+{
+ struct sf19a2890_usb_phy *p_phy;
+ struct phy_provider *provider;
+ struct phy *phy;
+ int ret;
+
+ p_phy = devm_kzalloc(&pdev->dev, sizeof(*p_phy), GFP_KERNEL);
+ if (!p_phy)
+ return -ENOMEM;
+
+ p_phy->dev = &pdev->dev;
+
+ p_phy->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(p_phy->base))
+ return PTR_ERR(p_phy->base);
+
+ p_phy->phy_clk = devm_clk_get(p_phy->dev, NULL);
+ if (IS_ERR(p_phy->phy_clk))
+ return dev_err_probe(p_phy->dev, PTR_ERR(p_phy->phy_clk),
+ "failed to get the PHY clock\n");
+
+ p_phy->resets[0].id = "por";
+ p_phy->resets[1].id = "phy";
+ ret = devm_reset_control_bulk_get_exclusive(p_phy->dev,
+ ARRAY_SIZE(p_phy->resets),
+ p_phy->resets);
+ if (ret)
+ return dev_err_probe(p_phy->dev, ret,
+ "failed to get the resets\n");
+
+ ret = reset_control_bulk_assert(ARRAY_SIZE(p_phy->resets),
+ p_phy->resets);
+ if (ret)
+ return ret;
+
+ phy = devm_phy_create(p_phy->dev, NULL, &sf19a2890_usb_phy_ops);
+ if (IS_ERR(phy))
+ return dev_err_probe(p_phy->dev, PTR_ERR(phy),
+ "failed to create the PHY\n");
+
+ phy_set_drvdata(phy, p_phy);
+
+ provider = devm_of_phy_provider_register(p_phy->dev,
+ of_phy_simple_xlate);
+ if (IS_ERR(provider))
+ return dev_err_probe(p_phy->dev, PTR_ERR(provider),
+ "failed to register the PHY provider\n");
+
+ return 0;
+}
+
+static const struct of_device_id sf19a2890_usb_phy_of_match[] = {
+ { .compatible = "siflower,sf19a2890-usb-phy" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, sf19a2890_usb_phy_of_match);
+
+static struct platform_driver sf19a2890_usb_phy_driver = {
+ .probe = sf19a2890_usb_phy_probe,
+ .driver = {
+ .name = "sf19a2890-usb-phy",
+ .of_match_table = sf19a2890_usb_phy_of_match,
+ },
+};
+module_platform_driver(sf19a2890_usb_phy_driver);
+
+MODULE_AUTHOR("Ziying Wu <ziying.wu@siflower.com.cn>");
+MODULE_DESCRIPTION("Siflower SF19A2890 USB 2.0 PHY driver");
+MODULE_LICENSE("GPL");
--
Git-155)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver
2026-11-17 0:31 ` [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver Joseph Telaak via B4 Relay
@ 2026-11-17 0:53 ` sashiko-bot
0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-17 0:53 UTC (permalink / raw)
To: Joseph Telaak
Cc: linux-phy, devicetree, robh, conor+dt, vkoul, neil.armstrong,
olteanv
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: siflower: undefined Kconfig dependency
MACH_SIFLOWER_MIPS
--
commit 202f638a2bcc34b802f82ced18e112090e99c627
Author: Chuanhong Guo <gch981213@gmail.com>
phy: siflower: Add SF19A2890 USB 2.0 PHY driver
This commit adds a driver and Kconfig entry for the Siflower SF19A2890
USB 2.0 PHY.
> diff --git a/drivers/phy/siflower/Kconfig b/drivers/phy/siflower/Kconfig
> new file mode 100644
> index 0000000000000..5ae1f83d14494
> --- /dev/null
> +++ b/drivers/phy/siflower/Kconfig
> @@ -0,0 +1,12 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +config PHY_SF19A2890_USB
> + tristate "Siflower SF19A2890 USB 2.0 PHY driver"
> + depends on MACH_SIFLOWER_MIPS || COMPILE_TEST
[Severity: Medium]
Is MACH_SIFLOWER_MIPS defined anywhere in the tree? Because that Kconfig
symbol does not exist, it evaluates to n and prevents PHY_SF19A2890_USB
from being enabled unless COMPILE_TEST is set.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-sf19a2890-usb-phy-v2-0-df3ce9d23f5a@telaak.dev?part=2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-17 0:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 0:31 [PATCH v2 0/2] phy: Add the Siflower SF19A2890 USB 2.0 PHY Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 1/2] dt-bindings: phy: Add " Joseph Telaak via B4 Relay
2026-11-17 0:31 ` [PATCH v2 2/2] phy: siflower: Add SF19A2890 USB 2.0 PHY driver Joseph Telaak via B4 Relay
2026-11-17 0:53 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox