mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Yu, Richard" <richard.yu@hpe.com>,
	"Verdun, Jean-Marie" <verdun@hpe.com>,
	"Hawkins, Nick" <nick.hawkins@hpe.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"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>,
	"Chang, Clay" <clayc@hpe.com>
Subject: Re: [PATCH v1 1/3] dt-bindings: usb: Add HPE GXP UDCG Controller
Date: Thu, 24 Aug 2023 08:31:50 +0200	[thread overview]
Message-ID: <541ce5de-88b2-7d67-6aaa-2faaeb4f6703@linaro.org> (raw)
In-Reply-To: <SJ0PR84MB20859D909E55BB1BC62EE3C68D1CA@SJ0PR84MB2085.NAMPRD84.PROD.OUTLOOK.COM>

On 23/08/2023 18:07, Yu, Richard wrote:
> 
> Thank you, Mr. Kozlowski.
> 
>>> I am implementing this driver using the Aspeed virtual hub driver as example. 
>>>
>>> Just like the Aspeed virtual hub is in the Devicetree:
>>>
>>> vhub: usb-vhub@1e6a0000 {
>>> 	compatible = "aspeed,ast2600-usb-vhub";
>>> 	reg = <0x1e6a0000 0x350>;
>>> 	interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
>>> 	clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
>>> 	aspeed,vhub-downstream-ports = <7>;
>>> 	aspeed,vhub-generic-endpoints = <21>;
>>> 	pinctrl-names = "default";
>>> 	pinctrl-0 = <&pinctrl_usb2ad_default>;
>>> 	status = "disabled";
>>> };
>>>
>>> In my case:  (I am replacing "udcg" with "vhub" and remove the vehci reference).
>>>
>>>  vhub: usb-vhub@80400800 {
>>> 	compatible = "hpe,gxp-vhub";
>>> 	reg = <0x80400800 0x0200>, <0x80401000 0x8000>;
>>> 	reg-names = "vhub", "udc";
>>> 	interrupts = <13>;
>>> 	interrupt-parent = <&vic1>;
>>> 	hpe,vhub-downstream-ports = <4>;
>>> 	hpe,vhub-generic-endpoints = <16>;
>>> };
> 
> 
>> The hub is not virtual, it is real. I understand that it is some software block or FPGA, but still I propose to skip any references to virtual.
> 
> I will remove any references to "virtual" in comment and documentation.
> 
> 
>>>>>> + hpe,vehci-downstream-ports:
>>>>>> + description: Number of downstream ports supported by the GXP
>>>>
>>>>
>>>>>> Why do you need this property in DT and what exactly does it represent?
>>>>>> You have one device - EHCI controller - and on some boards it is 
>>>>>> further customized? Even though it is the same device?
>>>>>
>>>>> That is correct. We can configure this VHUB Controller to have one 
>>>>> to
>>>>> 8 virtual ports. This is similar to the aspeed virtual USB HUB 
>>>>> "aspeed,vhub-downstream-ports" moving forward in the next patch we 
>>>>> are going to use "hpe,vhub-downstream-ports"
>>>
>>>> Moving forward you need to address this lack of physical presence...
>>>> Aren't these different devices and you just forgot to customize the compatible?
>>>
>>> I don’t fully understand here. Isn't the lack of physical presence 
>>> similar to the Aspeed virtual hub driver?
> .
>> I don't know Aspeed virtual hub driver. In any case, driver is irrelevant to the bindings.
> 
>> Why setting maximum number of downstream ports or devices would be needed per-board? 
>> Do you save some resources that way?
> 
> That is correct. Each port/devices will have to allocate resources and create device descriptor entry.

The answer to "why" is not "that is correct".

> Currently, I set the number of downstream ports to be 4. Thus, I will have:
> 
> /sys/bus/platform/devices/80400800.vhub/80400800.vhub:p1   <=== for kvm keyboard/mouse
> /sys/bus/platform/devices/80400800.vhub/80400800.vhub:p2   <=== for virtual CD/DVD/ISO image
> /sys/bus/platform/devices/80400800.vhub/80400800.vhub:p3   <=== for virtual USB key
> /sys/bus/platform/devices/80400800.vhub/80400800.vhub:p4   <=== for virtual NIC

So resources in Linux? That's not really relevant and important. I still
do not see the need of this property.

> 
> Just like aspeed:
> In g5 (aspeed-g5.dtsi), aspeed,vhub-downstream-ports = <5>;
> In g6 (aspeed-g6.dtsi), aspeed,vhub-downstream-ports = <7>;

I did not review that. Poor or incorrect example is not an argument. If
they introduced obvious bugs or obvious non-DT properties, shall you do
the same?

Best regards,
Krzysztof


  reply	other threads:[~2023-08-24  6:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 21:59 [PATCH v1 0/3] Add USB driver for HPE GXP Architecture richard.yu
2023-07-06 21:59 ` [PATCH v1 1/3] dt-bindings: usb: Add HPE GXP UDCG Controller richard.yu
2023-07-07  8:27   ` Krzysztof Kozlowski
2023-08-01 18:07     ` Yu, Richard
2023-08-05 19:08       ` Krzysztof Kozlowski
2023-08-09 15:52         ` Yu, Richard
2023-08-19 18:30           ` Krzysztof Kozlowski
2023-08-23 16:07             ` Yu, Richard
2023-08-24  6:31               ` Krzysztof Kozlowski [this message]
2023-07-06 21:59 ` [PATCH v1 2/3] usb: gadget: udc: gxp-udc: add HPE GXP USB support richard.yu
2023-07-07  2:16   ` Alan Stern
2023-08-01 18:50     ` Yu, Richard
2023-07-07  6:07   ` Greg KH
2023-07-07  8:35   ` Krzysztof Kozlowski
2023-07-07 10:11   ` Greg KH
2023-07-06 21:59 ` [PATCH v1 3/3] MAINTAINERS: add USB support to GXP richard.yu

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=541ce5de-88b2-7d67-6aaa-2faaeb4f6703@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=clayc@hpe.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nick.hawkins@hpe.com \
    --cc=richard.yu@hpe.com \
    --cc=robh+dt@kernel.org \
    --cc=verdun@hpe.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

all inboxes | Powered by JetHome®