Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp1072888lqh; Fri, 29 Mar 2024 06:34:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCzwNlYGU1j6RmQBuP8ygEIUoOiHHZnPh0sehobURsyHq9hrIOqIDlknHRut9wl1vRAk9Cn5dk7UVj8193DGHIlJKp9zncU6RVJ4kXzg== X-Google-Smtp-Source: AGHT+IFoBzpcANl9btvq2dusgozWPnp/l9dpQxS6rc3lBoW4trRslSA7tDII8FD6EGTYi1cz2rbt X-Received: by 2002:a17:906:7b4a:b0:a4e:1449:5148 with SMTP id n10-20020a1709067b4a00b00a4e14495148mr1533720ejo.14.1711719275709; Fri, 29 Mar 2024 06:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711719275; cv=pass; d=google.com; s=arc-20160816; b=iDn3qDNs2vsrxSeDnamf6j7keB9g/AjWGkhJVlMO+nKjEhOOZYfB62DmW6qVy/VeYB rx6JWMcdeY0vl+LjHhe+Pwz939txSIY5gdc+6oubSCS6ZDld7SaWvCzAtp8I9uewG7jB Dav66fVGgvRriCwlricx2hzBx48btD6ivbEWkiKTvK7WoVOqUMoGiCXnFCNxHd/oF9ao qYqA2FFaSJUEJW0E8nTvOA4AhG2ibcdI8RHRjlWawSKQftCy729nv3YQS7bpymcFwRce DfvBKKzxUeawt8dzat96RThhJO9oDTNqQi9F8B/zqowqTIducptFcYhTScYh6/0DVo3l NZnQ== 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=BUCxPNcbwA5TMTl4cKXuA8cgZIy51B/vkvIZYTjYEtw=; fh=gL0vF3K8/qyAVL9o/yTU9MoOZ322JPuFt/odB2X0yK0=; b=kMiCLOjKTa16CxbMLN0PjBVq+zWRINGV5xOC64p6/G10pzVK1Rqzc+PPipqm+JD4O1 rIPPVYCdwK2PJLrxY02eEuD84/PKuNI5r+HDf0+gd4RwU3W5bqIGryIEDe7ohQCB7Aav GYQf7xSVnEBhP8leicIBxNj/YfSh+be3Y5dX2a7qJAZTemrcvyNwmOh2K2nqiIPEMpwA 2sclarEfdVVRyBaP8ImleNZ5eg2yW3GW4aSYFrcruKapX7asH8K7x5QfTv9stcvPjnnh yLp703LboUciujWXXK0nxExPeYFrgQBUgE51p4e+37o/pTmlUvEvW0nJISr039v+CgTu 8rWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=da6CrC5I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124720-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z26-20020a170906271a00b00a47154bd722si1798171ejc.637.2024.03.29.06.34.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 06:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=da6CrC5I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-124720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124720-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 A2F8F1F27288 for ; Fri, 29 Mar 2024 13:33:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93061146A69; Fri, 29 Mar 2024 12:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="da6CrC5I" 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 A21B51465AB; Fri, 29 Mar 2024 12:40:08 +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=1711716008; cv=none; b=ok3yxt/rXamV1y0pKBjo1msUtQePLs/V8+GWTx7RM/eq8ctYBtLeViokxzmie1aprqaNAUHmvP78/vUo5GiW6gLt1k30DjaKY5oN6cv1v8tdSk6x6CuKYNGoRoNTRttJPxafgwPNPQdP23ZmqtNtT5UgLhaT+6ZiwJNNIbMCqSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711716008; c=relaxed/simple; bh=0Unq+1iE7ipc/KKZheYH+mrLHQ+V8/V5iM4qZIxwmTM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ar1Y15oNXm2JTvmMRT8C3g6dUqlQDC4Cg4tz84R2TPfVObpN89sNeRWB5q/kB/0iZ9us8JZ69Xmbhysu1ybxr5LhNYJxKpXj86Zy+mLfGl3gy8WStx+CjlwiYgVtd4cmQ/xSxlUIKqaXmtfHKKcp7w6PPWsZ1TMHGaYnDecgqjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=da6CrC5I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A7F1C43394; Fri, 29 Mar 2024 12:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711716008; bh=0Unq+1iE7ipc/KKZheYH+mrLHQ+V8/V5iM4qZIxwmTM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=da6CrC5IhYcZH5873WJ7wgarKOm0Dq2E/V/8kROPyX3L9Jql0/naWY+iCO+0acDMP xnabL3zA7YnbQOQlSbJta3EDDhZqB4ysfeuyQfuJ11UwqY7f0UwaLDlVHOXZawW4XG E9mNY266Pa42xVBbvw2xe3nR2ljR3mxcDPEraF3ob9IIDcYIBUDJQ73X5jaiqUILOg kS/K7+nguSrW8plOEpaaBIJsnOkeP5KcAjIFeKqL7cvRnmMIqDao8Cl8Um1tayHqXw cquV2wkwhmfeZf3B3zHw9gSzCiHtemRDMYrazA4eQOuXqlH150I4CeIt5C3vTi7mRO as8kzzlO9Oa5Q== 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.8 11/98] arm64: dts: qcom: sdm630: add USB QMP PHY support Date: Fri, 29 Mar 2024 08:36:42 -0400 Message-ID: <20240329123919.3087149-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240329123919.3087149-1-sashal@kernel.org> References: <20240329123919.3087149-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.8.2 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 2ed39d402d3f6..21fae799c816a 100644 --- a/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts +++ b/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts @@ -454,10 +454,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 87d0293c728d8..f06a9f0cf97c1 100644 --- a/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-nile.dtsi @@ -658,10 +658,16 @@ cam_vdig_default: cam-vdig-default-state { }; &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 513fe5e76b688..28489fb58b200 100644 --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi @@ -1286,7 +1286,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>; @@ -1297,17 +1296,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 3c47410ba94c0..7167f75bced3f 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts @@ -413,10 +413,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