From nobody Sun Nov 24 01:22:25 2024 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 BD8CD1448DC; Mon, 18 Nov 2024 05:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731907785; cv=none; b=a3v/y4Je+odgWlHbLJWoz6Se8plk7RWqqHqE7/0NAzvcLa9kRS+7dKQwK8oC7mbaJp0Q3/OeKkUuSSOz48jrhYpret2CZ5btCd9gb+Sn+LkfvLNtgBK1vj/zrARbef6ZMne1fdLJb+lTlNxr/BeyyjXwJGv2bwy9R+MySIAAlCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731907785; c=relaxed/simple; bh=JsmDYzubK3hOV4nekSGahI06QXEQyIgM5eko6uyp7ys=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pv151+fcDCKlQUu/Kqy+Ra6jk4BFUf9OusasHQ3nkpLhJpgDHAUCrzdJdhdlPBNp1q1RYeexBxmh0yiVASnzKwu44B7GDPJTs+O7yzHI4q5bOGfAM+iMciVj+qdksKNIkr/V/6V60gpZTaJ1+B00vHNvfydHF1NcUdwlv68yGbU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=PtOjDK0i; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="PtOjDK0i" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AI5Rml2020151; Mon, 18 Nov 2024 05:29:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= jgz7pF8JkfmkscHNlhoJqi1SqIt6y0WjsTv4g0OiuwM=; b=PtOjDK0iWZaS86di oesZ/JVJYnAWXwoH2JPpRtY9CupEkTf7K0b/MLVwm7IFDRCEWvBqJauB3pWt7Y9e soyo5pwyTq/XPb1enaZ8LEyaHC/74SgCq+uEqPGHufw2oyAne+xjRN9solrEoM3q L3ezfs1Pv9UNAdRcrrLtK/nm8aGgfT0FZ64nif9eUGD6BeUqlM2WAdnyMSX9Jqfe GDsYGtemHB7plkQkN5ExcN/RyoPgl3vs4JXnJbc9ETgHsLRR1r9LRQMaxX/oH9Uy JJlZDIHeMINWa/CnrFr+zc0NnuzaMae8Djbpj96LBKFCP+1hW6hYjRFosExWF+6Z mnxaPA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42xkqs3hq3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Nov 2024 05:29:36 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AI5Taoc010927 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Nov 2024 05:29:36 GMT Received: from hu-varada-blr.qualcomm.com (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 17 Nov 2024 21:29:29 -0800 From: Varadarajan Narayanan To: , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v4 6/6] arm64: dts: qcom: Add USB controller and phy nodes for IPQ5424 Date: Mon, 18 Nov 2024 10:58:39 +0530 Message-ID: <20241118052839.382431-7-quic_varada@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241118052839.382431-1-quic_varada@quicinc.com> References: <20241118052839.382431-1-quic_varada@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: n2g447VEUk04kekeBsLpOV3IL7fJzjqz X-Proofpoint-GUID: n2g447VEUk04kekeBsLpOV3IL7fJzjqz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 clxscore=1015 malwarescore=0 spamscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411180046 Content-Type: text/plain; charset="utf-8" The IPQ5424 SoC has both USB2.0 and USB3.0 controllers. The USB3.0 can connect to either of USB2.0 or USB3.0 phy and operate in the respective mode. Signed-off-by: Varadarajan Narayanan --- v4: Fix regulator names to match with other Qualcomm DT files v3: Regulator node names, labels and 'regulator-name' changed per review su= ggestions Stray newline removed v2: Add dm/dp_hs_phy_irq to usb3@8a00000 node Add u1/u2-entry quirks to usb@8a00000 node --- arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 66 ++++++++ arch/arm64/boot/dts/qcom/ipq5424.dtsi | 159 ++++++++++++++++++++ 2 files changed, 225 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/= dts/qcom/ipq5424-rdp466.dts index d4d31026a026..dae83fe642ef 100644 --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts @@ -16,12 +16,70 @@ / { aliases { serial0 =3D &uart1; }; + + vreg_misc_3p3: regulator-usb-3p3 { + compatible =3D "regulator-fixed"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + regulator-name =3D "usb_hs_vdda_3p3"; + }; + + vreg_misc_1p8: regulator-usb-1p8 { + compatible =3D "regulator-fixed"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + regulator-name =3D "vdda_1p8_usb"; + }; + + vreg_misc_0p925: regulator-usb-0p925 { + compatible =3D "regulator-fixed"; + regulator-min-microvolt =3D <925000>; + regulator-max-microvolt =3D <925000>; + regulator-boot-on; + regulator-always-on; + regulator-name =3D "vdd_core_usb"; + }; +}; + +&dwc_0 { + dr_mode =3D "host"; +}; + +&dwc_1 { + dr_mode =3D "host"; +}; + +&qusb_phy_0 { + vdd-supply =3D <&vreg_misc_0p925>; + vdda-pll-supply =3D <&vreg_misc_1p8>; + vdda-phy-dpdm-supply =3D <&vreg_misc_3p3>; + + status =3D "okay"; +}; + +&qusb_phy_1 { + vdd-supply =3D <&vreg_misc_0p925>; + vdda-pll-supply =3D <&vreg_misc_1p8>; + vdda-phy-dpdm-supply =3D <&vreg_misc_3p3>; + + status =3D "okay"; }; =20 &sleep_clk { clock-frequency =3D <32000>; }; =20 +&ssphy_0 { + vdda-pll-supply =3D <&vreg_misc_1p8>; + vdda-phy-supply =3D <&vreg_misc_0p925>; + + status =3D "okay"; +}; + &tlmm { sdc_default_state: sdc-default-state { clk-pins { @@ -53,6 +111,14 @@ &uart1 { status =3D "okay"; }; =20 +&usb2 { + status =3D "okay"; +}; + +&usb3 { + status =3D "okay"; +}; + &xo_board { clock-frequency =3D <24000000>; }; diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qc= om/ipq5424.dtsi index 5e219f900412..f8afd6f0412d 100644 --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi @@ -233,6 +233,165 @@ intc: interrupt-controller@f200000 { msi-controller; }; =20 + qusb_phy_1: phy@71000 { + compatible =3D "qcom,ipq5424-qusb2-phy"; + reg =3D <0 0x00071000 0 0x180>; + #phy-cells =3D <0>; + + clocks =3D <&gcc GCC_USB1_PHY_CFG_AHB_CLK>, + <&xo_board>; + clock-names =3D "cfg_ahb", "ref"; + + resets =3D <&gcc GCC_QUSB2_1_PHY_BCR>; + status =3D "disabled"; + }; + + usb2: usb2@1e00000 { + compatible =3D "qcom,ipq5424-dwc3", "qcom,dwc3"; + reg =3D <0 0x01ef8800 0 0x400>; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + clocks =3D <&gcc GCC_USB1_MASTER_CLK>, + <&gcc GCC_USB1_SLEEP_CLK>, + <&gcc GCC_USB1_MOCK_UTMI_CLK>, + <&gcc GCC_USB1_PHY_CFG_AHB_CLK>, + <&gcc GCC_CNOC_USB_CLK>; + + clock-names =3D "core", + "sleep", + "mock_utmi", + "iface", + "cfg_noc"; + + assigned-clocks =3D <&gcc GCC_USB1_MASTER_CLK>, + <&gcc GCC_USB1_MOCK_UTMI_CLK>; + assigned-clock-rates =3D <200000000>, + <24000000>; + + interrupts-extended =3D <&intc GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 387 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 388 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "pwr_event", + "qusb2_phy", + "dm_hs_phy_irq", + "dp_hs_phy_irq"; + + resets =3D <&gcc GCC_USB1_BCR>; + qcom,select-utmi-as-pipe-clk; + status =3D "disabled"; + + dwc_1: usb@1e00000 { + compatible =3D "snps,dwc3"; + reg =3D <0 0x01e00000 0 0xe000>; + clocks =3D <&gcc GCC_USB1_MOCK_UTMI_CLK>; + clock-names =3D "ref"; + interrupts =3D ; + phys =3D <&qusb_phy_1>; + phy-names =3D "usb2-phy"; + tx-fifo-resize; + snps,is-utmi-l1-suspend; + snps,hird-threshold =3D /bits/ 8 <0x0>; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + }; + }; + + qusb_phy_0: phy@7b000 { + compatible =3D "qcom,ipq5424-qusb2-phy"; + reg =3D <0 0x0007b000 0 0x180>; + #phy-cells =3D <0>; + + clocks =3D <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, + <&xo_board>; + clock-names =3D "cfg_ahb", "ref"; + + resets =3D <&gcc GCC_QUSB2_0_PHY_BCR>; + status =3D "disabled"; + }; + + ssphy_0: phy@7d000 { + compatible =3D "qcom,ipq5424-qmp-usb3-phy"; + reg =3D <0 0x0007d000 0 0xa00>; + #phy-cells =3D <0>; + + clocks =3D <&gcc GCC_USB0_AUX_CLK>, + <&xo_board>, + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, + <&gcc GCC_USB0_PIPE_CLK>; + clock-names =3D "aux", + "ref", + "cfg_ahb", + "pipe"; + + resets =3D <&gcc GCC_USB0_PHY_BCR>, + <&gcc GCC_USB3PHY_0_PHY_BCR>; + reset-names =3D "phy", + "phy_phy"; + + #clock-cells =3D <0>; + clock-output-names =3D "usb0_pipe_clk"; + + status =3D "disabled"; + }; + + usb3: usb3@8a00000 { + compatible =3D "qcom,ipq5424-dwc3", "qcom,dwc3"; + reg =3D <0 0x08af8800 0 0x400>; + + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + clocks =3D <&gcc GCC_USB0_MASTER_CLK>, + <&gcc GCC_USB0_SLEEP_CLK>, + <&gcc GCC_USB0_MOCK_UTMI_CLK>, + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, + <&gcc GCC_CNOC_USB_CLK>; + + clock-names =3D "core", + "sleep", + "mock_utmi", + "iface", + "cfg_noc"; + + assigned-clocks =3D <&gcc GCC_USB0_MASTER_CLK>, + <&gcc GCC_USB0_MOCK_UTMI_CLK>; + assigned-clock-rates =3D <200000000>, + <24000000>; + + interrupts-extended =3D <&intc GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 414 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "pwr_event", + "qusb2_phy", + "dm_hs_phy_irq", + "dp_hs_phy_irq"; + + resets =3D <&gcc GCC_USB_BCR>; + status =3D "disabled"; + + dwc_0: usb@8a00000 { + compatible =3D "snps,dwc3"; + reg =3D <0 0x08a00000 0 0xcd00>; + clocks =3D <&gcc GCC_USB0_MOCK_UTMI_CLK>; + clock-names =3D "ref"; + interrupts =3D ; + phys =3D <&qusb_phy_0>, <&ssphy_0>; + phy-names =3D "usb2-phy", "usb3-phy"; + tx-fifo-resize; + snps,is-utmi-l1-suspend; + snps,hird-threshold =3D /bits/ 8 <0x0>; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + }; + }; + timer@f420000 { compatible =3D "arm,armv7-timer-mem"; reg =3D <0 0xf420000 0 0x1000>; --=20 2.34.1