arm64: allwinner: a523: add USB3.0 support
cover arm64: allwinner: a523: add USB3.0 support
From: Mikhail Kalashnikov <[email protected]>
This series is a draft and does not include patches for dt-bindings. The first series is necessary for testing on other devices and initiating discussion.
This series of patches adds USB 3.0 functionality for the A523/A527/H728/T527 processor.Most of the code is derived from the BSP,
as the datasheet does not fully describe this feature.
I have verified functionality on two of my boards, walnutpi 2b (t527) and x96qproplus (h728). When testing usb3.0 on x96qproplus, I get reconnections of my nvme, it looks like the port does not provide enough
current to work. I have encountered similar complaints from users of the
device on Android. In the case of walnutpi, there is no such problem.
Based on 6.17-rc1
Mikhail Kalashnikov (7):
clk: sunxi-ng: a523: add missing usb related clocks
arm64: dts: allwinner: a523: add third usb2 phy
phy: sun4i-usb: a523: add support for the USB2 PHY
phy: allwinner: a523: add USB3/PCIe PHY driver
arm64: dts: allwinner: a523: add USB3.0 phy node
arm64: dts: allwinner: a523: add DWC3 USB3.0 node
arm64: dts: allwinner: a523: activate USB3 for all boards
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 52 +++- .../dts/allwinner/sun55i-a527-cubie-a5e.dts | 8 + .../dts/allwinner/sun55i-h728-x96qpro+.dts | 8 + .../dts/allwinner/sun55i-t527-avaota-a1.dts | 8 + drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 32 +++ drivers/clk/sunxi-ng/ccu-sun55i-a523.h | 2 +- drivers/phy/allwinner/Kconfig | 9 + drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun4i-usb.c | 10 + drivers/phy/allwinner/phy-sun55i-usb3-pcie.c | 267 ++++++++++++++++++ include/dt-bindings/clock/sun55i-a523-ccu.h | 4 + 11 files changed, 392 insertions(+), 9 deletions(-) create mode 100644 drivers/phy/allwinner/phy-sun55i-usb3-pcie.c
Signature · 1 line
2.50.1
PATCH 1/7 clk: sunxi-ng: a523: add missing usb related clocks
From: Mikhail Kalashnikov <[email protected]>
Several clocks were omitted when adding the original driver. These clocks are necessary for USB 3.0 to work correctly. I added these declarations according to the driver's BSP code.
--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 32 +++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun55i-a523.h | 2 +- include/dt-bindings/clock/sun55i-a523-ccu.h | 4 +++ 3 files changed, 37 insertions(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun55i-a523.c +32 -0
@@ -853,6 +853,31 @@ static struct ccu_mux usb_ohci1_clk = { }, }; +static SUNXI_CCU_GATE_DATA(usb2_clk, "usb2", osc24M, 0xa80, BIT(31), 0); + +static const struct clk_parent_data usb3_parents[] = { + { .fw_name ="hosc" }, + { .hw = &pll_periph0_200M_clk.hw }, + { .hw = &pll_periph1_200M_clk.hw }, +}; + +static SUNXI_CCU_M_DATA_WITH_MUX_GATE(usb3_clk, "usb3", usb3_parents, 0xa84, +0 ,5 ,/* M */ +24 ,3 ,/* mux */ +BIT (31 ),/* gate */ + 0); + +static const struct clk_parent_data usb3_suspend_parents[] = { + { .fw_name ="losc" }, +}; + +static SUNXI_CCU_M_DATA_WITH_MUX_GATE(usb3_suspend_clk, "usb3-suspend", + usb3_suspend_parents,0xa88 , +0 ,5 ,/* M */ +24 ,1 ,/* mux */ +BIT (31 ),/* gate */ + 0); + static SUNXI_CCU_GATE_HWS(bus_ohci0_clk, "bus-ohci0", ahb_hws, 0xa8c, BIT(0), 0); static SUNXI_CCU_GATE_HWS(bus_ohci1_clk, "bus-ohci1", ahb_hws, 0xa8c,
@@ -1290,6 +1315,9 @@ static struct ccu_common *sun55i_a523_ccu_clks[] = { &bus_ths_clk.common, &usb_ohci0_clk.common, &usb_ohci1_clk.common, + &usb2_clk.common, + &usb3_clk.common, + &usb3_suspend_clk.common, &bus_ohci0_clk.common, &bus_ohci1_clk.common, &bus_ehci0_clk.common,
@@ -1422,6 +1450,7 @@ static struct clk_hw_onecell_data sun55i_a523_hw_clks = { [CLK_MBUS_DMA] = &mbus_dma_clk.common.hw, [CLK_MBUS_VE] = &mbus_ve_clk.common.hw, [CLK_MBUS_CE] = &mbus_ce_clk.common.hw, + [CLK_MBUS_USB3] = &mbus_usb3_clk.common.hw, [CLK_MBUS_CSI] = &mbus_csi_clk.common.hw, [CLK_MBUS_ISP] = &mbus_isp_clk.common.hw, [CLK_MBUS_EMAC1] = &mbus_gmac1_clk.common.hw,
@@ -1474,6 +1503,9 @@ static struct clk_hw_onecell_data sun55i_a523_hw_clks = { [CLK_BUS_THS] = &bus_ths_clk.common.hw, [CLK_USB_OHCI0] = &usb_ohci0_clk.common.hw, [CLK_USB_OHCI1] = &usb_ohci1_clk.common.hw, + [CLK_USB2] = &usb2_clk.common.hw, + [CLK_USB3] = &usb3_clk.common.hw, + [CLK_USB3_SUSPEND] = &usb3_suspend_clk.common.hw, [CLK_BUS_OHCI0] = &bus_ohci0_clk.common.hw, [CLK_BUS_OHCI1] = &bus_ohci1_clk.common.hw, [CLK_BUS_EHCI0] = &bus_ehci0_clk.common.hw,
drivers/clk/sunxi-ng/ccu-sun55i-a523.h +1 -1
@@ -9,6 +9,6 @@#include <dt-bindings/clock/sun55i-a523-ccu.h> #include <dt-bindings/reset/sun55i-a523-ccu.h> -#define CLK_NUMBER (CLK_FANOUT2 + 1) +#define CLK_NUMBER (CLK_MBUS_USB3 + 1)#endif /* _CCU_SUN55I_A523_H */
include/dt-bindings/clock/sun55i-a523-ccu.h +4 -0
@@ -185,5 +185,9 @@#define CLK_FANOUT0 176#define CLK_FANOUT1 177#define CLK_FANOUT2 178 +#define CLK_USB2 179 +#define CLK_USB3 180 +#define CLK_USB3_SUSPEND 181 +#define CLK_MBUS_USB3 182#endif /* _DT_BINDINGS_CLK_SUN55I_A523_CCU_H_ */
Signature · 1 line
2.50.1
Re: [PATCH 1/7] clk: sunxi-ng: a523: add missing usb related clocks
Quoted 11 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
Several clocks were omitted when adding the original driver. These clocks are necessary for USB 3.0 to work correctly. I added these declarations according to the driver's BSP code.
Signed-off-by Mikhail Kalashnikov <[email protected]>--- drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 32 +++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun55i-a523.h | 2 +- include/dt-bindings/clock/sun55i-a523-ccu.h | 4 +++
Bindings should be a separate patch. Checkpatch should also suggest that.
Best regards,
Krzysztof
PATCH 2/7 arm64: dts: allwinner: a523: add third usb2 phy
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
It seems that there are actually three usb2 phys in the processor, which makes it incompatible with D1.
The third phy is used together with USB3/PCIe combophy with DWC3 controller. In the BSP code, the third PHY requires a separate glue driver, but it seems that it is not needed.
According to the BSP code, the third phy does not have a reset line; the only reset is declared in the DWC3 node, but none of this is documented. Since sun4i-usb-phy driver requires a reset, I added RST_BUS_3 here.
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +13 -8
@@ -503,22 +503,27 @@ usb_otg: usb@4100000 { }; usbphy: phy@4100400 { - compatible = "allwinner,sun55i-a523-usb-phy", - "allwinner,sun20i-d1-usb-phy"; + compatible = "allwinner,sun55i-a523-usb-phy"; reg = <0x4100400 0x100>, <0x4101800 0x100>, - <0x4200800 0x100>; + <0x4200800 0x100>, + <0x4e00000 0x100>; reg-names = "phy_ctrl", "pmu0", - "pmu1"; + "pmu1", + "pmu2"; clocks = <&osc24M>, - <&osc24M>; + <&osc24M>, + <&ccu CLK_USB2>; clock-names = "usb0_phy", - "usb1_phy"; + "usb1_phy", + "usb2_phy"; resets = <&ccu RST_USB_PHY0>, - <&ccu RST_USB_PHY1>; + <&ccu RST_USB_PHY1>, + <&ccu RST_BUS_3>; reset-names = "usb0_reset", - "usb1_reset"; + "usb1_reset", + "usb2_reset"; status = "disabled"; #phy-cells = <1>; };
Signature · 1 line
2.50.1
Re: [PATCH 2/7] arm64: dts: allwinner: a523: add third usb2 phy
Quoted 21 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
It seems that there are actually three usb2 phys in the processor, which makes it incompatible with D1.
The third phy is used together with USB3/PCIe combophy with DWC3 controller. In the BSP code, the third PHY requires a separate glue driver, but it seems that it is not needed.
According to the BSP code, the third phy does not have a reset line; the only reset is declared in the DWC3 node, but none of this is documented. Since sun4i-usb-phy driver requires a reset, I addedRST_BUS_3here.Signed-off-by Mikhail Kalashnikov <[email protected]>--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi usb_otg: usb@4100000 { · line 506
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +1
-2@@ -503,22 +503,27 @@ usb_otg: usb@4100000 { }; usbphy: phy@4100400 { - compatible = "allwinner,sun55i-a523-usb-phy", - "allwinner,sun20i-d1-usb-phy"; + compatible = "allwinner,sun55i-a523-usb-phy";
That's potential break of all users. Also, having third phy (so additional piece) is not making things incompatible.
Best regards,
Krzysztof
Re: [PATCH 2/7] arm64: dts: allwinner: a523: add third usb2 phy
Quoted 24 lines · On Sat, 16 Aug 2025 11:31:12 +0200 Krzysztof Kozlowski <[email protected]> wrote:
Quoted 23 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
It seems that there are actually three usb2 phys in the processor, which makes it incompatible with D1.
The third phy is used together with USB3/PCIe combophy with DWC3 controller. In the BSP code, the third PHY requires a separate glue driver, but it seems that it is not needed.
According to the BSP code, the third phy does not have a reset line; the only reset is declared in the DWC3 node, but none of this is documented. Since sun4i-usb-phy driver requires a reset, I addedRST_BUS_3here.Signed-off-by Mikhail Kalashnikov <[email protected]>--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0
-0@@ -503,22 +503,27 @@ usb_otg: usb@4100000 { };
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi usb_otg: usb@4100000 { · line 506
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +1
-2usbphy: phy@4100400 { - compatible = "allwinner,sun55i-a523-usb-phy", - "allwinner,sun20i-d1-usb-phy"; + compatible = "allwinner,sun55i-a523-usb-phy";That's potential break of all users. Also, having third phy (so additional piece) is not making things incompatible.
Yes, we would want to keep the fallback, to allow newer DTs working on older kernel. As the Linux driver is implemented right now, it's not fully compatible, since it ties the number of PHYs to the compatible string - but that's a Linux implementation choice, not something really related to the binding. And as I replied on the driver patch, that breaks anyway, and I think we can change it there to preserve compatibility, and make everyone happy: newer DTs on older kernels, older DTs on newer kernels, and all working within the kernel's capability.
Oh, and it looks like there are whitespace issues in the patch ...
Cheers,
Andre
PATCH 3/7 phy: sun4i-usb: a523: add support for the USB2 PHY
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
Previously, USB PHY was compatible with D1 and did not require separatedata options. But now we need to add a third PHY, which makes it incompatible. The third PHY is used together with USB3/PCIe combophy with DWC3 controller. In the BSP code, the third PHY requires a separate glue driver, but it seems that it is not needed.
--- drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/phy/allwinner/phy-sun4i-usb.c +10 -0
@@ -1025,6 +1025,15 @@ static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = { .siddq_in_base = true, }; +static const struct sun4i_usb_phy_cfg sun55i_a523_cfg = { + .num_phys =3 , + .phyctl_offset =REG_PHYCTL_A33 , + .dedicated_clocks = true, + .hci_phy_ctl_clear =PHY_CTL_SIDDQ , + .phy0_dual_route = 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 },
@@ -1041,6 +1050,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,sun55i-a523-usb-phy", .data = &sun55i_a523_cfg }, { .compatible = "allwinner,suniv-f1c100s-usb-phy", .data = &suniv_f1c100s_cfg }, { },
Signature · 1 line
2.50.1
Re: [PATCH 3/7] phy: sun4i-usb: a523: add support for the USB2 PHY
On Sat, 16 Aug 2025 16:46:56 +0800
iuncuim <[email protected]> wrote:
Hi Mikhail,
many thanks for posting these patches, that's a nice surprise to see this moving forward!
I think there are some issues with this series, but we can surely iron those out.
Quoted 6 lines
From: Mikhail Kalashnikov <[email protected]>
Previously, USB PHY was compatible with D1 and did not require separatedata options. But now we need to add a third PHY, which makes it incompatible. The third PHY is used together with USB3/PCIe combophy with DWC3 controller.
It is really used together? I think on IRC we lately established that the USB2.0 and USB3.0 parts are somewhat independent, and I think the Radxa board wires PHY1 to the D-/D+ pins of the USB3.0 socket, instead of PHY2.
Regardless: this change would be a compatibility break: When a new kernel with this change sees an old DT, it would bail out, because it doesn't find the resources for the third PHY in the DT.
What I'd suggest instead is to drop the hardcoded assumption about the number of PHYs, and instead just enumerate all "pmu<x>" cells in reg-names. That would work with both old and new DTs, and then we can also keep the fallback compatible name in the DT, to allow new DTs on older kernels (for instance a U-Boot provided DT on a stable kernel).
As an added benefit, it would make future enablement easier, as we are more likely to find a matching compatible string, even when the number of PHYs differ.
Cheers,
Andre
Quoted 41 lines
In the BSP code, the third PHY requires a separate glue driver, but it seems that it is not needed.
Signed-off-by Mikhail Kalashnikov <[email protected]>--- drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/phy/allwinner/phy-sun4i-usb.c +10
-0@@ -1025,6 +1025,15 @@ static const struct sun4i_usb_phy_cfg sun50i_h616_cfg = { .siddq_in_base = true, }; +static const struct sun4i_usb_phy_cfg sun55i_a523_cfg = { + .num_phys =3 , + .phyctl_offset =REG_PHYCTL_A33 , + .dedicated_clocks = true, + .hci_phy_ctl_clear =PHY_CTL_SIDDQ , + .phy0_dual_route = 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 },@@ -1041,6 +1050,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,sun55i-a523-usb-phy", .data = &sun55i_a523_cfg }, { .compatible = "allwinner,suniv-f1c100s-usb-phy", .data = &suniv_f1c100s_cfg }, { },
PATCH 4/7 phy: allwinner: a523: add USB3/PCIe PHY driver
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
The A523 family of processors features a combophy for USB 3.0 and PCIe, developed by Innosilicon. Simultaneous operation of both interfaces is not supported by design.
Currently, the driver only adds support for USB 3.0. PCIe support is currently unavailable and will be added later.
All data on phy configuration is taken from the manufacturer's BSP driver.
--- drivers/phy/allwinner/Kconfig | 9 + drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun55i-usb3-pcie.c | 267 +++++++++++++++++++ 3 files changed, 277 insertions(+) create mode 100644 drivers/phy/allwinner/phy-sun55i-usb3-pcie.c
drivers/phy/allwinner/Kconfig +9 -0
@@ -57,3 +57,12 @@ config PHY_SUN50I_USB3 part of Allwinner H6 SoC. This driver controls each individual USB 2+3 host PHY combo. + +config PHY_SUN55I_USB3_PCIE + tristate "Allwinner A523 Innosilicon USB3/PCIe Combophy Driver" + depends on ARCH_SUNXI || COMPILE_TEST + depends on RESET_CONTROLLER + select GENERIC_PHY + help + Enable this to support the Allwinner PCIe/USB3.0 combo PHY + with Innosilicon IP block founded in A523/A527/H728/T527 SOC
drivers/phy/allwinner/Makefile +1 -0
@@ -3,3 +3,4 @@ obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o obj-$(CONFIG_PHY_SUN6I_MIPI_DPHY) += phy-sun6i-mipi-dphy.o obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o obj-$(CONFIG_PHY_SUN50I_USB3) += phy-sun50i-usb3.o +obj-$(CONFIG_PHY_SUN55I_USB3_PCIE) += phy-sun55i-usb3-pcie.o
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +267 -0
267 lines not on this page · raw message
Signature · 1 line
2.50.1
Re: [PATCH 4/7] phy: allwinner: a523: add USB3/PCIe PHY driver
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 222
Quoted 5 lines · iuncuim
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +5
-0+ + phy->reset =devm_reset_control_get (dev,NULL ); +if (IS_ERR (phy->reset)) { +dev_err (dev,"failed to get reset control\n" ); +return PTR_ERR (phy->reset);
Syntax is return dev_err_probe.
Quoted 13 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +13
-0+ } + + phy->regs =devm_platform_ioremap_resource (pdev,0 ); +if (IS_ERR (phy->regs)) +return PTR_ERR (phy->regs); + + phy->regs_clk = phy->regs +PHY_CLK_OFFSET ; +if (IS_ERR (phy->regs_clk)) +return PTR_ERR (phy->regs_clk); + + phy->phy =devm_phy_create (dev,NULL , &sun55i_usb3_pcie_phy_ops); +if (IS_ERR (phy->phy)) { +dev_err (dev,"failed to create PHY\n" );
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 245
Quoted 10 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +10
-0+return PTR_ERR (phy->phy); + } + +phy_set_drvdata (phy->phy, phy); + phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); + + ret =sun55i_usb3_pcie_clk_init (phy); +if (ret) +return ret; +dev_info (phy->dev,"phy version is: 0x%x\n" ,readl (phy->regs));
This should be rather dev_dbg. See coding style.
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 251
Quoted 6 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +6
-0+ +return PTR_ERR_OR_ZERO (phy_provider); +} + +static const struct of_device_id sun55i_usb3_pcie_phy_of_match[] = { + { .compatible ="allwinner,sun55i-a523-usb3-pcie-phy" },
Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.
Quoted 6 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +6
-0+ { }, +}; +MODULE_DEVICE_TABLE (of, sun55i_usb3_pcie_phy_of_match); + +static struct platform_driver sun55i_usb3_pcie_phy_driver = { + .probe = sun55i_usb3_pcie_phy_probe,
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 267
Quoted 10 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +10
-0+ .driver = { + .of_match_table = sun55i_usb3_pcie_phy_of_match, + .name = "sun55i-usb3-pcie-phy", + } +}; +module_platform_driver (sun55i_usb3_pcie_phy_driver); + +MODULE_DESCRIPTION ("Allwinner A523 USB3/PCIe phy driver" ); +MODULE_AUTHOR ("Mikhail Kalashnikov <[email protected]>" ); +MODULE_LICENSE ("GPL" );
Best regards,
Krzysztof
Re: [PATCH 4/7] phy: allwinner: a523: add USB3/PCIe PHY driver
In reply to iuncuimQuoted 22 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
The A523 family of processors features a combophy for USB 3.0 and PCIe, developed by Innosilicon. Simultaneous operation of both interfaces is not supported by design.
Currently, the driver only adds support for USB 3.0. PCIe support is currently unavailable and will be added later.
All data on phy configuration is taken from the manufacturer's BSP driver.Signed-off-by Mikhail Kalashnikov <[email protected]>--- drivers/phy/allwinner/Kconfig | 9 + drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun55i-usb3-pcie.c | 267 +++++++++++++++++++ 3 files changed, 277 insertions(+) create mode 100644 drivers/phy/allwinner/phy-sun55i-usb3-pcie.cdrivers/phy/allwinner/Kconfig +0
-0
drivers/phy/allwinner/Kconfig config PHY_SUN50I_USB3 · line 64
Quoted 8 lines
drivers/phy/allwinner/Kconfig +5
-0@@ -57,3 +57,12 @@ config PHY_SUN50I_USB3 part of Allwinner H6 SoC. This driver controls each individual USB 2+3 host PHY combo. + +config PHY_SUN55I_USB3_PCIE + tristate "Allwinner A523 Innosilicon USB3/PCIe Combophy Driver" + depends on ARCH_SUNXI || COMPILE_TEST + depends on RESET_CONTROLLER
This dependency is not necessary. The reset controller API is stubbed out in case RESET_CONTROLLER is disabled.
ARCH_SUNXI selects ARCH_HAS_RESET_CONTROLLER, which default-enables RESET_CONTROLLER.
Quoted 19 lines
drivers/phy/allwinner/Kconfig +4
-0+ select GENERIC_PHY + help + Enable this to support the Allwinner PCIe/USB3.0 combo PHY + with Innosilicon IP block founded in A523/A527/H728/T527 SOCdrivers/phy/allwinner/Makefile +1
-0@@ -3,3 +3,4 @@ obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o obj-$(CONFIG_PHY_SUN6I_MIPI_DPHY) += phy-sun6i-mipi-dphy.o obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o obj-$(CONFIG_PHY_SUN50I_USB3) += phy-sun50i-usb3.o +obj-$(CONFIG_PHY_SUN55I_USB3_PCIE) += phy-sun55i-usb3-pcie.odrivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +0
-0@@ -0,0 +1,267 @@
[...]
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 149
Quoted 5 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +5
-0+static int sun55i_usb3_pcie_phy_init (struct phy *_phy) +{ +struct sun55i_usb3_pcie_phy *phy =phy_get_drvdata (_phy); + +sun55i_usb3_phy_open (phy);
Given that sun55i_usb3_pcie_phy_exit() asserts the reset and disables the clock, why isn't the clock enabled and the reset deasserted here?
As is, it looks like the code in sun55i_usb3_phy_open() could be just folded into sun55i_usb3_pcie_phy_init().
Quoted 2 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +2
-0+return 0 ; +}
[...]
Quoted 10 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +10
-0+static int sun55i_usb3_pcie_phy_probe (struct platform_device *pdev) +{ +struct sun55i_usb3_pcie_phy *phy; +struct device *dev = &pdev->dev; +struct phy_provider *phy_provider; +int ret; + + phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL ); +if (!phy) +return -ENOMEM ;
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 219
Quoted 10 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +10
-0+ + phy->dev = dev; + phy->clk =devm_clk_get (dev,NULL ); +if (IS_ERR (phy->clk)) { +if (PTR_ERR (phy->clk) != -EPROBE_DEFER ) +dev_err (dev,"failed to get phy clock\n" ); +return PTR_ERR (phy->clk); + } + + phy->reset =devm_reset_control_get (dev,NULL );
Please use devm_reset_control_get_exclusive() directly.
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 221
Quoted 2 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +2
-0+if (IS_ERR (phy->reset)) { +dev_err (dev,"failed to get reset control\n" );
Consider using dev_err_probe().
regards
Philipp
Re: [PATCH 4/7] phy: allwinner: a523: add USB3/PCIe PHY driver
In reply to iuncuimHi,
drivers/phy/allwinner/Makefile obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o · line 6
Quoted 7 lines
drivers/phy/allwinner/Makefile +1
-0@@ -3,3 +3,4 @@ obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o obj-$(CONFIG_PHY_SUN6I_MIPI_DPHY) += phy-sun6i-mipi-dphy.o obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o obj-$(CONFIG_PHY_SUN50I_USB3) += phy-sun50i-usb3.o +obj-$(CONFIG_PHY_SUN55I_USB3_PCIE) += phy-sun55i-usb3-pcie.o
Would it be better to call it phy-sun55i-combophy ?
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 149
Quoted 8 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +5
-0+static int sun55i_usb3_pcie_phy_init (struct phy *_phy) +{ +struct sun55i_usb3_pcie_phy *phy =phy_get_drvdata (_phy); + +sun55i_usb3_phy_open (phy);
Maybe we need to add case PHY_TYPE_USB3:
And use <&combophy PHY_TYPE_USB3> in the DT
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 251
Quoted 7 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +5
-0+ +return 0 ; +} +static const struct of_device_id sun55i_usb3_pcie_phy_of_match[] = { + { .compatible ="allwinner,sun55i-a523-usb3-pcie-phy" },
Would it be better to use "allwinner,sun55i-a523-combophy" as the compatible?
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c line 254
Quoted 3 lines
drivers/phy/allwinner/phy-sun55i-usb3-pcie.c new file +3
-0+ { }, +}; +MODULE_DEVICE_TABLE (of, sun55i_usb3_pcie_phy_of_match);
Thanks,
Chukun
PATCH 5/7 arm64: dts: allwinner: a523: add USB3.0 phy node
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
After adding the phy driver, we can also add phy node. In addition to the clk and reset lines, the power domain PD_PCIE is declared in this node according to the bsp dtb. So let's mention it.
Currently, phy driver does not support role selection and only works in USB3.0 mode.
--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +10 -0
@@ -606,6 +606,16 @@ mdio0: mdio { }; }; + combophy: phy@4f00000 { + compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; + reg = <0x04f00000 0x100000>; + clocks = <&ccu CLK_USB3>; + resets = <&ccu RST_BUS_PCIE_USB3>; + #phy-cells = <0>; + power-domains = <&pck600 PD_PCIE>; + status = "disabled"; + }; + ppu: power-controller@7001400 { compatible = "allwinner,sun55i-a523-ppu"; reg = <0x07001400 0x400>;
Signature · 1 line
2.50.1
Re: [PATCH 5/7] arm64: dts: allwinner: a523: add USB3.0 phy node
Quoted 8 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
After adding the phy driver, we can also add phy node. In addition to the clk and reset lines, the power domain
PD_PCIEis declared in this node according to the bsp dtb. So let's mention it.
Currently, phy driver does not support role selection and only works in USB3.0 mode.
Quoted 4 lines
Signed-off-by Mikhail Kalashnikov <[email protected]>--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
Please organize your patches correctly. One DTS was in the middle of patchset, other is at the end. They all must be at the end, because you cannot have dependency of driver on DTS.
Best regards,
Krzysztof
Re: [PATCH 5/7] arm64: dts: allwinner: a523: add USB3.0 phy node
In reply to iuncuimOn Sat, 16 Aug 2025 16:46:58 +0800
iuncuim <[email protected]> wrote:
Hi,
Quoted 7 lines
From: Mikhail Kalashnikov <[email protected]>
After adding the phy driver, we can also add phy node. In addition to the clk and reset lines, the power domain
PD_PCIEis declared in this node according to the bsp dtb. So let's mention it.
Currently, phy driver does not support role selection and only works in USB3.0 mode.
That's the current limitation of the proposed Linux driver, but should not affect the binding or DT:
Quoted 11 lines
Signed-off-by Mikhail Kalashnikov <[email protected]>--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 612
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4
-0@@ -606,6 +606,16 @@ mdio0: mdio { }; }; + combophy: phy@4f00000 { + compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; + reg = <0x04f00000 0x100000>; + clocks = <&ccu CLK_USB3>;
Will we need more clocks (or resets) when supporting PCIe later? If yes, we should add them already now, even if they are not used by the current driver.
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 614
Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +2
-0+ resets = <&ccu RST_BUS_PCIE_USB3>; + #phy-cells = <0>;
I think we should use one PHY cell here, to allow users to select the PHY path they need. A USB3.0-only driver implementation could choose to ignore it, or require the number to be 0 only, rejecting anything else. But this way we keep compatibility with newer DTs.
Cheers,
Andre
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4
-0+ power-domains = <&pck600 PD_PCIE>; + status = "disabled"; + }; + ppu: power-controller@7001400 { compatible = "allwinner,sun55i-a523-ppu"; reg = <0x07001400 0x400>;
Re: [PATCH 5/7] arm64: dts: allwinner: a523: add USB3.0 phy node
Quoted 40 lines · Andre Przywara
On Sat, 16 Aug 2025 16:46:58 +0800
iuncuim <[email protected]> wrote:Hi,
Quoted 7 lines
From: Mikhail Kalashnikov <[email protected]>
After adding the phy driver, we can also add phy node. In addition to the clk and reset lines, the power domain
PD_PCIEis declared in this node according to the bsp dtb. So let's mention it.
Currently, phy driver does not support role selection and only works in USB3.0 mode.That's the current limitation of the proposed Linux driver, but should not affect the binding or DT:
Quoted 11 lines
Signed-off-by Mikhail Kalashnikov <[email protected]>--- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0
-0arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 612
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4
-0@@ -606,6 +606,16 @@ mdio0: mdio { }; }; + combophy: phy@4f00000 { + compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; + reg = <0x04f00000 0x100000>; + clocks = <&ccu CLK_USB3>;Will we need more clocks (or resets) when supporting PCIe later? If yes, we should add them already now, even if they are not used by the current driver.
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 614
Quoted 2 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +2
-0+ resets = <&ccu RST_BUS_PCIE_USB3>; + #phy-cells = <0>;I think we should use one PHY cell here, to allow users to select the PHY path they need. A USB3.0-only driver implementation could choose to ignore it, or require the number to be 0 only, rejecting anything else. But this way we keep compatibility with newer DTs.
Agreed. It seems this is the common case for combined PHYs. The last cell tells which type of PHY is to be used.
ChenYu
Quoted 11 lines
Cheers,
AndreQuoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4
-0+ power-domains = <&pck600 PD_PCIE>; + status = "disabled"; + }; + ppu: power-controller@7001400 { compatible = "allwinner,sun55i-a523-ppu"; reg = <0x07001400 0x400>;
PATCH 6/7 arm64: dts: allwinner: a523: add DWC3 USB3.0 node
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
After adding the phy bindings, we can also add dwc3 node, which uses the previously added usbphy2 and part of usb3 from combophy.
All settings declared in dwc3 node are obtained from the x96qproplus' dtb. BSP contains an additional glue driver for dwc3, but it seems that it is not needed.
--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +21 -0
@@ -606,6 +606,27 @@ mdio0: mdio { }; }; + dwc3: usb@4d00000 { + compatible = "snps,dwc3"; + reg = <0x04d00000 0x100000>; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + dr_mode = "host"; + clocks = <&ccu CLK_MBUS_USB3>, <&ccu CLK_USB3>, + <&ccu CLK_USB2>, <&ccu CLK_USB3_SUSPEND>; + clock-names = "bus_clk", "ref_clk3", "ref_clk2", "suspend"; + maximum-speed = "super-speed"; + phy_type = "utmi"; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + snps,dis_u3_susphy_quirk; + snps,dis_u2_susphy_quirk; + snps,dis_rxdet_inp3_quirk; + phys = <&usbphy 2>, <&combophy>; + phy-names = "usb2-phy", "usb3-phy"; + status = "disabled"; + }; + combophy: phy@4f00000 { compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; reg = <0x04f00000 0x100000>;
Signature · 1 line
2.50.1
Re: [PATCH 6/7] arm64: dts: allwinner: a523: add DWC3 USB3.0 node
On Sat, 16 Aug 2025 16:46:59 +0800
iuncuim <[email protected]> wrote:
Hi,
Quoted 18 lines
From: Mikhail Kalashnikov <[email protected]>
After adding the phy bindings, we can also add dwc3 node, which uses the previously added usbphy2 and part of usb3 from combophy.
All settings declared in dwc3 node are obtained from the x96qproplus' dtb. BSP contains an additional glue driver for dwc3, but it seems that it is not needed.Signed-off-by Mikhail Kalashnikov <[email protected]>--- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 610
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +2
-0@@ -606,6 +606,27 @@ mdio0: mdio { }; }; + dwc3: usb@4d00000 { + compatible = "snps,dwc3";
Wouldn't we need an A523 specific compatible string first?
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 616
Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +6
-0+ reg = <0x04d00000 0x100000>; + interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>; + dr_mode = "host"; + clocks = <&ccu CLK_MBUS_USB3>, <&ccu CLK_USB3>, + <&ccu CLK_USB2>, <&ccu CLK_USB3_SUSPEND>; + clock-names = "bus_clk", "ref_clk3", "ref_clk2", "suspend";
How does this work, exactly? I see "bus_clk" (deprecated, should be "bus_early") and "suspend" in the bindings and the Linux driver, but where do ref_clk3 and ref_clk2 come from, and more importantly who is going to use them? IIUC, the binding hints that certain implementations could need more clocks, but then it's their responsibility to parse and enable them, in platform specific glue code, I think.
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 625
Quoted 9 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +9
-0+ maximum-speed = "super-speed"; + phy_type = "utmi"; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + snps,dis_u3_susphy_quirk; + snps,dis_u2_susphy_quirk; + snps,dis_rxdet_inp3_quirk; + phys = <&usbphy 2>, <&combophy>;
Related to my comment on the other DT patch, this should be "<&combophy 0>" (with "#phy-cells = <1>;" in the PHY node, to be forward compatible.
Cheers,
Andre
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +4
-0+ phy-names = "usb2-phy", "usb3-phy"; + status = "disabled"; + }; + combophy: phy@4f00000 { compatible = "allwinner,sun55i-a523-usb3-pcie-phy"; reg = <0x04f00000 0x100000>;
Re: [PATCH 6/7] arm64: dts: allwinner: a523: add DWC3 USB3.0 node
In reply to iuncuimarch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 612
Quoted 1 line · On Sat, 16 Aug 2025 16:46:59 +0800 iuncuim <[email protected]> wrote:
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +1
-0+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
(Sorry for the more-or-less necroposting)
This is the only mention of irq or interrupt in the entire series, which at first led me to believe there was something missing given that there's a "Nobody cared" message appearing when the port first detects something connected to it followed by something about the irq being disabled.
Now I read in the text of another patch (adding a TrimUi dts) that this message comes when an interrupt storm is detected, and given that the value in /proc/interrupts goes from zero to 100K in no time, that seems likely to be the case here as well.
What is this interrupt supposed to be about, and can it be handled better?
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH 6/7] arm64: dts: allwinner: a523: add DWC3 USB3.0 node
Quoted 13 lines · Per Larsson
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi mdio0: mdio { · line 612
Quoted 1 line · On Sat, 16 Aug 2025 16:46:59 +0800 iuncuim <[email protected]> wrote:
arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +1
-0+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;(Sorry for the more-or-less necroposting)
This is the only mention of irq or interrupt in the entire series, which at first led me to believe there was something missing given that there's a "Nobody cared" message appearing when the port first detects something connected to it followed by something about the irq being disabled.
Quoted 5 lines
Now I read in the text of another patch (adding a TrimUi dts) that this message comes when an interrupt storm is detected, and given that the value in
/proc/interruptsgoes from zero to 100K in no time, that seems likely to be the case here as well.
Yes.> What is this interrupt supposed to be about, and can it be handled
Quoted 1 line
better?
This inerrupt should be disabled in host mode, I'll do it in v2. But except this message it doesn't affect functionality.
PATCH 7/7 arm64: dts: allwinner: a523: activate USB3 for all boards
In reply to iuncuimFrom: Mikhail Kalashnikov <[email protected]>
Currently, these devices have a USB 3.0 port. Therefore, we can activate it.
--- arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts | 8 ++++++++ arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts | 8 ++++++++ arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts | 8 ++++++++ 3 files changed, 24 insertions(+)
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +8 -0
@@ -47,6 +47,14 @@ reg_usb_vbus: vbus { }; }; +&combophy { + status = "okay"; +}; + +&dwc3 { + status = "okay"; +}; + &ehci0 { status = "okay"; };
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dts +8 -0
@@ -46,6 +46,14 @@ reg_vcc3v3: vcc3v3 { }; }; +&combophy { + status = "okay"; +}; + +&dwc3 { + status = "okay"; +}; + &ehci0 { status = "okay"; };
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dts +8 -0
@@ -57,6 +57,14 @@ reg_usb_vbus: vbus { }; }; +&combophy { + status = "okay"; +}; + +&dwc3 { + status = "okay"; +}; + &ehci0 { status = "okay"; };
Signature · 1 line
2.50.1
Rob Herring (Arm)
maintainerQuoted 41 lines · iuncuim
From: Mikhail Kalashnikov <[email protected]>
This series is a draft and does not include patches for dt-bindings. The first series is necessary for testing on other devices and initiating discussion.
This series of patches adds USB 3.0 functionality for the A523/A527/H728/T527 processor.Most of the code is derived from the BSP,
as the datasheet does not fully describe this feature.I have verified functionality on two of my boards, walnutpi 2b (t527) and x96qproplus (h728). When testing usb3.0 on x96qproplus, I get reconnections of my nvme, it looks like the port does not provide enough
current to work. I have encountered similar complaints from users of the
device on Android. In the case of walnutpi, there is no such problem.Based on 6.17-rc1
Mikhail Kalashnikov (7):
clk: sunxi-ng: a523: add missing usb related clocks
arm64: dts: allwinner: a523: add third usb2 phy
phy: sun4i-usb: a523: add support for the USB2 PHY
phy: allwinner: a523: add USB3/PCIe PHY driver
arm64: dts: allwinner: a523: add USB3.0 phy node
arm64: dts: allwinner: a523: add DWC3 USB3.0 node
arm64: dts: allwinner: a523: activate USB3 for all boards.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 52 +++- .../dts/allwinner/sun55i-a527-cubie-a5e.dts | 8 + .../dts/allwinner/sun55i-h728-x96qpro+.dts | 8 + .../dts/allwinner/sun55i-t527-avaota-a1.dts | 8 + drivers/clk/sunxi-ng/ccu-sun55i-a523.c | 32 +++ drivers/clk/sunxi-ng/ccu-sun55i-a523.h | 2 +- drivers/phy/allwinner/Kconfig | 9 + drivers/phy/allwinner/Makefile | 1 + drivers/phy/allwinner/phy-sun4i-usb.c | 10 + drivers/phy/allwinner/phy-sun55i-usb3-pcie.c | 267 ++++++++++++++++++ include/dt-bindings/clock/sun55i-a523-ccu.h | 4 + 11 files changed, 392 insertions(+), 9 deletions(-) create mode 100644 drivers/phy/allwinner/phy-sun55i-usb3-pcie.c
Quoted 5 lines
--
2.50.1
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: remotes/korg/master-95-g90d970cade8e (exact match)
If this is not the correct base, please add 'base-commit' tag (or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/allwinner/' for [email protected]:
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clock-names: ['usb0_phy', 'usb1_phy', 'usb2_phy'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clocks: [[5], [5], [2, 179]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): compatible: 'oneOf' conditional failed, one must be fixed:
['allwinner,sun55i-a523-usb-phy'] is too short 'allwinner,sun55i-a523-usb-phy' is not one of ['allwinner,sun20i-d1-usb-phy', 'allwinner,sun50i-a64-usb-phy'] from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#
arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg: [[68158464, 256], [68163584, 256], [69208064, 256], [81788928, 256]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg-names: ['phy_ctrl', 'pmu0', 'pmu1', 'pmu2'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reset-names: ['usb0_reset', 'usb1_reset', 'usb2_reset'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clock-names: ['usb0_phy', 'usb1_phy', 'usb2_phy'] is too long arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): resets: [[2, 49], [2, 50], [2, 56]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clocks: [[5], [5], [2, 179]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): compatible: 'oneOf' conditional failed, one must be fixed:
['allwinner,sun55i-a523-usb-phy'] is too short 'allwinner,sun55i-a523-usb-phy' is not one of ['allwinner,sun20i-d1-usb-phy', 'allwinner,sun50i-a64-usb-phy'] from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#
arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg: [[68158464, 256], [68163584, 256], [69208064, 256], [81788928, 256]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg-names: ['phy_ctrl', 'pmu0', 'pmu1', 'pmu2'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reset-names: ['usb0_reset', 'usb1_reset', 'usb2_reset'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): resets: [[2, 49], [2, 50], [2, 56]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clock-names: ['usb0_phy', 'usb1_phy', 'usb2_phy'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clocks: [[5], [5], [2, 179]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): compatible: 'oneOf' conditional failed, one must be fixed:
['allwinner,sun55i-a523-usb-phy'] is too short 'allwinner,sun55i-a523-usb-phy' is not one of ['allwinner,sun20i-d1-usb-phy', 'allwinner,sun50i-a64-usb-phy'] from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#
arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg: [[68158464, 256], [68163584, 256], [69208064, 256], [81788928, 256]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg-names: ['phy_ctrl', 'pmu0', 'pmu1', 'pmu2'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reset-names: ['usb0_reset', 'usb1_reset', 'usb2_reset'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): resets: [[2, 49], [2, 50], [2, 56]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clock-names: ['usb0_phy', 'usb1_phy', 'usb2_phy'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): clocks: [[5], [5], [2, 179]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): compatible: 'oneOf' conditional failed, one must be fixed:
['allwinner,sun55i-a523-usb-phy'] is too short 'allwinner,sun55i-a523-usb-phy' is not one of ['allwinner,sun20i-d1-usb-phy', 'allwinner,sun50i-a64-usb-phy'] from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#
arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg: [[68158464, 256], [68163584, 256], [69208064, 256], [81788928, 256]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reg-names: ['phy_ctrl', 'pmu0', 'pmu1', 'pmu2'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): reset-names: ['usb0_reset', 'usb1_reset', 'usb2_reset'] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: phy@4100400 (allwinner,sun55i-a523-usb-phy): resets: [[2, 49], [2, 50], [2, 56]] is too long
from schema $id: http://devicetree.org/schemas/phy/allwinner,sun50i-a64-usb-phy.yaml#arch/arm64/boot/dts/allwinner/sun55i-h728-x96qpro+.dtb: /soc/phy@4f00000: failed to match any schema with compatible: ['allwinner,sun55i-a523-usb3-pcie-phy'] arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dtb: /soc/phy@4f00000: failed to match any schema with compatible: ['allwinner,sun55i-a523-usb3-pcie-phy'] arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dtb: /soc/phy@4f00000: failed to match any schema with compatible: ['allwinner,sun55i-a523-usb3-pcie-phy'] arch/arm64/boot/dts/allwinner/sun55i-t527-avaota-a1.dtb: /soc/phy@4f00000: failed to match any schema with compatible: ['allwinner,sun55i-a523-usb3-pcie-phy']