From: Andre Przywara <andre.przywara@arm.com>
To: iuncuim <iuncuim@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org, linux-clk@vger.kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 3/7] phy: sun4i-usb: a523: add support for the USB2 PHY
Date: Sat, 16 Aug 2025 14:31:17 +0100 [thread overview]
Message-ID: <20250816143117.4b86ecc6@minigeek.lan> (raw)
In-Reply-To: <20250816084700.569524-4-iuncuim@gmail.com>
On Sat, 16 Aug 2025 16:46:56 +0800
iuncuim <iuncuim@gmail.com> 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.
> From: Mikhail Kalashnikov <iuncuim@gmail.com>
>
> 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
> 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 <iuncuim@gmail.com>
> ---
> drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
> index 8873aed3a..bb79339f2 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -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 },
> { },
WARNING: multiple messages have this Message-ID (diff)
From: Andre Przywara <andre.przywara@arm.com>
To: iuncuim <iuncuim@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org, linux-clk@vger.kernel.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 3/7] phy: sun4i-usb: a523: add support for the USB2 PHY
Date: Sat, 16 Aug 2025 14:31:17 +0100 [thread overview]
Message-ID: <20250816143117.4b86ecc6@minigeek.lan> (raw)
In-Reply-To: <20250816084700.569524-4-iuncuim@gmail.com>
On Sat, 16 Aug 2025 16:46:56 +0800
iuncuim <iuncuim@gmail.com> 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.
> From: Mikhail Kalashnikov <iuncuim@gmail.com>
>
> 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
> 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 <iuncuim@gmail.com>
> ---
> drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
> index 8873aed3a..bb79339f2 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -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 },
> { },
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-08-16 13:37 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 8:46 [PATCH 0/7] arm64: allwinner: a523: add USB3.0 support iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 8:46 ` [PATCH 1/7] clk: sunxi-ng: a523: add missing usb related clocks iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 9:30 ` Krzysztof Kozlowski
2025-08-16 9:30 ` Krzysztof Kozlowski
2025-08-16 8:46 ` [PATCH 2/7] arm64: dts: allwinner: a523: add third usb2 phy iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 9:31 ` Krzysztof Kozlowski
2025-08-16 9:31 ` Krzysztof Kozlowski
2025-08-16 13:38 ` Andre Przywara
2025-08-16 13:38 ` Andre Przywara
2025-08-16 8:46 ` [PATCH 3/7] phy: sun4i-usb: a523: add support for the USB2 PHY iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 13:31 ` Andre Przywara [this message]
2025-08-16 13:31 ` Andre Przywara
2025-08-16 8:46 ` [PATCH 4/7] phy: allwinner: a523: add USB3/PCIe PHY driver iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 9:33 ` Krzysztof Kozlowski
2025-08-16 9:33 ` Krzysztof Kozlowski
2025-08-25 9:42 ` Philipp Zabel
2025-08-25 9:42 ` Philipp Zabel
2025-08-27 6:40 ` Chukun Pan
2025-08-27 6:40 ` Chukun Pan
2025-08-16 8:46 ` [PATCH 5/7] arm64: dts: allwinner: a523: add USB3.0 phy node iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 9:32 ` Krzysztof Kozlowski
2025-08-16 9:32 ` Krzysztof Kozlowski
2025-08-16 13:49 ` Andre Przywara
2025-08-16 13:49 ` Andre Przywara
2025-08-25 15:41 ` Chen-Yu Tsai
2025-08-25 15:41 ` Chen-Yu Tsai
2025-08-16 8:46 ` [PATCH 6/7] arm64: dts: allwinner: a523: add DWC3 USB3.0 node iuncuim
2025-08-16 8:46 ` iuncuim
2025-08-16 14:10 ` Andre Przywara
2025-08-16 14:10 ` Andre Przywara
2025-08-16 8:47 ` [PATCH 7/7] arm64: dts: allwinner: a523: activate USB3 for all boards iuncuim
2025-08-16 8:47 ` iuncuim
2025-08-18 18:24 ` [PATCH 0/7] arm64: allwinner: a523: add USB3.0 support Rob Herring (Arm)
2025-08-18 18:24 ` Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250816143117.4b86ecc6@minigeek.lan \
--to=andre.przywara@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=iuncuim@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=sboyd@kernel.org \
--cc=vkoul@kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.