From patchwork Thu Nov 30 15:42:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 748969 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="sB8jtZz6" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB1310D5; Thu, 30 Nov 2023 07:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701358973; x=1701963773; i=wahrenst@gmx.net; bh=kWZYlij2kNgwIM5uMiXInPyv/VHhBRMRoCrGHtd2dDQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=sB8jtZz6Xz8ASMBwCKpy52E4RbuiygkhQKQSsxr/DAhIArV9U5FCOk65DKwceGCw nUlnrJPipQ/pu3W4nw+QKTtZGk8x6Lu5WpuHHNtFPpsGwSqymZfbAw2BIX3JipAcz ZXCR9oXkD/vypngeggPK8Vbe2otQNOGDfVfWC6yqFP+xIyqNz0l0yftf30cRerldw cxOWfbMTDCgPMRQkFryuG/MdhIXBn5jwFSzllCFco4J3q55ZzdnWE6T160rv6udx7 1iyNNTv9vFmoci8tCPNza0fhsKRkSdDpTUMfBm97dPLJgbicyptSn4GlpBymFsKph rlFM1y2wuMenuZF0Ew== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MEm6F-1r2vcF3BPP-00GJv1; Thu, 30 Nov 2023 16:42:52 +0100 From: Stefan Wahren To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Mathias Nyman Cc: bcm-kernel-feedback-list@broadcom.com, Cyril Brulebois , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren , Conor Dooley Subject: [PATCH V2 1/2] dt-bindings: usb: xhci: Add optional power-domains Date: Thu, 30 Nov 2023 16:42:28 +0100 Message-Id: <20231130154229.22334-2-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231130154229.22334-1-wahrenst@gmx.net> References: <20231130154229.22334-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:QQhxP6kT7761HtF+VIHw4espQ3ZzBNTv0Vb9JSXeLDhtSjHDJ46 zC3Cw3U3lm6Ak4POJQy4XrTBmG5wQn+BGxbNEZ5f0gbcldpHa8PGCcy6VAakK7bVhG96iHu wSriIjhVu+ittIWgmD8tBxa9cqYcnSsT6HdkRFowTZaKb2ak8J0dumbOdN9bei1KvEa8I+Z UnLys6+as5tc1IwtnkXsw== UI-OutboundReport: notjunk:1;M01:P0:PvrOUnMOBjY=;LTAu8yW9kIzdrCOY6VrCfgfJ8VV PwuD9wZhKyzjuAr5qUM3OgRHmndO0nfRpIEUWfGb2z2lCZinzC0aL0p+yLnRxCYHuGKBH/Tpg prrjJPrzRD/+BuDCkAumoF1zTSs3NGzuGNqf5MhE16+hI4NEWm13qGQuIlzNAbLM+pJ1QnnXU d/nStLEUieOArKOuI1UynRIURdF6GpzWtxG2jivfQoS2m9PtuGR1t07xNt35kNJV0dKN+dLmM 6GHIm7qzeP9N/vC1TZpl78NogrCfJC/junx1w19s3euSdCJsBflcbJ0ia6JbViMZzjso/KF9l LIRVBtWM34HI7VJPfTw1B6qxLNA3WK5rLvEuavBvtQXbpS0Ddf/DZ8X3y6J0DbnVV+3X38N4m lT2DiG+G5agiLUFSQtF9wdLQj4DZ6FTmcBV+q0DCFzM8GbjYLcnNPJFI0dSRY4/VRdU4JQrs2 fUKBpEbXgGKgeSztrNz7cRKeX2Y6qVsTzC6sKca6SKo/DFYld31l009Hym/EHOoE4yKzm7gNt FGE/8qRO/Igk+1zM21sMBfglNdWYGGx6DHcIRhH0I6/VifLbET5S3SN1M3Ar6yX/emGIwwH08 7KU/lfH4HPEyciO+ZzpJ/T02PlTjUyQXpdrpD7EWPqNQQh8MgyZoaF7ea+eQLj12iX1XTsNo/ WgjqqBVytW9UQ2rhksMdE5SJ6nn+UuyRSwiiD81BlKBJLUBWCe3croq3SNwUtzvDXc0+NA41t kbIW51L0wnVGSjYw2A9thiYzWpT3IqMCZoQr8Cpp93kHPY8ZFRWlWGTGIy1dAO4X7iziYTtcf eHSNyVTDdKBB9yODZU7+QNj6v81Qoin8ej/uCTcuN5VZlM5XQtfuRNqucotuvCrjRf/efAHp4 mh6lVKG5UCyIkAV5uWa+N4cwFOn1EgzusHh1z/fXWmddT8Ss2yf26VJkkwGKOJ0ksJqI58yHU kZ3KxohKZf92HpyMzKSVJaZuSxY= BCM2711 SoC use a power domain for the xHCI. So allow supplying this domain in bindings. Signed-off-by: Stefan Wahren Acked-by: Conor Dooley --- Documentation/devicetree/bindings/usb/generic-xhci.yaml | 3 +++ 1 file changed, 3 insertions(+) -- 2.34.1 diff --git a/Documentation/devicetree/bindings/usb/generic-xhci.yaml b/Documentation/devicetree/bindings/usb/generic-xhci.yaml index 594ebb3ee432..e48beaff7d0d 100644 --- a/Documentation/devicetree/bindings/usb/generic-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-xhci.yaml @@ -49,6 +49,9 @@ properties: - const: core - const: reg + power-domains: + maxItems: 1 + unevaluatedProperties: false required: From patchwork Thu Nov 30 15:42:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 748970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="o3kX6ZpA" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95FF610F1; Thu, 30 Nov 2023 07:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701358973; x=1701963773; i=wahrenst@gmx.net; bh=yhMkKS+sAlCsS1nNe3kHstRuH6SokhhYvl1bbZnnXtY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=o3kX6ZpAW7/CVSaaWHkLLKKxrL20QRhKA612lOqZlaFcRPAgSguhiwxe/jCQhq3E iaHrCojRc/26nflDqXkt4Ov98eXeZp2jCZ+vNqgtuF438xBAnD6yPND4oMIDxqzoI VSgVEibrKmp7Hem5QBYxtPLTHJdJycYRyckR7eysVFn0ASDHtXNjtKgIX/Lqyd0rE zWw+GmsRBZp3SF7rOmPENbWt8ElN79cXh4Z2YRG4CrFY8UpMRbRbZXci1FbDNEbMH vugIU/oCge48hvZKpGS70pYHzWjjYsJwaUMFLONBq83EPDsahsDsnV4g62CXZbZXu SKryzRamASum2Bno8g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M89L1-1rDyFK16X5-005LZD; Thu, 30 Nov 2023 16:42:53 +0100 From: Stefan Wahren To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Mathias Nyman Cc: bcm-kernel-feedback-list@broadcom.com, Cyril Brulebois , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH V2 2/2] ARM: dts: bcm2711: Add generic xHCI Date: Thu, 30 Nov 2023 16:42:29 +0100 Message-Id: <20231130154229.22334-3-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231130154229.22334-1-wahrenst@gmx.net> References: <20231130154229.22334-1-wahrenst@gmx.net> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:nFOnVGoxmH762IJxTV32OFk9LqgZ3wepQQVwxougTVVzIBWmZvy nNHHfDUkuPckCm4Z4sgDnaLTLwqUX/h2LZsqboWyB9MARFQm27Zv1oW+QinSfQIBP1oq+hd veQSjYLIKpc3ag+fioQB3WyLpX2xnsbOQrc1qtAyRzdxlccqztroRIO99GPbXI5Y0ur8YHT xESY0cmdfGx+g6+8NiV3A== UI-OutboundReport: notjunk:1;M01:P0:DqP/bVl2bc0=;gsZO/adFcmtHNOXehG7oq16NB2h Lz4hEN8rIxhea/py7dGMLbE20wsDTNnx6NXytzUx+yykdzT4w1zJDygTSEHj7Lzm3GqDy2EE6 PGCVz3dWrpqzW+/J/ek4GjD72GJkAN/JZjRSeOsxfiDsEz+xgXHFpl6UZExpLWgKAHTcNyFBD sEB606hLvLFNURFv7Y4LgguXDSBvdkCv2qIROWwg16EGQdbAjpb8mhLkegljbbORLtP5e6bBB SPqeDWuF426P3LFP79LTyEM1OXCcVujnke7ZwFKVpZy+53UGrkLxroHWftaiz6wUvIb+V7+oa 2vLUJdcJpdglXAUYCLdUQP+7oF9q7qZF/T1EEz2uOg6LLjIvWE/9H7sAwtryiRwYnQoNv3qg5 gQ3aBIWnyTfpQg3+rUKpohyhE4LTNoqUIjfGOOW4q1s1v8cn1naO926YivD2yzf7b+XXjc1I2 sEWu484sHfVU5HfxdC1W8svE7caWvBjAEcgahxxKQpl2YIGtwlfqE0uJVYH5bBJSiK7OQjypD Buq/9d/6U/a9NVoev60gmQZUDyj5DaX7uXkYtmeI2eDxMGggbX9h8VeHM5v3Jby/pn51C5TAu 84D3teo8Ys1tnsvOap8WgoJYY75XSKejfgpL7Avf+ttxvNCBrlJoK7mXwfflg2GCt//FqXj1m LFdkvEdyAipcKhORbzplvRLXaA/mLlcaN6uLT+kpiAmiwBuPbH79QEG3BJymYRaPPMxLUSIF8 +AeQH8IMABumwynWM0h7cAHWlXauNRAxGhIFxlUEFm7cZFy7uGEBOv10lXcI/AKQDftgOoxEx VZpqEO662l2JDrgjA64YjLRLLv48EpJ650lgbaREpO3JPmyah8o82JGUWrRoTvBymbQPVp2Y0 e5G6FC8+wT0yB4ELNOhCcgLUSGoZmj5GOx1TiH0rsQ4HZ/EE7LPe4TFJ+g6unm//pI4hoyhv9 M5P6fA== The BCM2711 SoC also has a generic xHCI. The USB port is currently only usable on the Compute Module 4 (e.g. via IO board). Because DWC2 and xHCI share the same PHY, we let the bootloader enable it on demand. Signed-off-by: Stefan Wahren Tested-by: Florian Fainelli --- arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi | 5 +++++ arch/arm/boot/dts/broadcom/bcm2711.dtsi | 14 ++++++++++++++ 2 files changed, 19 insertions(+) -- 2.34.1 diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi index 98817a6675b9..d233a191c139 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include "bcm2835-rpi.dtsi" +#include #include / { @@ -76,3 +77,7 @@ &v3d { &vchiq { interrupts = ; }; + +&xhci { + power-domains = <&power RPI_POWER_DOMAIN_USB>; +}; diff --git a/arch/arm/boot/dts/broadcom/bcm2711.dtsi b/arch/arm/boot/dts/broadcom/bcm2711.dtsi index 4a379a14966d..8e68884c2f0d 100644 --- a/arch/arm/boot/dts/broadcom/bcm2711.dtsi +++ b/arch/arm/boot/dts/broadcom/bcm2711.dtsi @@ -604,6 +604,20 @@ genet_mdio: mdio@e14 { }; }; + xhci: usb@7e9c0000 { + compatible = "brcm,xhci-brcm-v2"; + reg = <0x0 0x7e9c0000 0x100000>; + #address-cells = <1>; + #size-cells = <0>; + interrupts = ; + /* DWC2 and this IP block share the same USB PHY, + * enabling both at the same time results in lockups. + * So keep this node disabled and let the bootloader + * decide which interface should be enabled. + */ + status = "disabled"; + }; + v3d: gpu@7ec00000 { compatible = "brcm,2711-v3d"; reg = <0x0 0x7ec00000 0x4000>,