mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sohaib Mohamed <sohaib.amhmd@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH v2 09/14] phy: rockchip-inno-usb2: Add support for RK3562 PHY
Date: Fri, 30 Jan 2026 09:01:33 +0100	[thread overview]
Message-ID: <286e4835-2283-4e58-b7ba-d4b053aa952c@pengutronix.de> (raw)
In-Reply-To: <20260130-barebox-kickpi-v2-9-d27cf94a39b6@gmail.com>

On 1/30/26 06:17, Sohaib Mohamed wrote:
> Add support for the RK3562 PHY variant.
> 
> Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 52 ++++++++++++++++++++++++++-
>  1 file changed, 51 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> index 9805537c34..6b57522090 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
> @@ -394,7 +394,8 @@ static int rockchip_usb2phy_probe(struct device *dev)
>  	rphy->dev = dev;
>  
>  	if (of_device_is_compatible(np, "rockchip,rv1108-usb2phy") ||
> -	    of_device_is_compatible(np, "rockchip,rk3568-usb2phy"))
> +	    of_device_is_compatible(np, "rockchip,rk3568-usb2phy") ||
> +	    of_device_is_compatible(np, "rockchip,rk3562-usb2phy"))
>  		rphy->grf_base = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf");
>  	else
>  		rphy->grf_base = syscon_node_to_regmap(dev->parent->of_node);
> @@ -857,6 +858,54 @@ static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = {
>  	{ /* sentinel */ }
>  };
>  
> +static const struct rockchip_usb2phy_cfg rk3562_phy_cfgs[] = {
> +	{
> +		.reg = 0xff740000,
> +		.num_ports	= 2,
> +		.clkout_ctl	= { 0x0108, 4, 4, 1, 0 },
> +		.port_cfgs	= {
> +			[USB2PHY_PORT_OTG] = {
> +				.phy_sus	= { 0x0100, 8, 0, 0, 0x1d1 },
> +				.bvalid_det_en	= { 0x0110, 2, 2, 0, 1 },
> +				.bvalid_det_st	= { 0x0114, 2, 2, 0, 1 },
> +				.bvalid_det_clr = { 0x0118, 2, 2, 0, 1 },
> +				.idfall_det_en	= { 0x0110, 5, 5, 0, 1 },
> +				.idfall_det_st	= { 0x0114, 5, 5, 0, 1 },
> +				.idfall_det_clr = { 0x0118, 5, 5, 0, 1 },
> +				.idrise_det_en	= { 0x0110, 4, 4, 0, 1 },
> +				.idrise_det_st	= { 0x0114, 4, 4, 0, 1 },
> +				.idrise_det_clr = { 0x0118, 4, 4, 0, 1 },
> +				.ls_det_en	= { 0x0110, 0, 0, 0, 1 },
> +				.ls_det_st	= { 0x0114, 0, 0, 0, 1 },
> +				.ls_det_clr	= { 0x0118, 0, 0, 0, 1 },
> +				.utmi_avalid	= { 0x0120, 10, 10, 0, 1 },
> +				.utmi_bvalid	= { 0x0120, 9, 9, 0, 1 },
> +				.utmi_ls	= { 0x0120, 5, 4, 0, 1 },
> +			},
> +			[USB2PHY_PORT_HOST] = {
> +				.phy_sus	= { 0x0104, 8, 0, 0x1d2, 0x1d1 },
> +				.ls_det_en	= { 0x0110, 1, 1, 0, 1 },
> +				.ls_det_st	= { 0x0114, 1, 1, 0, 1 },
> +				.ls_det_clr	= { 0x0118, 1, 1, 0, 1 },
> +				.utmi_ls	= { 0x0120, 17, 16, 0, 1 },
> +				.utmi_hstdet	= { 0x0120, 19, 19, 0, 1 }
> +			}
> +		},
> +		.chg_det = {
> +			.cp_det		= { 0x0120, 24, 24, 0, 1 },
> +			.dcp_det	= { 0x0120, 23, 23, 0, 1 },
> +			.dp_det		= { 0x0120, 25, 25, 0, 1 },
> +			.idm_sink_en	= { 0x0108, 8, 8, 0, 1 },
> +			.idp_sink_en	= { 0x0108, 7, 7, 0, 1 },
> +			.idp_src_en	= { 0x0108, 9, 9, 0, 1 },
> +			.rdm_pdwn_en	= { 0x0108, 10, 10, 0, 1 },
> +			.vdm_src_en	= { 0x0108, 12, 12, 0, 1 },
> +			.vdp_src_en	= { 0x0108, 11, 11, 0, 1 },
> +		},
> +	},
> +	{ /* sentinel */ }
> +};
> +
>  static const struct rockchip_usb2phy_cfg rv1108_phy_cfgs[] = {
>  	{
>  		.reg = 0x100,
> @@ -1040,6 +1089,7 @@ static const struct of_device_id rockchip_usb2phy_dt_match[] = {
>  	{ .compatible = "rockchip,rk322x-usb2phy", .data = &rk322x_phy_cfgs },
>  	{ .compatible = "rockchip,rk3308-usb2phy", .data = &rk3328_phy_cfgs },
>  	{ .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs },
> +	{ .compatible = "rockchip,rk3562-usb2phy", .data = &rk3562_phy_cfgs },
>  	{ .compatible = "rockchip,rk3368-usb2phy", .data = &rk3368_phy_cfgs },
>  	{ .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs },
>  	{ .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs },
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2026-01-30  8:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30  5:16 [PATCH v2 00/14] ARM: rockchip: Add initial RK3562 SoC support Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 01/14] " Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 02/14] clk: rockchip: add RK3562 clock and reset driver support Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 03/14] pinctrl: rockchip: sync driver with Linux Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 04/14] ARM: boards: Rockchip: add RK3562-EVB2 support Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 05/14] ARM: boards: Rockchip: Add device tree for kickpi k3 board Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 06/14] ARM: rockchip: Add RK3562 KickPi K3 board support Sohaib Mohamed
2026-01-30  5:16 ` [PATCH v2 07/14] pmdomain: rockchip: Add RK3562 power domain support Sohaib Mohamed
2026-01-30  8:00   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 08/14] aiodev: rockchip_saradc: Add RK3562 support Sohaib Mohamed
2026-01-30  8:01   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 09/14] phy: rockchip-inno-usb2: Add support for RK3562 PHY Sohaib Mohamed
2026-01-30  8:01   ` Ahmad Fatoum [this message]
2026-01-30  5:17 ` [PATCH v2 10/14] rockchip-rng: Add RK3562 support Sohaib Mohamed
2026-01-30  8:02   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 11/14] mci: sdhci: rockchip-dwcmshc: " Sohaib Mohamed
2026-01-30  8:03   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 12/14] nvmem: rockchip-otp: " Sohaib Mohamed
2026-01-30  8:03   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 13/14] phy: rockchip: inno-dsidphy: " Sohaib Mohamed
2026-01-30  8:04   ` Ahmad Fatoum
2026-01-30  5:17 ` [PATCH v2 14/14] phy: rockchip: naneng-combphy: " Sohaib Mohamed
2026-01-30  8:05   ` Ahmad Fatoum

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=286e4835-2283-4e58-b7ba-d4b053aa952c@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sohaib.amhmd@gmail.com \
    /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