Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2263187rdb; Wed, 21 Feb 2024 02:04:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWkuVCBm5Oq1/IyXh497vhDlaB/pjRrTB2g8aFUXBYl3OSwWaG1yQVinNLt4Dytaq44mX7m6ys6pkA+/RRld+UjdtO82JVA3G1LN9FI9A== X-Google-Smtp-Source: AGHT+IFIyv5PMYTwUNkn5VYZjPt4EHFdO8KKrAT8RQLdObmj6bNYdYceIR9SPtOGhOg9jDYimpAO X-Received: by 2002:a17:902:e88a:b0:1db:e089:746f with SMTP id w10-20020a170902e88a00b001dbe089746fmr10443497plg.6.1708509871909; Wed, 21 Feb 2024 02:04:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708509871; cv=pass; d=google.com; s=arc-20160816; b=EnM39Vsaizo9UcGevTnZ/X0D/AktAOKhCIAkJ8VFj+nypBBNF/0hSMx+pvEjMmTsuw /xwURX1kwmcIeObRtM7lR/zDpI8GI6y/JkLZIm/fvE26WIbrx5hVDSDzquGDdFEw6NAJ YKGLwKLnij5HAMBCCM1VqfptYbNfH0j1qtfzu0pjZCGN4W4VhN7L7Ah4VogILXR7W78R eCiMBTrBethdEM1bkbnBB31IfIjTsBs7BxpZsfL3PJ70J4Z3ZCtKIH05NbFWU/OC7Ewd MJXnIAxH3tp3mRkw8IPGDnCLoTiw4gTXIbL77xqzAzoPaAPJJsIWwwNW8GPG1Ao/ilT9 EIrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=X6K2D9yhXImL7RVfjrsJqvwOTg0mL/SU1y02Ca1nzKI=; fh=J8W0mQCzJu/VRRcFMRbmq27+ojPkaDc4uLicbpV3byA=; b=iMRfN83isE5bymYQBiXPYLXPUiwd244ljvqroCmOUm5KwzQJvdN8y/eL7n2YprHBqw YvlR30ZEYDeHyGvfadlb0QidvNG+L5QFH42VFc1wVqFer2cdE6FFMC0G2n4cYkwB8wEC /T2Egc1jH1uXPKDGqIT3s8B0Qd+kWfcXIm+sT0bcMKWSEvoOX4V7n3DPmVhzXKMMMGbH Qz61ivT3KJkCZWb5uajnJuOaA+v9k1bR6PFZjQ38bjIv65xFIu6Rd/KscxqUjpBg3kmD lK7Z9g1FkCkACj/ve6YwkvTnRycWWiF5qkKYtMM0z7x9u1edxRi7svRKH7yqoSuLroGJ ck5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="j/cClNDH"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d12-20020a170903230c00b001db420e7552si7758139plh.65.2024.02.21.02.04.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 02:04:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="j/cClNDH"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-74469-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C478C281AFC for ; Wed, 21 Feb 2024 10:00:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C07B3F8FF; Wed, 21 Feb 2024 09:52:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="j/cClNDH" 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 5A39F3D564; Wed, 21 Feb 2024 09:52:57 +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=1708509178; cv=none; b=kt6F+Brld8/13jmLpQ0xj9mtPao/pZ78dvi4maFq9GhVnnk+SVkGrGVHA70q9Ystn6BtHZ827gM0iX2YPqhUcqezlZ3+S4CCwczLiWT8A4O4hdDk7xqsZwiv9x6frhYT61C/FT34TzvvHnmFVsphASmrGHDJfmulZWYGprMhwFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708509178; c=relaxed/simple; bh=n+F3zfUjjh0FcowZvUt7zMvLrVajwJGpsuxCwXX6+io=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=j8N/xjna7MyljJKF+JztNrXd755PWiRVJxb0DfzvkHDsPRkm8BeLfzxD+ySZYYBoedE9AwwYyVmcu6q59qbuajeXveVUXrslCqcDq6Vl8S2v0fPRYFO0TIV7qFYD7VCRqwtc8LOkAEi9TEShHBGu31oQgAiof+TclmlDwHa9o/0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=j/cClNDH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 725E0C433F1; Wed, 21 Feb 2024 09:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708509177; bh=n+F3zfUjjh0FcowZvUt7zMvLrVajwJGpsuxCwXX6+io=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=j/cClNDHf5DPCLnlNAtv51eNkyM3+JZg3cpj30hyd/au43bgg7+XDqv4wJp3SEdm7 HslEbEs0xdVbUvUt5tpF8jDvQUg9uxBL63bTPPBlbw7be4fFIfk1Dv91wzSytUwde6 Vj0pRam/eVXk8WmkPoE17SK6Iky3eq01eGhZjDl2OyYkuK1FD8ydHAer79YWacywJz 6B9RLZRj26wUavBTrf/5dkOqmcgh4bMJjlvJXEYu2ZOJJXklz5oxbMO3wiRKQwTAoL /BZT+iMnpHb6MVBy9lnNLY4t7e6+T/V8FrolTVPil8bgtEjdUASi1YF0lJBC9BnDRM /hYodnqz+aRLA== Message-ID: Date: Wed, 21 Feb 2024 10:52:49 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] usb: xhci: Add support for Google XHCI controller Content-Language: en-US To: Puma Hsu 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 References: <20240219061008.1761102-1-pumahsu@google.com> <20240219061008.1761102-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J/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 21/02/2024 10:31, Puma Hsu wrote: > On Mon, Feb 19, 2024 at 8:22 PM Krzysztof Kozlowski 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