From patchwork Tue Jan 16 01:10:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 763433 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CEC9D20DCE for ; Tue, 16 Jan 2024 01:11:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZGtM+g3E" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2cd2f472665so97906891fa.2 for ; Mon, 15 Jan 2024 17:11:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367477; x=1705972277; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RStsOu+xacQMgJbS/MXyR2aPxlxf4VUezrxj/3wNsBo=; b=ZGtM+g3EZe7jEsisf1riGT5iM06fUtIRW/nD2vbvNQV+Q0FnOCg3IBF0rAqo1LyE92 t8rmiu4QpIZ3faUsa8U/GHwyA9kHMg1q0OxZTPgUCFkWRB8NyfknQs1y4bWmj0B+8zP9 sTyXancP0tecfLfluncGzb6sgge04uv44TUhcSd/zzOhuOlaIRlczQiKdMl3AkCp7TTs G+JbmUwL7F6ifJtXxHexuZzr5tMX6OEdg1RwIDGbDau8TivjF+ORqBiQeuqbmAlYIZJJ 5wns+SHS6Bw2Fql2HyxrHQrTDMKeLWV8LGY2DjY/NJCtDxYq3qbjK2WhQVxWqDc24KIx qKEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367477; x=1705972277; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RStsOu+xacQMgJbS/MXyR2aPxlxf4VUezrxj/3wNsBo=; b=WlKF2GjP+j7bJ8VQsawlT68cU8JGog3ovyKGZjpklm9RMYYIF2kmyzNxQutQOp6/x/ qwpcJDxczfpBJsm9XHAhEdbAIXoCLkNMxITEA9ZHhh8vYg0Sg72ZEhHw8Me7jQ792cUV 0MPUWj9W9TExBIONGN+XkQAjLVdPP3pwau/Mm1LeO3KE+e+igDzTipbiHRw4/V9IAnEg VFoax3VIsFR6qiZDTZOYuYE/vV+sO+XsYv4gCLWCAppaVAya8JE7K+c/4b/nU/wtPmNu ZQOs1yQTcrby1/Re5YfyHGa0DOHt9KRgfWY5UxUHAmCDtGb/0EAGf84codcerscRiNN4 s1vw== X-Gm-Message-State: AOJu0Yzp5hIiKcRaekpezSW1A+pCtolqY4dJiQdLyXL53HPnj3JXwICZ GHLb0CtvAQY+AgwVUYzLVUBChmNtcL7G0g== X-Google-Smtp-Source: AGHT+IF9QTTC5raiMne+yAWfQBinTWrTQZS+iMZiQlovjnYcHgehvOq/I4moxnNElTukvTobtkTSNg== X-Received: by 2002:a2e:8e68:0:b0:2cc:6d87:9a91 with SMTP id t8-20020a2e8e68000000b002cc6d879a91mr2614457ljk.72.1705367477059; Mon, 15 Jan 2024 17:11:17 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id q15-20020a2e84cf000000b002cc7a2f7a9asm1513414ljh.98.2024.01.15.17.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:11:16 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:10:57 +0200 Subject: [PATCH 3/4] arm64: dts: qcom: sdm630: add USB QMP PHY support Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-sdm660-usb3-support-v1-3-2fbd683aea77@linaro.org> References: <20240116-sdm660-usb3-support-v1-0-2fbd683aea77@linaro.org> In-Reply-To: <20240116-sdm660-usb3-support-v1-0-2fbd683aea77@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=4024; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=vROuTM9nsbcJ2159YURKAEnKyZKiaf/PSfxNouUCVmU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdex4RZUyTpfyKAR0l1z9mtwjfi8RAfh3fnpQ i2EL6HKaaSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXsQAKCRCLPIo+Aiko 1RL9B/4q7I8AvvEE5rhJD8I+RlFZpuAGL8KtxWu/fIt3Mi7wRKBiALt44Pk/zwNDYTCG1sfCKLH xDl6ESkv7X5HGAqUwszMQ2qZL/s+lb2Zi5gM7Q2g6qT1MuWK/Wf1El8a9e03GSmUI6zZzOi7cYu THZTZY4eyWYEnJt5oo1mfj9dqAI3cMxFamNheWkzzq4FLo4jokTo/yTGCMh+JAfzwvN7B7lomCo doPShrWy5ZUX3Kym+yimdeEdatoW8XE3s0YTCGVl3ivVugDW7F9iskso+RMf9bsHG7IKxEw9b04 mCWxg7B8S/fM8Izmn52q4SgOOYR0O78KC7sG2wWIo8aALEpi X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A 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 --- .../arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 6 ++++ .../boot/dts/qcom/sdm630-sony-xperia-nile.dtsi | 6 ++++ arch/arm64/boot/dts/qcom/sdm630.dtsi | 36 +++++++++++++++++----- .../arm64/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 2ed39d402d3f..90118f133961 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 87d0293c728d..f06a9f0cf97c 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 513fe5e76b68..28489fb58b20 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 3c47410ba94c..7167f75bced3 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>; };