All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mehta, Piyush" <piyush.mehta@amd.com>
To: "Simek, Michal" <michal.simek@amd.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"balbi@kernel.org" <balbi@kernel.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Paladugu,
	Siva Durga Prasad" <siva.durga.prasad.paladugu@amd.com>,
	Manish Narani <manish.narani@xilinx.com>
Subject: RE: [PATCH] dt-bindings: usb: dwc3: Add interrupt-names to include hibernation interrupt
Date: Fri, 23 Sep 2022 04:38:05 +0000	[thread overview]
Message-ID: <MN2PR12MB4333EBFADEDD7DB623F4634188519@MN2PR12MB4333.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1824afba-c249-f5d1-e504-d71bf7d79979@amd.com>



> -----Original Message-----
> From: Simek, Michal <michal.simek@amd.com>
> Sent: Thursday, September 22, 2022 5:05 PM
> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; Mehta, Piyush
> <piyush.mehta@amd.com>; gregkh@linuxfoundation.org;
> robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; balbi@kernel.org
> Cc: linux-usb@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; Paladugu, Siva Durga Prasad
> <siva.durga.prasad.paladugu@amd.com>; Manish Narani
> <manish.narani@xilinx.com>
> Subject: Re: [PATCH] dt-bindings: usb: dwc3: Add interrupt-names to include
> hibernation interrupt
> 
> 
> 
> On 9/16/22 12:10, Krzysztof Kozlowski wrote:
> > On 15/09/2022 10:04, Michal Simek wrote:
> >>
> >>
> >> On 9/15/22 10:44, Krzysztof Kozlowski wrote:
> >>> On 14/09/2022 14:15, Mehta, Piyush wrote:
> >>>>
> >>>>> Where is the user (DTS) and implementation of this change? If this
> >>>>> is specific to Xilinx, why you do not have device specific compatible?
> >>>> [Piyush]:
> >>>> We have dedicated irq line for hibernation feature,  "hiber" irq line
> triggers hibernation interrupt.
> >>>> DWC3 core supports the hibernation feature, we have a dedicated code
> which is yet to be upstreamed.
> >>>> As the hibernation feature provided by dwc3-core, so this will be
> supported by other SOC/vendors.
> >>>
> >>> But is hiber irq line present in other vendors? What confuses me is
> >>> adding not only "hiber" irq but also otg in completely new enum.
> >>
> >> I will let Piyush to comment hiber IRQ. But I expect we don't have
> >> visibility what others are doing but this is line is not Xilinx
> >> invention that's why I expect IP from Synopsys have it by default but
> >> it is up to soc vendor if hibernation feature is enabled or not.
> >>
> >> otg is already listed in
> >> Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> >>
> >> It is only about order.
> >> Driver is already using
> >> platform_get_irq_byname..() functions
> >
> > Linux driver yes, but other platforms (bootloaders, operating systems)
> > might be doing things differently. Therefore the order and items are
> > usually strict. If they cannot be strict, it is nice to know why or it
> > is nice to restrict it to some specific variant (if it is applicable).
> >
> > This is why I asked whether the line is specific to Xilinx or to others.
> >
> >>
> >> I think any combination should be fine. Do we need to record used
> >> order or there is way in yaml to support any combination with
> >> dwc_usb3, host, peripheral, otg should be working (ignoring that hiber
> which should be likely there too).
> >
> > What confuses me here more, is having otg. I understand that dwc_usb3
> > is the single interrupt for all the modes, so my naive approach would be:
> > oneOf:
> >   - dwc_usb3
> >   - enum [dwc_usb3, hiber]
> >   - enum [host, peripheral, otg]
> >   - enum [host, peripheral, otg, hiber]
> >
> > However here Piyush adds not only hiber but also otg...
> 
> I was looking at code and I think we should be able to use this order
> - enum [host, peripheral, otg, hiber]
> which should ensure compatibility in other SW projects.
> 
> We can completely ignore dwc_usb3. It means above dwc_usb3, hiber
> shouldn't be also listed to make sure that the second entry is all the time irq
> for peripheral.
> 
> Thanks,
> Michal

Enabling wakeup in zynqMp we need to put the core into hibernation, as versal don't have hibernation concept, but we require interrupt for wakeup.
We have a versal platform where we are not using hibernation, but system wake up we need the interrupt. For this interrupt-name enum would be:
- enum [host, peripheral, otg, usb-wakeup]

zynqMp :
- enum [host, peripheral, otg, hiber]

Versal:
- enum [host, peripheral, otg, usb-wakeup]

Regards,
Piyush Mehta

  parent reply	other threads:[~2022-09-23  4:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12  8:57 [PATCH] dt-bindings: usb: dwc3: Add interrupt-names to include hibernation interrupt Piyush Mehta
2022-09-13  9:21 ` Krzysztof Kozlowski
2022-09-14 13:15   ` Mehta, Piyush
2022-09-15  8:44     ` Krzysztof Kozlowski
2022-09-15  9:04       ` Michal Simek
2022-09-16 10:10         ` Krzysztof Kozlowski
2022-09-22 11:34           ` Michal Simek
2022-09-23  4:28             ` Mehta, Piyush
2022-09-23  4:38             ` Mehta, Piyush [this message]
2022-09-23  9:22               ` Krzysztof Kozlowski
2022-09-23  9:34                 ` Michal Simek
2022-09-23 12:43 ` Felipe Balbi
2022-09-23 13:25   ` Michal Simek

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=MN2PR12MB4333EBFADEDD7DB623F4634188519@MN2PR12MB4333.namprd12.prod.outlook.com \
    --to=piyush.mehta@amd.com \
    --cc=balbi@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=manish.narani@xilinx.com \
    --cc=michal.simek@amd.com \
    --cc=robh+dt@kernel.org \
    --cc=siva.durga.prasad.paladugu@amd.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 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.