From: Krzysztof Kozlowski <krzk@kernel.org>
To: Puma Hsu <pumahsu@google.com>
Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org,
Thinh.Nguyen@synopsys.com, badhri@google.com, royluo@google.com,
howardyen@google.com, albertccwang@google.com, raychi@google.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/3] usb: xhci: Add support for Google XHCI controller
Date: Wed, 21 Feb 2024 10:52:49 +0100 [thread overview]
Message-ID: <bea850fe-19e8-492e-b885-6d01b389c32c@kernel.org> (raw)
In-Reply-To: <CAGCq0LYFMrFmxeKZE9g-O61+N03rJoGL0XvXJVya0Yx-ZasvBA@mail.gmail.com>
On 21/02/2024 10:31, Puma Hsu wrote:
> On Mon, Feb 19, 2024 at 8:22 PM Krzysztof Kozlowski <krzk@kernel.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@99C0000 {
>>> compatible = "shared-dma-pool";
>>> reg = <0x00000000 0x99C0000 0x00000000 0x40000>;
>>> no-map;
>>> };
>>>
>>> dwc3: dwc3@c400000 {
>>> 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
DT is not a place for driver stuff.
> read this property to initiate the probing of the dedicated driver.
I know, but it is not a reason to add stuff to DT.
> 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.
Sorry, you miss the point. Either you have pure DWC3 hardware or not.
You claim now you do not have pure hardware, which is reasonable,
because it is always customized per-vendor. In such case you cannot
claim this is a pure DWC3. You must provide bindings for your hardware.
Now, if you claim you have a pure DWC3 hardware without need for any
vendor customizations, then entire patchset is fake try to upstream your
Android vendor stuff. We talked about such stuff many times on mailing
list, so for obvious reasons I won't repeat it. Trying to push vendor
hooks and vendor quirks is one of the most common mistakes, so several
talks already say: don't do this.
> It will be appreciated if there are alternative or more appropriate
> approaches, we welcome discussion to explore the best possible
> solution. Thanks.
And what's wrong with all previous feedbacks for similar
Google/Samsung/Artpec/Tensor vendor hacks? Once or twice per year some
folks around Google or Samsung try to push such, they all receive the
same feedback and they disappear, so I have to repeat the same feedback
to the next person... Please go through previous patches from
@samsung.com for various subsystems.
Documentation/devicetree/bindings/submitting-patches.rst
Documentation/devicetree/bindings/writing-bindings.rst
+other people or my talks on Devicetree
Summarizing: Devicetree is for hardware, not for your driver
hooks/quirks/needs. Describe properly and fully the hardware, not your
driver.
Best regards,
Krzysztof
next prev parent reply other threads:[~2024-02-21 9:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 6:10 [PATCH 0/3] usb: xhci: Add support for Google XHCI controller Puma Hsu
2024-02-19 6:10 ` [PATCH 1/3] dt-bindings: usb: Add xhci glue driver support Puma Hsu
2024-02-19 12:18 ` Krzysztof Kozlowski
2024-02-19 6:10 ` [PATCH 2/3] usb: xhci: Add support for Google XHCI controller Puma Hsu
2024-02-19 6:30 ` Greg KH
2024-02-21 9:22 ` Puma Hsu
2024-02-19 12:21 ` Krzysztof Kozlowski
2024-02-21 9:31 ` Puma Hsu
2024-02-21 9:52 ` Krzysztof Kozlowski [this message]
2024-02-22 9:45 ` Puma Hsu
2024-02-19 6:10 ` [PATCH 3/3] MAINTAINERS: Add maintainer for Google USB XHCI driver Puma Hsu
2024-02-19 6:31 ` Greg KH
2024-02-19 8:35 ` Puma Hsu
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=bea850fe-19e8-492e-b885-6d01b389c32c@kernel.org \
--to=krzk@kernel.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=albertccwang@google.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=howardyen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=pumahsu@google.com \
--cc=raychi@google.com \
--cc=royluo@google.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