From: Minda Chen <minda.chen@starfivetech.com>
To: Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>,
Roger Quadros <rogerq@kernel.org>, Rick Chen <rick@andestech.com>,
Leo <ycliang@andestech.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Alexey Romanov <avromanov@salutedevices.com>,
Sumit Garg <sumit.garg@linaro.org>,
Mark Kettenis <kettenis@openbsd.org>, Nishanth Menon <nm@ti.com>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
Simon Glass <sjg@chromium.org>, E Shattow <lucent@gmail.com>,
Minda Chen <minda.chen@starfivetech.com>
Subject: [PATCH v6 4/8] usb: cdns: starfive: Get dr mode from wrapper device dts node
Date: Thu, 23 Jan 2025 09:01:08 +0800 [thread overview]
Message-ID: <20250123010112.78924-5-minda.chen@starfivetech.com> (raw)
In-Reply-To: <20250123010112.78924-1-minda.chen@starfivetech.com>
Cdns core driver also get dr mode from wrapper devcie dts node
to make it is same with Starfive cdns USB Linux kernel driver,
Starfive 7110 OF_UPSTREAM is enabled
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
drivers/phy/starfive/phy-jh7110-pcie.c | 2 +-
drivers/usb/cdns3/core.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/starfive/phy-jh7110-pcie.c b/drivers/phy/starfive/phy-jh7110-pcie.c
index ecb04bdedfa..a30582821d9 100644
--- a/drivers/phy/starfive/phy-jh7110-pcie.c
+++ b/drivers/phy/starfive/phy-jh7110-pcie.c
@@ -170,7 +170,7 @@ static int starfive_pcie_phy_get_syscon(struct udevice *dev)
int ret;
/* get corresponding syscon phandle */
- ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 0, 0,
+ ret = dev_read_phandle_with_args(dev, "starfive,sys-syscon", NULL, 1, 0,
&sys_phandle);
if (ret < 0) {
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 4cfd38ec245..4434dc15bec 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -410,6 +410,9 @@ int cdns3_bind(struct udevice *parent)
name = ofnode_get_name(node);
dr_mode = usb_get_dr_mode(node);
+ if (dr_mode == USB_DR_MODE_UNKNOWN)
+ dr_mode = usb_get_dr_mode(dev_ofnode(parent));
+
switch (dr_mode) {
#if defined(CONFIG_SPL_USB_HOST) || \
(!defined(CONFIG_XPL_BUILD) && defined(CONFIG_USB_HOST))
--
2.17.1
next prev parent reply other threads:[~2025-01-23 1:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 1:01 [PATCH v6 0/8] Add Starfive JH7110 Cadence USB driver Minda Chen
2025-01-23 1:01 ` [PATCH v6 1/8] usb: cdns3: Set USB PHY mode in cdns3_drd_update_mode() Minda Chen
2025-01-23 1:01 ` [PATCH v6 2/8] phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver Minda Chen
2025-01-23 1:01 ` [PATCH v6 3/8] phy: starfive: Add Starfive JH7110 PCIe " Minda Chen
2025-01-23 1:01 ` Minda Chen [this message]
2025-01-27 21:56 ` [PATCH v6 4/8] usb: cdns: starfive: Get dr mode from wrapper device dts node Marek Vasut
2025-01-23 1:01 ` [PATCH v6 5/8] usb: cdns: starfive: Add cdns USB driver Minda Chen
2025-01-27 21:57 ` Marek Vasut
2025-01-23 1:01 ` [PATCH v6 6/8] spl: starfive: visionfive2: Disable USB overcurrent pin by default Minda Chen
2025-01-23 1:01 ` [PATCH v6 7/8] configs: starfive: Add visionfive2 cadence USB configuration Minda Chen
2025-01-23 1:01 ` [PATCH v6 8/8] MAINTAINERS: Update Starfive visionfive2 maintain files Minda Chen
2025-01-23 14:51 ` [PATCH v6 0/8] Add Starfive JH7110 Cadence USB driver E Shattow
2025-02-21 7:41 ` E Shattow
2025-02-26 12:40 ` Marek Vasut
2025-03-03 1:05 ` Minda Chen
2025-03-03 14:12 ` Marek Vasut
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=20250123010112.78924-5-minda.chen@starfivetech.com \
--to=minda.chen@starfivetech.com \
--cc=avromanov@salutedevices.com \
--cc=kettenis@openbsd.org \
--cc=lucent@gmail.com \
--cc=marex@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=nm@ti.com \
--cc=rick@andestech.com \
--cc=rogerq@kernel.org \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ycliang@andestech.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