[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGCq0LYFMrFmxeKZE9g-O61+N03rJoGL0XvXJVya0Yx-ZasvBA@mail.gmail.com>
Date: Wed, 21 Feb 2024 17:31:42 +0800
From: Puma Hsu <pumahsu@...gle.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: mathias.nyman@...el.com, gregkh@...uxfoundation.org,
Thinh.Nguyen@...opsys.com, badhri@...gle.com, royluo@...gle.com,
howardyen@...gle.com, albertccwang@...gle.com, raychi@...gle.com,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 2/3] usb: xhci: Add support for Google XHCI controller
On Mon, Feb 19, 2024 at 8:22 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On 19/02/2024 07:10, Puma Hsu wrote:
> > In our SoC platform, we support allocating dedicated memory spaces
> > other than system memory for XHCI, which also requires IOMMU mapping.
> > The rest of driver probing and executing will use the generic
> > xhci-plat driver.
> >
> > We support USB dual roles and switch roles by generic dwc3 driver,
> > the dwc3 driver always probes xhci-plat driver now, so we introduce
> > a device tree property to probe a XHCI glue driver.
> >
> > Sample:
> > xhci_dma: xhci_dma@...0000 {
> > compatible = "shared-dma-pool";
> > reg = <0x00000000 0x99C0000 0x00000000 0x40000>;
> > no-map;
> > };
> >
> > dwc3: dwc3@...0000 {
> > compatible = "snps,dwc3";
> > reg = <0 0x0c400000 0 0x10000>;
> > xhci-glue = "xhci-hcd-goog";
>
> NAK, that's not DWC3 hardware in such case.
By introducing this property, users can specify the name of their
dedicated driver in the device tree. The generic dwc3 driver will
read this property to initiate the probing of the dedicated driver.
The motivation behind this is that we have dedicated things
(described in commit message) to do for the XHCI driver in our
device. BTW, I put this property here because currently there is
no xhci node, xhci related properties are put under dwc3 node.
It will be appreciated if there are alternative or more appropriate
approaches, we welcome discussion to explore the best possible
solution. Thanks.
>
> ...
>
> > return -ENOMEM;
> > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> > index 4448d0ab06f0..1c1613c548d9 100644
> > --- a/drivers/usb/host/Kconfig
> > +++ b/drivers/usb/host/Kconfig
> > @@ -61,6 +61,12 @@ config USB_XHCI_PLATFORM
> >
> > If unsure, say N.
> >
> > +config USB_XHCI_GOOG
> > + tristate "xHCI support for Google Tensor SoCs"
> > + help
>
> Please always Cc Google Tensor SoC maintainers and Samsung SoC
> maintainers on your contributions around Google Tensor SoC.
>
> Anyway you just tried to push vendor code to upstream without aligning
> it to usptream code style and to proper driver model. That's not good.
> Please work with your colleagues in Google to explain how to upstream
> vendor code. There were many, many trainings and presentations. One
> coming from Dmitry will be in EOSS24 in two months.
Thank you for advising. I will find the training and study it first, and will cc
the related maintainers in future code uploading.
>
> Best regards,
> Krzysztof
>
Powered by blists - more mailing lists