Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp18310lqz; Fri, 29 Mar 2024 07:18:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpaA9j9Fni8lrw+cq5tNcAh1PdwyFFiBrfntMbMYUBJwwoUd0cRj8H8Ioz7k4IcUhBRybw6Mgo1Hy67XWH93aJbQQCG6S4rzoL3Zp/bg== X-Google-Smtp-Source: AGHT+IGEWsKtGNBE8n5dTzLheYM4cCNwqmYQ+6vGCkDf4VKxgIXYJjbWwnplow9GyzC2Uwnu70ft X-Received: by 2002:a05:6402:3490:b0:56b:e535:6b01 with SMTP id v16-20020a056402349000b0056be5356b01mr2690483edc.4.1711721934540; Fri, 29 Mar 2024 07:18:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711721934; cv=pass; d=google.com; s=arc-20160816; b=zIu9pFf24dn5w09jj4gGvSPjwrlvIbm2VuDY87Rjj7JWgFpJ9KNI9YceQbIPC1HXVE v1Ilja7bHYWzQdSRh8326mKKEGEfotJdGXfvWXdAn2ZdkEtKcZERTST6PPIquJnP1tDy RWcjlPTffivT1LHSUZlMY1yY2ChsGq3ycZeAKZOjnHFk4Z5JCGGvQL/6mGgZDbZlxhjf S9m/rNitoHcvzyQBhJOIRkknH2NqJm68ikfEbtdB/pU12tAzSBPS5ew8dzcP0IFHknvc d0xTxPKmoEZbQkdOY7HIgwd8J0yF6eREK/8i0fQXVOMXWD9DNfIO4deEG0dFvebWxkrj Oqtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=AysGSv2HsM8nknepIobYrZHMFeQWg2J9EzK3/F3+dh4=; fh=gL0vF3K8/qyAVL9o/yTU9MoOZ322JPuFt/odB2X0yK0=; b=d/w0G6IR782SEmOgN2cS1PF3dDVnwqkEBqvSSHh/ni+YUnXQpkRhgZmdzLffSV/Ynq EsgAdaWK640dFz4kR3XTk1gE/LlVh2UZyMXTorWKQxnbr6ZjjOwIHIJ55JF56OuA+BKm JTNqowrspB3imPSBcKLmXCTJ20K/grCTpsmPe++//a/xSf3QELNqkfGfJfBEvw8HIWTT ZtdUjBC8h/G6d2BiTGyjLZqIuIFEoOnZRj4RdrrHo7DqsCxwxNqQAqMDiBg3yT8RsbSL ZfUldlJW19H/rlyc7qXmPeWSAlMbqRiw5O5gIGT/UqxfqhCYdZx5ng/ViT/4Hkj4PuY7 fF3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxfXy1++; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m25-20020a50c199000000b0056c38f7295fsi1834543edf.602.2024.03.29.07.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 07:18:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxfXy1++; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124888-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1A2021F2621D for ; Fri, 29 Mar 2024 14:18:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6589421EB9A; Fri, 29 Mar 2024 12:46:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oxfXy1++" 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 7302721EB81; Fri, 29 Mar 2024 12:46:12 +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=1711716372; cv=none; b=HTOfn8iHzITUBgti/OedLaMdFDAj7tFRu8WfCky4k64yu3EzzcbEbg6438OFMv3HiP+9BpKXSXr8PJc6jSm5PcOd+nabSUia15i1RplldrUgIU9tHRlNBvlXXeTz9G9SrofF5p7aUcxvIwW0uAlg7VgkgPUyR2jWWIoQgO51im8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716372; c=relaxed/simple; bh=A75RSHCw4CqssR5CcTQUp5pbGcsNVHagnw3nvde01W0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jqone/jBlNw6PAzIFLlm9ZDU2BUVOc97l1go5PM9Olwn55cyCsBkQBSQ65Jhqc7hN6A/0TrOwl9NWgsSNRL88t9mUsP1zz5E1nuYByGC9T220XH3PWalUYME4MmISuRNZPNFnT4u1hrg01hVZWoOK0CokhQV/pDFA0G0HH0qbMw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oxfXy1++; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2A64C433F1; Fri, 29 Mar 2024 12:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716372; bh=A75RSHCw4CqssR5CcTQUp5pbGcsNVHagnw3nvde01W0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oxfXy1++5cWWoFbhsIuiz3KEV2d9S2SWyoEq8p2DAFUi8riu7DbofXk7/TTnNj5Cv WGywUGkch/aVDz32qFDZ5MYUKu2epWFckiRsVl1XlobmOP7Ycs8lARpc7bEpyFGlqH Gi2E8i6D3WWWyWSf074cd1OGtXN/SpyG/5aAQDi4VVxfa+LqEXlPMcPMdUCmWRQXMe t6TUfDsERFsvi2wkNDNLWdcKckdi8TvH9Exh7kU1+hCyzlfiGeaY0+vu8IkjKk84Lj scdTZtB5YpLeJb/on6DUjoWprz5kky7OLrRNIalP9nwU8LSMANvuraxx0wQ5usrpeP yitRnGynJZuHg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dmitry Baryshkov , Konrad Dybcio , Bjorn Andersson , Sasha Levin , robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 04/52] arm64: dts: qcom: sdm630: add USB QMP PHY support Date: Fri, 29 Mar 2024 08:44:58 -0400 Message-ID: <20240329124605.3091273-4-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329124605.3091273-1-sashal@kernel.org> References: <20240329124605.3091273-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.83 Content-Transfer-Encoding: 8bit From: Dmitry Baryshkov [ Upstream commit bb5009a24ec3f2f2ec1e2ed7b8a5dcde9a9e28d9 ] Define USB3 QMP PHY presend on the SDM630 / SDM660 platforms. Enable it by default in the USB3 host, but (for compatibility), force USB 2.0 mode for all defined boards. The boards should opt-in to enable USB 3.0 support. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240116-sdm660-usb3-support-v1-3-2fbd683aea77@linaro.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- .../boot/dts/qcom/sda660-inforce-ifc6560.dts | 6 ++++ .../dts/qcom/sdm630-sony-xperia-nile.dtsi | 6 ++++ arch/arm64/boot/dts/qcom/sdm630.dtsi | 36 ++++++++++++++----- .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 6 ++++ 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts index 28050bc5f0813..f824036871cc1 100644 --- a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts +++ b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts @@ -452,10 +452,16 @@ &usb2_dwc3 { }; &usb3 { + qcom,select-utmi-as-pipe-clk; + status = "okay"; }; &usb3_dwc3 { + maximum-speed = "high-speed"; + phys = <&qusb2phy0>; + phy-names = "usb2-phy"; + dr_mode = "peripheral"; extcon = <&extcon_usb>; }; diff --git a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi index 09c07800793a0..dd1d7e738c8da 100644 --- a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi @@ -650,10 +650,16 @@ cam_vdig_default: cam-vdig-default { }; &usb3 { + qcom,select-utmi-as-pipe-clk; + status = "okay"; }; &usb3_dwc3 { + maximum-speed = "high-speed"; + phys = <&qusb2phy0>; + phy-names = "usb2-phy"; + dr_mode = "peripheral"; extcon = <&extcon_usb>; }; diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi index 2430549265d3f..1d18c85c5c5b0 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -1233,7 +1233,6 @@ usb3: usb@a8f8800 { interrupt-names = "hs_phy_irq", "ss_phy_irq"; power-domains = <&gcc USB_30_GDSC>; - qcom,select-utmi-as-pipe-clk; resets = <&gcc GCC_USB_30_BCR>; @@ -1244,17 +1243,38 @@ usb3_dwc3: usb@a800000 { snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - /* - * SDM630 technically supports USB3 but I - * haven't seen any devices making use of it. - */ - maximum-speed = "high-speed"; - phys = <&qusb2phy0>; - phy-names = "usb2-phy"; + phys = <&qusb2phy0>, <&usb3_qmpphy>; + phy-names = "usb2-phy", "usb3-phy"; snps,hird-threshold = /bits/ 8 <0>; }; }; + usb3_qmpphy: phy@c010000 { + compatible = "qcom,sdm660-qmp-usb3-phy"; + reg = <0x0c010000 0x1000>; + + clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, + <&gcc GCC_USB3_CLKREF_CLK>, + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; + + resets = <&gcc GCC_USB3_PHY_BCR>, + <&gcc GCC_USB3PHY_PHY_BCR>; + reset-names = "phy", + "phy_phy"; + + qcom,tcsr-reg = <&tcsr_regs_1 0x6b244>; + + status = "disabled"; + }; + qusb2phy0: phy@c012000 { compatible = "qcom,sdm660-qusb2-phy"; reg = <0x0c012000 0x180>; diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts index a3559f6e34a5e..308f9786a648e 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts @@ -411,10 +411,16 @@ &tlmm { }; &usb3 { + qcom,select-utmi-as-pipe-clk; + status = "okay"; }; &usb3_dwc3 { + maximum-speed = "high-speed"; + phys = <&qusb2phy0>; + phy-names = "usb2-phy"; + dr_mode = "peripheral"; extcon = <&extcon_usb>; }; -- 2.43.0