From: Mikhail Kalashnikov <iuncuim@gmail.com>
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.
Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
---
.../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++-------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
index 6b6f2296b..e4ed4fa82 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi
@@ -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>;
};
--
2.50.1
On 16/08/2025 10:46, iuncuim wrote: > From: Mikhail Kalashnikov <iuncuim@gmail.com> > > 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. > > Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com> > --- > .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > index 6b6f2296b..e4ed4fa82 100644 > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > @@ -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
On Sat, 16 Aug 2025 11:31:12 +0200 Krzysztof Kozlowski <krzk@kernel.org> wrote: > On 16/08/2025 10:46, iuncuim wrote: > > From: Mikhail Kalashnikov <iuncuim@gmail.com> > > > > 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. > > > > Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com> > > --- > > .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 21 ++++++++++++------- > > 1 file changed, 13 insertions(+), 8 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > > index 6b6f2296b..e4ed4fa82 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi > > @@ -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. 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
© 2016 - 2025 Red Hat, Inc.