public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Johan Jonker <jbx6244@gmail.com>
To: kever.yang@rock-chips.com
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, lukma@denx.de,
	marex@denx.de, u-boot@lists.denx.de
Subject: [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support
Date: Fri, 29 Apr 2022 23:40:06 +0200	[thread overview]
Message-ID: <20220429214008.26977-2-jbx6244@gmail.com> (raw)
In-Reply-To: <20220429214008.26977-1-jbx6244@gmail.com>

Add rk3066a/rk3188 support to rockchip_usb2_phy.c
They don't have completely identical usb phy registers,
so separate comapatible strings and data.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index 93caa821..c46ad86d 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -42,6 +42,12 @@ struct rockchip_usb2_phy_dt_id {
 	const void	*data;
 };
 
+static const struct rockchip_usb2_phy_cfg rk3066a_pdata = {
+	.port_reset	= {0x00, 12, 12, 0, 1},
+	.soft_con	= {0x08, 2, 2, 0, 1},
+	.suspend	= {0x08, 8, 3, (0x01 << 3), (0x2A << 3)},
+};
+
 static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
 	.port_reset     = {0x00, 12, 12, 0, 1},
 	.soft_con       = {0x08, 2, 2, 0, 1},
@@ -49,6 +55,8 @@ static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
 };
 
 static struct rockchip_usb2_phy_dt_id rockchip_usb2_phy_dt_ids[] = {
+	{ .compatible = "rockchip,rk3066a-usb-phy", .data = &rk3066a_pdata },
+	{ .compatible = "rockchip,rk3188-usb-phy", .data = &rk3288_pdata },
 	{ .compatible = "rockchip,rk3288-usb-phy", .data = &rk3288_pdata },
 	{}
 };
-- 
2.20.1


  reply	other threads:[~2022-04-29 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker
2022-04-29 21:40 ` Johan Jonker [this message]
2022-05-26  7:01   ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Kever Yang
2022-04-29 21:40 ` [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function Johan Jonker
2022-05-26  7:01   ` Kever Yang
2022-04-29 21:40 ` [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 Johan Jonker
2022-05-26  7:02   ` Kever Yang
2022-05-26  7:01 ` [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Kever Yang

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=20220429214008.26977-2-jbx6244@gmail.com \
    --to=jbx6244@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=philipp.tomsich@vrull.eu \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /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