From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] phy: rockchip-inno-usb2: add support for older rockchip SoC bindings
Date: Thu, 2 Dec 2021 08:42:36 +0100 [thread overview]
Message-ID: <20211202074236.196396-1-a.fatoum@pengutronix.de> (raw)
Anything earlier than the rv1108, has no rockchip,usbgrf regmap and
instead access the parent device's regmap. Add support for this binding,
so the driver is usable on the rk3399.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 6b9d54f34460..459ad9b35534 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -392,7 +392,12 @@ static int rockchip_usb2phy_probe(struct device_d *dev)
rphy->dev = dev;
- rphy->grf_base = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf");
+ if (of_device_is_compatible(np, "rockchip,rv1108-usb2phy") ||
+ of_device_is_compatible(np, "rockchip,rk3568-usb2phy"))
+ rphy->grf_base = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf");
+ else
+ rphy->grf_base = syscon_node_to_regmap(dev->parent->device_node);
+
if (IS_ERR(rphy->grf_base))
return PTR_ERR(rphy->grf_base);
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2021-12-02 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 7:42 Ahmad Fatoum [this message]
2021-12-07 9:10 ` Sascha Hauer
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=20211202074236.196396-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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