From: Neil Armstrong <neil.armstrong@linaro.org>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Chen-Yu Tsai <wenst@chromium.org>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Felipe Balbi" <balbi@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Sven Peter" <sven@kernel.org>, "Janne Grunau" <j@jannau.net>,
"Neal Gompa" <neal@gompa.dev>, "Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Ryan Chen" <ryan_chen@aspeedtech.com>,
"Billy Tsai" <billy_tsai@aspeedtech.com>,
"Michal Simek" <michal.simek@amd.com>,
"Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Peter Griffin" <peter.griffin@linaro.org>,
"André Draszik" <andre.draszik@linaro.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Yixun Lan" <dlan@kernel.org>,
"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"Minda Chen" <minda.chen@starfivetech.com>,
"Shyam Pandey" <radhey.shyam.pandey@amd.com>,
"Wei Yang" <yangwei1@eswincomputing.com>,
"Senchuan Zhang" <zhangsenchuan@eswincomputing.com>,
"Hang Cao" <caohang@eswincomputing.com>,
"Li Jun" <jun.li@nxp.com>, "Peng Fan" <peng.fan@nxp.com>,
"Roy Luo" <royluo@google.com>,
"Yang Xiwen" <forbidden405@foxmail.com>,
"Ahmad Zainie" <wan.ahmad.zainie.wan.mohamad@intel.com>,
"Robert Marko" <robert.marko@sartura.hr>,
"Xu Yang" <xu.yang_2@nxp.com>,
"Wesley Cheng" <quic_wcheng@quicinc.com>,
"Stanley Chang" <stanley_chang@realtek.com>,
"Ze Huang" <huang.ze@linux.dev>,
"Aswath Govindraju" <a-govindraju@ti.com>,
"Roger Quadros" <rogerq@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
asahi@lists.linux.dev, linux-aspeed@lists.ozlabs.org,
imx@lists.linux.dev, linux-samsung-soc@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Subject: Re: [PATCH 2/2] dt-bindings: usb: snps,dwc3: Fix downstream port numbering
Date: Thu, 15 Oct 2026 09:44:40 +0200 [thread overview]
Message-ID: <8d4d3ec2-3c97-4a46-97f8-048fdf81b853@linaro.org> (raw)
In-Reply-To: <b4c0761b-34f2-42ad-97e7-ab34ae776281@oss.qualcomm.com>
On 10/14/26 18:36, Konrad Dybcio wrote:
> On 10/14/26 11:44 AM, Neil Armstrong wrote:
>> On 10/14/26 11:29, Chen-Yu Tsai wrote:
>>> On Wed, Oct 14, 2026 at 5:28 PM Neil Armstrong
>>> <neil.armstrong@linaro.org> wrote:
>>>>
>>>> On 10/14/26 10:20, Chen-Yu Tsai wrote:
>>>>> The DWC3 controller can operate in host mode. It does so with a XHCI
>>>>> compliant host controller. The XHCI has two downstream ports, one for
>>>>> HS and one for SS. USB downstream ports start from 1, not 0.
>
> [...]
>
>
>>> IMHO having consistent numbering across controller types would be
>>> better. This avoids making the USB core and hub code deal with more
>>> exceptions, and also easier to understand and write device trees.
>>
>> I was in the impression the port number not necessarily reflects
>> an actual physical numbering, and can be a logical number we would
>> then map in the kernel.
>>
>> I don't see any issue here having base 0 for the bindings and then
>> converting it to base 1 for the XHCI port numbering.
>
> I thought base1 comes from the USB spec and not just XHCI?
This is my question, is the spec says: each USB Host Controller root
port shall be considered as a port of a Hub and numbered the same way,
then fine, let's use the base1 numbering.
As I understand how USB is architectured, all downstream ports of Hubs
are numbered in base1, and the whole topology is based on that.
But here, we are speaking of physically separate USB busses, one
USB2.0 and one USB3.0, a controller could also have 10 USB2.0 ports
and 5 USB3.0 ports, who knows. The way those will be numbered is not
part of the specification because the specification only the defines
the topology of an USB bus, like PCI(e) defines the topology on a PCI(e) bus.
How we aggregate all those busses to abstract them to software is not
part of the spec, we chose to declare a fake root Hub with a physical
downstream port as a virtual port of the root Hub, fine but this is
purely software abstraction.
We may only use the hardware IP port numbering in the bindings, not
the software abstraction.
We could use the base1 to describe the DWC3 ports, but how to describe
all the physical USB busses a controller can expose ? We may not limit
the bindings to USB2.0 and USB3.0 ports only.
How about the USB4, does it use the USB3.0 port ?
Neil
>
> Konrad
next prev parent reply other threads:[~2026-10-15 7:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 8:20 [PATCH 0/2] dt-bindings: usb: downstream host ports for hcd and dwc3 Chen-Yu Tsai
2026-10-14 8:20 ` [PATCH 1/2] dt-bindings: usb: hcd: Add downstream USB ports Chen-Yu Tsai
2026-10-14 8:20 ` [PATCH 2/2] dt-bindings: usb: snps,dwc3: Fix downstream port numbering Chen-Yu Tsai
2026-10-14 8:28 ` Neil Armstrong
2026-10-14 9:29 ` Chen-Yu Tsai
2026-10-14 9:44 ` Neil Armstrong
2026-10-14 10:14 ` Chen-Yu Tsai
2026-10-14 12:15 ` Neil Armstrong
2026-10-14 16:36 ` Konrad Dybcio
2026-10-15 7:44 ` Neil Armstrong [this message]
2026-10-15 9:00 ` Chen-Yu Tsai
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=8d4d3ec2-3c97-4a46-97f8-048fdf81b853@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=Frank.Li@nxp.com \
--cc=a-govindraju@ti.com \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=andrew@codeconstruct.com.au \
--cc=asahi@lists.linux.dev \
--cc=balbi@kernel.org \
--cc=billy_tsai@aspeedtech.com \
--cc=caohang@eswincomputing.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=festevam@gmail.com \
--cc=forbidden405@foxmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=heiko@sntech.de \
--cc=huang.ze@linux.dev \
--cc=imx@lists.linux.dev \
--cc=j@jannau.net \
--cc=jbrunet@baylibre.com \
--cc=joel@jms.id.au \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mhiramat@kernel.org \
--cc=michal.simek@amd.com \
--cc=minda.chen@starfivetech.com \
--cc=neal@gompa.dev \
--cc=peng.fan@nxp.com \
--cc=peter.griffin@linaro.org \
--cc=quic_wcheng@quicinc.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robert.marko@sartura.hr \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=royluo@google.com \
--cc=ryan_chen@aspeedtech.com \
--cc=s.hauer@pengutronix.de \
--cc=spacemit@lists.linux.dev \
--cc=stanley_chang@realtek.com \
--cc=sven@kernel.org \
--cc=troy.mitchell@linux.spacemit.com \
--cc=tudor.ambarus@linaro.org \
--cc=wan.ahmad.zainie.wan.mohamad@intel.com \
--cc=wenst@chromium.org \
--cc=xu.yang_2@nxp.com \
--cc=yangwei1@eswincomputing.com \
--cc=zhangsenchuan@eswincomputing.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®