From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D12F318E02A; Mon, 2 Mar 2026 09:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772443635; cv=none; b=nt6JSTicKQJ6qoLSmFAML99P2teVOaPF+54TRPNedRkJywSS8uVAgovqeJmNrCarkCvEH2ppFOrve26Otct81kPSVeEL/ry+IKMiDbuc2zscjfEIYw82Y/g7xuT4DcyG8h55eyuW/t1GYluYEyBc2g0xTyXynyVlaiKD0VjP/cI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772443635; c=relaxed/simple; bh=LW64Gcs17r+m3bjYFPY4OjImJZUp2lyl4j2HhRwRhdU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gGFwI6Mn+ZGGgteM2iAtQu46P6V4oO0wiFEPpC9k5/Zf4veAqVTtPZLD+d1K9ajEms+Hi+avB6/CcCBXMnBzzf6eS+w7rB4HEJS3s11XW8siY9z7XsEtnlrUX4UCB4ztqdtr02AcKvUx0vC7GKgz81x/DGNSp+VyHqt5nj2GoZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Pr3QOzQt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pr3QOzQt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14612C19423; Mon, 2 Mar 2026 09:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772443635; bh=LW64Gcs17r+m3bjYFPY4OjImJZUp2lyl4j2HhRwRhdU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Pr3QOzQtOIDmrqg8NDq5C6OJCJYe/Wd5xtIJI19zaoAwEKbQvsvPvFRzDXXosWQ5k QE0xrnSCR72fG/MlLH8v7t4Qln5yQBRb63GcSXv4YVO4BboDVkMsWjx07z99VeYPSU z8UeID0FsNxdQNYcWlHI8pgKf8jfat2B9ni2NRXnXb+4YriyKN9qp8FZLbNwR05FU+ Q0pSnEl8rsCalxnp/Su5nJ64/8ky042hli17UcwGrcFoujOzPqPknkupQp6q6TiWLK KwKyzd1XCcjrwZEwMBBo/j0cZXTVhgN/l4qxkLQVRq5No4DnanC0RIdMo/dNGQAwpo J5c9/G8VDCK5Q== Message-ID: <81c86ce7-0c55-4c2b-8956-cea4c63351cb@kernel.org> Date: Mon, 2 Mar 2026 10:27:11 +0100 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] dt-bindings: usb: cdns,usb3: Add support for USBSSP To: Peter Chen Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, gregkh@linuxfoundation.org, pawell@cadence.com, rogerq@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, cix-kernel-upstream@cixtech.com References: <20260302030339.324196-1-peter.chen@cixtech.com> <20260302030339.324196-3-peter.chen@cixtech.com> <20260302-vengeful-delicate-macaw-e8dc8c@quoll> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0Z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pyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 02/03/2026 10:21, Peter Chen wrote: > On 26-03-02 08:28:07, Krzysztof Kozlowski wrote: >> >> On Mon, Mar 02, 2026 at 11:03:34AM +0800, Peter Chen wrote: >>> Extend the Cadence USBSS DRD binding to also cover the USBSSP >>> controller by adding "cdns,usbssp" to the compatible enum. >>> >>> The USBSSP is the next-generation Cadence USB controller IP. It adds >>> SuperSpeed Plus (USB 3.1 gen2x1, 10 Gbps) support and uses an >>> XHCI-based device controller. The register layout and resource model >>> (otg/xhci/dev memory regions; host/peripheral/otg interrupts) are >>> identical to the USBSS, so both controllers share the same binding >>> and the same platform driver (cdns3-plat.c). >>> >>> Changes to the binding: >>> - compatible: const -> enum with cdns,usb3 and cdns,usbssp >>> - maximum-speed: add super-speed-plus >>> - Add USBSSP example >>> >>> This patch was developed with assistance from Anthropic Claude Opus 4.6. >> >> Use proper tag, but expect pushback of microslop crap. > > Krzysztof, thanks for your reply. > > I tried to add Assisted-by or Co-developed-by tag, neither can pass > checkpatch.pl check, it needs a valid email address. See below: > > ERROR: Unrecognized email address: 'Claude (Anthropic Claude Opus 4.6)' > #45: > Assisted-by: Claude (Anthropic Claude Opus 4.6) > >> >>> >>> Signed-off-by: Peter Chen >>> --- >>> .../devicetree/bindings/usb/cdns,usb3.yaml | 36 +++++++++++++++++-- >>> 1 file changed, 33 insertions(+), 3 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml >>> index f454ddd9bbaa..f79333e7fc1f 100644 >>> --- a/Documentation/devicetree/bindings/usb/cdns,usb3.yaml >>> +++ b/Documentation/devicetree/bindings/usb/cdns,usb3.yaml >>> @@ -4,14 +4,22 @@ >>> $id: http://devicetree.org/schemas/usb/cdns,usb3.yaml# >>> $schema: http://devicetree.org/meta-schemas/core.yaml# >>> >>> -title: Cadence USBSS-DRD controller >>> +title: Cadence USBSS/USBSSP DRD controller >>> >>> maintainers: >>> - Pawel Laszczak >>> >>> +description: >>> + Cadence USB dual-role controllers. USBSS (cdns,usb3) supports up to >>> + SuperSpeed (USB 3.0). USBSSP (cdns,usbssp) is the next generation with >>> + SuperSpeed Plus (USB 3.1 gen2x1) and XHCI-based device controller. Both >>> + share the same register layout and resource model. >> >> So are compatible or not? >> > > Sorry for the misleading description. They are NOT fully compatible. > The register layout (OTG/XHCI/Device) and interrupts > (OTG/XHCI/Device/Wakeup) are the same, but register contents are Layout cannot be the same if contents is different. Same layout means same register is at the same place. If you have different register with different contents at given place, how is it "same layout"? > different, esp, the device (gadget) controllers are architecturally different: > > - USBSS uses a custom gadget controller (cdns3_gadget_init) > - USBSSP uses an XHCI-based gadget controller (cdnsp_gadget_init) You just described drivers, so this does not convince me at all. > > I will fix the description in v2 to clearly state this difference. > >>> + >>> properties: >>> compatible: >>> - const: cdns,usb3 >>> + enum: >>> + - cdns,usb3 >>> + - cdns,usbssp >> >> Why do we need another generic compatible? >> >> And why do you add it now to each of device schemas using this one? You did not respond to this one. Look how this schema is used. > > Like explain above, the USBSSP has a different device/gadget controller > architecture from USBSS. The platform driver uses the compatible string > to select the correct gadget init function: Again, driver stuff. > > if (device_get_match_data(dev) == &cdnsp_plat) > cdns->gadget_init = cdnsp_gadget_init; > else > cdns->gadget_init = cdns3_gadget_init; > > Without a distinct compatible, the driver cannot know which gadget > controller is present. This is a Cadence IP-level distinction (not > SoC-specific), so a generic compatible seems appropriate here. But > please let me know if you'd prefer a different approach. Generic compatibles are almost never appropriate and driver code rarely convinces. Best regards, Krzysztof