From: Felipe Balbi <balbi@kernel.org>
To: Manish Narani <MNARANI@xilinx.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
Michal Simek <michals@xilinx.com>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
git <git@xilinx.com>
Subject: RE: [PATCH 2/2] usb: dwc3: Add driver for Xilinx platforms
Date: Wed, 09 Sep 2020 13:26:42 +0300 [thread overview]
Message-ID: <87blifkzz1.fsf@kernel.org> (raw)
In-Reply-To: <BYAPR02MB58960AA4C87C76223C04D71BC1260@BYAPR02MB5896.namprd02.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 2240 bytes --]
Hi,
Manish Narani <MNARANI@xilinx.com> writes:
>> -----Original Message-----
>> From: Felipe Balbi <balbi@kernel.org>
>> Sent: Tuesday, September 1, 2020 5:45 PM
>>
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + ret = dwc3_xlnx_rst_assert(priv_data->apbrst);
>> >> > + if (ret < 0) {
>> >> > + dev_err(dev, "%s: %d: Failed to assert reset\n",
>> >> > + __func__, __LINE__);
>> >>
>> >> dev_err(dev, "Failed to assert APB reset\n");
>> >>
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + ret = phy_init(priv_data->usb3_phy);
>> >>
>> >> dwc3 core should be handling this already
>> >
>> > The USB controller used in Xilinx ZynqMP platform uses xilinx GT phy
>> > which has 4 GT lanes and can used by 4 peripherals at a time.
>>
>> At the same time or are they mutually exclusive?
>
> The lanes are mutually exclusive.
Thank you for confirming :-)
> [...]
>> >> > + if (ret < 0) {
>> >> > + dev_err(dev, "%s: %d: Failed to release reset\n",
>> >> > + __func__, __LINE__);
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + /* Set PIPE power present signal */
>> >> > + writel(PIPE_POWER_ON, priv_data->regs + PIPE_POWER_OFFSET);
>> >> > +
>> >> > + /* Clear PIPE CLK signal */
>> >> > + writel(PIPE_CLK_OFF, priv_data->regs + PIPE_CLK_OFFSET);
>> >>
>> >> shouldn't this be hidden under clk_enable()?
>> >
>> > Though its naming suggests something related to clock framework, it is
>> > a register in the Xilinx USB controller space which configures the
>> > PIPE clock coming from Serdes.
>>
>> PIPE clock is a clock. It just so happens that the source is the PHY
>> itself.
>
> This bit is used to choose between PIPE clock coming from SerDes
> and the Suspend Clock. When the controller is out of reset, this bit
> needs to be reset in order to make the USB controller work. This
> register is added in Xilinx USB controller register space. I will
> add more description about the same in v2.
Aha! That clarifies. It's just a clock selection from clocks that are
generated elsewhere :-) I guess a clk driver would be overkill, indeed.
Thanks for explaining. Could you add some of this information to commit
log, then?
cheers
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Manish Narani <MNARANI@xilinx.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
Michal Simek <michals@xilinx.com>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>, git <git@xilinx.com>
Subject: RE: [PATCH 2/2] usb: dwc3: Add driver for Xilinx platforms
Date: Wed, 09 Sep 2020 13:26:42 +0300 [thread overview]
Message-ID: <87blifkzz1.fsf@kernel.org> (raw)
In-Reply-To: <BYAPR02MB58960AA4C87C76223C04D71BC1260@BYAPR02MB5896.namprd02.prod.outlook.com>
[-- Attachment #1.1: Type: text/plain, Size: 2240 bytes --]
Hi,
Manish Narani <MNARANI@xilinx.com> writes:
>> -----Original Message-----
>> From: Felipe Balbi <balbi@kernel.org>
>> Sent: Tuesday, September 1, 2020 5:45 PM
>>
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + ret = dwc3_xlnx_rst_assert(priv_data->apbrst);
>> >> > + if (ret < 0) {
>> >> > + dev_err(dev, "%s: %d: Failed to assert reset\n",
>> >> > + __func__, __LINE__);
>> >>
>> >> dev_err(dev, "Failed to assert APB reset\n");
>> >>
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + ret = phy_init(priv_data->usb3_phy);
>> >>
>> >> dwc3 core should be handling this already
>> >
>> > The USB controller used in Xilinx ZynqMP platform uses xilinx GT phy
>> > which has 4 GT lanes and can used by 4 peripherals at a time.
>>
>> At the same time or are they mutually exclusive?
>
> The lanes are mutually exclusive.
Thank you for confirming :-)
> [...]
>> >> > + if (ret < 0) {
>> >> > + dev_err(dev, "%s: %d: Failed to release reset\n",
>> >> > + __func__, __LINE__);
>> >> > + goto err;
>> >> > + }
>> >> > +
>> >> > + /* Set PIPE power present signal */
>> >> > + writel(PIPE_POWER_ON, priv_data->regs + PIPE_POWER_OFFSET);
>> >> > +
>> >> > + /* Clear PIPE CLK signal */
>> >> > + writel(PIPE_CLK_OFF, priv_data->regs + PIPE_CLK_OFFSET);
>> >>
>> >> shouldn't this be hidden under clk_enable()?
>> >
>> > Though its naming suggests something related to clock framework, it is
>> > a register in the Xilinx USB controller space which configures the
>> > PIPE clock coming from Serdes.
>>
>> PIPE clock is a clock. It just so happens that the source is the PHY
>> itself.
>
> This bit is used to choose between PIPE clock coming from SerDes
> and the Suspend Clock. When the controller is out of reset, this bit
> needs to be reset in order to make the USB controller work. This
> register is added in Xilinx USB controller register space. I will
> add more description about the same in v2.
Aha! That clarifies. It's just a clock selection from clocks that are
generated elsewhere :-) I guess a clk driver would be overkill, indeed.
Thanks for explaining. Could you add some of this information to commit
log, then?
cheers
--
balbi
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-09-09 10:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 18:43 [PATCH 0/2] Add a separate DWC3 OF driver for Xilinx platforms Manish Narani
2020-08-26 18:43 ` Manish Narani
2020-08-26 18:44 ` [PATCH 1/2] dt-bindings: usb: dwc3-xilinx: Add documentation for Versal DWC3 Controller Manish Narani
2020-08-26 18:44 ` Manish Narani
2020-09-08 23:05 ` Rob Herring
2020-09-08 23:05 ` Rob Herring
2020-09-09 15:46 ` Manish Narani
2020-09-09 15:46 ` Manish Narani
2020-09-09 16:00 ` Rob Herring
2020-09-09 16:00 ` Rob Herring
2020-08-26 18:44 ` [PATCH 2/2] usb: dwc3: Add driver for Xilinx platforms Manish Narani
2020-08-26 18:44 ` Manish Narani
2020-08-26 19:00 ` Randy Dunlap
2020-08-26 19:00 ` Randy Dunlap
2020-08-27 6:31 ` Felipe Balbi
2020-08-27 6:31 ` Felipe Balbi
2020-08-28 11:41 ` Manish Narani
2020-08-28 11:41 ` Manish Narani
2020-09-01 12:15 ` Felipe Balbi
2020-09-01 12:15 ` Felipe Balbi
2020-09-09 9:14 ` Manish Narani
2020-09-09 9:14 ` Manish Narani
2020-09-09 10:26 ` Felipe Balbi [this message]
2020-09-09 10:26 ` Felipe Balbi
2020-08-27 7:42 ` Chunfeng Yun
2020-08-27 7:42 ` Chunfeng Yun
2020-08-27 9:02 ` Philipp Zabel
2020-08-27 9:02 ` Philipp Zabel
2020-08-27 18:46 ` Robin Murphy
2020-08-27 18:46 ` Robin Murphy
2020-08-28 17:53 ` Manish Narani
2020-08-28 17:53 ` Manish Narani
2020-09-01 12:00 ` Robin Murphy
2020-09-01 12:00 ` Robin Murphy
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=87blifkzz1.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=MNARANI@xilinx.com \
--cc=devicetree@vger.kernel.org \
--cc=git@xilinx.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michals@xilinx.com \
--cc=p.zabel@pengutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.