From: Gabor Juhos <j4g8y7@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Igal Liberman <igall@marvell.com>,
Kishon Vijay Abraham I <kishon@kernel.org>,
linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH phy-fixes] phy: marvell: mvebu-a3700-utmi: fix incorrect USB2_PHY_CTRL register access
Date: Wed, 1 Apr 2026 09:13:57 +0200 [thread overview]
Message-ID: <141b3528-f83a-4fc3-954f-630ce45e54df@gmail.com> (raw)
In-Reply-To: <87zf3o873b.fsf@bootlin.com>
Hi Miquel,
> Hi Gabor,
>
> On 21/03/2026 at 15:42:32 +01, Gabor Juhos <j4g8y7@gmail.com> wrote:
>
>> The mvebu_a3700_utmi_phy_power_off() function tries to modify the
>> USB2_PHY_CTRL register by using the IO address of the PHY IP block along
>> with the readl/writel IO accessors. However, the register exist in the
>> USB miscellaneous register space, and as such it must be accessed via
>> regmap like it is done in the mvebu_a3700_utmi_phy_power_on() function.
>>
>> Change the code to use regmap_update_bits() for modífying the register
>
> Spurious accent here :-) ^
>
> Do you imply that the register access was not working? Or that it was
> not using the correct API? ...
It was using the wrong API with wrong base address.
The USB2_PHY_CTRL(x) macro gives back an offset relative to the base address of
the USB miscellaneous registers. However the current code uses that offset with
the base address of the UTMI PHY registers.
So, instead of modifying the 'USB2 Host PHY Control' register at 0xd005f804 it
changes the 'USB2 UTMI PHY PLL Control 1' register at 0xd005f004.
Since the miscellaneous registers can be accessed only via the regmap obtained
from a syscon node we have to use the regmap API instead of the generic IO
accessors.
> ... (hence potential issues with locking might arise)
The regmap API uses built-in locking so there should be no locking issues.
Regards,
Gabor
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-04-01 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 14:42 [PATCH phy-fixes] phy: marvell: mvebu-a3700-utmi: fix incorrect USB2_PHY_CTRL register access Gabor Juhos
2026-03-31 13:24 ` Miquel Raynal
2026-04-01 7:13 ` Gabor Juhos [this message]
2026-04-01 8:10 ` Miquel Raynal
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=141b3528-f83a-4fc3-954f-630ce45e54df@gmail.com \
--to=j4g8y7@gmail.com \
--cc=igall@marvell.com \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=neil.armstrong@linaro.org \
--cc=vkoul@kernel.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