linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Cody Eksal <masterr3c0rd@epochal.quest>
To: Andre Przywara <andre.przywara@arm.com>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-phy@lists.infradead.org, linux-usb@vger.kernel.org,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Yangtao Li <frank@allwinnertech.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Parthiban <parthiban@linumiz.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <treding@nvidia.com>,
	Maxime Ripard <mripard@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Yangtao Li <tiny.windzz@gmail.com>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH 06/13] phy: sun4i-usb: add support for A100 USB PHY
Date: Mon, 28 Oct 2024 13:15:39 -0300	[thread overview]
Message-ID: <eda06e73559c5d12e430cda8f93a0204@epochal.quest> (raw)
In-Reply-To: <20241024202216.6cded8c4@minigeek.lan>

On 2024/10/24 4:22 pm, Andre Przywara wrote:
> On Thu, 24 Oct 2024 14:05:24 -0300
> Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
>> b/drivers/phy/allwinner/phy-sun4i-usb.c
>> index b0f19e950601..a3942b2ee90b 100644
>> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
>> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
>> @@ -1006,6 +1006,16 @@ static const struct sun4i_usb_phy_cfg 
>> sun50i_a64_cfg = {
>>  	.phy0_dual_route = true,
>>  };
>> 
>> +static const struct sun4i_usb_phy_cfg sun50i_a100_cfg = {
>> +	.num_phys = 2,
>> +	.disc_thresh = 3,
> 
> This member is never used when .siddq_in_base is true (and yes, this is
> wrong for the H616 too), ...
> 
>> +	.phyctl_offset = REG_PHYCTL_A33,
>> +	.dedicated_clocks = true,
>> +	.hci_phy_ctl_clear = PHY_CTL_SIDDQ,
>> +	.phy0_dual_route = true,
>> +	.siddq_in_base = true,
> 
> ... which makes this whole description identical to the D1 version.
> So at the very least we wouldn't this new a100_cfg, but instead just
> point to the existing d1_cfg.
I did test on my board and confirmed simply using a D1 compatible works.
> And this also brings up the question whether we need a new compatible
> string. As it stands now, we could also use:
> 	compatible = "allwinner,sun50i-a100-usb-phy",
> 		     "allwinner,sun20i-d1-usb-phy";
> 
> and wouldn't need any driver changes at all. Which would have the neat
> side effect to make USB work already with v5.18 kernels.
> 
> The only downside is the somewhat weird ordering of the compatible
> strings, with the much newer chip as the fallback.
I plan to drop this patch in V2, in favor of just adding the 
compatible/fallback. Although it's odd ordering, I would think fixing 
the DTS of other device trees to remedy this would probably not be worth 
the hassle.
Thanks for pointing this out!

- Cody
> What do other people think here?
> 
> Cheers,
> Andre


  reply	other threads:[~2024-10-28 16:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 17:05 [PATCH 00/13] sunxi: A100/A133 second stage support Cody Eksal
2024-10-24 17:05 ` [PATCH 01/13] arm64: dts: allwinner: A100: Add PMU mode Cody Eksal
2024-10-24 17:05 ` [PATCH 02/13] arm64: dts: allwinner: a100: add watchdog node Cody Eksal
2024-10-24 17:05 ` [PATCH 03/13] dt-bindings: phy: sun50i-a64: add a100 compatible Cody Eksal
2024-10-27 21:11   ` Rob Herring (Arm)
2024-10-28 16:40     ` Cody Eksal
2024-10-24 17:05 ` [PATCH 04/13] dt-bindings: usb: Add A100 compatible string Cody Eksal
2024-10-25 10:09   ` Andre Przywara
2024-10-27 21:12   ` Rob Herring (Arm)
2024-10-27 21:22     ` Rob Herring
2024-10-28 16:02       ` Cody Eksal
2024-10-24 17:05 ` [PATCH 05/13] dt-bindings: usb: sunxi-musb: " Cody Eksal
2024-10-27 20:47   ` Krzysztof Kozlowski
2024-10-28 16:06     ` Cody Eksal
2024-10-24 17:05 ` [PATCH 06/13] phy: sun4i-usb: add support for A100 USB PHY Cody Eksal
2024-10-24 19:22   ` Andre Przywara
2024-10-28 16:15     ` Cody Eksal [this message]
2024-10-24 17:05 ` [PATCH 07/13] arm64: dts: allwinner: a100: add usb related nodes Cody Eksal
2024-10-26  0:44   ` Andre Przywara
2024-10-28 16:31     ` Cody Eksal
2024-10-26  1:29   ` Chen-Yu Tsai
2024-10-28 16:35     ` Cody Eksal
2024-10-24 17:05 ` [PATCH 08/13] arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1 Cody Eksal
2024-10-24 17:05 ` [PATCH 09/13] arm64: allwinner: a100: Add MMC related nodes Cody Eksal
2024-10-24 17:05 ` [PATCH 10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node Cody Eksal
2024-10-24 17:05 ` [PATCH 11/13] dt-bindings: opp: h6: Add A100 operating points Cody Eksal
2024-10-27 20:47   ` Krzysztof Kozlowski
     [not found]     ` <13a5e833ce19df20b0420d7f1052fd96@epochal.quest>
2024-10-27 21:17       ` Krzysztof Kozlowski
2024-10-28 16:18         ` Cody Eksal
2024-10-24 17:05 ` [PATCH 12/13] cpufreq: sun50i: add a100 cpufreq support Cody Eksal
2024-10-24 17:05 ` [PATCH 13/13] arm64: dts: allwinner: a100: Add CPU Operating Performance Points table Cody Eksal
2024-10-25 12:27   ` Andre Przywara
2024-10-28 16:42     ` Cody Eksal
2024-10-25 13:55 ` [PATCH 00/13] sunxi: A100/A133 second stage support 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=eda06e73559c5d12e430cda8f93a0204@epochal.quest \
    --to=masterr3c0rd@epochal.quest \
    --cc=andre.przywara@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=frank@allwinnertech.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=kishon@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-usb@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=nm@ti.com \
    --cc=parthiban@linumiz.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=sboyd@kernel.org \
    --cc=tiny.windzz@gmail.com \
    --cc=treding@nvidia.com \
    --cc=vireshk@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).