From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 748D249E12B for ; Thu, 15 Oct 2026 07:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792050289; cv=none; b=iljbMykb9pNSw1AQrYK9xGfogZGG5XJl1Pp8DsBOS2yYbpFV7WH25Jpm83MvrPiwJQhBBfPYzNKasp7dlKLNZv/CxbDbUwkdoveKM+42HyGncDtfVOO0Ooga1fdzT0fz3NwUqjqZsHRak9WTW6/MBYRGUw1k5zoELA7P6xQwZGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792050289; c=relaxed/simple; bh=0UA8dSV6qvMA9myM9p5q2eyTL3r5zJtR3t1wLT4sjBw=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=HVyjdFsIMSaLLy0IgmBQxr9pZHZLCxB3RhG4ahOFdYVq6UXORHzviGtMdVljp6JVki9rB/O0p279rHN5bXy1KI1ieJhccG5NV+uaUvYRH0ivxk+fOp97OGlM+TXFu/x4fJrNopRfMRTFFt9sMLVLAKJgsDVtExE7ESjhPD9DX8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nxMHOxUY; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nxMHOxUY" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4a0e1b0681bso35771345e9.3 for ; Thu, 15 Oct 2026 00:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792050284; x=1792655084; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to:content-type; bh=+dvMNnzmsfKlXaQReE9W1eWaATaq+JUXJSwSZca7lFE=; b=nxMHOxUYUs4JuNmbTThb0A720WUFU0SU5BVZmFT9/N7xvL8d1lixLvPj73zDpLVz8F pHBuBYG+uMVShWpjkoX6s6sN4kZoXoALeiHRuZkN+mKBkWj0tuDvIsJCQ9SpzjYAt3yU KfOzJiupBHhOTxNZen6ceQE/nGb18BuiFwmZUSUg0eIz8LwhrusxyqsAljfmVndWFjak EfcHUN4Ku6sefLSBjoaZWvc++u16wyTVaOvxw4pToXzAEShK4HeOtGTihuz4vxtDJFKY IUrUYNVBFQ6G7ojcasVA/xyKn+zF1Lh4zrkYXyEIo7y2N30yvAO8kUKn0LplsOOW0WTP Tocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792050284; x=1792655084; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=+dvMNnzmsfKlXaQReE9W1eWaATaq+JUXJSwSZca7lFE=; b=SIhrKM98KLw7UT8iXzF5Gh1cNWTGaQd35iGG6RRmWYq78tuB5FBleOOv5drzk+K550 CRURSVxufkbLEUu42Mf6mFZHM5g/gbEhrDagkJU92wCE2n5u1ugWpi+87dasVZX2hGpZ dzCf8czbX++8+asG6MyMviGRRofISj7stwoBGQVNpzBX08Nt3EzXWHcmd7LIwp30LvWU jKmmAtBD2NdTtpv/45P3ZCFtL9we3J2EgJMbdNW9j5GFqYaJemLwzYZzChRayaj45reV touAULUHV0ygVXmDVAxYj2uC4VQP7HTGeW0QdPESuB8i0Bc7UCgkDfw1r27rnBcN5KLi fF6g== X-Forwarded-Encrypted: i=1; AKwUvBzcTCdTKYZ3RCT5XIMVavqTfNMIbkDsrKPafe1J3+RUmOzPSQEgYWDcaNMO9HASVxppR/ViJBpD2pVqFAs=@vger.kernel.org X-Gm-Message-State: AFq9FYLUorr50TZtH3HWEAlWftO4XmWqHmiBezmFfjXzfi9FtBw2RkPX GwDUzWEGPDBBIfooZ46h2m8h5mbfIJbdKjdFN/midJE4l9oNrkvH4WqM6HWLTQD8814= X-Gm-Gg: AYBFou2LShmjXqSu7qp6secq0BgQ676r4phPFrx7MiQi/vgNsYn+vqJucfgZIw5Utau gSj4ubZNb8/4e2SOYheJc+14GEpamdJP6M31wqgkIKeW11WA0ZbZ5e2D2bOFrzevB640vrNWh0P TEA8vleRY/sbRCzf4Ymw8gNqTdzsFHOlhZpoSbbOSsw7Skt+B256CFFg+FVCtdO1CjoNNa1MWB1 xuPj7XVEKKRmgTQY4hW6TQ+H4p5p7oj71P5XVpwXdTPoOImOYLB7yDkx3hHbtCtyFk85dUchK8e 5WK9RCtffu8z10OLuXS9+mfYj8QTv4qVF3RPzpHI87pnx+2VlasoUGHekMSF2ImihaBrvWBEA8X W0YCnKcaghN8PdnTj+acVPs5Wjy7ATYEcRpST1QYXac5lUXoRu6yjjsh+WLqfC00ERW9cNXf1lM Ce2Q3rPCY0o5oAdqMiJKkfgUJhqaUpeQWaZRbzfUkBbj2hudRNq+AwscFrEeXl/3jphn871Ouwf OaygZcDa9evdqsokXVw6CqdABqOrqKgGJMbzGSfih2GHIwAvE6Bq+k= X-Received: by 2002:a05:600c:4685:b0:4a0:27eb:49b with SMTP id 5b1f17b1804b1-4a18e4ae6fcmr385008175e9.30.1792050282515; Thu, 15 Oct 2026 00:44:42 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:fdbf:f373:6d5b:93e4? ([2a01:e0a:106d:1080:fdbf:f373:6d5b:93e4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48ded185de7sm8548506f8f.31.2026.10.15.00.44.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2026 00:44:42 -0700 (PDT) Message-ID: <8d4d3ec2-3c97-4a46-97f8-048fdf81b853@linaro.org> Date: Thu, 15 Oct 2026 09:44:40 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH 2/2] dt-bindings: usb: snps,dwc3: Fix downstream port numbering To: Konrad Dybcio , Chen-Yu Tsai Cc: Greg Kroah-Hartman , Felipe Balbi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sven Peter , Janne Grunau , Neal Gompa , Joel Stanley , Andrew Jeffery , Ryan Chen , Billy Tsai , Michal Simek , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peter Griffin , =?UTF-8?Q?Andr=C3=A9_Draszik?= , Tudor Ambarus , Heiko Stuebner , Alim Akhtar , Kunihiko Hayashi , Masami Hiramatsu , Yixun Lan , Troy Mitchell , Minda Chen , Shyam Pandey , Wei Yang , Senchuan Zhang , Hang Cao , Li Jun , Peng Fan , Roy Luo , Yang Xiwen , Ahmad Zainie , Robert Marko , Xu Yang , Wesley Cheng , Stanley Chang , Ze Huang , Aswath Govindraju , Roger Quadros , 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 References: <20261014082037.1774672-1-wenst@chromium.org> <20261014082037.1774672-3-wenst@chromium.org> <7020a7a6-332e-4fd0-a659-d82eb768614c@linaro.org> <03375a31-0ac6-47a4-b0dc-6327080e1622@linaro.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04 YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+ SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY 4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 >>> 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