From: Vinod Koul <vkoul@kernel.org>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: Heiko Stuebner <heiko@sntech.de>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Yao Zi <ziyao@disroot.org>, Chukun Pan <amadeus@jmu.edu.cn>,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Jianwei Zheng <jianwei.zheng@rock-chips.com>
Subject: Re: [PATCH 05/11] phy: rockchip: inno-usb2: Add support for RK3528
Date: Tue, 12 Aug 2025 21:19:59 +0530 [thread overview]
Message-ID: <aJtip49r8R3-2XXi@vaman> (raw)
In-Reply-To: <20250723122323.2344916-6-jonas@kwiboo.se>
On 23-07-25, 12:23, Jonas Karlman wrote:
> From: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Please do not send encrypted emails over public mail lists
>
> The RK3528 has a single USB2PHY with a otg and host port.
>
> Add support for the RK3528 variant of USB2PHY.
>
> PHY tuning for RK3528:
>
> - Turn off differential receiver in suspend mode to save power
> consumption.
>
> - Set HS eye-height to 400mV instead of default 450mV.
>
> - Choose the Tx fs/ls data as linestate from TX driver for otg port
> which uses dwc3 controller to improve fs/ls devices compatibility with
> long cables.
>
> This is based on vendor kernel linux-stan-6.1-rkr5 tag.
>
> Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 74 +++++++++++++++++++
> 1 file changed, 74 insertions(+)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index cd1a02b990ef..b8950d9f9e97 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> @@ -1507,6 +1507,28 @@ static int rk3128_usb2phy_tuning(struct rockchip_usb2phy *rphy)
> BIT(2) << BIT_WRITEABLE_SHIFT | 0);
> }
>
> +static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy)
> +{
> + int ret = 0;
Superfluous init
> +
> + /* Turn off otg port differential receiver in suspend mode */
> + ret |= regmap_write(rphy->phy_base, 0x30, BIT(18) | 0x0000);
> +
> + /* Turn off host port differential receiver in suspend mode */
> + ret |= regmap_write(rphy->phy_base, 0x430, BIT(18) | 0x0000);
> +
> + /* Set otg port HS eye height to 400mv (default is 450mv) */
> + ret |= regmap_write(rphy->phy_base, 0x30, GENMASK(22, 20) | 0x0000);
> +
> + /* Set host port HS eye height to 400mv (default is 450mv) */
> + ret |= regmap_write(rphy->phy_base, 0x430, GENMASK(22, 20) | 0x0000);
> +
> + /* Choose the Tx fs/ls data as linestate from TX driver for otg port */
> + ret |= regmap_write(rphy->phy_base, 0x94, GENMASK(22, 19) | 0x0018);
No error checking?
--
~Vinod
next prev parent reply other threads:[~2025-08-12 19:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 12:22 [PATCH 00/11] rockchip: Add USB 2.0 support for RK3528 Jonas Karlman
2025-07-23 12:22 ` [PATCH 01/11] dt-bindings: phy: rockchip,inno-usb2phy: Require GRF for RK3568/RV1108 Jonas Karlman
2025-07-25 23:03 ` Rob Herring (Arm)
2025-07-23 12:23 ` [PATCH 02/11] phy: rockchip: inno-usb2: Simplify rockchip,usbgrf handling Jonas Karlman
2025-07-23 12:23 ` [PATCH 03/11] dt-bindings: phy: rockchip,inno-usb2phy: Add compatible for RK3528 Jonas Karlman
2025-07-25 23:04 ` Rob Herring (Arm)
2025-07-23 12:23 ` [PATCH 04/11] phy: rockchip: inno-usb2: Add clkout_ctl_phy support Jonas Karlman
2025-07-23 12:23 ` [PATCH 05/11] phy: rockchip: inno-usb2: Add support for RK3528 Jonas Karlman
2025-08-12 15:49 ` Vinod Koul [this message]
2025-10-19 14:44 ` Jonas Karlman
2025-07-23 12:23 ` [PATCH 06/11] dt-bindings: usb: dwc3: Add compatible " Jonas Karlman
2025-07-25 23:06 ` Rob Herring (Arm)
2025-07-23 12:23 ` [PATCH 07/11] arm64: dts: rockchip: Add USB nodes " Jonas Karlman
2025-07-23 14:30 ` Chukun Pan
2025-07-23 15:30 ` Jonas Karlman
2025-08-07 7:00 ` Chukun Pan
2025-07-23 12:23 ` [PATCH 08/11] arm64: dts: rockchip: Enable USB 2.0 ports on Radxa E20C Jonas Karlman
2025-07-23 12:23 ` [PATCH 09/11] arm64: dts: rockchip: Enable USB 2.0 ports on Radxa ROCK 2A/2F Jonas Karlman
2025-07-23 12:23 ` [PATCH 10/11] arm64: dts: rockchip: Enable USB 2.0 ports on ArmSoM Sige1 Jonas Karlman
2025-07-23 12:23 ` [PATCH 11/11] arm64: dts: rockchip: Enable USB 2.0 ports on NanoPi Zero2 Jonas Karlman
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=aJtip49r8R3-2XXi@vaman \
--to=vkoul@kernel.org \
--cc=amadeus@jmu.edu.cn \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jianwei.zheng@rock-chips.com \
--cc=jonas@kwiboo.se \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=ziyao@disroot.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