* [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 2/9] dt-bindings: usb: generic-{ehci,ohci}: " Alastair D'Silva
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the Allwinner A733 (sun60i-a733) USB 2.0 PHY compatible string.
The A733 USB PHY requires the OTG/PHY register bus clock (bus) in addition
to the two PHY reference clocks.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../phy/allwinner,sun50i-a64-usb-phy.yaml | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
index 580c3296a18d..4892c1766182 100644
--- a/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/allwinner,sun50i-a64-usb-phy.yaml
@@ -19,6 +19,7 @@ properties:
- enum:
- allwinner,sun20i-d1-usb-phy
- allwinner,sun50i-a64-usb-phy
+ - allwinner,sun60i-a733-usb-phy
- items:
- enum:
- allwinner,sun50i-a100-usb-phy
@@ -38,14 +39,18 @@ properties:
- const: pmu1
clocks:
+ minItems: 2
items:
- description: USB OTG PHY bus clock
- description: USB Host 0 PHY bus clock
+ - description: USB OTG/PHY register bus clock
clock-names:
+ minItems: 2
items:
- const: usb0_phy
- const: usb1_phy
+ - const: bus
resets:
items:
@@ -84,6 +89,25 @@ required:
- resets
- reset-names
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: allwinner,sun60i-a733-usb-phy
+ then:
+ properties:
+ clocks:
+ minItems: 3
+ clock-names:
+ minItems: 3
+ else:
+ properties:
+ clocks:
+ maxItems: 2
+ clock-names:
+ maxItems: 2
+
additionalProperties: false
examples:
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 2/9] dt-bindings: usb: generic-{ehci,ohci}: Add Allwinner A733
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733 Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 3/9] usb: ehci-platform: Increase EHCI_MAX_CLKS to 5 Alastair D'Silva
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the Allwinner A733 EHCI and OHCI compatible strings to the generic
EHCI and OHCI bindings.
The A733 EHCI controller requires 5 clocks (bus EHCI, bus OHCI, OHCI
module, AHB USB SYS, and MBUS MSI-Lite2) and the OHCI controller
requires 4 clocks. Constrain the clock counts for the A733 compatibles.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../devicetree/bindings/usb/generic-ehci.yaml | 17 ++++++++++++++++-
.../devicetree/bindings/usb/generic-ohci.yaml | 5 ++++-
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
index 908b02d9175e..ae376b8d7c04 100644
--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
@@ -21,6 +21,7 @@ properties:
- allwinner,sun50i-h616-ehci
- allwinner,sun55i-a523-ehci
- allwinner,sun5i-a13-ehci
+ - allwinner,sun60i-a733-ehci
- allwinner,sun6i-a31-ehci
- allwinner,sun7i-a20-ehci
- allwinner,sun8i-a23-ehci
@@ -98,7 +99,7 @@ properties:
clocks:
minItems: 1
- maxItems: 4
+ maxItems: 5
description: |
In case the Renesas R-Car Gen3 SoCs:
- if a host only channel: first clock should be host.
@@ -217,6 +218,20 @@ allOf:
required:
- access-controllers
- clocks
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: allwinner,sun60i-a733-ehci
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ else:
+ properties:
+ clocks:
+ minItems: 1
+ maxItems: 4
unevaluatedProperties: false
diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
index 7a8c3c231815..65d057f247fe 100644
--- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
@@ -21,6 +21,7 @@ properties:
- allwinner,sun50i-h616-ohci
- allwinner,sun55i-a523-ohci
- allwinner,sun5i-a13-ohci
+ - allwinner,sun60i-a733-ohci
- allwinner,sun6i-a31-ohci
- allwinner,sun7i-a20-ohci
- allwinner,sun8i-a23-ohci
@@ -210,7 +211,9 @@ allOf:
properties:
compatible:
contains:
- const: rockchip,rk3588-ohci
+ enum:
+ - allwinner,sun60i-a733-ohci
+ - rockchip,rk3588-ohci
then:
properties:
clocks:
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 3/9] usb: ehci-platform: Increase EHCI_MAX_CLKS to 5
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 1/9] dt-bindings: phy: allwinner,sun50i-a64-usb-phy: Add Allwinner A733 Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 2/9] dt-bindings: usb: generic-{ehci,ohci}: " Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 4/9] phy: allwinner: sun4i-usb: Add Allwinner A733 support Alastair D'Silva
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
The Allwinner A733 EHCI controllers require 5 clocks (bus EHCI, bus
OHCI, OHCI module, AHB USB SYS, and MBUS MSI-Lite2).
Increase EHCI_MAX_CLKS from 4 to 5 so ehci-platform enables all five
clocks.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
drivers/usb/host/ehci-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index f61f095cedab..cf40b7b8d1c1 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -40,7 +40,7 @@
#include "ehci.h"
#define DRIVER_DESC "EHCI generic platform driver"
-#define EHCI_MAX_CLKS 4
+#define EHCI_MAX_CLKS 5
#define hcd_to_ehci_priv(h) ((struct ehci_platform_priv *)hcd_to_ehci(h)->priv)
#define BCM_USB_FIFO_THRESHOLD 0x00800040
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 4/9] phy: allwinner: sun4i-usb: Add Allwinner A733 support
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (2 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 3/9] usb: ehci-platform: Increase EHCI_MAX_CLKS to 5 Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 5/9] arm64: dts: allwinner: sun60i-a733: Add USB 2.0 host nodes Alastair D'Silva
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add support for the Allwinner A733 (sun60i-a733) USB 2.0 PHY.
Enable the PHY register bus clock (bus) during PHY init, and keep PHY0 out
of reset and SIDDQ while any PHY is active.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
drivers/phy/allwinner/phy-sun4i-usb.c | 119 +++++++++++++++++++-------
1 file changed, 88 insertions(+), 31 deletions(-)
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index f26eed0db17e..e1f20d00d593 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -102,7 +102,9 @@ struct sun4i_usb_phy_cfg {
u32 hci_phy_ctl_clear;
u8 phyctl_offset;
bool dedicated_clocks;
+ bool has_bus_clk;
bool phy0_dual_route;
+ bool needs_phy0_siddq;
bool needs_phy2_siddq;
bool siddq_in_base;
bool poll_vbusen;
@@ -111,9 +113,11 @@ struct sun4i_usb_phy_cfg {
struct sun4i_usb_phy_data {
void __iomem *base;
+ struct clk *bus_clk;
const struct sun4i_usb_phy_cfg *cfg;
enum usb_dr_mode dr_mode;
spinlock_t reg_lock; /* guard access to phyctl reg */
+ unsigned int phy0_siddq_users;
int num_phys;
struct sun4i_usb_phy {
struct phy *phy;
@@ -257,24 +261,39 @@ static int sun4i_usb_phy_init(struct phy *_phy)
{
struct sun4i_usb_phy *phy = phy_get_drvdata(_phy);
struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy);
+ unsigned long flags;
int ret;
u32 val;
- ret = clk_prepare_enable(phy->clk);
+ ret = clk_prepare_enable(data->bus_clk);
if (ret)
return ret;
+ ret = clk_prepare_enable(phy->clk);
+ if (ret)
+ goto err_disable_bus_clk;
+
ret = clk_prepare_enable(phy->clk2);
- if (ret) {
- clk_disable_unprepare(phy->clk);
- return ret;
- }
+ if (ret)
+ goto err_disable_clk;
ret = reset_control_deassert(phy->reset);
- if (ret) {
- clk_disable_unprepare(phy->clk2);
- clk_disable_unprepare(phy->clk);
- return ret;
+ if (ret)
+ goto err_disable_clk2;
+
+ /* Some PHYs on some SoCs need the help of PHY0 to work. */
+ if (data->cfg->needs_phy0_siddq && phy->index != 0) {
+ struct sun4i_usb_phy *phy0 = &data->phys[0];
+
+ ret = clk_prepare_enable(phy0->clk);
+ if (ret)
+ goto err_assert_reset;
+
+ ret = reset_control_deassert(phy0->reset);
+ if (ret) {
+ clk_disable_unprepare(phy0->clk);
+ goto err_assert_reset;
+ }
}
/* Some PHYs on some SoCs need the help of PHY2 to work. */
@@ -282,20 +301,13 @@ static int sun4i_usb_phy_init(struct phy *_phy)
struct sun4i_usb_phy *phy2 = &data->phys[2];
ret = clk_prepare_enable(phy2->clk);
- if (ret) {
- reset_control_assert(phy->reset);
- clk_disable_unprepare(phy->clk2);
- clk_disable_unprepare(phy->clk);
- return ret;
- }
+ if (ret)
+ goto err_assert_reset;
ret = reset_control_deassert(phy2->reset);
if (ret) {
clk_disable_unprepare(phy2->clk);
- reset_control_assert(phy->reset);
- clk_disable_unprepare(phy->clk2);
- clk_disable_unprepare(phy->clk);
- return ret;
+ goto err_assert_reset;
}
/*
@@ -306,10 +318,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
if (ret) {
reset_control_assert(phy2->reset);
clk_disable_unprepare(phy2->clk);
- reset_control_assert(phy->reset);
- clk_disable_unprepare(phy->clk2);
- clk_disable_unprepare(phy->clk);
- return ret;
+ goto err_assert_reset;
}
if (phy2->pmu && data->cfg->hci_phy_ctl_clear) {
@@ -328,11 +337,16 @@ static int sun4i_usb_phy_init(struct phy *_phy)
}
if (data->cfg->siddq_in_base) {
- if (phy->index == 0) {
+ if (phy->index == 0 || data->cfg->needs_phy0_siddq) {
+ spin_lock_irqsave(&data->reg_lock, flags);
val = readl(data->base + data->cfg->phyctl_offset);
- val |= PHY_CTL_VBUSVLDEXT;
+ if (phy->index == 0)
+ val |= PHY_CTL_VBUSVLDEXT;
val &= ~PHY_CTL_SIDDQ;
writel(val, data->base + data->cfg->phyctl_offset);
+ if (data->cfg->needs_phy0_siddq)
+ data->phy0_siddq_users++;
+ spin_unlock_irqrestore(&data->reg_lock, flags);
}
} else {
/* Enable USB 45 Ohm resistor calibration */
@@ -363,27 +377,48 @@ static int sun4i_usb_phy_init(struct phy *_phy)
}
return 0;
+
+err_assert_reset:
+ reset_control_assert(phy->reset);
+err_disable_clk2:
+ clk_disable_unprepare(phy->clk2);
+err_disable_clk:
+ clk_disable_unprepare(phy->clk);
+err_disable_bus_clk:
+ clk_disable_unprepare(data->bus_clk);
+ return ret;
}
static int sun4i_usb_phy_exit(struct phy *_phy)
{
struct sun4i_usb_phy *phy = phy_get_drvdata(_phy);
struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy);
+ unsigned long flags;
- if (phy->index == 0) {
- if (data->cfg->siddq_in_base) {
- void __iomem *phyctl = data->base +
- data->cfg->phyctl_offset;
+ if (data->cfg->siddq_in_base &&
+ (phy->index == 0 || data->cfg->needs_phy0_siddq)) {
+ void __iomem *phyctl = data->base + data->cfg->phyctl_offset;
+ spin_lock_irqsave(&data->reg_lock, flags);
+ if (!data->cfg->needs_phy0_siddq || --data->phy0_siddq_users == 0)
writel(readl(phyctl) | PHY_CTL_SIDDQ, phyctl);
- }
+ spin_unlock_irqrestore(&data->reg_lock, flags);
+ }
+ if (phy->index == 0) {
/* Disable pull-ups */
sun4i_usb_phy0_update_iscr(_phy, ISCR_DPDM_PULLUP_EN, 0);
sun4i_usb_phy0_update_iscr(_phy, ISCR_ID_PULLUP_EN, 0);
data->phy0_init = false;
}
+ if (data->cfg->needs_phy0_siddq && phy->index != 0) {
+ struct sun4i_usb_phy *phy0 = &data->phys[0];
+
+ reset_control_assert(phy0->reset);
+ clk_disable_unprepare(phy0->clk);
+ }
+
if (data->cfg->needs_phy2_siddq && phy->index != 2) {
struct sun4i_usb_phy *phy2 = &data->phys[2];
@@ -395,6 +430,7 @@ static int sun4i_usb_phy_exit(struct phy *_phy)
reset_control_assert(phy->reset);
clk_disable_unprepare(phy->clk2);
clk_disable_unprepare(phy->clk);
+ clk_disable_unprepare(data->bus_clk);
return 0;
}
@@ -739,6 +775,13 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
if (IS_ERR(data->base))
return PTR_ERR(data->base);
+ if (data->cfg->has_bus_clk) {
+ data->bus_clk = devm_clk_get(dev, "bus");
+ if (IS_ERR(data->bus_clk))
+ return dev_err_probe(dev, PTR_ERR(data->bus_clk),
+ "failed to get bus clock\n");
+ }
+
data->id_det_gpio = devm_gpiod_get_optional(dev, "usb0_id_det",
GPIOD_IN);
if (IS_ERR(data->id_det_gpio)) {
@@ -787,7 +830,10 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
continue;
snprintf(name, sizeof(name), "usb%d_reset", i);
- phy->reset = devm_reset_control_get(dev, name);
+ if (i == 0 && data->cfg->needs_phy0_siddq)
+ phy->reset = devm_reset_control_get_shared(dev, name);
+ else
+ phy->reset = devm_reset_control_get(dev, name);
if (IS_ERR(phy->reset)) {
if (PTR_ERR(phy->reset) == -ENOENT)
break;
@@ -1013,6 +1059,16 @@ static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = {
.siddq_in_base = true,
};
+static const struct sun4i_usb_phy_cfg sun60i_a733_cfg = {
+ .phyctl_offset = REG_PHYCTL_A33,
+ .dedicated_clocks = true,
+ .has_bus_clk = true,
+ .hci_phy_ctl_clear = PHY_CTL_SIDDQ,
+ .phy0_dual_route = true,
+ .needs_phy0_siddq = true,
+ .siddq_in_base = true,
+};
+
static const struct of_device_id sun4i_usb_phy_of_match[] = {
{ .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg },
{ .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg },
@@ -1029,6 +1085,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = {
.data = &sun50i_a64_cfg},
{ .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg },
{ .compatible = "allwinner,sun50i-h616-usb-phy", .data = &sun50i_h616_cfg },
+ { .compatible = "allwinner,sun60i-a733-usb-phy", .data = &sun60i_a733_cfg },
{ .compatible = "allwinner,suniv-f1c100s-usb-phy",
.data = &suniv_f1c100s_cfg },
{ },
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 5/9] arm64: dts: allwinner: sun60i-a733: Add USB 2.0 host nodes
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (3 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 4/9] phy: allwinner: sun4i-usb: Add Allwinner A733 support Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 6/9] arm64: dts: allwinner: sun60i-a733-orangepi-4-pro: Enable USB 2.0 host Alastair D'Silva
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the usbphy, ehci0, ohci0, ehci1, and ohci1 nodes for the Allwinner
A733 SoC.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../arm64/boot/dts/allwinner/sun60i-a733.dtsi | 86 +++++++++++++++++++
1 file changed, 86 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi b/arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
index e062b08006da..3e2df92e63c9 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733.dtsi
@@ -546,6 +546,92 @@ mmc2: mmc@4022000 {
status = "disabled";
};
+ usbphy: phy@4100400 {
+ compatible = "allwinner,sun60i-a733-usb-phy";
+ reg = <0x04100400 0x100>,
+ <0x04101800 0x100>,
+ <0x04200800 0x100>;
+ reg-names = "phy_ctrl",
+ "pmu0",
+ "pmu1";
+ clocks = <&ccu CLK_USB01_REF>,
+ <&ccu CLK_USB01_REF>,
+ <&ccu CLK_BUS_OTG>;
+ clock-names = "usb0_phy",
+ "usb1_phy",
+ "bus";
+ resets = <&ccu RST_USB_PHY0>,
+ <&ccu RST_USB_PHY1>;
+ reset-names = "usb0_reset",
+ "usb1_reset";
+ #phy-cells = <1>;
+ status = "disabled";
+ };
+
+ ehci0: usb@4101000 {
+ compatible = "allwinner,sun60i-a733-ehci",
+ "generic-ehci";
+ reg = <0x04101000 0x100>;
+ interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&ccu CLK_AHB_USB_SYS>,
+ <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_BUS_EHCI0>,
+ <&ccu CLK_USB_OHCI0>,
+ <&ccu CLK_MBUS_MSI_LITE2>;
+ resets = <&ccu RST_BUS_OHCI0>,
+ <&ccu RST_BUS_EHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci0: usb@4101400 {
+ compatible = "allwinner,sun60i-a733-ohci",
+ "generic-ohci";
+ reg = <0x04101400 0x100>;
+ interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&ccu CLK_AHB_USB_SYS>,
+ <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_USB_OHCI0>,
+ <&ccu CLK_MBUS_MSI_LITE2>;
+ resets = <&ccu RST_BUS_OHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci1: usb@4200000 {
+ compatible = "allwinner,sun60i-a733-ehci",
+ "generic-ehci";
+ reg = <0x04200000 0x100>;
+ interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&ccu CLK_AHB_USB_SYS>,
+ <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_BUS_EHCI1>,
+ <&ccu CLK_USB_OHCI1>,
+ <&ccu CLK_MBUS_MSI_LITE2>;
+ resets = <&ccu RST_BUS_OHCI1>,
+ <&ccu RST_BUS_EHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci1: usb@4200400 {
+ compatible = "allwinner,sun60i-a733-ohci",
+ "generic-ohci";
+ reg = <0x04200400 0x100>;
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&ccu CLK_AHB_USB_SYS>,
+ <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_USB_OHCI1>,
+ <&ccu CLK_MBUS_MSI_LITE2>;
+ resets = <&ccu RST_BUS_OHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
r_ccu: clock-controller@7010000 {
compatible = "allwinner,sun60i-a733-r-ccu";
reg = <0x07010000 0x250>;
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 6/9] arm64: dts: allwinner: sun60i-a733-orangepi-4-pro: Enable USB 2.0 host
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (4 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 5/9] arm64: dts: allwinner: sun60i-a733: Add USB 2.0 host nodes Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 7/9] arm64: dts: allwinner: sun60i-a733-cubie-a7a: " Alastair D'Silva
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the 5V system supply and USB1 VBUS regulator (PB8), and enable usbphy,
ehci1, and ohci1 on the Xunlong OrangePi 4 Pro.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../allwinner/sun60i-a733-orangepi-4-pro.dts | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-orangepi-4-pro.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-orangepi-4-pro.dts
index 374287d962a8..327c996c7e7b 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733-orangepi-4-pro.dts
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-orangepi-4-pro.dts
@@ -21,6 +21,28 @@ aliases {
chosen {
stdout-path = "serial0:115200n8";
};
+
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <®_vcc5v>;
+ gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>; /* PB8 */
+ enable-active-high;
+ };
+
+ reg_vcc5v: regulator-vcc5v {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+};
+
+&ehci1 {
+ status = "okay";
};
&hosc {
@@ -36,6 +58,10 @@ &mmc0 {
status = "okay";
};
+&ohci1 {
+ status = "okay";
+};
+
&r_i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&r_i2c0_pl_pins>;
@@ -73,3 +99,8 @@ &uart0 {
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
+
+&usbphy {
+ usb1_vbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 7/9] arm64: dts: allwinner: sun60i-a733-cubie-a7a: Enable USB 2.0 host
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (5 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 6/9] arm64: dts: allwinner: sun60i-a733-orangepi-4-pro: Enable USB 2.0 host Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 8/9] arm64: dts: allwinner: sun60i-a733-cubie-a7s: " Alastair D'Silva
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the USB1 VBUS regulator (PL2) and enable usbphy, ehci1, and ohci1 on
the Radxa Cubie A7A.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../dts/allwinner/sun60i-a733-cubie-a7a.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
index 9017cadf6c6a..c10fe2014e76 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7a.dts
@@ -69,6 +69,17 @@ reg_vcc5v: regulator-5v {
regulator-max-microvolt = <5000000>;
regulator-always-on;
};
+
+ /* SGM2576 current-limited VBUS switch for the USB-A 3.0 port */
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <®_vcc5v>;
+ gpios = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+ enable-active-high;
+ };
};
&cpu0 {
@@ -103,6 +114,10 @@ &cpu7 {
cpu-supply = <®_dcdc3>;
};
+&ehci1 {
+ status = "okay";
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pg_pins>;
@@ -132,6 +147,10 @@ &hosc {
clock-frequency = <26000000>;
};
+&ohci1 {
+ status = "okay";
+};
+
&pio {
vcc-pb-supply = <®_swout2>; // via VCC-IO
vcc-pc-supply = <®_cldo5>;
@@ -383,3 +402,8 @@ &uart0 {
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
+
+&usbphy {
+ usb1_vbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 8/9] arm64: dts: allwinner: sun60i-a733-cubie-a7s: Enable USB 2.0 host
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (6 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 7/9] arm64: dts: allwinner: sun60i-a733-cubie-a7a: " Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:16 ` [PATCH v2 9/9] arm64: dts: allwinner: sun60i-a733-cubie-a7z: " Alastair D'Silva
2026-11-30 1:28 ` [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support sashiko-bot
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Add the USB1 VBUS regulator (PM5) and enable usbphy, ehci1, and ohci1 on
the Radxa Cubie A7S.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../dts/allwinner/sun60i-a733-cubie-a7s.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
index 98a878a2d739..c9d980dd7616 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
@@ -59,6 +59,17 @@ reg_ps: regulator-ps-output {
vin-supply = <®_vcc5v0_sys>;
};
+ /* SGM2576 current-limited VBUS switch for the USB-A 2.0 port */
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <®_vcc5v0_sys>;
+ gpios = <&r_pio 1 5 GPIO_ACTIVE_HIGH>; /* PM5 */
+ enable-active-high;
+ };
+
reg_vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0-sys";
@@ -100,6 +111,10 @@ &cpu7 {
cpu-supply = <®_dcdc3>;
};
+&ehci1 {
+ status = "okay";
+};
+
&hosc {
clock-frequency = <26000000>;
};
@@ -129,6 +144,10 @@ &mmc0 {
status = "okay";
};
+&ohci1 {
+ status = "okay";
+};
+
&pio {
vcc-pb-supply = <®_swout2>; /* via VCC-IO */
vcc-pc-supply = <®_cldo5>;
@@ -331,3 +350,8 @@ &uart0 {
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
+
+&usbphy {
+ usb1_vbus-supply = <®_usb1_vbus>;
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v2 9/9] arm64: dts: allwinner: sun60i-a733-cubie-a7z: Enable USB 2.0 host
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (7 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 8/9] arm64: dts: allwinner: sun60i-a733-cubie-a7s: " Alastair D'Silva
@ 2026-11-30 1:16 ` Alastair D'Silva
2026-11-30 1:28 ` [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support sashiko-bot
9 siblings, 0 replies; 11+ messages in thread
From: Alastair D'Silva @ 2026-11-30 1:16 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Greg Kroah-Hartman, Alan Stern,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
Cc: Maxime Ripard, Andre Przywara, Daniel Golle, Enzo Adriano,
Vinicius Pedrosa, linux-phy, devicetree, linux-arm-kernel,
linux-sunxi, linux-usb, linux-kernel, Alastair D'Silva
Enable usbphy, ehci1, and ohci1 for the onboard USB Wi-Fi/BT bus on the
Radxa Cubie A7Z.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
---
.../boot/dts/allwinner/sun60i-a733-cubie-a7z.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
index 049e6b67c23a..b5dd25981a5f 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7z.dts
@@ -102,6 +102,10 @@ &cpu7 {
cpu-supply = <®_dcdc3>;
};
+&ehci1 {
+ status = "okay";
+};
+
&hosc {
clock-frequency = <26000000>;
};
@@ -117,6 +121,10 @@ &mmc0 {
status = "okay";
};
+&ohci1 {
+ status = "okay";
+};
+
&pio {
/* VCC-IO */
vcc-pb-supply = <®_swout2>;
@@ -347,3 +355,7 @@ &uart0 {
pinctrl-0 = <&uart0_pb_pins>;
status = "okay";
};
+
+&usbphy {
+ status = "okay";
+};
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support
2026-11-30 1:16 [PATCH v2 0/9] Add Allwinner A733 USB 2.0 host support Alastair D'Silva
` (8 preceding siblings ...)
2026-11-30 1:16 ` [PATCH v2 9/9] arm64: dts: allwinner: sun60i-a733-cubie-a7z: " Alastair D'Silva
@ 2026-11-30 1:28 ` sashiko-bot
9 siblings, 0 replies; 11+ messages in thread
From: sashiko-bot @ 2026-11-30 1:28 UTC (permalink / raw)
To: Alastair D'Silva; +Cc: linux-usb
Sashiko has reviewed this 9-patch series and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130011623.3475209-1-alastair@d-silva.org
^ permalink raw reply [flat|nested] 11+ messages in thread