devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Piyush Mehta <piyush.mehta@amd.com>
To: <gregkh@linuxfoundation.org>, <michal.simek@amd.com>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <peter.chen@kernel.org>,
	<linus.walleij@linaro.org>, <paul@crapouillou.net>,
	<arnd@arndb.de>
Cc: <piyush.mehta@amd.com>, <linux-usb@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<git@amd.com>
Subject: [RFC PATCH 2/3] usb: chipidea: add usb2 phy interface for Zynq platform
Date: Fri, 29 Sep 2023 12:18:51 +0530	[thread overview]
Message-ID: <20230929064852.16642-3-piyush.mehta@amd.com> (raw)
In-Reply-To: <20230929064852.16642-1-piyush.mehta@amd.com>

USB2 phy has been added to the Zynq platform data. This defines the ULPI
phy interface for accessing the ULPI register.

Signed-off-by: Piyush Mehta <piyush.mehta@amd.com>
---
 drivers/usb/chipidea/ci_hdrc_usb2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index 1321ee67f3b8..a115383fa1ee 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -65,6 +65,14 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev)
 	if (match && match->data) {
 		/* struct copy */
 		*ci_pdata = *(struct ci_hdrc_platform_data *)match->data;
+		if (of_device_is_compatible(pdev->dev.of_node,
+					    "xlnx,zynq-usb-2.20a")) {
+			ci_pdata->usb_phy = devm_usb_get_phy_by_phandle(dev,
+									"usb-phy",
+									0);
+			if (IS_ERR(ci_pdata->usb_phy))
+				return PTR_ERR(ci_pdata->usb_phy);
+		}
 	}
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-- 
2.17.1


  parent reply	other threads:[~2023-09-29  6:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29  6:48 [RFC PATCH 0/3] usb: phy: Add platform driver support for ULPI phys Piyush Mehta
2023-09-29  6:48 ` [RFC PATCH 1/3] dt-binding: usb: ulpi-phy: add ulpi-phy binding Piyush Mehta
2023-09-29 14:04   ` Conor Dooley
2023-09-30 15:15   ` Krzysztof Kozlowski
2023-10-02 17:00   ` Rob Herring
2023-10-04 11:45     ` Mehta, Piyush
2023-12-01 13:07       ` Mehta, Piyush
2023-09-29  6:48 ` Piyush Mehta [this message]
2023-09-29  6:48 ` [RFC PATCH 3/3] usb: phy: Add platform driver support for ULPI phys Piyush Mehta

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=20230929064852.16642-3-piyush.mehta@amd.com \
    --to=piyush.mehta@amd.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=git@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=paul@crapouillou.net \
    --cc=peter.chen@kernel.org \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).