From patchwork Tue Jan 14 05:11:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938416 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 319B32327BA for ; Tue, 14 Jan 2025 05:05:48 +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=1736831150; cv=none; b=CgVo9Eug6Mo7ZLQ4VnkKdkYWMz0SQ+EhfOwmfJuUUXFM3AUOHKk5ch9vdve8+ihLjGAbaqXT07sGPhqxRAMtxfJtsZQ+ToOmot6xcewrCYNYtG3E9EuWF444GM8RJIdgtS+EWpr1/6sTQcA9oMF7gwdXQceMR4y10reUuGXhaMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831150; c=relaxed/simple; bh=G6dtBU2rfEreIT2rFdyqftSefNbsw6nq18RbsWsp5iY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QMvBfsUe48rNPa2DbhK6z6DOMCpow28SKOg65IuaQrcI7Ctwr4Zs7Bd5ruykZUQTl5sufuA/0aDH+nmnjWWnSryBsG5DkMz1TlKtb0FJ/qhQEV8PYoudY0LBTvAJJUsJSNZTgl8UCrdh7qOhBz7HfLysqXg6ONGvuTTYkVPHtnE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=U3CARc/g; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="U3CARc/g" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E23i9X008530 for ; Tue, 14 Jan 2025 05:05:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Gf68pBND6Bw8Zne3bWp+1+Yl8GBhak+geAciswXOc+E=; b=U3CARc/g+oBFma+x uYjF5bK9Fm6UOHVlBfrJz1Gk/f8VDjPzFI7vHzrhQ2262i5yNkESzQJeFA/JM26W ptyXRg0ABKVlA3bjxj155HdYp2tp0Qq99FP6ekfYQ1W0vEqrjZV1Y/23Qp0k7UqE 3pWqgXOWpMdg+CnJRkK0NlE8z/oRSovaHKTM0V23Zz+q7wf7zj3jtkyPnFy7cHeH oYywycLRXF6JtDPyqLtUTZl1VrH0I6BonUYtOHCSM+odgLhzMXo20QhWMimsZBrf HHlRJSllYJ3aEw+J66jHt5WWIo3eiTLKEh9+TfL0qk71uWFE+M5mxAqxnRewzYmQ ILNhgQ== Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eterbk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:47 +0000 (GMT) Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-5f88020f6f9so3669580eaf.3 for ; Mon, 13 Jan 2025 21:05:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831146; x=1737435946; 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=Gf68pBND6Bw8Zne3bWp+1+Yl8GBhak+geAciswXOc+E=; b=ucREGPvOgjcXki1qDP8JQISAs6Anq+PlYviPyeVBM+lVUnvKptSue60DsLjGLvfPU4 L7PdTnkbJExyE9PoQ155R2mlmUEsN3/RvzQePEru/fPB88JMyHfzUK7dBz68ehflLJnZ 0SPBa966L6D3zqMW2ZLEGqtpgqH+ksZPi7J1fNU6y6N4AoK9gPR8PjqcRlY4Up06ifKn 1ZZM1yICsQTWbFIIv/ZhLqY/3s90JCp0gKYgKW7F03lydfg2hgPgfFAdxvCfOCWkrb2R 79cMzL/WI2tJGs++O/bQxQ0GyYSA1Bc5Nqj96fJgFouTXPxip1i8f/T/Dp9cPrPgHJlR vnjw== X-Forwarded-Encrypted: i=1; AJvYcCWsm3a3BoXzv8O36RP4hyPXpgMNUYvnBjbeh0i0XgfKqtZhlZOPjL3v5B/xeL/G1URTPINCEbrDxV4=@vger.kernel.org X-Gm-Message-State: AOJu0YwQCc4SzY7+lXZ0HAlgjRm5XPG8ue5aGCMu45W/6Jb6TmFjn0j/ pmzKMfw8ez+cj9Bjbwhv79HV8fjEfCa5uyW41vk61pZTjXqPCK8KdO6rS7QUDERv9dXoceajeIJ K7LdAxqtL8uKMmRIKxp9GZj6VugyeqR2+AoK7w7aNdWsqbfk/oE1LT8z80iw= X-Gm-Gg: ASbGncu+JtYGOq9tTOpUUZdO4Y26by2QUvog5CPqy4tuXWWY59/gihQ7X0nb+Mn06v+ DrVZd2zVQatX17+whVxTkI0qTcfKMlfLG6z+N+n1nyk1PMj2M2kldOlF64WwNOvOG8vsidhp6BC 61Hulp5wf3Kin8e1y7k+2KRlAM++Y11pUzpNuWBSZKZmQgVD4nRIIXBdEEFUpOAX2pulfLBmSB4 5vED1peIVTfkAcTJF7pCyLuasDOTe0uGLZ0nhJ0C5vvuqb43F3mGQjs30detizaxQaMwbcFk74p U3Ad+lcGCpMN3ShzLcBcGKCVXaxCNUqXnaLqw/ICzUxfgRtFKhHEwJ6J X-Received: by 2002:a05:6820:1520:b0:5f6:d896:4afe with SMTP id 006d021491bc7-5f7309645d5mr13975581eaf.3.1736831145622; Mon, 13 Jan 2025 21:05:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1lU6i27DwfQZgvaaz4U1vt5GzXa+IZsX7I/BiaDc+J/WVyAMzVDxPSrBxx/AL3//iDwyMpQ== X-Received: by 2002:a05:6820:1520:b0:5f6:d896:4afe with SMTP id 006d021491bc7-5f7309645d5mr13975566eaf.3.1736831144933; Mon, 13 Jan 2025 21:05:44 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:44 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:34 -0800 Subject: [PATCH v3 01/12] dt-bindings: usb: snps,dwc3: Split core description Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-1-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=29276; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=G6dtBU2rfEreIT2rFdyqftSefNbsw6nq18RbsWsp5iY=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIUyYuIIj988QjM2A610Bd/+42u2axIpEAqS EvVeaBYwViJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFBUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWGWA//Yr1XCAl7N8ZgvipJism9Pj9GjU6GnpFUjbH4udY bpxRnkjdoig1TgFyJ1AX1K1PsYTtKprdAU5lR7RUgf2XQia347+SPYfuH2v1r4dn5UIyfkwlFVo jU/9z+i9OIgi8JkVxaSC8sWQ5+T3F9Wbr5KkCTAVEg8yFCWbGZiXURDHavN2sWcQqCd1GBjuR2z uTG8OcO7M3q9heU7ooyi/u82cLDf+MI7H77c/jeQGqEZVrc39NTPYNU97teJX4e8D25FgQ71BT2 OG1D6KW7e8xW/KKQaqGXYOKveK2CBNcj1nPwOmoVcCGsNG367w1c367LKs22+H41Y05gaZHgCf9 RTmY+5+b18Ujyc5oWbbk3h7iACUnHzlSRvmrpAtJdfTolor36lvnxFozzHmi6lbIZG1c+TB4Hex sBv2Wvq0zlf1FA3cV5WCTWWt8BgzlToPK5pbWCJNw/87yFXRpIT/Tk+ZDXNXCmYPq45o25dwAPz NfcrUZezOfEq2bg3Rp0+00DntIjVyOhfsOIxqT5bOhepoM14E2cE873NwNgrqdQozrkvFf0SrvP QMfIqCKIJLbLArrxoOIl6T5nK1qT8XN9dCVynu+dNPvriY2imhpbWPctMhWJu7y4RionAp68llp xfSZ220GnGAaus4pw5OuXDdEdZlqTRXNzExtRCms3nSg= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: 4LOUqGsE3kB7PElnX0Eez1wiUx_ZQ5iT X-Proofpoint-GUID: 4LOUqGsE3kB7PElnX0Eez1wiUx_ZQ5iT 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 clxscore=1011 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 The Synopsys DWC3 core is found either as a standalone block or integrated with vendor glue logic. So far the latter has been described as two separate IP blocks in DeviceTree, but the two parts are not separate. In the case where the core is integrated together with vendor glue, resources such as clock and resets are often customized by the vendor, such that the standard properties doesn't make sense. Split the snps,dwc3 binding in a description of the core properties and the standard "glue" properties, in order to allow vendor bindings to inherit the core properties. Reviewed-by: Rob Herring (Arm) Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/usb/snps,dwc3-common.yaml | 415 +++++++++++++++++++++ .../devicetree/bindings/usb/snps,dwc3.yaml | 391 +------------------ 2 files changed, 416 insertions(+), 390 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml new file mode 100644 index 000000000000..c956053fd036 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml @@ -0,0 +1,415 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/snps,dwc3-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synopsys DesignWare USB3 Controller common properties + +maintainers: + - Felipe Balbi + +description: + Defines the properties of the DWC3 core as being embedded in either an + vendor-specific implementation or as a standalone component. + +allOf: + - $ref: usb-drd.yaml# + - if: + properties: + dr_mode: + const: peripheral + + required: + - dr_mode + then: + $ref: usb.yaml# + else: + $ref: usb-xhci.yaml# + +properties: + extcon: + maxItems: 1 + deprecated: true + + usb-phy: + minItems: 1 + items: + - description: USB2/HS PHY + - description: USB3/SS PHY + + phys: + minItems: 1 + maxItems: 19 + + phy-names: + minItems: 1 + maxItems: 19 + oneOf: + - items: + enum: [ usb2-phy, usb3-phy ] + - items: + pattern: "^usb(2-([0-9]|1[0-4])|3-[0-3])$" + + snps,usb2-lpm-disable: + description: Indicate if we don't want to enable USB2 HW LPM for host + mode. + type: boolean + + snps,usb3_lpm_capable: + description: Determines if platform is USB3 LPM capable + type: boolean + + snps,usb2-gadget-lpm-disable: + description: Indicate if we don't want to enable USB2 HW LPM for gadget + mode. + type: boolean + + snps,dis-start-transfer-quirk: + description: + When set, disable isoc START TRANSFER command failure SW work-around + for DWC_usb31 version 1.70a-ea06 and prior. + type: boolean + + snps,disable_scramble_quirk: + description: + True when SW should disable data scrambling. Only really useful for FPGA + builds. + type: boolean + + snps,has-lpm-erratum: + description: True when DWC3 was configured with LPM Erratum enabled + type: boolean + + snps,lpm-nyet-threshold: + description: LPM NYET threshold + $ref: /schemas/types.yaml#/definitions/uint8 + + snps,u2exit_lfps_quirk: + description: Set if we want to enable u2exit lfps quirk + type: boolean + + snps,u2ss_inp3_quirk: + description: Set if we enable P3 OK for U2/SS Inactive quirk + type: boolean + + snps,req_p1p2p3_quirk: + description: + When set, the core will always request for P1/P2/P3 transition sequence. + type: boolean + + snps,del_p1p2p3_quirk: + description: + When set core will delay P1/P2/P3 until a certain amount of 8B10B errors + occur. + type: boolean + + snps,del_phy_power_chg_quirk: + description: When set core will delay PHY power change from P0 to P1/P2/P3. + type: boolean + + snps,lfps_filter_quirk: + description: When set core will filter LFPS reception. + type: boolean + + snps,rx_detect_poll_quirk: + description: + when set core will disable a 400us delay to start Polling LFPS after + RX.Detect. + type: boolean + + snps,tx_de_emphasis_quirk: + description: When set core will set Tx de-emphasis value + type: boolean + + snps,tx_de_emphasis: + description: + The value driven to the PHY is controlled by the LTSSM during USB3 + Compliance mode. + $ref: /schemas/types.yaml#/definitions/uint8 + enum: + - 0 # -6dB de-emphasis + - 1 # -3.5dB de-emphasis + - 2 # No de-emphasis + + snps,dis_u3_susphy_quirk: + description: When set core will disable USB3 suspend phy + type: boolean + + snps,dis_u2_susphy_quirk: + description: When set core will disable USB2 suspend phy + type: boolean + + snps,dis_enblslpm_quirk: + description: + When set clears the enblslpm in GUSB2PHYCFG, disabling the suspend signal + to the PHY. + type: boolean + + snps,dis-u1-entry-quirk: + description: Set if link entering into U1 needs to be disabled + type: boolean + + snps,dis-u2-entry-quirk: + description: Set if link entering into U2 needs to be disabled + type: boolean + + snps,dis_rxdet_inp3_quirk: + description: + When set core will disable receiver detection in PHY P3 power state. + type: boolean + + snps,dis-u2-freeclk-exists-quirk: + description: + When set, clear the u2_freeclk_exists in GUSB2PHYCFG, specify that USB2 + PHY doesn't provide a free-running PHY clock. + type: boolean + + snps,dis-del-phy-power-chg-quirk: + description: + When set core will change PHY power from P0 to P1/P2/P3 without delay. + type: boolean + + snps,dis-tx-ipgap-linecheck-quirk: + description: When set, disable u2mac linestate check during HS transmit + type: boolean + + snps,parkmode-disable-ss-quirk: + description: + When set, all SuperSpeed bus instances in park mode are disabled. + type: boolean + + snps,parkmode-disable-hs-quirk: + description: + When set, all HighSpeed bus instances in park mode are disabled. + type: boolean + + snps,dis_metastability_quirk: + description: + When set, disable metastability workaround. CAUTION! Use only if you are + absolutely sure of it. + type: boolean + + snps,dis-split-quirk: + description: + When set, change the way URBs are handled by the driver. Needed to + avoid -EPROTO errors with usbhid on some devices (Hikey 970). + type: boolean + + snps,gfladj-refclk-lpm-sel-quirk: + description: + When set, run the SOF/ITP counter based on ref_clk. + type: boolean + + snps,resume-hs-terminations: + description: + Fix the issue of HS terminations CRC error on resume by enabling this + quirk. When set, all the termsel, xcvrsel, opmode becomes 0 during end + of resume. This option is to support certain legacy ULPI PHYs. + type: boolean + + snps,ulpi-ext-vbus-drv: + description: + Some ULPI USB PHY does not support internal VBUS supply, and driving + the CPEN pin, requires the configuration of the ulpi DRVVBUSEXTERNAL + bit. When set, the xhci host will configure the USB2 PHY drives VBUS + with an external supply. + type: boolean + + snps,is-utmi-l1-suspend: + description: + True when DWC3 asserts output signal utmi_l1_suspend_n, false when + asserts utmi_sleep_n. + type: boolean + + snps,hird-threshold: + description: HIRD threshold + $ref: /schemas/types.yaml#/definitions/uint8 + + snps,hsphy_interface: + description: + High-Speed PHY interface selection between UTMI+ and ULPI when the + DWC_USB3_HSPHY_INTERFACE has value 3. + $ref: /schemas/types.yaml#/definitions/string + enum: [utmi, ulpi] + + snps,quirk-frame-length-adjustment: + description: + Value for GFLADJ_30MHZ field of GFLADJ register for post-silicon frame + length adjustment when the fladj_30mhz_sdbnd signal is invalid or + incorrect. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 0x3f + + snps,ref-clock-period-ns: + description: + Value for REFCLKPER field of GUCTL register for reference clock period in + nanoseconds, when the hardware set default does not match the actual + clock. + + This binding is deprecated. Instead, provide an appropriate reference clock. + minimum: 8 + maximum: 62 + deprecated: true + + snps,rx-thr-num-pkt: + description: + USB RX packet threshold count. In host mode, this field specifies + the space that must be available in the RX FIFO before the core can + start the corresponding USB RX transaction (burst). + In device mode, this field specifies the space that must be + available in the RX FIFO before the core can send ERDY for a + flow-controlled endpoint. It is only used for SuperSpeed. + The valid values for this field are from 1 to 15. (DWC3 SuperSpeed + USB 3.0 Controller Databook) + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 15 + + snps,rx-max-burst: + description: + Max USB RX burst size. In host mode, this field specifies the + Maximum Bulk IN burst the DWC_usb3 core can perform. When the system + bus is slower than the USB, RX FIFO can overrun during a long burst. + You can program a smaller value to this field to limit the RX burst + size that the core can perform. It only applies to SS Bulk, + Isochronous, and Interrupt IN endpoints in the host mode. + In device mode, this field specifies the NUMP value that is sent in + ERDY for an OUT endpoint. + The valid values for this field are from 1 to 16. (DWC3 SuperSpeed + USB 3.0 Controller Databook) + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + snps,tx-thr-num-pkt: + description: + USB TX packet threshold count. This field specifies the number of + packets that must be in the TXFIFO before the core can start + transmission for the corresponding USB transaction (burst). + This count is valid in both host and device modes. It is only used + for SuperSpeed operation. + Valid values are from 1 to 15. (DWC3 SuperSpeed USB 3.0 Controller + Databook) + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 15 + + snps,tx-max-burst: + description: + Max USB TX burst size. When the system bus is slower than the USB, + TX FIFO can underrun during a long burst. Program a smaller value + to this field to limit the TX burst size that the core can execute. + In Host mode, it only applies to SS Bulk, Isochronous, and Interrupt + OUT endpoints. This value is not used in device mode. + Valid values are from 1 to 16. (DWC3 SuperSpeed USB 3.0 Controller + Databook) + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + snps,rx-thr-num-pkt-prd: + description: + Periodic ESS RX packet threshold count (host mode only). Set this and + snps,rx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31 + programming guide section 1.2.4) to enable periodic ESS RX threshold. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + snps,rx-max-burst-prd: + description: + Max periodic ESS RX burst size (host mode only). Set this and + snps,rx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 + programming guide section 1.2.4) to enable periodic ESS RX threshold. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + snps,tx-thr-num-pkt-prd: + description: + Periodic ESS TX packet threshold count (host mode only). Set this and + snps,tx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31 + programming guide section 1.2.3) to enable periodic ESS TX threshold. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + snps,tx-max-burst-prd: + description: + Max periodic ESS TX burst size (host mode only). Set this and + snps,tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 + programming guide section 1.2.3) to enable periodic ESS TX threshold. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 16 + + tx-fifo-resize: + description: Determines if the TX fifos can be dynamically resized depending + on the number of IN endpoints used and if bursting is supported. This + may help improve bandwidth on platforms with higher system latencies, as + increased fifo space allows for the controller to prefetch data into its + internal memory. + type: boolean + + tx-fifo-max-num: + description: Specifies the max number of packets the txfifo resizing logic + can account for when higher endpoint bursting is used. (bMaxBurst > 6) The + higher the number, the more fifo space the txfifo resizing logic will + allocate for that endpoint. + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 3 + + snps,incr-burst-type-adjustment: + description: + Value for INCR burst type of GSBUSCFG0 register, undefined length INCR + burst type enable and INCRx type. A single value means INCRX burst mode + enabled. If more than one value specified, undefined length INCR burst + type will be enabled with burst lengths utilized up to the maximum + of the values passed in this property. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 8 + uniqueItems: true + items: + enum: [1, 4, 8, 16, 32, 64, 128, 256] + + num-hc-interrupters: + maximum: 8 + default: 1 + + port: + $ref: /schemas/graph.yaml#/properties/port + description: + This port is used with the 'usb-role-switch' property to connect the + dwc3 to type C connector. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: + Those ports should be used with any connector to the data bus of this + controller using the OF graph bindings specified if the "usb-role-switch" + property is used. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: High Speed (HS) data bus. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: Super Speed (SS) data bus. + + wakeup-source: + $ref: /schemas/types.yaml#/definitions/flag + description: + Enable USB remote wakeup. + +required: + - compatible + - reg + +additionalProperties: true +... + diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml index 1cd0ca90127d..4380bb6fa2f0 100644 --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml @@ -15,18 +15,7 @@ description: compatible string. allOf: - - $ref: usb-drd.yaml# - - if: - properties: - dr_mode: - const: peripheral - - required: - - dr_mode - then: - $ref: usb.yaml# - else: - $ref: usb-xhci.yaml# + - $ref: snps,dwc3-common.yaml# properties: compatible: @@ -70,32 +59,9 @@ properties: dma-coherent: true - extcon: - maxItems: 1 - deprecated: true - iommus: maxItems: 1 - usb-phy: - minItems: 1 - items: - - description: USB2/HS PHY - - description: USB3/SS PHY - - phys: - minItems: 1 - maxItems: 19 - - phy-names: - minItems: 1 - maxItems: 19 - oneOf: - - items: - enum: [ usb2-phy, usb3-phy ] - - items: - pattern: "^usb(2-([0-9]|1[0-4])|3-[0-3])$" - power-domains: description: The DWC3 has 2 power-domains. The power management unit (PMU) and @@ -109,361 +75,6 @@ properties: resets: minItems: 1 - snps,usb2-lpm-disable: - description: Indicate if we don't want to enable USB2 HW LPM for host - mode. - type: boolean - - snps,usb3_lpm_capable: - description: Determines if platform is USB3 LPM capable - type: boolean - - snps,usb2-gadget-lpm-disable: - description: Indicate if we don't want to enable USB2 HW LPM for gadget - mode. - type: boolean - - snps,dis-start-transfer-quirk: - description: - When set, disable isoc START TRANSFER command failure SW work-around - for DWC_usb31 version 1.70a-ea06 and prior. - type: boolean - - snps,disable_scramble_quirk: - description: - True when SW should disable data scrambling. Only really useful for FPGA - builds. - type: boolean - - snps,has-lpm-erratum: - description: True when DWC3 was configured with LPM Erratum enabled - type: boolean - - snps,lpm-nyet-threshold: - description: LPM NYET threshold - $ref: /schemas/types.yaml#/definitions/uint8 - - snps,u2exit_lfps_quirk: - description: Set if we want to enable u2exit lfps quirk - type: boolean - - snps,u2ss_inp3_quirk: - description: Set if we enable P3 OK for U2/SS Inactive quirk - type: boolean - - snps,req_p1p2p3_quirk: - description: - When set, the core will always request for P1/P2/P3 transition sequence. - type: boolean - - snps,del_p1p2p3_quirk: - description: - When set core will delay P1/P2/P3 until a certain amount of 8B10B errors - occur. - type: boolean - - snps,del_phy_power_chg_quirk: - description: When set core will delay PHY power change from P0 to P1/P2/P3. - type: boolean - - snps,lfps_filter_quirk: - description: When set core will filter LFPS reception. - type: boolean - - snps,rx_detect_poll_quirk: - description: - when set core will disable a 400us delay to start Polling LFPS after - RX.Detect. - type: boolean - - snps,tx_de_emphasis_quirk: - description: When set core will set Tx de-emphasis value - type: boolean - - snps,tx_de_emphasis: - description: - The value driven to the PHY is controlled by the LTSSM during USB3 - Compliance mode. - $ref: /schemas/types.yaml#/definitions/uint8 - enum: - - 0 # -6dB de-emphasis - - 1 # -3.5dB de-emphasis - - 2 # No de-emphasis - - snps,dis_u3_susphy_quirk: - description: When set core will disable USB3 suspend phy - type: boolean - - snps,dis_u2_susphy_quirk: - description: When set core will disable USB2 suspend phy - type: boolean - - snps,dis_enblslpm_quirk: - description: - When set clears the enblslpm in GUSB2PHYCFG, disabling the suspend signal - to the PHY. - type: boolean - - snps,dis-u1-entry-quirk: - description: Set if link entering into U1 needs to be disabled - type: boolean - - snps,dis-u2-entry-quirk: - description: Set if link entering into U2 needs to be disabled - type: boolean - - snps,dis_rxdet_inp3_quirk: - description: - When set core will disable receiver detection in PHY P3 power state. - type: boolean - - snps,dis-u2-freeclk-exists-quirk: - description: - When set, clear the u2_freeclk_exists in GUSB2PHYCFG, specify that USB2 - PHY doesn't provide a free-running PHY clock. - type: boolean - - snps,dis-del-phy-power-chg-quirk: - description: - When set core will change PHY power from P0 to P1/P2/P3 without delay. - type: boolean - - snps,dis-tx-ipgap-linecheck-quirk: - description: When set, disable u2mac linestate check during HS transmit - type: boolean - - snps,parkmode-disable-ss-quirk: - description: - When set, all SuperSpeed bus instances in park mode are disabled. - type: boolean - - snps,parkmode-disable-hs-quirk: - description: - When set, all HighSpeed bus instances in park mode are disabled. - type: boolean - - snps,dis_metastability_quirk: - description: - When set, disable metastability workaround. CAUTION! Use only if you are - absolutely sure of it. - type: boolean - - snps,dis-split-quirk: - description: - When set, change the way URBs are handled by the driver. Needed to - avoid -EPROTO errors with usbhid on some devices (Hikey 970). - type: boolean - - snps,gfladj-refclk-lpm-sel-quirk: - description: - When set, run the SOF/ITP counter based on ref_clk. - type: boolean - - snps,resume-hs-terminations: - description: - Fix the issue of HS terminations CRC error on resume by enabling this - quirk. When set, all the termsel, xcvrsel, opmode becomes 0 during end - of resume. This option is to support certain legacy ULPI PHYs. - type: boolean - - snps,ulpi-ext-vbus-drv: - description: - Some ULPI USB PHY does not support internal VBUS supply, and driving - the CPEN pin, requires the configuration of the ulpi DRVVBUSEXTERNAL - bit. When set, the xhci host will configure the USB2 PHY drives VBUS - with an external supply. - type: boolean - - snps,is-utmi-l1-suspend: - description: - True when DWC3 asserts output signal utmi_l1_suspend_n, false when - asserts utmi_sleep_n. - type: boolean - - snps,hird-threshold: - description: HIRD threshold - $ref: /schemas/types.yaml#/definitions/uint8 - - snps,hsphy_interface: - description: - High-Speed PHY interface selection between UTMI+ and ULPI when the - DWC_USB3_HSPHY_INTERFACE has value 3. - $ref: /schemas/types.yaml#/definitions/string - enum: [utmi, ulpi] - - snps,quirk-frame-length-adjustment: - description: - Value for GFLADJ_30MHZ field of GFLADJ register for post-silicon frame - length adjustment when the fladj_30mhz_sdbnd signal is invalid or - incorrect. - $ref: /schemas/types.yaml#/definitions/uint32 - minimum: 0 - maximum: 0x3f - - snps,ref-clock-period-ns: - description: - Value for REFCLKPER field of GUCTL register for reference clock period in - nanoseconds, when the hardware set default does not match the actual - clock. - - This binding is deprecated. Instead, provide an appropriate reference clock. - minimum: 8 - maximum: 62 - deprecated: true - - snps,rx-thr-num-pkt: - description: - USB RX packet threshold count. In host mode, this field specifies - the space that must be available in the RX FIFO before the core can - start the corresponding USB RX transaction (burst). - In device mode, this field specifies the space that must be - available in the RX FIFO before the core can send ERDY for a - flow-controlled endpoint. It is only used for SuperSpeed. - The valid values for this field are from 1 to 15. (DWC3 SuperSpeed - USB 3.0 Controller Databook) - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 15 - - snps,rx-max-burst: - description: - Max USB RX burst size. In host mode, this field specifies the - Maximum Bulk IN burst the DWC_usb3 core can perform. When the system - bus is slower than the USB, RX FIFO can overrun during a long burst. - You can program a smaller value to this field to limit the RX burst - size that the core can perform. It only applies to SS Bulk, - Isochronous, and Interrupt IN endpoints in the host mode. - In device mode, this field specifies the NUMP value that is sent in - ERDY for an OUT endpoint. - The valid values for this field are from 1 to 16. (DWC3 SuperSpeed - USB 3.0 Controller Databook) - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - snps,tx-thr-num-pkt: - description: - USB TX packet threshold count. This field specifies the number of - packets that must be in the TXFIFO before the core can start - transmission for the corresponding USB transaction (burst). - This count is valid in both host and device modes. It is only used - for SuperSpeed operation. - Valid values are from 1 to 15. (DWC3 SuperSpeed USB 3.0 Controller - Databook) - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 15 - - snps,tx-max-burst: - description: - Max USB TX burst size. When the system bus is slower than the USB, - TX FIFO can underrun during a long burst. Program a smaller value - to this field to limit the TX burst size that the core can execute. - In Host mode, it only applies to SS Bulk, Isochronous, and Interrupt - OUT endpoints. This value is not used in device mode. - Valid values are from 1 to 16. (DWC3 SuperSpeed USB 3.0 Controller - Databook) - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - snps,rx-thr-num-pkt-prd: - description: - Periodic ESS RX packet threshold count (host mode only). Set this and - snps,rx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31 - programming guide section 1.2.4) to enable periodic ESS RX threshold. - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - snps,rx-max-burst-prd: - description: - Max periodic ESS RX burst size (host mode only). Set this and - snps,rx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 - programming guide section 1.2.4) to enable periodic ESS RX threshold. - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - snps,tx-thr-num-pkt-prd: - description: - Periodic ESS TX packet threshold count (host mode only). Set this and - snps,tx-max-burst-prd to a valid, non-zero value 1-16 (DWC_usb31 - programming guide section 1.2.3) to enable periodic ESS TX threshold. - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - snps,tx-max-burst-prd: - description: - Max periodic ESS TX burst size (host mode only). Set this and - snps,tx-thr-num-pkt-prd to a valid, non-zero value 1-16 (DWC_usb31 - programming guide section 1.2.3) to enable periodic ESS TX threshold. - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 1 - maximum: 16 - - tx-fifo-resize: - description: Determines if the TX fifos can be dynamically resized depending - on the number of IN endpoints used and if bursting is supported. This - may help improve bandwidth on platforms with higher system latencies, as - increased fifo space allows for the controller to prefetch data into its - internal memory. - type: boolean - - tx-fifo-max-num: - description: Specifies the max number of packets the txfifo resizing logic - can account for when higher endpoint bursting is used. (bMaxBurst > 6) The - higher the number, the more fifo space the txfifo resizing logic will - allocate for that endpoint. - $ref: /schemas/types.yaml#/definitions/uint8 - minimum: 3 - - snps,incr-burst-type-adjustment: - description: - Value for INCR burst type of GSBUSCFG0 register, undefined length INCR - burst type enable and INCRx type. A single value means INCRX burst mode - enabled. If more than one value specified, undefined length INCR burst - type will be enabled with burst lengths utilized up to the maximum - of the values passed in this property. - $ref: /schemas/types.yaml#/definitions/uint32-array - minItems: 1 - maxItems: 8 - uniqueItems: true - items: - enum: [1, 4, 8, 16, 32, 64, 128, 256] - - num-hc-interrupters: - maximum: 8 - default: 1 - - port: - $ref: /schemas/graph.yaml#/properties/port - description: - This port is used with the 'usb-role-switch' property to connect the - dwc3 to type C connector. - - ports: - $ref: /schemas/graph.yaml#/properties/ports - description: - Those ports should be used with any connector to the data bus of this - controller using the OF graph bindings specified if the "usb-role-switch" - property is used. - - properties: - port@0: - $ref: /schemas/graph.yaml#/properties/port - description: High Speed (HS) data bus. - - port@1: - $ref: /schemas/graph.yaml#/properties/port - description: Super Speed (SS) data bus. - - wakeup-source: - $ref: /schemas/types.yaml#/definitions/flag - description: - Enable USB remote wakeup. - unevaluatedProperties: false required: From patchwork Tue Jan 14 05:11:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938418 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 BE72323354F for ; Tue, 14 Jan 2025 05:05:48 +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=1736831151; cv=none; b=SkHHdUOUwy3d6HvXC4x3E9G6NTtdeGdJZDZs8gFgR4CDH4fNju19Z3SA/duUtvR/UX0XT85DmXQmycEz4lJCj2zuAXdhfOXidn+c+h7OiAVs2ye5qEBvVlV/3fDQmeNy5s/ijpO0/wQpmwCuzgFTfJBBJ3akXjRD2/7R2xtyTJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831151; c=relaxed/simple; bh=0VsZDRePzRoN0Q0mxLTGRZ4UObLYSHWuETSTbRWlDng=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=buUnfZHyX2Elb616PuroozTeNNW5tpcgvOh6oofnPgTVZyY3Kc/KMgPDKDRivArfkW+q92IGOsP1NY3o7Zmms8L/6Br0t3czkea4kS9b/rd3JUnxn7giO7CqpWO2jSs/1+VAryt5AXIXONHmMGQZPNlMaeSX4R6WOvZVkwD/WjQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hWVuCk/M; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hWVuCk/M" 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 50DJLYJx002830 for ; Tue, 14 Jan 2025 05:05:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= OBKXeGSZQxrf0jZiT5W1If6viY8DX4hhAQZtfABqOKY=; b=hWVuCk/MAcDYYOvk Ca0WV4aWaPIvdvdpxwf6unx3BiQHGCbZdniMoXV48EuLU4pk91XMDfbzijo2Xvhm E/RjMrRXyz3smxKyk7OezD/9apaQUbBZddHBl+9YvWNEvDd5xYtWenzczfO/cQcm y8Tz4W4adxlyNJ76ETx0Cp+jZ3KAGQyChOVVtdiZMq9V/QeKSfcfPwHTZUsNOc0I JCrDOtN7AorAW8mrCbMdamthEwutU+Rg0vzNTgJwIaZMSJYQhROT/5Ah4xruOQI+ NHaWWezZ0u6IhlgYY2X/rQwq0+RevxFxobWK7t0TZwKz4dk3W/mZ+SsHk3zyMG1x vsJWhg== Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4458ww92ck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:47 +0000 (GMT) Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-721b270290aso2715313a34.1 for ; Mon, 13 Jan 2025 21:05:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831147; x=1737435947; 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=OBKXeGSZQxrf0jZiT5W1If6viY8DX4hhAQZtfABqOKY=; b=QhWZOH++dTmJpvWboN8P0sEOlMbbRAo/rz4D4/X3364z1DRnA03ldVFrtpUWnzWJqd oIyuYuDqUgyrnIEwBAOiJwbi0ruP+sKnGbS5LcIm3ggSg2A0mc69PkUTNTenMqccRLtP xQNytPyFecahMWaI8sy5aSjnnDfkjaNuH7QbAzx+z9syDLK2ul9zBJ+iOWiDZSHet1ey qCZsPBjkNoa5Y/m071B5hfQkCj64HnYiiXTNExh1N8rFXHXybx8Snk2/1heQU9uEZ8uI RKTm7sugm0ZMjlzotOhuIw5n2U1PWi6VnVgNrGqy7+zAniAnlbH3X2ic+1nBY9QseKha XXWA== X-Forwarded-Encrypted: i=1; AJvYcCXYRsX9hkHdwOHwqWGfRdGrxZZPYIQVqzDP4qAVAoJezc/We4KuSfiKjMssT8Kj7HukgAQO/3rthu8=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1qHB6KVthjm/2cReXbDnO9wOoidShOho6BEUHmcBK32wZksnQ I3VQjxC9bsty1t/W8r3t9sTxFizlRejf3ECI9TPTeqiVwRVP4TW46HkMMNVvVg/UbqdiL2Q3k+k q1BQ0LIJep2IVBcrLMRA9orrpubQ3lw1vg/BJo+ui+v7J4P79nsiNjTJYcVE= X-Gm-Gg: ASbGncvG/meO7Rs2pirmw//+hKxrcxc3Od07+K1vXNEMIvKEPgABoGZFKUcOfuxbFOK i6zcLJ8+EwuY7sXRHgnXJKoQOwF7YNMP6PoC15vJSfM/OolO+wVZwESxtI4TIDV8L2tWlu26DF7 Z9tGbKjnnzsPypLyiAd4InKXpgnDGfyfXWBkW81T4Ku5RstIiUP9dTi4AlPx+vH7Ctw2tlBVz1J jX5Xwv7Q/0q/xymvkwPsY8fRQS0jD1qfUuVLklwy0n+bDXybOfWjje/U8ZVu+4nZZZ9r/KsyYpL KSMv+CziiyZ2q+y6RWNsVJPVMgSx2TVs/D1OTvbwIZmvPpjidO+1SQkC X-Received: by 2002:a05:6830:6610:b0:71e:1c5:4f9a with SMTP id 46e09a7af769-721e2ec120amr15921023a34.25.1736831146526; Mon, 13 Jan 2025 21:05:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4+Nk9t07KonDc7HgBERD0FxZBuebkIVe6elAiIke+S8IGF9M4H7xgShCXU55t+t36vuhIZA== X-Received: by 2002:a05:6830:6610:b0:71e:1c5:4f9a with SMTP id 46e09a7af769-721e2ec120amr15921011a34.25.1736831146121; Mon, 13 Jan 2025 21:05:46 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:45 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:35 -0800 Subject: [PATCH v3 02/12] dt-bindings: usb: Introduce qcom,snps-dwc3 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-2-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=19774; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=0VsZDRePzRoN0Q0mxLTGRZ4UObLYSHWuETSTbRWlDng=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIUqc16DJtsGZ7yZYIT6DuPKABUSEfB5+kP4 e62FdnN4peJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFBUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcW3cBAAnn6IzhnsYWOGb/DDEzSdRAEjyuz9OJd7RinV4ni jU6dKufDpuB5Dp5sG9JwsDW5yT+gI17OulVGjM34N3GAzAfK+Y8ZwbwM/clj3guY9qkg2aNC1ok Sl3b22QAF7yqz0rD2l4pnRFlcXmH4huEkNWMfC4fPIoSEFUx8j7EHdZi9peLc3cb6tLeeiYJAHX veRaFqM0FvsAZJxA9mm/4fhg8GCY3iyuq02fKOLZhUyNkQKedODjUvo26mmz3vsLFvlMfjsKrcy 6CvNGIPtJFuO6XsIIdb3fTHXJyMW7whUjtTrA1mOATu0UykUxUw1jU1dxu6gC7vlhAfwrhpvGtB HQd16GjnYBEd6tVgrqGbBndNEasV3YjF0a/OXJUwQ90SN13Yn6RU0ga8bXrw2a1k3XRXMYOSOVE BMNvMbsr6FLhsSQYerWm1V1eel00OxUaLR3odXuTfaa4SlVi/YhTfzm723ZC+vTo7PlNHUDQtMC BvRg9sPypR8smnCkg6zH793x0bTpsf7HOmbRkvvvc9IcsIi+B1S+0diwn1PfsuHXUJKP5IAYBf4 5JcwhoOjPZWGKLx+PaEHD+UxDKugK/uL5x+3UkivPdcoTQl/DjtmH1OuuMb0WPPp3mDIu6ixQPU UCZJqGC0hacrZpdmY28PId/ZUNqWilXIEh7OFbhY4jr8= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-GUID: 329nCQhI0hKJhePFbmMzTvkEyCG0IRzV X-Proofpoint-ORIG-GUID: 329nCQhI0hKJhePFbmMzTvkEyCG0IRzV 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 priorityscore=1501 spamscore=0 mlxlogscore=999 mlxscore=0 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 The Qualcomm USB glue is not separate of the Synopsys DWC3 core and several of the snps,dwc3 properties (such as clocks and reset) conflicts in expectation with the Qualcomm integration. Using the newly split out Synopsys DWC3 core properties, describe the Qualcomm USB block in a single block. The new binding is a copy of qcom,dwc3 with the needed modifications. It would have been convenient to retain the two structures with the same compatibles, but as there exist no way to select a binding based on the absence of a subnode/patternProperty, a new generic compatible is introduced to describe this binding. To avoid redefining all the platform-specific compatibles, "select" is used to tell the DeviceTree validator which binding to use solely on the generic compatible. (Otherwise if the specific compatible matches during validation, the generic one must match as well) Mark qcom,dwc3 deprecated, to favor expressing future platforms using the new combined binding. Signed-off-by: Bjorn Andersson --- .../devicetree/bindings/usb/qcom,dwc3.yaml | 13 +- .../devicetree/bindings/usb/qcom,snps-dwc3.yaml | 618 +++++++++++++++++++++ 2 files changed, 630 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml index 8fd02e8aaaa5..09907e492563 100644 --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml @@ -4,11 +4,22 @@ $id: http://devicetree.org/schemas/usb/qcom,dwc3.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm SuperSpeed DWC3 USB SoC controller +title: Legacy Qualcomm SuperSpeed DWC3 USB SoC controller maintainers: - Wesley Cheng +# Use the combined qcom,snps-dwc3 instead +deprecated: true + +select: + properties: + compatible: + contains: + const: qcom,dwc3 + required: + - compatible + properties: compatible: items: diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml new file mode 100644 index 000000000000..e0369964d495 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml @@ -0,0 +1,618 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,snps-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm SuperSpeed DWC3 USB SoC controller + +maintainers: + - Wesley Cheng + +description: + Describes the Qualcomm USB block, based on Synopsys DWC3. + +select: + properties: + compatible: + contains: + const: qcom,snps-dwc3 + required: + - compatible + +properties: + compatible: + items: + - enum: + - qcom,ipq4019-dwc3 + - qcom,ipq5018-dwc3 + - qcom,ipq5332-dwc3 + - qcom,ipq6018-dwc3 + - qcom,ipq8064-dwc3 + - qcom,ipq8074-dwc3 + - qcom,ipq9574-dwc3 + - qcom,msm8953-dwc3 + - qcom,msm8994-dwc3 + - qcom,msm8996-dwc3 + - qcom,msm8998-dwc3 + - qcom,qcm2290-dwc3 + - qcom,qcs404-dwc3 + - qcom,qcs615-dwc3 + - qcom,qcs8300-dwc3 + - qcom,qdu1000-dwc3 + - qcom,sa8775p-dwc3 + - qcom,sar2130p-dwc3 + - qcom,sc7180-dwc3 + - qcom,sc7280-dwc3 + - qcom,sc8180x-dwc3 + - qcom,sc8180x-dwc3-mp + - qcom,sc8280xp-dwc3 + - qcom,sc8280xp-dwc3-mp + - qcom,sdm660-dwc3 + - qcom,sdm670-dwc3 + - qcom,sdm845-dwc3 + - qcom,sdx55-dwc3 + - qcom,sdx65-dwc3 + - qcom,sdx75-dwc3 + - qcom,sm4250-dwc3 + - qcom,sm6115-dwc3 + - qcom,sm6125-dwc3 + - qcom,sm6350-dwc3 + - qcom,sm6375-dwc3 + - qcom,sm8150-dwc3 + - qcom,sm8250-dwc3 + - qcom,sm8350-dwc3 + - qcom,sm8450-dwc3 + - qcom,sm8550-dwc3 + - qcom,sm8650-dwc3 + - qcom,x1e80100-dwc3 + - const: qcom,snps-dwc3 + + reg: + description: Offset and length of register set for QSCRATCH wrapper + maxItems: 1 + + power-domains: + description: specifies a phandle to PM domain provider node + maxItems: 1 + + required-opps: + maxItems: 1 + + clocks: + description: | + Several clocks are used, depending on the variant. Typical ones are:: + - cfg_noc:: System Config NOC clock. + - core:: Master/Core clock, has to be >= 125 MHz for SS operation and >= + 60MHz for HS operation. + - iface:: System bus AXI clock. + - sleep:: Sleep clock, used for wakeup when USB3 core goes into low + power mode (U3). + - mock_utmi:: Mock utmi clock needed for ITP/SOF generation in host + mode. Its frequency should be 19.2MHz. + minItems: 1 + maxItems: 9 + + clock-names: + minItems: 1 + maxItems: 9 + + iommus: + maxItems: 1 + + resets: + maxItems: 1 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: usb-ddr + - const: apps-usb + + interrupts: + description: | + Different types of interrupts are used based on HS PHY used on target: + - dwc_usb3: Core DWC3 interrupt + - pwr_event: Used for wakeup based on other power events. + - hs_phy_irq: Apart from DP/DM/QUSB2 PHY interrupts, there is + hs_phy_irq which is not triggered by default and its + functionality is mutually exclusive to that of + {dp/dm}_hs_phy_irq and qusb2_phy_irq. + - qusb2_phy: SoCs with QUSB2 PHY do not have separate DP/DM IRQs and + expose only a single IRQ whose behavior can be modified + by the QUSB2PHY_INTR_CTRL register. The required DPSE/ + DMSE configuration is done in QUSB2PHY_INTR_CTRL register + of PHY address space. + - {dp/dm}_hs_phy_irq: These IRQ's directly reflect changes on the DP/ + DM pads of the SoC. These are used for wakeup + only on SoCs with non-QUSB2 targets with + exception of SDM670/SDM845/SM6350. + - ss_phy_irq: Used for remote wakeup in Super Speed mode of operation. + minItems: 3 + maxItems: 19 + + interrupt-names: + minItems: 3 + maxItems: 19 + + qcom,select-utmi-as-pipe-clk: + description: + If present, disable USB3 pipe_clk requirement. + Used when dwc3 operates without SSPHY and only + HS/FS/LS modes are supported. + type: boolean + + wakeup-source: true + +# Required child node: + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + +allOf: + - $ref: snps,dwc3-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq4019-dwc3 + - qcom,ipq5332-dwc3 + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: core + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq8064-dwc3 + then: + properties: + clocks: + items: + - description: Master/Core clock, has to be >= 125 MHz + for SS operation and >= 60MHz for HS operation. + clock-names: + items: + - const: core + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq9574-dwc3 + - qcom,msm8953-dwc3 + - qcom,msm8996-dwc3 + - qcom,msm8998-dwc3 + - qcom,qcs8300-dwc3 + - qcom,sa8775p-dwc3 + - qcom,sc7180-dwc3 + - qcom,sc7280-dwc3 + - qcom,sdm670-dwc3 + - qcom,sdm845-dwc3 + - qcom,sdx55-dwc3 + - qcom,sdx65-dwc3 + - qcom,sdx75-dwc3 + - qcom,sm6350-dwc3 + then: + properties: + clocks: + maxItems: 5 + clock-names: + items: + - const: cfg_noc + - const: core + - const: iface + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq6018-dwc3 + then: + properties: + clocks: + minItems: 3 + maxItems: 4 + clock-names: + oneOf: + - items: + - const: core + - const: sleep + - const: mock_utmi + - items: + - const: cfg_noc + - const: core + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq8074-dwc3 + - qcom,qdu1000-dwc3 + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: cfg_noc + - const: core + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq5018-dwc3 + - qcom,msm8994-dwc3 + - qcom,qcs404-dwc3 + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: core + - const: iface + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-dwc3 + - qcom,sc8280xp-dwc3-mp + - qcom,x1e80100-dwc3 + - qcom,x1e80100-dwc3-mp + then: + properties: + clocks: + maxItems: 9 + clock-names: + items: + - const: cfg_noc + - const: core + - const: iface + - const: sleep + - const: mock_utmi + - const: noc_aggr + - const: noc_aggr_north + - const: noc_aggr_south + - const: noc_sys + + - if: + properties: + compatible: + contains: + enum: + - qcom,sdm660-dwc3 + then: + properties: + clocks: + minItems: 4 + maxItems: 5 + clock-names: + oneOf: + - items: + - const: cfg_noc + - const: core + - const: iface + - const: sleep + - const: mock_utmi + - items: + - const: cfg_noc + - const: core + - const: sleep + - const: mock_utmi + + - if: + properties: + compatible: + contains: + enum: + - qcom,qcm2290-dwc3 + - qcom,qcs615-dwc3 + - qcom,sar2130p-dwc3 + - qcom,sc8180x-dwc3 + - qcom,sc8180x-dwc3-mp + - qcom,sm6115-dwc3 + - qcom,sm6125-dwc3 + - qcom,sm8150-dwc3 + - qcom,sm8250-dwc3 + - qcom,sm8450-dwc3 + - qcom,sm8550-dwc3 + - qcom,sm8650-dwc3 + then: + properties: + clocks: + minItems: 6 + clock-names: + items: + - const: cfg_noc + - const: core + - const: iface + - const: sleep + - const: mock_utmi + - const: xo + + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8350-dwc3 + then: + properties: + clocks: + minItems: 5 + maxItems: 6 + clock-names: + minItems: 5 + items: + - const: cfg_noc + - const: core + - const: iface + - const: sleep + - const: mock_utmi + - const: xo + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq5018-dwc3 + - qcom,ipq6018-dwc3 + - qcom,ipq8074-dwc3 + - qcom,msm8953-dwc3 + - qcom,msm8998-dwc3 + then: + properties: + interrupts: + minItems: 3 + maxItems: 4 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event + - const: qusb2_phy + - const: ss_phy_irq + + - if: + properties: + compatible: + contains: + enum: + - qcom,msm8996-dwc3 + - qcom,qcs404-dwc3 + - qcom,sdm660-dwc3 + - qcom,sm6115-dwc3 + - qcom,sm6125-dwc3 + then: + properties: + interrupts: + minItems: 4 + maxItems: 5 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event + - const: qusb2_phy + - const: hs_phy_irq + - const: ss_phy_irq + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq5332-dwc3 + then: + properties: + interrupts: + maxItems: 4 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event + - const: dp_hs_phy_irq + - const: dm_hs_phy_irq + + - if: + properties: + compatible: + contains: + enum: + - qcom,x1e80100-dwc3 + then: + properties: + interrupts: + maxItems: 5 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event + - const: dp_hs_phy_irq + - const: dm_hs_phy_irq + - const: ss_phy_irq + + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq4019-dwc3 + - qcom,ipq8064-dwc3 + - qcom,msm8994-dwc3 + - qcom,qcs615-dwc3 + - qcom,qcs8300-dwc3 + - qcom,qdu1000-dwc3 + - qcom,sa8775p-dwc3 + - qcom,sc7180-dwc3 + - qcom,sc7280-dwc3 + - qcom,sc8180x-dwc3 + - qcom,sc8280xp-dwc3 + - qcom,sdm670-dwc3 + - qcom,sdm845-dwc3 + - qcom,sdx55-dwc3 + - qcom,sdx65-dwc3 + - qcom,sdx75-dwc3 + - qcom,sm4250-dwc3 + - qcom,sm6350-dwc3 + - qcom,sm8150-dwc3 + - qcom,sm8250-dwc3 + - qcom,sm8350-dwc3 + - qcom,sm8450-dwc3 + - qcom,sm8550-dwc3 + - qcom,sm8650-dwc3 + then: + properties: + interrupts: + minItems: 5 + maxItems: 6 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event + - const: hs_phy_irq + - const: dp_hs_phy_irq + - const: dm_hs_phy_irq + - const: ss_phy_irq + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8180x-dwc3-mp + - qcom,x1e80100-dwc3-mp + then: + properties: + interrupts: + minItems: 11 + maxItems: 11 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event_1 + - const: pwr_event_2 + - const: hs_phy_1 + - const: hs_phy_2 + - const: dp_hs_phy_1 + - const: dm_hs_phy_1 + - const: dp_hs_phy_2 + - const: dm_hs_phy_2 + - const: ss_phy_1 + - const: ss_phy_2 + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-dwc3-mp + then: + properties: + interrupts: + minItems: 19 + maxItems: 19 + interrupt-names: + items: + - const: dwc_usb3 + - const: pwr_event_1 + - const: pwr_event_2 + - const: pwr_event_3 + - const: pwr_event_4 + - const: hs_phy_1 + - const: hs_phy_2 + - const: hs_phy_3 + - const: hs_phy_4 + - const: dp_hs_phy_1 + - const: dm_hs_phy_1 + - const: dp_hs_phy_2 + - const: dm_hs_phy_2 + - const: dp_hs_phy_3 + - const: dm_hs_phy_3 + - const: dp_hs_phy_4 + - const: dm_hs_phy_4 + - const: ss_phy_1 + - const: ss_phy_2 + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + soc { + #address-cells = <2>; + #size-cells = <2>; + + usb@a600000 { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0x100000>; + + clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, + <&gcc GCC_USB30_PRIM_MASTER_CLK>, + <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>, + <&gcc GCC_USB30_PRIM_SLEEP_CLK>, + <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>; + clock-names = "cfg_noc", + "core", + "iface", + "sleep", + "mock_utmi"; + + assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, + <&gcc GCC_USB30_PRIM_MASTER_CLK>; + assigned-clock-rates = <19200000>, <150000000>; + + interrupts = , + , + , + , + , + ; + interrupt-names = "dwc_usb3", "pwr_event", "hs_phy_irq", + "dp_hs_phy_irq", "dm_hs_phy_irq", "ss_phy_irq"; + + power-domains = <&gcc USB30_PRIM_GDSC>; + + resets = <&gcc GCC_USB30_PRIM_BCR>; + + iommus = <&apps_smmu 0x740 0>; + snps,dis_u2_susphy_quirk; + snps,dis_enblslpm_quirk; + phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phy-names = "usb2-phy", "usb3-phy"; + }; + }; +... From patchwork Tue Jan 14 05:11:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938417 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 4CC232343B5 for ; Tue, 14 Jan 2025 05:05:49 +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=1736831151; cv=none; b=rfZayQ2C/o3Rabo0TMFCkRGCNP4QOSucq9iXZMjHykRjHcrCWTrWiGeSRJfSC3HANGcfK3vjb6aHyOq7za5li1kpg/+tco52efGiieTLx1DWl4eyb1gWRFaNWorHw0d4TNlGmqDOHDF6inMEH4qiCTlnHgrRPPNmNZ5rLWx8xKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831151; c=relaxed/simple; bh=cEWULSiGoWIr4uAoz57xnHYom3cCE6za+4sS6e97+6E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DExUgknCeYZwJZpspmcJGmJcyn7h9dnZ9tUFV4Pq/zrB4QbU738jMZoKnouNRMudiCZB4DZmaunYHr7koPBlmwiedft/nY1SEw+Wd7GkcirWjSHCV3fwnotHbMUOTP752SUlXFoWToiyew/dp0uiSbG1chA4G5BXpOAa/v9su+I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=J1kTa67A; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="J1kTa67A" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E40Q3e020687 for ; Tue, 14 Jan 2025 05:05:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= +VkUXrOLcLDpSxofU5hRKw+Y1fiuNviLtTxMsES8ipI=; b=J1kTa67A9rOEL9kr o+gjpSXV4RpgrN23L6Gs52iqfVyQ11AR/JyWCmMg/xawhLDOsulFRL2LdLjITnqq 0RgIcuwOLYth9Q9yWRTrGJIp1ikXoHOkLY98F+SrN9MXZhRD3FtCOmvvIRtbmtC/ h+a85Orzjm+1ETpHZr82/NDR14DSz7pquJqldnGbEwjJEUoAy2IaYfbg3f+FB44z ZUlfX7fLZVKbnZtGpV8Rt162tDgv3DHpA3GR+ZVe8kepjfFjb7Pju5mU8Bn6WDWK DcJzRr+5jtftOy/pZ92Klj+hlnlhGjNsELW77HGmgj3u3kbvVpgVOC2obR/WrsJt tp7eUQ== Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445gh603ah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:48 +0000 (GMT) Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-3eb8138cb32so3491197b6e.2 for ; Mon, 13 Jan 2025 21:05:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831147; x=1737435947; 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=+VkUXrOLcLDpSxofU5hRKw+Y1fiuNviLtTxMsES8ipI=; b=K/ksnMUNmYf5lvDSWmcxJxYxSYcnwLvzCS3YkASd4wbSCmMI+VfIweoBrTbMNXUM2F u8MG03VP2tgZi7XWY3d3tO6D0KEF4f4M7F5YWYBH0rNfL2vMSMdRxQxmLPkzOi2Az6lz e2uQDLUDgQzMnjP3el1uOmJZ208dxOOCF+X529SzsMG5CkArytooQO3bjiZHptRQktZS j9mTgTs6Y+cj+Y6b165m/S4zj3askBgtaM2u8JL3SgGhEYRp53wPdkRXrBs6B6ec/3WW +9ehlf0LzYwz9OH+R7vCLZapR2/9m6VLfq2426VDdVrXEIrW9WiVNoyvllCd7Fxul/4D sAuA== X-Forwarded-Encrypted: i=1; AJvYcCVib4uSdV4+sCyajoTfyt2cTlM4/EqXi4ORoaUN1m2AZVJAil7dneqwcp40I5F6XmlNhXi9uETlC8Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzjBO0pyyEDsnpMqo7P2Id4NlriPWNozFkwUIoO4v3vzJEaDYRc 1sYXRGEBiM+ZOeQ7wb/0WqIPwAPjdyGS+bINyz9NmM8vL5b6XuY0u6hMSbc2fpQoAurcRZZNhEL qpMOeZoUmWCMK4NgW9q54GKEOLb1W6RLiaBpT2hli/ZkH+IWFy3iptF8wRyY= X-Gm-Gg: ASbGncuJiCvZRBGOlWDt+MyjjOEmWIHnyPKi8fGXbZbjD/8xBUXjlOywoGZ+jlH26jF GiOEMFCveTj5XaFSh8gbstQdQ0y4BEnkpf/m2QFc348qY/VvS3s/rNJS3z4wL8ptIYw07gsuJsO mhtTc6Vn4PiFloqEo1kseXq5RaJsaOe3W3sqO5zMSk7jnVY3aIYPAUNozrJEv3LdQE25DD2hFx1 QptmxQO4yqXhebtwSbxWFE2XenCTMqVgsfdz1IzDuNjImFtJbbzxDq+S4sDh3kqK/Axhe4EpwHB pVRtwCF5AGp1MOkosYl0R5fySUdmmqE1Ce4M3OVuaFMKzwpJouzkc3fP X-Received: by 2002:a05:6808:6396:b0:3f0:e42:4dab with SMTP id 5614622812f47-3f00e425c3bmr9849873b6e.33.1736831147417; Mon, 13 Jan 2025 21:05:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IF48gmKNJ7kvN2MsPkkY4TVIyrGT0lQ2sF5JyRVS+J4uOenMZH+1AAMJf2LdNd32YErsixZcw== X-Received: by 2002:a05:6808:6396:b0:3f0:e42:4dab with SMTP id 5614622812f47-3f00e425c3bmr9849852b6e.33.1736831147117; Mon, 13 Jan 2025 21:05:47 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:46 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:36 -0800 Subject: [PATCH v3 03/12] of: dynamic: Add of_changeset_add_prop_copy() Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-3-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2203; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=cEWULSiGoWIr4uAoz57xnHYom3cCE6za+4sS6e97+6E=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVESRHXDU5xGo0wLQM+Yn/AExNqBNW8EdSt NuzfG1DIU2JAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcVWhw//WKnIBpDCTavyrPXwLpmezKe+u3AEL2Ncbr4RQMx bCAeTAdvL/tJh9aYXQTsQb2W9HEpjgAzLYdg6XYd6T5TlZoMLH13WQyKlpruTtQ7DweN8YH451D 3BYwQbPqOVOBKSgg3xU/jNUgY44U0eidfat/m4bXm/c8kC+HUdygPSj20S3BSrmFfIW9peE0u/t Z2E1plVpFMuOkYHvIYRBN1T5n0h72UiwReUPETMbHhIk4LJGy7okp57usO1sSQ5KEXyRj2LUEjU s/jebX1avnVzryHlXKTMLPjA9n7BBN8uMq1bJskRW0lJKlUkiBZqlJVShhboUmv4FFJSsBuDtGG 1u5SkgfK6O3mpWbEbAyD1aFsfudmwaGbYonENWUM3MjIg5GOMpbJv10nQUcn95V9z80xuTQ3T5U cw5JouNJWrhGVnt4i80hse4+AFWdhXzj3hGSypc3tGFm73Slug421961CXYE6HDmFYe/CjR53Ny i52SqwtxKfBw1p+tgNacPTUq3n3R/Uq1qxSOrXDz0jTlNecpdw1GmlxYYtbCjG95ivcPNED7t0n nDGw5t6B3RGZu1FpTv16I8aKIrNHfgtqOVDtojh30yyiJCadyUkv4567wkaquHtX2LwzMacJbF8 tGf07oz+iMfexBd4Y87FK6JjetCVdN+TxK3O6Mhz4EWY= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: DdzRp52Hsw6PAQqQDi79SBWWIcifUJZs X-Proofpoint-GUID: DdzRp52Hsw6PAQqQDi79SBWWIcifUJZs 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 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 clxscore=1011 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 When implementing migration between bindings with different structure, properties might move from one node to another. Introduce a helper function to do this, releaving the caller from having to care about the datatype of the property and/or peek into the struct property. Signed-off-by: Bjorn Andersson --- drivers/of/dynamic.c | 20 ++++++++++++++++++++ include/linux/of.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 0aba760f7577..e4d7ff53a892 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -1073,6 +1073,26 @@ int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np, } EXPORT_SYMBOL_GPL(of_changeset_add_prop_bool); +/** + * of_changeset_add_prop_copy() - Add a property with name and value copied + * from an existing property, to a changeset. + * + * @ocs: changeset pointer + * @np: device node pointer + * @prop: existing property to copy + * + * Create a new property with name and value copied from a provided property, + * to a changeset. + * + * Return: 0 on success, a negative error value in case of an error. + */ +int of_changeset_add_prop_copy(struct of_changeset *ocs, struct device_node *np, + const struct property *prop) +{ + return of_changeset_add_prop_helper(ocs, np, prop); +} +EXPORT_SYMBOL_GPL(of_changeset_add_prop_copy); + static int of_changeset_update_prop_helper(struct of_changeset *ocs, struct device_node *np, const struct property *pp) diff --git a/include/linux/of.h b/include/linux/of.h index f921786cb8ac..6a9bcdf9d629 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -1667,6 +1667,9 @@ int of_changeset_update_prop_string(struct of_changeset *ocs, int of_changeset_add_prop_bool(struct of_changeset *ocs, struct device_node *np, const char *prop_name); +int of_changeset_add_prop_copy(struct of_changeset *ocs, struct device_node *np, + const struct property *prop); + #else /* CONFIG_OF_DYNAMIC */ static inline int of_reconfig_notifier_register(struct notifier_block *nb) { From patchwork Tue Jan 14 05:11:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938419 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 C682D23499D for ; Tue, 14 Jan 2025 05:05:50 +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=1736831153; cv=none; b=iDWc/CrrpBBjDo2/9KpL4wBTnaIxJpgHom3wBhnR4zD/afuQJDl2R/JWmSXoEu9bck2zMJJs9kAGybb88uOOwPfuFXNXfSe8iAoixKa2CUFPiR65QNw8iz4NaqdNbt/RMVU6V/qSb+YidbGNaR7ChQmv/W+NzSiWgO8cryoKWVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831153; c=relaxed/simple; bh=+7T+W0npzIsClEByBimGQWCrPRhW5Rfaa7ea0jwJn8U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OtOMMcNTOmtzVSl5g1kS9bffJb8i642M/eE+HQe/HEP/o+CfhbDJ5Srg0ngy/kYJfU5BP0U2wRn30hgUugpb1fsQCdTOOhv8R4qECqkkNWmkQrHyNnIvO0bcv9AvSb5+BisK9REaY9+RQoJ0V6M32nZh/LORnAPvPlAOPv13bqQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=k69kXcRx; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="k69kXcRx" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E23gsX008519 for ; Tue, 14 Jan 2025 05:05:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= U+2fy3/LK/7hee4NhdhsAUZpisJu9Q29FyDFunFTLIA=; b=k69kXcRxfiRRI5Nc RpNKXv1rXYeBjOR2vHl9buk0+l7fhlwMXY0HPW86wCSPJtTUqBNrKjeE0VSgu0/U HW0KrLbRKQzky0SVy0VckqE7YgLtlkEuLvBaWsQ5GCb9yCvDrASczpfpNXoXRY3B WNdt2vDrdgLxRaetk7dTUNly9RHiZKYIfGWDKIfmvygDwJNXfDuHueK2ExOoEWWr KQ2gQCLhs0PRpXxbxKekApx/GQR9eRocbg3HyhEzF2fXV7kLy+CT1IMG3QdXHysf zfqkCUib5I2hlyfY7sCD0WGN/ubU9j3CMCjmllX+IWJUey/FGm6c3RCb97Hmvynk OSWotw== Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eterbkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:49 +0000 (GMT) Received: by mail-ot1-f72.google.com with SMTP id 46e09a7af769-71e156b0ca9so3332573a34.2 for ; Mon, 13 Jan 2025 21:05:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831149; x=1737435949; 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=U+2fy3/LK/7hee4NhdhsAUZpisJu9Q29FyDFunFTLIA=; b=uujpQgFIcCDP4HV94hWdSTxdWsxpP7nenna/kakSxMs9UwlwLLIuiDPPvNPmhtPuGP WTQZAAycJ6q5c9p/iKyPU8U+ZDPWSezaBIjJKT1gOVuAM86ZFOh1KG8R01wiEoX6WCQn hRvdIkgg36xuDW3AOzw2kkd7wV0lNdJEhgI+aW5Hi/F8bIK7WTEWEZbz+hiDDu5ZiYmc OsvIPnkg5R5SfzLgk0baz8k6JBQCxbbWs8T0o7Lkta6rlETAQLA7fFfBJsijFq3JVEVW tRNax/q527E/Uwi5v3vBtmdIriWxqKUu8uTZtmLI6s/PE+0f12SPR9EEvQ3X/XQY9K+L oAIA== X-Forwarded-Encrypted: i=1; AJvYcCVGCuiF01rafw4HYoPmYuUiapcudz1wOhe+FU5Vj+zGhWkSSQuLNoCNdOVKSGKsq4Wk2wMsOMfruXQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwwtQNXhaS8MhiF2A7mkIa+gPVxWQNn20Q/eybE+yoi2NOuQnn9 CS1NeTvhK4l9wQjAylz3Mug+cAVICwvAL9OBOcR8d4ikYwSEIs15XWsQLm0JDOMReWf0YJca9T1 cdnNLY6mHtTU6WCz+IyBVsLfcCTxUSzJSCPyfzrExB89dNX0/4mLRWak++GA= X-Gm-Gg: ASbGnctgS7zkmZFMTH3uqSXdoQz9DTiHIURlQL/kyYMkvZ1d/yc2kNn023kGwYlP7VO cAXEoZxYw3P1iJRaU/geOECiWgw7NhmmcGTRWYyVkIAGt/J4ZAplyIFV+xk/P2c4yyrVdvnR9xg jTd6o+90lQg60zfxGHIA7Vp7GB2Kxg6s2KV6TOLeTLMIBZAv8C+ZLQVwe9f48n0XCIjR0OqL2uq hbNhRB4mRUIhQLDKNMOvWml9MeRe7mJKSt6Ogz4q/6heRz92rjUgYqk+o7jHu7Y6RzJ4Xb1KLEW ayAAztTtVAdz58gySp0ZXOEeMZ72zRXENnqxJvJbVV6duwInA1kWtSNP X-Received: by 2002:a05:6830:678e:b0:71d:fc52:1ab6 with SMTP id 46e09a7af769-721e2e9b660mr15257966a34.23.1736831148566; Mon, 13 Jan 2025 21:05:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/kSyD1OtHatXV7bU0pa748PZBDxc+nss+I9GrvkOdP+CQM86cfz3KVsLY33vBqQgvSikgPw== X-Received: by 2002:a05:6830:678e:b0:71d:fc52:1ab6 with SMTP id 46e09a7af769-721e2e9b660mr15257954a34.23.1736831148185; Mon, 13 Jan 2025 21:05:48 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:47 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:37 -0800 Subject: [PATCH v3 04/12] of: overlays: Introduce dwc3 flattening overlay Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-4-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=9764; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=+7T+W0npzIsClEByBimGQWCrPRhW5Rfaa7ea0jwJn8U=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVTsZSh8RjRlN+dbQqiOg8NYoBdj/N1uddm jbR50VoHwWJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWHBw//ToyOtUUtb89CwegfxOWVuB3g+E27cz2uh5LRfq/ W3xB+SzgrbG8yeSAl+y/l0zKHBuxm534IzO/umvAees0CkjG+MFCc1QUhmrmRxBTw+5i8O4EB4Q 9oLJknrVo71huV0QY6lJCxDtrvDm5u7UvF2Vn0OPQfiEh3c/uRIXFZrYffIZiazcxDrk3TlD51U 52iXw8MHk2v0QKFpm6NjgpaKVey4xV1xizq1mxueIh04GJBRG0eswPtLE5OCiSVetq2p+ZmBEfu fjic6gptxZF5QEW9K7j1LQR/hEhFc7MZP7foxTGoMinZYOWjXoXnMbxtodT3P2aCPAZRFn0ISTy LraSnhaJjb1fhxlxob5w5LZvjT48iJ2BP1OGPe2BU2FN4HLeN3OCwEwdO1gU6bL+UpDwKFlatlm FeCePzfKI5egz+CqaRhQvWHMGOYiYiX90r5TJl/5/wsviybgakCEOYk8LGZpfSZOFKCHvv93gFw s7i7iKEEZbAAFDMzl1zA+D2l/RMqBQqAT3YKa4/u/ydmqyoe/nH7IEV09n5uLyZNsZGnfljyWO5 Zv+EQP1EqMpolFfJ3NWP3wg6bGEEMdVv+XDkTBy8pchMDkuqRajAhijJjJksxpTmBSdc2IHTIu5 Uzu9oFQdayCp3d/QYNUL7NSKuxUgoRSWYvorsoGultIA= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: NpxPbipq0TU3cieUUPXHVs8fdhSDxe8I X-Proofpoint-GUID: NpxPbipq0TU3cieUUPXHVs8fdhSDxe8I 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 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 The Synopsys DWC3 core is often found together with vendor glue logic. While being a single piece of hardware this has been expressed as two independent (although with parent/child relationship) nodes in DeviceTree - but they are not separate components, and the separation prevents implementation of certain features (such as role switching, when this involved both parts). The newly introduced qcom,snps-dwc3 binding changes this representation of the Qualcomm implementation to a single node, and in an upcoming change the implementation follows suite - combining the two separate drivers into a single device instance. In order to avoid two separate implementations of the Qualcomm DWC3 glue driver, and/or continue to live with the documented race conditions in the driver, the driver will be changed to only operate on the new - flattened - DeviceTree binding. As both the Qualcomm glue driver and the dwc3 core driver is parsing DeviceTree, the only sensible way to handle this - while maintaining backwards compatibility with exiting DeviceTree blobs, is to convert the representation at runtime. The conversion between qcom,dwc3 and qcom,snps-dwc3 is performed here in the form of an independent overlay-based mechanism, to avoid sprinkling DeviceTree-translation code into the glue driver, which over time is expected to allow hiding some internals of the OF-code. But this should also make it suitable for other (than Qualcomm) vendors to reuse the translation logic as they flatten their glue/dwc3 implementations. The migration is implemented using two steps: 1) SoC/board integration is migrated using embedded overlays, which are applied based on machine compatible matching. This handles the complex cases such as merging "reg" and "interrupt" properties. 2) Standard snps properties, which might be board-specific, are migrated using of_changeset logic. Notably the of_graph is migrated this way, to avoid having to provide overlays for every single board dtb out there. The migration code can only be enabled once the dwc3 glue driver supports the new binding, but in order to avoid having to support both bindings in the dwc3 glue a kill-switch is left in place, to be removed at the instant the driver is converted. The newly introduced Kconfig option is defaulted to follow USB_DWC3_QCOM in order to maximize the chances of people not losing USB functionality in defconfig or distro builds. Over time this can probably be phased out, followed by the overlay solution itself. Signed-off-by: Bjorn Andersson --- drivers/of/Kconfig | 2 + drivers/of/Makefile | 2 + drivers/of/overlays/Kconfig | 15 ++ drivers/of/overlays/Makefile | 3 + drivers/of/overlays/dwc3-flattening/Makefile | 4 + .../of/overlays/dwc3-flattening/dwc3-flattening.c | 160 +++++++++++++++++++++ .../of/overlays/dwc3-flattening/dwc3-flattening.h | 7 + 7 files changed, 193 insertions(+) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 50697cc3b07e..b5f3cd69bad9 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -126,4 +126,6 @@ config OF_OVERLAY_KUNIT_TEST config OF_NUMA bool +source "drivers/of/overlays/Kconfig" + endif # OF diff --git a/drivers/of/Makefile b/drivers/of/Makefile index 379a0afcbdc0..1ff9d0befb38 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -25,3 +25,5 @@ obj-$(CONFIG_OF_OVERLAY_KUNIT_TEST) += overlay-test.o overlay-test-y := overlay_test.o kunit_overlay_test.dtbo.o obj-$(CONFIG_OF_UNITTEST) += unittest-data/ + +obj-y += overlays/ diff --git a/drivers/of/overlays/Kconfig b/drivers/of/overlays/Kconfig new file mode 100644 index 000000000000..8f07e6db3dc3 --- /dev/null +++ b/drivers/of/overlays/Kconfig @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0 + +config OF_OVERLAYS_DWC3_FLATTENING + bool "DeviceTree overlay for migrating DWC3 glue bindings" + depends on OF + select OF_DYNAMIC + select OF_OVERLAY + default USB_DWC3_QCOM + help + This option enables the migration of the loaded DeviceTree from the + binding that splits DWC3 representation in glue and core nodes (such + as "qcom,dwc3"), to the unified binding ("qcom,snps-dwc3"). + + Enable this if you intend to boot the Linux kernel on a system with a + DeviceTree blob using the non-flattened binding. diff --git a/drivers/of/overlays/Makefile b/drivers/of/overlays/Makefile new file mode 100644 index 000000000000..44dd5c09ac8d --- /dev/null +++ b/drivers/of/overlays/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_OF_OVERLAYS_DWC3_FLATTENING) += dwc3-flattening/ diff --git a/drivers/of/overlays/dwc3-flattening/Makefile b/drivers/of/overlays/dwc3-flattening/Makefile new file mode 100644 index 000000000000..78ed59517887 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_OF_OVERLAYS_DWC3_FLATTENING) += dwc3-flattening-overlay.o +dwc3-flattening-overlay-y += dwc3-flattening.o diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c new file mode 100644 index 000000000000..fe8e42627fe3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c @@ -0,0 +1,160 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2025, Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#define pr_fmt(fmt) "dwc3-flattening: " fmt + +#include +#include +#include +#include "dwc3-flattening.h" + +struct dwc3_overlay_symbol { + const char *symbol; + const char *path; +}; + +struct dwc3_overlay_data { + const void *fdt; + const void *end; + const char *migrate_match; +}; + +static const struct of_device_id dwc3_flatten_of_match[] = { + {} +}; + +static int dwc3_flattening_copy_snps_properties(struct of_changeset *ocs, + struct device_node *np, + struct device_node *dwc3) +{ + struct property *prop; + int ret = 0; + + for_each_property_of_node(dwc3, prop) { + if (strncmp(prop->name, "snps,", 5) && + strcmp(prop->name, "usb-role-switch") && + strcmp(prop->name, "dr_mode") && + strcmp(prop->name, "tx-fifo-resize") && + strcmp(prop->name, "maximum-speed")) + continue; + + ret = of_changeset_add_prop_copy(ocs, np, prop); + if (ret) + break; + } + + return ret; +} + +static int dwc3_flattening_copy_ports_tree(struct of_changeset *ocs, + struct device_node *new_parent, + struct device_node *old_node) +{ + struct device_node *new_node; + struct property *prop; + int ret; + + new_node = of_changeset_create_node(ocs, new_parent, old_node->full_name); + if (!new_node) + return -ENOMEM; + + for_each_property_of_node(old_node, prop) { + of_changeset_add_prop_copy(ocs, new_node, prop); + } + + for_each_child_of_node_scoped(old_node, child) { + ret = dwc3_flattening_copy_ports_tree(ocs, new_node, child); + if (ret) + return ret; + } + + return of_changeset_detach_node(ocs, old_node); +} + +static int dwc3_flattening_migrate(struct of_changeset *ocs, + struct device_node *np) +{ + struct device_node *ports; + struct device_node *dwc3; + int ret; + + dwc3 = of_get_compatible_child(np, "snps,dwc3"); + if (!dwc3) + return 0; + + ret = dwc3_flattening_copy_snps_properties(ocs, np, dwc3); + if (ret) { + pr_err("failed to copy properties of %pOF", dwc3); + goto out; + } + + ports = of_get_child_by_name(dwc3, "ports"); + if (ports) { + ret = dwc3_flattening_copy_ports_tree(ocs, np, ports); + of_node_put(ports); + if (ret) { + pr_err("failed to clone ports child of %pOF", dwc3); + goto out; + } + } + + ret = of_changeset_detach_node(ocs, dwc3); + +out: + of_node_put(dwc3); + + return ret; +} + +static int dwc3_flattening_init(void) +{ + const struct dwc3_overlay_data *data; + const struct of_device_id *match; + struct of_changeset migrate_ocs; + struct device_node *np; + int overlay_ovcs; + int ret; + + /* TODO: Remove kill-switch as dwc3-qcom is migrated to qcom,snps-dwc */ + return 0; + + match = of_match_node(dwc3_flatten_of_match, of_root); + if (!match) + return 0; + + data = match->data; + + np = of_find_compatible_node(NULL, NULL, data->migrate_match); + if (!np) { + pr_debug("already applied\n"); + return 0; + } + of_node_put(np); + + of_changeset_init(&migrate_ocs); + for_each_compatible_node(np, NULL, data->migrate_match) { + ret = dwc3_flattening_migrate(&migrate_ocs, np); + if (ret < 0) { + of_node_put(np); + goto out_migrate_destroy; + } + } + + ret = of_changeset_apply(&migrate_ocs); + if (ret < 0) + goto out_migrate_destroy; + + ret = of_overlay_fdt_apply(data->fdt, data->end - data->fdt, &overlay_ovcs, NULL); + if (ret < 0) { + of_overlay_remove(&overlay_ovcs); + of_changeset_revert(&migrate_ocs); + } + +out_migrate_destroy: + of_changeset_destroy(&migrate_ocs); + + return ret; +} +postcore_initcall(dwc3_flattening_init); diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h new file mode 100644 index 000000000000..6147376d3c92 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DWC3_FLATTENING_H__ +#define __DWC3_FLATTENING_H__ + +#include + +#endif From patchwork Tue Jan 14 05:11:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938420 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 DF7FA23A0E9 for ; Tue, 14 Jan 2025 05:05:51 +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=1736831154; cv=none; b=SjptwnUv0CFmInTdQ5nRJ5Gq5X4Gd7bPp2DhL0de87btTF87d2GFgI/rShskeiKAdPDdM7ZRk5/HlWsH4kqGCx+7+beg2D4ZywHnPKr5f/s4jQ0GnzN1Pmgi0jfSXGwZVZq9KQkEtzJv7UBHP67pIDzlzP9hQQ0N8DUwmggW6t0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831154; c=relaxed/simple; bh=HNcOKVWgkynOsQsZmCyiwG5aufCrKz7qvDtrRc11G98=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rsuxC+aqN7kmtI1XAHIo1kwWrpkrMdNek3YUm4g/BTfqfG2hNrXW2b/Fh4IxpDxIJbMPCmrbl9BnP98OxN9oHSLiZQ5dEHf+6RyjTvMxv+6EwDjVKcpPXu57aHWqlvf42Qwj0ONGZS9xTWK5Jpuv3MpPiCZISoKrh4LdCeLW7vE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=L0+hIFa1; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="L0+hIFa1" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E40vEY021560 for ; Tue, 14 Jan 2025 05:05:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7I2ZpH0MSoZBEKik/5sjgM3rSjLlQOF9XJbz0TLhn9A=; b=L0+hIFa1T5VtNHHe bJm3WN5qxaOHJyoTZBAMOnox7Rm8bT/18wrtNKVz3KPFDeOHj6ebgvJcfkYxU3J3 8oSzcCxMNexLPycwh9a+BZifMCARB1XkX2RKpyv62IQhOAHmZYEs/FgaTlytRMZ5 UpJQ7xICyoW1zEeiAh6v8fil33+jYq1+xAPTuwhzZmz9wUOpuHHwmKIQrUgqa+LB Qacfk1V0bTROA6gsD/cyfxt7PdEaQ37GJfYnjC0tbjNQJBDAVJuUoGosyRnc1fVH CU3tKthqaSoo8O5Y6yxx6h1+dWqbmqELl06mrU5VK2THXQkWC4xuwUC9Tq3jOOdL BAIplA== Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445gh603aw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:51 +0000 (GMT) Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-5f4d603fa7aso3683162eaf.2 for ; Mon, 13 Jan 2025 21:05:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831150; x=1737435950; 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=7I2ZpH0MSoZBEKik/5sjgM3rSjLlQOF9XJbz0TLhn9A=; b=EesZdsd9gOGGklhVsnWkCMtHzjKGgYk/EAUo+9Ufl7xsubRVrQkbjAZ0PYLH2Xf3KN Z1Q5y6aWWj9l9KNhRWUCuRrXb4pno4W4pRDbbSnA2t5zPiKNXvWsv6erHQIFAhh0UdEZ 8FnznNvbL/8OStVNTrKESCMY69OfkXY/vL0MOnA8yqBgtItDzoXm0i9dRc+zAwZFza2g Ubbsap9eIepgJ31h8lxnwr4l3I6UoZ+r3ewVi4CvinPU0C3sta0W4bPuwF8AeqjZlHYv gHND9dH3mVmUNptsMRmfCFhh+A17d8WsmakPgn4PsWNzVX8yM4UDJ6UnhE2XsqpESc9M K9sw== X-Forwarded-Encrypted: i=1; AJvYcCVtrUX9ikD/6/lDpFeRdPMR5kNjuvCsCKsVLUC6wO2bevcmQSd2AFNr0zlSnJq/cxLq/cfD2+MBXK0=@vger.kernel.org X-Gm-Message-State: AOJu0Yzl//6opoM1FjcdD5Xj+W8vrkgjXY+0HJ7o6sS/gk2Chsk8s3sU A5NjZ1wcPyjrDiM24FgBUsI+lvFlLmCt/weRCBifrrlOGxV54hBDN9dKR8HIR6zBFi2Ay1GDr9F 8HxyasgZa/USar4eWBl7wA8XXdXGaMWDrV49Wl00v0gIDe2ev5ui5pbnEA9EuX1rr+Po= X-Gm-Gg: ASbGncu7rNaxbpt9XNUGlQ+rbo/WEoGfBFctpTJ0G13x52/exhQWz0Lkkeakketc4c4 XpDY/+MSmc9wrfKH3UCIS3JWEBbfwa6R8aCt58ryl4ORhqFcHY9S4nO7PYqtn/EvGuLSQMF9xID ksnFmakCVRQax1hJg7Xz9sfLJsB/QbO2kHb7uHyhYIayM7m/1p1w8IVBexvu2vkRXofHK3YBZwO 7C8B9Ty70kra+jnFuE3FgqJOtjBbKZZk4yO93cIEynaTqZLdlBep+BlEKN714FvjnFrXw38eV79 3kDtj1W4Inq+CuP44Psv5Ha5oOZq2bGVl1xHTNqmuDEEM+zCOyHkVOvV X-Received: by 2002:a05:6808:2026:b0:3ea:443e:d1cd with SMTP id 5614622812f47-3ef2ed8a3dbmr3343791b6e.34.1736831149840; Mon, 13 Jan 2025 21:05:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+gUzO4oPE8WL+6+zT4G5culPHMuy1PnSlPkXpFnletZ4dNXodA20W8hlF7+K2WN+2sYSuvQ== X-Received: by 2002:a05:6808:2026:b0:3ea:443e:d1cd with SMTP id 5614622812f47-3ef2ed8a3dbmr3343768b6e.34.1736831149458; Mon, 13 Jan 2025 21:05:49 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:48 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:38 -0800 Subject: [PATCH v3 05/12] of: overlays: dwc3-flattening: Add Qualcomm Arm32 overlays Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-5-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=11881; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=HNcOKVWgkynOsQsZmCyiwG5aufCrKz7qvDtrRc11G98=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVp/QB6yC+BHC8j5GvacF7Nvn4ICJDkLLPX SflYtgeR+uJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWiKw//Uhyzkd0STQcAAV7kT2fVl8Ewe5JoqcRo2br2TSJ w/xkWDpBVSi/pK2QuDnIxyjr/KtBuQZ6v7BWLUE/7k89Qc63Rsq5nTA9A8/uiy6GOWRCEeVamJW H3tOVGe6UCFBESasOjQHOkzo0S/QpQll5949WkXbkqCoM+VOPyMTOnbKXRkddZvKcdstK5MLwsz 0p9xD8bjyte+UnpmlDMWzIr3XJQEB9wC1Ys59RaJVdsQvyGFcqgKeEvYYDNYLtUXzksem94oj/O ob/JL1cZFRPa5m8vkGMJnlAXo2IhLgNZsXnklN1QuPIRVTM8qhNYXeGlFC5cP8lj/G7+LGLOVJb c8RRys3eJt9n6YCDur77w4pT4ag88GikuYXHpi4XoB0jC/ewSXdgF1i09lPrLlombwPHIl8x/BJ m2tvOTittEJsP3wTZMSB0cWWawuWxqbpO0v36nXwARevtdG2YFJsRcMCbEAWZ06+55ehf6PrNFA 5yftg+n7WpaihzfysZrdOvph6sg1Osfk2GizSIgsqRSLscZmdE+kvnM6bp9Xl5ZW/mieUtGRNKs DMLNIiv64CxwqdCgLnF+xssYWOxBar9wcununXf/j3dERIyrTMcLZ0JICUeIiTS2AgT5IUdK6UE JhaeNghARkVTq6p7B9yMrxpYcOHDu1ADcSWhwd3Jw9nE= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: _BtJd6IuHTbecVeTYh-6SGQkp9XBZo5b X-Proofpoint-GUID: _BtJd6IuHTbecVeTYh-6SGQkp9XBZo5b 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 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 clxscore=1011 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 Introduce the overlays necessary for migrating Qualcomm Arm32 boards currently present in the upstream Linux kernel. Signed-off-by: Bjorn Andersson --- drivers/of/overlays/dwc3-flattening/Makefile | 6 ++++ .../of/overlays/dwc3-flattening/dwc3-flattening.c | 42 ++++++++++++++++++++++ .../of/overlays/dwc3-flattening/dwc3-flattening.h | 13 +++++++ .../overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts | 36 +++++++++++++++++++ .../dwc3-qcom_ipq4018_8dev_jalapeno.dts | 38 ++++++++++++++++++++ .../overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts | 38 ++++++++++++++++++++ .../overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts | 40 +++++++++++++++++++++ .../overlays/dwc3-flattening/dwc3-qcom_sdx55.dts | 38 ++++++++++++++++++++ .../overlays/dwc3-flattening/dwc3-qcom_sdx65.dts | 38 ++++++++++++++++++++ 9 files changed, 289 insertions(+) diff --git a/drivers/of/overlays/dwc3-flattening/Makefile b/drivers/of/overlays/dwc3-flattening/Makefile index 78ed59517887..248ddabd424e 100644 --- a/drivers/of/overlays/dwc3-flattening/Makefile +++ b/drivers/of/overlays/dwc3-flattening/Makefile @@ -2,3 +2,9 @@ obj-$(CONFIG_OF_OVERLAYS_DWC3_FLATTENING) += dwc3-flattening-overlay.o dwc3-flattening-overlay-y += dwc3-flattening.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq4018.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq4018_8dev_jalapeno.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq4019.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq8064.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdx55.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdx65.dtb.o diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c index fe8e42627fe3..0a3a31c5088b 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c @@ -21,7 +21,49 @@ struct dwc3_overlay_data { const char *migrate_match; }; +static const struct dwc3_overlay_data dwc3_qcom_ipq4018_overlay = { + .fdt = __dtb_dwc3_qcom_ipq4018_begin, + .end = __dtb_dwc3_qcom_ipq4018_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq4018_8dev_jalapeno_overlay = { + .fdt = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin, + .end = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq4019_overlay = { + .fdt = __dtb_dwc3_qcom_ipq4019_begin, + .end = __dtb_dwc3_qcom_ipq4019_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq8064_overlay = { + .fdt = __dtb_dwc3_qcom_ipq8064_begin, + .end = __dtb_dwc3_qcom_ipq8064_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdx55_overlay = { + .fdt = __dtb_dwc3_qcom_sdx55_begin, + .end = __dtb_dwc3_qcom_sdx55_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdx65_overlay = { + .fdt = __dtb_dwc3_qcom_sdx65_begin, + .end = __dtb_dwc3_qcom_sdx65_end, + .migrate_match = "qcom,dwc3", +}; + static const struct of_device_id dwc3_flatten_of_match[] = { + { .compatible = "8dev,jalapeno", .data = &dwc3_qcom_ipq4018_8dev_jalapeno_overlay }, + { .compatible = "qcom,ipq4018", .data = &dwc3_qcom_ipq4018_overlay }, + { .compatible = "qcom,ipq4019", .data = &dwc3_qcom_ipq4019_overlay }, + { .compatible = "qcom,ipq8064", .data = &dwc3_qcom_ipq8064_overlay }, + { .compatible = "qcom,sdx55", .data = &dwc3_qcom_sdx55_overlay }, + { .compatible = "qcom,sdx65", .data = &dwc3_qcom_sdx65_overlay }, {} }; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h index 6147376d3c92..57d7dbc94980 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h @@ -4,4 +4,17 @@ #include +extern u8 __dtb_dwc3_qcom_ipq4018_begin[]; +extern u8 __dtb_dwc3_qcom_ipq4018_end[]; +extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin[]; +extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end[]; +extern u8 __dtb_dwc3_qcom_ipq4019_begin[]; +extern u8 __dtb_dwc3_qcom_ipq4019_end[]; +extern u8 __dtb_dwc3_qcom_ipq8064_begin[]; +extern u8 __dtb_dwc3_qcom_ipq8064_end[]; +extern u8 __dtb_dwc3_qcom_sdx55_begin[]; +extern u8 __dtb_dwc3_qcom_sdx55_end[]; +extern u8 __dtb_dwc3_qcom_sdx65_begin[]; +extern u8 __dtb_dwc3_qcom_sdx65_end[]; + #endif diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts new file mode 100644 index 000000000000..1bd86a1852ba --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xf8100>; + phys = <&usb3_hs_phy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc/usb@60f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x06000000 0xf8100>; + phys = <&usb2_hs_phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts new file mode 100644 index 000000000000..bdc76b73c1fe --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xf8100>; + phys = <&usb3_hs_phy>, + <&usb3_ss_phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc/usb@60f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x06000000 0xf8100>; + phys = <&usb2_hs_phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts new file mode 100644 index 000000000000..bdc76b73c1fe --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xf8100>; + phys = <&usb3_hs_phy>, + <&usb3_ss_phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc/usb@60f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3"; + reg = <0x06000000 0xf8100>; + phys = <&usb2_hs_phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts new file mode 100644 index 000000000000..8e29a17472c6 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@100f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq8064-dwc3", "qcom,snps-dwc3"; + reg = <0x10000000 0x14d00>; + phys = <&hs_phy_0>, + <&ss_phy_0>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc/usb@110f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq8064-dwc3", "qcom,snps-dwc3"; + reg = <0x11000000 0x14d00>; + phys = <&hs_phy_1>, + <&ss_phy_1>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts new file mode 100644 index 000000000000..9ebb5d42f355 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@a6f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,sdx55-dwc3", "qcom,snps-dwc3"; + reg = <0x0a600000 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 51 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1a0 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts new file mode 100644 index 000000000000..239caec1f80d --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc/usb@a6f8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,sdx65-dwc3", "qcom,snps-dwc3"; + reg = <0x0a600000 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 19 IRQ_TYPE_EDGE_BOTH>, + <&pdc 18 IRQ_TYPE_EDGE_BOTH>, + <&pdc 76 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1a0 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; From patchwork Tue Jan 14 05:11:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938421 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 E793E23D3CB for ; Tue, 14 Jan 2025 05:05:55 +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=1736831164; cv=none; b=leIl/u3Ycl38t+7JIDYWXTvro4AdRljaVxIKTCHLQPtn747jzU0kHiAIc15e4MEKgE22BtXOrRxnnMogFiYiogOTWAH/5rfqV/IHySkc46yAAfkR6fHjaC4tbwA6txxvhlG8gRtLP2LGpb3WeCJdqclJGjqLXhfgQyN3Gtos0Dk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831164; c=relaxed/simple; bh=eVZ1RmTHKgbnk1IWLkQv54xVHndrD+zNyODhTeRc7zc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NK9G4vrGEsRBrB2O79iKXAyP//+oGX6DCv+ZewM6qn8VFIHodbwGLbG0lxekM5gnTu7qnnc8YkOfKzoCjqdgHOKN/+XMgad9+Ln6YtJAJV0XvoG5THlZ/dDf8YyuKmfmbaXqq30hJCwZglcxKhKZw9RnuOxFOmoOiqL+wqLi010= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=eHZYB7Gl; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="eHZYB7Gl" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E25DB9020329 for ; Tue, 14 Jan 2025 05:05:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ZCBjS8nUjkynSvy/BD/OVnxm4MFnRm7rnyz4Vr/pees=; b=eHZYB7Glwk+E5V8E mkJ1nwlnJz80aUfH0ZOhqnp2OY1smKXahz1d7xSPL0OU63do33vxucxdR6w0VaTU 02+wlX9EBYVu/7h28Z+VQu9ZYIx4zpOtMgDEcP75QgSDoKZDa79/wWKyX0Yv1AbV fhHUjLUNd/4FsxuZ8eh/MrHkTJpgqNtYn3GmJtUSdRX7a94Fq1m/oBMT8a4nJUJN pIu9tTY0gX364O1ZhfCyzD68luCCrmGX82YeDwOq+4RXuq+xcApn4a89KDobjF7b A7woH+GQcuTvHOZkWHxOxGVc+Zyq8Qjr3Ajb5VulL5yyAaRt4LgasEHoZjV8K0xd qR/vpg== Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eu48be7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:05:54 +0000 (GMT) Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-5f33beef685so3273711eaf.0 for ; Mon, 13 Jan 2025 21:05:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831154; x=1737435954; 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=ZCBjS8nUjkynSvy/BD/OVnxm4MFnRm7rnyz4Vr/pees=; b=BXhusnROaHkeewiAJkb8jQEk85oAlZChaUerjuUMUkrhotxmGVmrqznssQO19H+8hI jLooactvWLPqjdczUfbPymStIMTLsVaii/BoB8ljKL5/pU9FuhWMiAgK1cGNh0GraBrM GV+4Nf+CNHTCR3dwzqjjGpDxQBAxIukHTJ1f4NmgZhinBbHraFhkFZmRFjfClyrop5K1 16ZrecsAtoXIxJVuhW3Q8mugCNtNusSfVAxjDAUdVUOyLGR+R2n0Aki8yWOVl3n6v7FJ LyMX3k/CnIzTJ5TqCa8KBIwmelMjkppGkRlwCmRNawoDBhNbZs+GibB2/6pZEvAHcdmo LfoQ== X-Forwarded-Encrypted: i=1; AJvYcCUhQDNGx+w/fp9nZzd0/43FiD52ZzKjz+M/yh2CiOVjYlUBxO4PTplYb1e5M8zUuQDF4K+Dr4gzpBU=@vger.kernel.org X-Gm-Message-State: AOJu0YzOsatwYeV2fCYPr26NYay5MWJ7YfUcfITuZnDtjt5X1wpj+5fn 0k9I3/GARTarGco503xDCI2v07/mmfJ2VQAmxjsfshU1y3cHm5BzdcSMsuWYiZAS3BK7lx6QY2h YfgXjccnwU+yM9KX8DK8p11aG7KTbjhF6M74pS6YTKBbv9M6GFoUOOXfTuI4= X-Gm-Gg: ASbGncu32AoDJFNCEDceGypdb0i3w6C8Kk92IUd/TSxksu2VHEXDBWw5+kn7YYadmUE B1cbjxGl2lu2WTusPDVWstElmOuy3ImShYtnsBVYuG/35YLHxEkMr973yfyJp6d+/iUa8W8efIy e3D6eFW+NCrbZlWIQvvm5RORaW+j9ico4dzP1gfxBN1ZMTWH1jx0y7oJSVr+3zcbsFu2zWlRET3 a20QrrgHLVJlVInbDsj7Ww1G87pKN2GuNPilbUym5r5oKwpTrNlU0KXOs54z71TfrkQhUsMRMYS ji87v3FMZ2eCJgS29NfPtF+gs5BU3d6SVx0DPX7qjFa7x3U6XHlx86S5 X-Received: by 2002:a05:6808:3c89:b0:3eb:5c27:f75c with SMTP id 5614622812f47-3ef2ec96edemr14883595b6e.12.1736831152377; Mon, 13 Jan 2025 21:05:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3gmdick5K1Gwg79wayWgfEZvhcQpgGj6YFljRD0zzdMoEYGxZ3On2Jv9CnQU0ZS1XCvdvOQ== X-Received: by 2002:a05:6808:3c89:b0:3eb:5c27:f75c with SMTP id 5614622812f47-3ef2ec96edemr14883544b6e.12.1736831151259; Mon, 13 Jan 2025 21:05:51 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:50 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:39 -0800 Subject: [PATCH v3 06/12] of: overlays: dwc3-flattening: Add Qualcomm Arm64 board overlays Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-6-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=214742; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=eVZ1RmTHKgbnk1IWLkQv54xVHndrD+zNyODhTeRc7zc=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVxXk4c5S99sHGdclgsEd3uMJt9gL9q7gAI 8c9p2Hjw/uJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcULfA/9FXfyNOveoYMJOWiVPF2SZ6dEW2h2Yeu/LLqawtu 2rloO9Ra8GQ99E3yIQ700inj7TvN8hEq/VxphcDaN6VinhK6waXYKZyYh5qCyRaQu2LslQYa5b2 EslXO8RtN/4kqiOsY4AGHUbwVZ1qVEjEFexMeZCjQ6voRhYH31t29inn1x7jEzofeXojPgrPEj+ iooyDiXmHHT2+Q2PTSHDITG1FpFnXqHDlcehCdlcD6GIrDevUJwB7zEXoVrDxt9UCtasjcKWlYi P2oSMKiQJoXoE/Ksed8xwPjqh1CxQa0PmoqqEkLzFnr5kDvlewG6Jdnh7T91ekLNUDL1GmBBlnz 1WJdm93W6nchqY2tcpyzFcu9B0OV0dmoU4rGivFMMboM6+0o1JgQra6z21CI+0f7qyldAegxbz0 NBjrh7fHdk/mBJdyISJccBvYBPOiiqpb7xoYSRdhJ1iirS2G0h0W8NDuxyHtSTC0oeQ/eEnglJG XuIhLqoVb1RBNGIVyhswg4qOUEKJISVR0+eyuZAbGt3yL/ROdzJCutLHYcxm8scRQyxlI+f+2gT OARuIlkgwyXXz1Dprt02rxxgoGhjlrrPFf/N+uLrdBYhEgnuCOzzfe9Yk1CaukeOtaCaIwO17kn lVfivvLwqGfyWVyhtKRI6O2vI6B4q0PdfXEY+RAYB+Y0= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-GUID: ypy2PFfp5BzHVAvWV3aQr-PB8hWa2mbw X-Proofpoint-ORIG-GUID: ypy2PFfp5BzHVAvWV3aQr-PB8hWa2mbw 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 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 impostorscore=0 mlxscore=0 clxscore=1011 lowpriorityscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140039 Introduce the overlays necessary for migrating Qualcomm Arm64 boards currently present in the upstream Linux kernel. Signed-off-by: Bjorn Andersson --- drivers/of/overlays/dwc3-flattening/Makefile | 84 +++ .../of/overlays/dwc3-flattening/dwc3-flattening.c | 588 +++++++++++++++++++++ .../of/overlays/dwc3-flattening/dwc3-flattening.h | 168 ++++++ .../overlays/dwc3-flattening/dwc3-qcom_apq8094.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_apq8096.dts | 60 +++ .../dwc3-qcom_apq8096_inforce_ifc6640.dts | 58 ++ .../overlays/dwc3-flattening/dwc3-qcom_ipq5018.dts | 28 + .../overlays/dwc3-flattening/dwc3-qcom_ipq5332.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_ipq5424.dts | 58 ++ .../overlays/dwc3-flattening/dwc3-qcom_ipq6018.dts | 54 ++ .../overlays/dwc3-flattening/dwc3-qcom_ipq8074.dts | 58 ++ .../overlays/dwc3-flattening/dwc3-qcom_ipq9574.dts | 29 + .../overlays/dwc3-flattening/dwc3-qcom_msm8953.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_msm8992.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_msm8994.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_msm8996.dts | 58 ++ .../dwc3-qcom_msm8996_oneplus_oneplus3.dts | 56 ++ .../dwc3-qcom_msm8996_oneplus_oneplus3t.dts | 56 ++ .../dwc3-qcom_msm8996_sony_dora_row.dts | 57 ++ .../dwc3-qcom_msm8996_sony_kagura_row.dts | 57 ++ .../dwc3-qcom_msm8996_sony_keyaki_row.dts | 57 ++ .../dwc3-qcom_msm8996_xiaomi_gemini.dts | 56 ++ .../dwc3-qcom_msm8996_xiaomi_natrium.dts | 56 ++ .../dwc3-qcom_msm8996_xiaomi_scorpio.dts | 56 ++ .../overlays/dwc3-flattening/dwc3-qcom_msm8998.dts | 34 ++ .../dwc3-qcom_msm8998_fxtec_pro1.dts | 35 ++ .../dwc3-qcom_msm8998_oneplus_cheeseburger.dts | 32 ++ .../dwc3-qcom_msm8998_oneplus_dumpling.dts | 32 ++ .../dwc3-qcom_msm8998_sony_xperia_lilac.dts | 35 ++ .../dwc3-qcom_msm8998_sony_xperia_maple.dts | 35 ++ .../dwc3-qcom_msm8998_sony_xperia_poplar.dts | 35 ++ .../dwc3-qcom_msm8998_xiaomi_sagit.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_qcm2290.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_qcm6490.dts | 63 +++ .../overlays/dwc3-flattening/dwc3-qcom_qcs404.dts | 56 ++ .../overlays/dwc3-flattening/dwc3-qcom_qcs615.dts | 62 +++ .../overlays/dwc3-flattening/dwc3-qcom_qcs8300.dts | 62 +++ .../overlays/dwc3-flattening/dwc3-qcom_qdu1000.dts | 38 ++ .../overlays/dwc3-flattening/dwc3-qcom_qru1000.dts | 38 ++ .../overlays/dwc3-flattening/dwc3-qcom_sa8155p.dts | 71 +++ .../overlays/dwc3-flattening/dwc3-qcom_sa8540p.dts | 129 +++++ .../overlays/dwc3-flattening/dwc3-qcom_sa8775p.dts | 90 ++++ .../dwc3-flattening/dwc3-qcom_sar2130p.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sc7180.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sc7280.dts | 63 +++ .../overlays/dwc3-flattening/dwc3-qcom_sc8180x.dts | 109 ++++ .../dwc3-flattening/dwc3-qcom_sc8280xp.dts | 129 +++++ .../dwc3-qcom_sc8280xp_microsoft_blackrock.dts | 121 +++++ .../overlays/dwc3-flattening/dwc3-qcom_sda660.dts | 59 +++ .../overlays/dwc3-flattening/dwc3-qcom_sdm450.dts | 33 ++ .../overlays/dwc3-flattening/dwc3-qcom_sdm630.dts | 57 ++ .../overlays/dwc3-flattening/dwc3-qcom_sdm632.dts | 32 ++ .../overlays/dwc3-flattening/dwc3-qcom_sdm636.dts | 59 +++ .../overlays/dwc3-flattening/dwc3-qcom_sdm660.dts | 57 ++ .../overlays/dwc3-flattening/dwc3-qcom_sdm670.dts | 36 ++ .../overlays/dwc3-flattening/dwc3-qcom_sdm845.dts | 64 +++ .../dwc3-qcom_sdm845_lenovo_yoga_c630.dts | 67 +++ .../dwc3-flattening/dwc3-qcom_sdm845_lg_judyln.dts | 67 +++ .../dwc3-flattening/dwc3-qcom_sdm845_lg_judyp.dts | 67 +++ .../dwc3-qcom_sdm845_qcom_sdm845_mtp.dts | 67 +++ .../dwc3-qcom_sdm845_samsung_starqltechn.dts | 67 +++ .../dwc3-qcom_sdm845_samsung_w737.dts | 67 +++ .../dwc3-qcom_sdm845_shift_axolotl.dts | 67 +++ .../dwc3-qcom_sdm845_thundercomm_db845c.dts | 67 +++ .../dwc3-qcom_sdm845_xiaomi_beryllium.dts | 67 +++ .../dwc3-qcom_sdm845_xiaomi_beryllium_ebbg.dts | 67 +++ .../overlays/dwc3-flattening/dwc3-qcom_sdx75.dts | 36 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm4250.dts | 37 ++ .../dwc3-qcom_sm4250_oneplus_billie2.dts | 35 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm6115.dts | 37 ++ .../dwc3-qcom_sm6115_lenovo_j606f.dts | 35 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm6125.dts | 36 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm6350.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm6375.dts | 36 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm7125.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm7225.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm7325.dts | 60 +++ .../overlays/dwc3-flattening/dwc3-qcom_sm8150.dts | 67 +++ .../overlays/dwc3-flattening/dwc3-qcom_sm8250.dts | 67 +++ .../dwc3-qcom_sm8250_xiaomi_elish.dts | 64 +++ .../overlays/dwc3-flattening/dwc3-qcom_sm8350.dts | 67 +++ .../dwc3-qcom_sm8350_microsoft_surface_duo2.dts | 67 +++ .../dwc3-qcom_sm8350_qcom_sm8350_hdk.dts | 69 +++ .../dwc3-qcom_sm8350_qcom_sm8350_mtp.dts | 67 +++ .../dwc3-qcom_sm8350_sony_pdx214_generic.dts | 67 +++ .../dwc3-qcom_sm8350_sony_pdx215_generic.dts | 67 +++ .../overlays/dwc3-flattening/dwc3-qcom_sm8450.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm8550.dts | 39 ++ .../overlays/dwc3-flattening/dwc3-qcom_sm8650.dts | 39 ++ .../dwc3-flattening/dwc3-qcom_x1e80100.dts | 153 ++++++ .../dwc3-qcom_x1e80100_hp_omnibook_x14.dts | 149 ++++++ 91 files changed, 5782 insertions(+) diff --git a/drivers/of/overlays/dwc3-flattening/Makefile b/drivers/of/overlays/dwc3-flattening/Makefile index 248ddabd424e..afc509d97d1b 100644 --- a/drivers/of/overlays/dwc3-flattening/Makefile +++ b/drivers/of/overlays/dwc3-flattening/Makefile @@ -2,9 +2,93 @@ obj-$(CONFIG_OF_OVERLAYS_DWC3_FLATTENING) += dwc3-flattening-overlay.o dwc3-flattening-overlay-y += dwc3-flattening.o +dwc3-flattening-overlay-y += dwc3-qcom_apq8094.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_apq8096.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_apq8096_inforce_ifc6640.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_ipq4018.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_ipq4018_8dev_jalapeno.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_ipq4019.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq5018.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq5332.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq5424.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq6018.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_ipq8064.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq8074.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_ipq9574.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8953.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8992.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8994.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_oneplus_oneplus3.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_oneplus_oneplus3t.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_sony_dora_row.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_sony_kagura_row.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_sony_keyaki_row.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_xiaomi_gemini.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_xiaomi_natrium.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8996_xiaomi_scorpio.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_fxtec_pro1.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_oneplus_cheeseburger.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_oneplus_dumpling.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_sony_xperia_lilac.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_sony_xperia_maple.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_sony_xperia_poplar.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_msm8998_xiaomi_sagit.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qcm2290.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qcm6490.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qcs404.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qcs615.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qcs8300.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qdu1000.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_qru1000.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sa8155p.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sa8540p.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sa8775p.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sar2130p.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sc7180.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sc7280.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sc8180x.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sc8280xp.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sc8280xp_microsoft_blackrock.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sda660.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm450.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm630.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm632.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm636.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm660.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm670.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_lenovo_yoga_c630.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_lg_judyln.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_lg_judyp.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_qcom_sdm845_mtp.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_samsung_starqltechn.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_samsung_w737.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_shift_axolotl.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_thundercomm_db845c.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_xiaomi_beryllium.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdm845_xiaomi_beryllium_ebbg.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_sdx55.dtb.o dwc3-flattening-overlay-y += dwc3-qcom_sdx65.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sdx75.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm4250.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm4250_oneplus_billie2.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm6115.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm6115_lenovo_j606f.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm6125.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm6350.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm6375.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm7125.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm7225.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm7325.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8150.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8250.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8250_xiaomi_elish.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8350.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8350_qcom_sm8350_hdk.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8450.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8550.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_sm8650.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_x1e80100.dtb.o +dwc3-flattening-overlay-y += dwc3-qcom_x1e80100_hp_omnibook_x14.dtb.o diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c index 0a3a31c5088b..d33cdf6661c0 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c @@ -21,6 +21,24 @@ struct dwc3_overlay_data { const char *migrate_match; }; +static const struct dwc3_overlay_data dwc3_qcom_apq8094_overlay = { + .fdt = __dtb_dwc3_qcom_apq8094_begin, + .end = __dtb_dwc3_qcom_apq8094_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_apq8096_overlay = { + .fdt = __dtb_dwc3_qcom_apq8096_begin, + .end = __dtb_dwc3_qcom_apq8096_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_apq8096_inforce_ifc6640_overlay = { + .fdt = __dtb_dwc3_qcom_apq8096_inforce_ifc6640_begin, + .end = __dtb_dwc3_qcom_apq8096_inforce_ifc6640_end, + .migrate_match = "qcom,dwc3", +}; + static const struct dwc3_overlay_data dwc3_qcom_ipq4018_overlay = { .fdt = __dtb_dwc3_qcom_ipq4018_begin, .end = __dtb_dwc3_qcom_ipq4018_end, @@ -39,12 +57,372 @@ static const struct dwc3_overlay_data dwc3_qcom_ipq4019_overlay = { .migrate_match = "qcom,dwc3", }; +static const struct dwc3_overlay_data dwc3_qcom_ipq5018_overlay = { + .fdt = __dtb_dwc3_qcom_ipq5018_begin, + .end = __dtb_dwc3_qcom_ipq5018_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq5332_overlay = { + .fdt = __dtb_dwc3_qcom_ipq5332_begin, + .end = __dtb_dwc3_qcom_ipq5332_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq5424_overlay = { + .fdt = __dtb_dwc3_qcom_ipq5424_begin, + .end = __dtb_dwc3_qcom_ipq5424_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq6018_overlay = { + .fdt = __dtb_dwc3_qcom_ipq6018_begin, + .end = __dtb_dwc3_qcom_ipq6018_end, + .migrate_match = "qcom,dwc3", +}; + static const struct dwc3_overlay_data dwc3_qcom_ipq8064_overlay = { .fdt = __dtb_dwc3_qcom_ipq8064_begin, .end = __dtb_dwc3_qcom_ipq8064_end, .migrate_match = "qcom,dwc3", }; +static const struct dwc3_overlay_data dwc3_qcom_ipq8074_overlay = { + .fdt = __dtb_dwc3_qcom_ipq8074_begin, + .end = __dtb_dwc3_qcom_ipq8074_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_ipq9574_overlay = { + .fdt = __dtb_dwc3_qcom_ipq9574_begin, + .end = __dtb_dwc3_qcom_ipq9574_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8953_overlay = { + .fdt = __dtb_dwc3_qcom_msm8953_begin, + .end = __dtb_dwc3_qcom_msm8953_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8992_overlay = { + .fdt = __dtb_dwc3_qcom_msm8992_begin, + .end = __dtb_dwc3_qcom_msm8992_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8994_overlay = { + .fdt = __dtb_dwc3_qcom_msm8994_begin, + .end = __dtb_dwc3_qcom_msm8994_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_begin, + .end = __dtb_dwc3_qcom_msm8996_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_oneplus_oneplus3_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_begin, + .end = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_oneplus_oneplus3t_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_begin, + .end = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_dora_row_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_sony_dora_row_begin, + .end = __dtb_dwc3_qcom_msm8996_sony_dora_row_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_kagura_row_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_sony_kagura_row_begin, + .end = __dtb_dwc3_qcom_msm8996_sony_kagura_row_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_keyaki_row_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_sony_keyaki_row_begin, + .end = __dtb_dwc3_qcom_msm8996_sony_keyaki_row_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_gemini_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_gemini_begin, + .end = __dtb_dwc3_qcom_msm8996_xiaomi_gemini_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_natrium_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_natrium_begin, + .end = __dtb_dwc3_qcom_msm8996_xiaomi_natrium_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_scorpio_overlay = { + .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_begin, + .end = __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_begin, + .end = __dtb_dwc3_qcom_msm8998_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_fxtec_pro1_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_fxtec_pro1_begin, + .end = __dtb_dwc3_qcom_msm8998_fxtec_pro1_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_oneplus_cheeseburger_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_begin, + .end = __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_oneplus_dumpling_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_oneplus_dumpling_begin, + .end = __dtb_dwc3_qcom_msm8998_oneplus_dumpling_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_lilac_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_begin, + .end = __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_maple_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_maple_begin, + .end = __dtb_dwc3_qcom_msm8998_sony_xperia_maple_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_poplar_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_begin, + .end = __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_msm8998_xiaomi_sagit_overlay = { + .fdt = __dtb_dwc3_qcom_msm8998_xiaomi_sagit_begin, + .end = __dtb_dwc3_qcom_msm8998_xiaomi_sagit_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qcm2290_overlay = { + .fdt = __dtb_dwc3_qcom_qcm2290_begin, + .end = __dtb_dwc3_qcom_qcm2290_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qcm6490_overlay = { + .fdt = __dtb_dwc3_qcom_qcm6490_begin, + .end = __dtb_dwc3_qcom_qcm6490_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qcs404_overlay = { + .fdt = __dtb_dwc3_qcom_qcs404_begin, + .end = __dtb_dwc3_qcom_qcs404_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qcs615_overlay = { + .fdt = __dtb_dwc3_qcom_qcs615_begin, + .end = __dtb_dwc3_qcom_qcs615_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qcs8300_overlay = { + .fdt = __dtb_dwc3_qcom_qcs8300_begin, + .end = __dtb_dwc3_qcom_qcs8300_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qdu1000_overlay = { + .fdt = __dtb_dwc3_qcom_qdu1000_begin, + .end = __dtb_dwc3_qcom_qdu1000_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_qru1000_overlay = { + .fdt = __dtb_dwc3_qcom_qru1000_begin, + .end = __dtb_dwc3_qcom_qru1000_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sa8155p_overlay = { + .fdt = __dtb_dwc3_qcom_sa8155p_begin, + .end = __dtb_dwc3_qcom_sa8155p_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sa8540p_overlay = { + .fdt = __dtb_dwc3_qcom_sa8540p_begin, + .end = __dtb_dwc3_qcom_sa8540p_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sa8775p_overlay = { + .fdt = __dtb_dwc3_qcom_sa8775p_begin, + .end = __dtb_dwc3_qcom_sa8775p_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sar2130p_overlay = { + .fdt = __dtb_dwc3_qcom_sar2130p_begin, + .end = __dtb_dwc3_qcom_sar2130p_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sc7180_overlay = { + .fdt = __dtb_dwc3_qcom_sc7180_begin, + .end = __dtb_dwc3_qcom_sc7180_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sc7280_overlay = { + .fdt = __dtb_dwc3_qcom_sc7280_begin, + .end = __dtb_dwc3_qcom_sc7280_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sc8180x_overlay = { + .fdt = __dtb_dwc3_qcom_sc8180x_begin, + .end = __dtb_dwc3_qcom_sc8180x_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sc8280xp_overlay = { + .fdt = __dtb_dwc3_qcom_sc8280xp_begin, + .end = __dtb_dwc3_qcom_sc8280xp_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sc8280xp_microsoft_blackrock_overlay = { + .fdt = __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_begin, + .end = __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sda660_overlay = { + .fdt = __dtb_dwc3_qcom_sda660_begin, + .end = __dtb_dwc3_qcom_sda660_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm450_overlay = { + .fdt = __dtb_dwc3_qcom_sdm450_begin, + .end = __dtb_dwc3_qcom_sdm450_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm630_overlay = { + .fdt = __dtb_dwc3_qcom_sdm630_begin, + .end = __dtb_dwc3_qcom_sdm630_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm632_overlay = { + .fdt = __dtb_dwc3_qcom_sdm632_begin, + .end = __dtb_dwc3_qcom_sdm632_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm636_overlay = { + .fdt = __dtb_dwc3_qcom_sdm636_begin, + .end = __dtb_dwc3_qcom_sdm636_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm660_overlay = { + .fdt = __dtb_dwc3_qcom_sdm660_begin, + .end = __dtb_dwc3_qcom_sdm660_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm670_overlay = { + .fdt = __dtb_dwc3_qcom_sdm670_begin, + .end = __dtb_dwc3_qcom_sdm670_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_begin, + .end = __dtb_dwc3_qcom_sdm845_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_lenovo_yoga_c630_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_begin, + .end = __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_lg_judyln_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_lg_judyln_begin, + .end = __dtb_dwc3_qcom_sdm845_lg_judyln_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_lg_judyp_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_lg_judyp_begin, + .end = __dtb_dwc3_qcom_sdm845_lg_judyp_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_qcom_sdm845_mtp_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_begin, + .end = __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_samsung_starqltechn_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_samsung_starqltechn_begin, + .end = __dtb_dwc3_qcom_sdm845_samsung_starqltechn_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_samsung_w737_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_samsung_w737_begin, + .end = __dtb_dwc3_qcom_sdm845_samsung_w737_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_shift_axolotl_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_shift_axolotl_begin, + .end = __dtb_dwc3_qcom_sdm845_shift_axolotl_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_thundercomm_db845c_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_thundercomm_db845c_begin, + .end = __dtb_dwc3_qcom_sdm845_thundercomm_db845c_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_xiaomi_beryllium_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_begin, + .end = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_overlay = { + .fdt = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_begin, + .end = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_end, + .migrate_match = "qcom,dwc3", +}; + static const struct dwc3_overlay_data dwc3_qcom_sdx55_overlay = { .fdt = __dtb_dwc3_qcom_sdx55_begin, .end = __dtb_dwc3_qcom_sdx55_end, @@ -57,13 +435,223 @@ static const struct dwc3_overlay_data dwc3_qcom_sdx65_overlay = { .migrate_match = "qcom,dwc3", }; +static const struct dwc3_overlay_data dwc3_qcom_sdx75_overlay = { + .fdt = __dtb_dwc3_qcom_sdx75_begin, + .end = __dtb_dwc3_qcom_sdx75_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm4250_overlay = { + .fdt = __dtb_dwc3_qcom_sm4250_begin, + .end = __dtb_dwc3_qcom_sm4250_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm4250_oneplus_billie2_overlay = { + .fdt = __dtb_dwc3_qcom_sm4250_oneplus_billie2_begin, + .end = __dtb_dwc3_qcom_sm4250_oneplus_billie2_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm6115_overlay = { + .fdt = __dtb_dwc3_qcom_sm6115_begin, + .end = __dtb_dwc3_qcom_sm6115_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm6115_lenovo_j606f_overlay = { + .fdt = __dtb_dwc3_qcom_sm6115_lenovo_j606f_begin, + .end = __dtb_dwc3_qcom_sm6115_lenovo_j606f_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm6125_overlay = { + .fdt = __dtb_dwc3_qcom_sm6125_begin, + .end = __dtb_dwc3_qcom_sm6125_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm6350_overlay = { + .fdt = __dtb_dwc3_qcom_sm6350_begin, + .end = __dtb_dwc3_qcom_sm6350_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm6375_overlay = { + .fdt = __dtb_dwc3_qcom_sm6375_begin, + .end = __dtb_dwc3_qcom_sm6375_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm7125_overlay = { + .fdt = __dtb_dwc3_qcom_sm7125_begin, + .end = __dtb_dwc3_qcom_sm7125_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm7225_overlay = { + .fdt = __dtb_dwc3_qcom_sm7225_begin, + .end = __dtb_dwc3_qcom_sm7225_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm7325_overlay = { + .fdt = __dtb_dwc3_qcom_sm7325_begin, + .end = __dtb_dwc3_qcom_sm7325_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8150_overlay = { + .fdt = __dtb_dwc3_qcom_sm8150_begin, + .end = __dtb_dwc3_qcom_sm8150_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8250_overlay = { + .fdt = __dtb_dwc3_qcom_sm8250_begin, + .end = __dtb_dwc3_qcom_sm8250_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8250_xiaomi_elish_overlay = { + .fdt = __dtb_dwc3_qcom_sm8250_xiaomi_elish_begin, + .end = __dtb_dwc3_qcom_sm8250_xiaomi_elish_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8350_overlay = { + .fdt = __dtb_dwc3_qcom_sm8350_begin, + .end = __dtb_dwc3_qcom_sm8350_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8350_qcom_sm8350_hdk_overlay = { + .fdt = __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_begin, + .end = __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8450_overlay = { + .fdt = __dtb_dwc3_qcom_sm8450_begin, + .end = __dtb_dwc3_qcom_sm8450_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8550_overlay = { + .fdt = __dtb_dwc3_qcom_sm8550_begin, + .end = __dtb_dwc3_qcom_sm8550_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_sm8650_overlay = { + .fdt = __dtb_dwc3_qcom_sm8650_begin, + .end = __dtb_dwc3_qcom_sm8650_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_x1e80100_overlay = { + .fdt = __dtb_dwc3_qcom_x1e80100_begin, + .end = __dtb_dwc3_qcom_x1e80100_end, + .migrate_match = "qcom,dwc3", +}; + +static const struct dwc3_overlay_data dwc3_qcom_x1e80100_hp_omnibook_x14_overlay = { + .fdt = __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_begin, + .end = __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_end, + .migrate_match = "qcom,dwc3", +}; + static const struct of_device_id dwc3_flatten_of_match[] = { { .compatible = "8dev,jalapeno", .data = &dwc3_qcom_ipq4018_8dev_jalapeno_overlay }, + { .compatible = "fxtec,pro1", .data = &dwc3_qcom_msm8998_fxtec_pro1_overlay }, + { .compatible = "hp,omnibook-x14", .data = &dwc3_qcom_x1e80100_hp_omnibook_x14_overlay }, + { .compatible = "inforce,ifc6640", .data = &dwc3_qcom_apq8096_inforce_ifc6640_overlay }, + { .compatible = "lenovo,j606f", .data = &dwc3_qcom_sm6115_lenovo_j606f_overlay }, + { .compatible = "lenovo,yoga-c630", .data = &dwc3_qcom_sdm845_lenovo_yoga_c630_overlay }, + { .compatible = "lg,judyln", .data = &dwc3_qcom_sdm845_lg_judyln_overlay }, + { .compatible = "lg,judyp", .data = &dwc3_qcom_sdm845_lg_judyp_overlay }, + { .compatible = "microsoft,blackrock", .data = &dwc3_qcom_sc8280xp_microsoft_blackrock_overlay }, + { .compatible = "oneplus,billie2", .data = &dwc3_qcom_sm4250_oneplus_billie2_overlay }, + { .compatible = "oneplus,cheeseburger", .data = &dwc3_qcom_msm8998_oneplus_cheeseburger_overlay }, + { .compatible = "oneplus,dumpling", .data = &dwc3_qcom_msm8998_oneplus_dumpling_overlay }, + { .compatible = "oneplus,oneplus3", .data = &dwc3_qcom_msm8996_oneplus_oneplus3_overlay }, + { .compatible = "oneplus,oneplus3t", .data = &dwc3_qcom_msm8996_oneplus_oneplus3t_overlay }, + { .compatible = "qcom,apq8094", .data = &dwc3_qcom_apq8094_overlay }, + { .compatible = "qcom,apq8096", .data = &dwc3_qcom_apq8096_overlay }, { .compatible = "qcom,ipq4018", .data = &dwc3_qcom_ipq4018_overlay }, { .compatible = "qcom,ipq4019", .data = &dwc3_qcom_ipq4019_overlay }, + { .compatible = "qcom,ipq5018", .data = &dwc3_qcom_ipq5018_overlay }, + { .compatible = "qcom,ipq5332", .data = &dwc3_qcom_ipq5332_overlay }, + { .compatible = "qcom,ipq5424", .data = &dwc3_qcom_ipq5424_overlay }, + { .compatible = "qcom,ipq6018", .data = &dwc3_qcom_ipq6018_overlay }, { .compatible = "qcom,ipq8064", .data = &dwc3_qcom_ipq8064_overlay }, + { .compatible = "qcom,ipq8074", .data = &dwc3_qcom_ipq8074_overlay }, + { .compatible = "qcom,ipq9574", .data = &dwc3_qcom_ipq9574_overlay }, + { .compatible = "qcom,msm8953", .data = &dwc3_qcom_msm8953_overlay }, + { .compatible = "qcom,msm8992", .data = &dwc3_qcom_msm8992_overlay }, + { .compatible = "qcom,msm8994", .data = &dwc3_qcom_msm8994_overlay }, + { .compatible = "qcom,msm8996", .data = &dwc3_qcom_msm8996_overlay }, + { .compatible = "qcom,msm8998", .data = &dwc3_qcom_msm8998_overlay }, + { .compatible = "qcom,qcm2290", .data = &dwc3_qcom_qcm2290_overlay }, + { .compatible = "qcom,qcm6490", .data = &dwc3_qcom_qcm6490_overlay }, + { .compatible = "qcom,qcs404", .data = &dwc3_qcom_qcs404_overlay }, + { .compatible = "qcom,qcs615", .data = &dwc3_qcom_qcs615_overlay }, + { .compatible = "qcom,qcs8300", .data = &dwc3_qcom_qcs8300_overlay }, + { .compatible = "qcom,qdu1000", .data = &dwc3_qcom_qdu1000_overlay }, + { .compatible = "qcom,qru1000", .data = &dwc3_qcom_qru1000_overlay }, + { .compatible = "qcom,sa8155p", .data = &dwc3_qcom_sa8155p_overlay }, + { .compatible = "qcom,sa8540p", .data = &dwc3_qcom_sa8540p_overlay }, + { .compatible = "qcom,sa8775p", .data = &dwc3_qcom_sa8775p_overlay }, + { .compatible = "qcom,sar2130p", .data = &dwc3_qcom_sar2130p_overlay }, + { .compatible = "qcom,sc7180", .data = &dwc3_qcom_sc7180_overlay }, + { .compatible = "qcom,sc7280", .data = &dwc3_qcom_sc7280_overlay }, + { .compatible = "qcom,sc8180x", .data = &dwc3_qcom_sc8180x_overlay }, + { .compatible = "qcom,sc8280xp", .data = &dwc3_qcom_sc8280xp_overlay }, + { .compatible = "qcom,sda660", .data = &dwc3_qcom_sda660_overlay }, + { .compatible = "qcom,sdm450", .data = &dwc3_qcom_sdm450_overlay }, + { .compatible = "qcom,sdm630", .data = &dwc3_qcom_sdm630_overlay }, + { .compatible = "qcom,sdm632", .data = &dwc3_qcom_sdm632_overlay }, + { .compatible = "qcom,sdm636", .data = &dwc3_qcom_sdm636_overlay }, + { .compatible = "qcom,sdm660", .data = &dwc3_qcom_sdm660_overlay }, + { .compatible = "qcom,sdm670", .data = &dwc3_qcom_sdm670_overlay }, + { .compatible = "qcom,sdm845", .data = &dwc3_qcom_sdm845_overlay }, + { .compatible = "qcom,sdm845-mtp", .data = &dwc3_qcom_sdm845_qcom_sdm845_mtp_overlay }, { .compatible = "qcom,sdx55", .data = &dwc3_qcom_sdx55_overlay }, { .compatible = "qcom,sdx65", .data = &dwc3_qcom_sdx65_overlay }, + { .compatible = "qcom,sdx75", .data = &dwc3_qcom_sdx75_overlay }, + { .compatible = "qcom,sm4250", .data = &dwc3_qcom_sm4250_overlay }, + { .compatible = "qcom,sm6115", .data = &dwc3_qcom_sm6115_overlay }, + { .compatible = "qcom,sm6125", .data = &dwc3_qcom_sm6125_overlay }, + { .compatible = "qcom,sm6350", .data = &dwc3_qcom_sm6350_overlay }, + { .compatible = "qcom,sm6375", .data = &dwc3_qcom_sm6375_overlay }, + { .compatible = "qcom,sm7125", .data = &dwc3_qcom_sm7125_overlay }, + { .compatible = "qcom,sm7225", .data = &dwc3_qcom_sm7225_overlay }, + { .compatible = "qcom,sm7325", .data = &dwc3_qcom_sm7325_overlay }, + { .compatible = "qcom,sm8150", .data = &dwc3_qcom_sm8150_overlay }, + { .compatible = "qcom,sm8250", .data = &dwc3_qcom_sm8250_overlay }, + { .compatible = "qcom,sm8350", .data = &dwc3_qcom_sm8350_overlay }, + { .compatible = "qcom,sm8350-hdk", .data = &dwc3_qcom_sm8350_qcom_sm8350_hdk_overlay }, + { .compatible = "qcom,sm8450", .data = &dwc3_qcom_sm8450_overlay }, + { .compatible = "qcom,sm8550", .data = &dwc3_qcom_sm8550_overlay }, + { .compatible = "qcom,sm8650", .data = &dwc3_qcom_sm8650_overlay }, + { .compatible = "qcom,x1e80100", .data = &dwc3_qcom_x1e80100_overlay }, + { .compatible = "samsung,starqltechn", .data = &dwc3_qcom_sdm845_samsung_starqltechn_overlay }, + { .compatible = "samsung,w737", .data = &dwc3_qcom_sdm845_samsung_w737_overlay }, + { .compatible = "shift,axolotl", .data = &dwc3_qcom_sdm845_shift_axolotl_overlay }, + { .compatible = "sony,dora-row", .data = &dwc3_qcom_msm8996_sony_dora_row_overlay }, + { .compatible = "sony,kagura-row", .data = &dwc3_qcom_msm8996_sony_kagura_row_overlay }, + { .compatible = "sony,keyaki-row", .data = &dwc3_qcom_msm8996_sony_keyaki_row_overlay }, + { .compatible = "sony,xperia-lilac", .data = &dwc3_qcom_msm8998_sony_xperia_lilac_overlay }, + { .compatible = "sony,xperia-maple", .data = &dwc3_qcom_msm8998_sony_xperia_maple_overlay }, + { .compatible = "sony,xperia-poplar", .data = &dwc3_qcom_msm8998_sony_xperia_poplar_overlay }, + { .compatible = "thundercomm,db845c", .data = &dwc3_qcom_sdm845_thundercomm_db845c_overlay }, + { .compatible = "xiaomi,beryllium", .data = &dwc3_qcom_sdm845_xiaomi_beryllium_overlay }, + { .compatible = "xiaomi,beryllium-ebbg", .data = &dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_overlay }, + { .compatible = "xiaomi,elish", .data = &dwc3_qcom_sm8250_xiaomi_elish_overlay }, + { .compatible = "xiaomi,gemini", .data = &dwc3_qcom_msm8996_xiaomi_gemini_overlay }, + { .compatible = "xiaomi,natrium", .data = &dwc3_qcom_msm8996_xiaomi_natrium_overlay }, + { .compatible = "xiaomi,sagit", .data = &dwc3_qcom_msm8998_xiaomi_sagit_overlay }, + { .compatible = "xiaomi,scorpio", .data = &dwc3_qcom_msm8996_xiaomi_scorpio_overlay }, {} }; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h index 57d7dbc94980..bc897db4dd1e 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h @@ -4,17 +4,185 @@ #include +extern u8 __dtb_dwc3_qcom_apq8094_begin[]; +extern u8 __dtb_dwc3_qcom_apq8094_end[]; +extern u8 __dtb_dwc3_qcom_apq8096_begin[]; +extern u8 __dtb_dwc3_qcom_apq8096_end[]; +extern u8 __dtb_dwc3_qcom_apq8096_inforce_ifc6640_begin[]; +extern u8 __dtb_dwc3_qcom_apq8096_inforce_ifc6640_end[]; extern u8 __dtb_dwc3_qcom_ipq4018_begin[]; extern u8 __dtb_dwc3_qcom_ipq4018_end[]; extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin[]; extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end[]; extern u8 __dtb_dwc3_qcom_ipq4019_begin[]; extern u8 __dtb_dwc3_qcom_ipq4019_end[]; +extern u8 __dtb_dwc3_qcom_ipq5018_begin[]; +extern u8 __dtb_dwc3_qcom_ipq5018_end[]; +extern u8 __dtb_dwc3_qcom_ipq5332_begin[]; +extern u8 __dtb_dwc3_qcom_ipq5332_end[]; +extern u8 __dtb_dwc3_qcom_ipq5424_begin[]; +extern u8 __dtb_dwc3_qcom_ipq5424_end[]; +extern u8 __dtb_dwc3_qcom_ipq6018_begin[]; +extern u8 __dtb_dwc3_qcom_ipq6018_end[]; extern u8 __dtb_dwc3_qcom_ipq8064_begin[]; extern u8 __dtb_dwc3_qcom_ipq8064_end[]; +extern u8 __dtb_dwc3_qcom_ipq8074_begin[]; +extern u8 __dtb_dwc3_qcom_ipq8074_end[]; +extern u8 __dtb_dwc3_qcom_ipq9574_begin[]; +extern u8 __dtb_dwc3_qcom_ipq9574_end[]; +extern u8 __dtb_dwc3_qcom_msm8953_begin[]; +extern u8 __dtb_dwc3_qcom_msm8953_end[]; +extern u8 __dtb_dwc3_qcom_msm8992_begin[]; +extern u8 __dtb_dwc3_qcom_msm8992_end[]; +extern u8 __dtb_dwc3_qcom_msm8994_begin[]; +extern u8 __dtb_dwc3_qcom_msm8994_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_dora_row_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_dora_row_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_kagura_row_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_kagura_row_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_keyaki_row_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_sony_keyaki_row_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_gemini_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_gemini_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_natrium_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_natrium_end[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_begin[]; +extern u8 __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_fxtec_pro1_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_fxtec_pro1_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_oneplus_dumpling_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_oneplus_dumpling_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_maple_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_maple_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_end[]; +extern u8 __dtb_dwc3_qcom_msm8998_xiaomi_sagit_begin[]; +extern u8 __dtb_dwc3_qcom_msm8998_xiaomi_sagit_end[]; +extern u8 __dtb_dwc3_qcom_qcm2290_begin[]; +extern u8 __dtb_dwc3_qcom_qcm2290_end[]; +extern u8 __dtb_dwc3_qcom_qcm6490_begin[]; +extern u8 __dtb_dwc3_qcom_qcm6490_end[]; +extern u8 __dtb_dwc3_qcom_qcs404_begin[]; +extern u8 __dtb_dwc3_qcom_qcs404_end[]; +extern u8 __dtb_dwc3_qcom_qcs615_begin[]; +extern u8 __dtb_dwc3_qcom_qcs615_end[]; +extern u8 __dtb_dwc3_qcom_qcs8300_begin[]; +extern u8 __dtb_dwc3_qcom_qcs8300_end[]; +extern u8 __dtb_dwc3_qcom_qdu1000_begin[]; +extern u8 __dtb_dwc3_qcom_qdu1000_end[]; +extern u8 __dtb_dwc3_qcom_qru1000_begin[]; +extern u8 __dtb_dwc3_qcom_qru1000_end[]; +extern u8 __dtb_dwc3_qcom_sa8155p_begin[]; +extern u8 __dtb_dwc3_qcom_sa8155p_end[]; +extern u8 __dtb_dwc3_qcom_sa8540p_begin[]; +extern u8 __dtb_dwc3_qcom_sa8540p_end[]; +extern u8 __dtb_dwc3_qcom_sa8775p_begin[]; +extern u8 __dtb_dwc3_qcom_sa8775p_end[]; +extern u8 __dtb_dwc3_qcom_sar2130p_begin[]; +extern u8 __dtb_dwc3_qcom_sar2130p_end[]; +extern u8 __dtb_dwc3_qcom_sc7180_begin[]; +extern u8 __dtb_dwc3_qcom_sc7180_end[]; +extern u8 __dtb_dwc3_qcom_sc7280_begin[]; +extern u8 __dtb_dwc3_qcom_sc7280_end[]; +extern u8 __dtb_dwc3_qcom_sc8180x_begin[]; +extern u8 __dtb_dwc3_qcom_sc8180x_end[]; +extern u8 __dtb_dwc3_qcom_sc8280xp_begin[]; +extern u8 __dtb_dwc3_qcom_sc8280xp_end[]; +extern u8 __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_begin[]; +extern u8 __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_end[]; +extern u8 __dtb_dwc3_qcom_sda660_begin[]; +extern u8 __dtb_dwc3_qcom_sda660_end[]; +extern u8 __dtb_dwc3_qcom_sdm450_begin[]; +extern u8 __dtb_dwc3_qcom_sdm450_end[]; +extern u8 __dtb_dwc3_qcom_sdm630_begin[]; +extern u8 __dtb_dwc3_qcom_sdm630_end[]; +extern u8 __dtb_dwc3_qcom_sdm632_begin[]; +extern u8 __dtb_dwc3_qcom_sdm632_end[]; +extern u8 __dtb_dwc3_qcom_sdm636_begin[]; +extern u8 __dtb_dwc3_qcom_sdm636_end[]; +extern u8 __dtb_dwc3_qcom_sdm660_begin[]; +extern u8 __dtb_dwc3_qcom_sdm660_end[]; +extern u8 __dtb_dwc3_qcom_sdm670_begin[]; +extern u8 __dtb_dwc3_qcom_sdm670_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_lg_judyln_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_lg_judyln_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_lg_judyp_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_lg_judyp_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_samsung_starqltechn_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_samsung_starqltechn_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_samsung_w737_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_samsung_w737_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_shift_axolotl_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_shift_axolotl_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_thundercomm_db845c_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_thundercomm_db845c_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_end[]; +extern u8 __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_begin[]; +extern u8 __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_end[]; extern u8 __dtb_dwc3_qcom_sdx55_begin[]; extern u8 __dtb_dwc3_qcom_sdx55_end[]; extern u8 __dtb_dwc3_qcom_sdx65_begin[]; extern u8 __dtb_dwc3_qcom_sdx65_end[]; +extern u8 __dtb_dwc3_qcom_sdx75_begin[]; +extern u8 __dtb_dwc3_qcom_sdx75_end[]; +extern u8 __dtb_dwc3_qcom_sm4250_begin[]; +extern u8 __dtb_dwc3_qcom_sm4250_end[]; +extern u8 __dtb_dwc3_qcom_sm4250_oneplus_billie2_begin[]; +extern u8 __dtb_dwc3_qcom_sm4250_oneplus_billie2_end[]; +extern u8 __dtb_dwc3_qcom_sm6115_begin[]; +extern u8 __dtb_dwc3_qcom_sm6115_end[]; +extern u8 __dtb_dwc3_qcom_sm6115_lenovo_j606f_begin[]; +extern u8 __dtb_dwc3_qcom_sm6115_lenovo_j606f_end[]; +extern u8 __dtb_dwc3_qcom_sm6125_begin[]; +extern u8 __dtb_dwc3_qcom_sm6125_end[]; +extern u8 __dtb_dwc3_qcom_sm6350_begin[]; +extern u8 __dtb_dwc3_qcom_sm6350_end[]; +extern u8 __dtb_dwc3_qcom_sm6375_begin[]; +extern u8 __dtb_dwc3_qcom_sm6375_end[]; +extern u8 __dtb_dwc3_qcom_sm7125_begin[]; +extern u8 __dtb_dwc3_qcom_sm7125_end[]; +extern u8 __dtb_dwc3_qcom_sm7225_begin[]; +extern u8 __dtb_dwc3_qcom_sm7225_end[]; +extern u8 __dtb_dwc3_qcom_sm7325_begin[]; +extern u8 __dtb_dwc3_qcom_sm7325_end[]; +extern u8 __dtb_dwc3_qcom_sm8150_begin[]; +extern u8 __dtb_dwc3_qcom_sm8150_end[]; +extern u8 __dtb_dwc3_qcom_sm8250_begin[]; +extern u8 __dtb_dwc3_qcom_sm8250_end[]; +extern u8 __dtb_dwc3_qcom_sm8250_xiaomi_elish_begin[]; +extern u8 __dtb_dwc3_qcom_sm8250_xiaomi_elish_end[]; +extern u8 __dtb_dwc3_qcom_sm8350_begin[]; +extern u8 __dtb_dwc3_qcom_sm8350_end[]; +extern u8 __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_begin[]; +extern u8 __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_end[]; +extern u8 __dtb_dwc3_qcom_sm8450_begin[]; +extern u8 __dtb_dwc3_qcom_sm8450_end[]; +extern u8 __dtb_dwc3_qcom_sm8550_begin[]; +extern u8 __dtb_dwc3_qcom_sm8550_end[]; +extern u8 __dtb_dwc3_qcom_sm8650_begin[]; +extern u8 __dtb_dwc3_qcom_sm8650_end[]; +extern u8 __dtb_dwc3_qcom_x1e80100_begin[]; +extern u8 __dtb_dwc3_qcom_x1e80100_end[]; +extern u8 __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_begin[]; +extern u8 __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_end[]; #endif diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8094.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8094.dts new file mode 100644 index 000000000000..8ca699460ec3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8094.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@f92f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8994-dwc3", "qcom,snps-dwc3"; + reg = <0xf9200000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096.dts new file mode 100644 index 000000000000..f05d6c905e85 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096.dts @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&usb2_id>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + extcon = <&usb3_id>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096_inforce_ifc6640.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096_inforce_ifc6640.dts new file mode 100644 index 000000000000..1b9ae360f1ce --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_apq8096_inforce_ifc6640.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5018.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5018.dts new file mode 100644 index 000000000000..44266816a50b --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5018.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq5018-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xe400>; + interrupts = , + ; + interrupt-names = "dwc_usb3", + "hs_phy_irq"; + phys = <&usbphy0>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5332.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5332.dts new file mode 100644 index 000000000000..6e6699e4f859 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5332.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq5332-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xe400>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + phys = <&usbphy0>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5424.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5424.dts new file mode 100644 index 000000000000..e14dc85d8b39 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq5424.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb2@1e00000"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,ipq5424-dwc3", "qcom,snps-dwc3"; + reg = <0 0x01e00000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>, + <&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 = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "dm_hs_phy_irq", + "dp_hs_phy_irq"; + phys = <&qusb_phy_1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb3@8a00000"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,ipq5424-dwc3", "qcom,snps-dwc3"; + reg = <0 0x08a00000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>, + <&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 = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "dm_hs_phy_irq", + "dp_hs_phy_irq"; + phys = <&qusb_phy_0>, + <&ssphy_0>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq6018.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq6018.dts new file mode 100644 index 000000000000..14e7fa720831 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq6018.dts @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@70f8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq6018-dwc3", "qcom,snps-dwc3"; + reg = <0 0x07000000 0 0xd100>; + interrupts = , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy"; + phys = <&qusb_phy_1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@8af8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq6018-dwc3", "qcom,snps-dwc3"; + reg = <0 0x08a00000 0 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb_phy_0>, + <&ssphy_0>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8074.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8074.dts new file mode 100644 index 000000000000..169da32fcd24 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8074.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq8074-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb_phy_0>, + <&ssphy_0>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@8cf8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,ipq8074-dwc3", "qcom,snps-dwc3"; + reg = <0x08c00000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb_phy_1>, + <&ssphy_1>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq9574.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq9574.dts new file mode 100644 index 000000000000..ba644dde4845 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq9574.dts @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8af8800"; + #address-cells = <1>; + #size-cells = <1>; + + __overlay__ { + compatible = "qcom,ipq9574-dwc3", "qcom,snps-dwc3"; + reg = <0x08a00000 0xd100>; + interrupts-extended = <&intc GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event"; + phys = <&usb_0_qusbphy>, + <&usb_0_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8953.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8953.dts new file mode 100644 index 000000000000..2c2d8e00ab78 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8953.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@70f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8953-dwc3", "qcom,snps-dwc3"; + reg = <0x07000000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&hsusb_phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8992.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8992.dts new file mode 100644 index 000000000000..8ca699460ec3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8992.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@f92f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8994-dwc3", "qcom,snps-dwc3"; + reg = <0xf9200000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8994.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8994.dts new file mode 100644 index 000000000000..8ca699460ec3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8994.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@f92f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8994-dwc3", "qcom,snps-dwc3"; + reg = <0xf9200000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996.dts new file mode 100644 index 000000000000..1b9ae360f1ce --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3.dts new file mode 100644 index 000000000000..7a583de320cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3t.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3t.dts new file mode 100644 index 000000000000..7a583de320cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_oneplus_oneplus3t.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_dora_row.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_dora_row.dts new file mode 100644 index 000000000000..da6e357b0cbc --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_dora_row.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + extcon = <&usb3_id>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_kagura_row.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_kagura_row.dts new file mode 100644 index 000000000000..da6e357b0cbc --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_kagura_row.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + extcon = <&usb3_id>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_keyaki_row.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_keyaki_row.dts new file mode 100644 index 000000000000..da6e357b0cbc --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_sony_keyaki_row.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + extcon = <&usb3_id>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_gemini.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_gemini.dts new file mode 100644 index 000000000000..7a583de320cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_gemini.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_natrium.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_natrium.dts new file mode 100644 index 000000000000..7a583de320cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_natrium.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_scorpio.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_scorpio.dts new file mode 100644 index 000000000000..7a583de320cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8996_xiaomi_scorpio.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@6af8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x06a00000 0xd000>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@76f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8996-dwc3", "qcom,snps-dwc3"; + reg = <0x07600000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&hsusb_phy2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998.dts new file mode 100644 index 000000000000..75824abf794b --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998.dts @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_fxtec_pro1.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_fxtec_pro1.dts new file mode 100644 index 000000000000..4f3aded0142d --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_fxtec_pro1.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_cheeseburger.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_cheeseburger.dts new file mode 100644 index 000000000000..3b331d0e5283 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_cheeseburger.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_dumpling.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_dumpling.dts new file mode 100644 index 000000000000..3b331d0e5283 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_oneplus_dumpling.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_lilac.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_lilac.dts new file mode 100644 index 000000000000..4f3aded0142d --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_lilac.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_maple.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_maple.dts new file mode 100644 index 000000000000..4f3aded0142d --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_maple.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_poplar.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_poplar.dts new file mode 100644 index 000000000000..4f3aded0142d --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_sony_xperia_poplar.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>, + <&usb3phy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_xiaomi_sagit.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_xiaomi_sagit.dts new file mode 100644 index 000000000000..3b331d0e5283 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_msm8998_xiaomi_sagit.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8998-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&qusb2phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm2290.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm2290.dts new file mode 100644 index 000000000000..4a43b3f1a51e --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm2290.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qcm2290-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 12 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x120 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm6490.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm6490.dts new file mode 100644 index 000000000000..c9c921d55e3f --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcm6490.dts @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8cf8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x08c00000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0xa0 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xe0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs404.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs404.dts new file mode 100644 index 000000000000..794bac913137 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs404.dts @@ -0,0 +1,56 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@7678800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,qcs404-dwc3", "qcom,snps-dwc3"; + reg = <0x07580000 0xd100>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "qusb2_phy"; + phys = <&usb2_phy_prim>, + <&usb3_phy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@79b8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,qcs404-dwc3", "qcom,snps-dwc3"; + reg = <0x078c0000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "qusb2_phy"; + phys = <&usb2_phy_sec>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs615.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs615.dts new file mode 100644 index 000000000000..52f94ce9c327 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs615.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qcs615-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x140 0x0>; + phys = <&usb_1_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qcs615-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 664 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 663 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 662 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0xe0 0x0>; + phys = <&usb_hsphy_2>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs8300.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs8300.dts new file mode 100644 index 000000000000..fa843e3ca9ff --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qcs8300.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qcs8300-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 12 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x80 0x0>; + phys = <&usb_1_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qcs8300-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qdu1000.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qdu1000.dts new file mode 100644 index 000000000000..8d245859fae1 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qdu1000.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qdu1000-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xc0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qru1000.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qru1000.dts new file mode 100644 index 000000000000..8d245859fae1 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_qru1000.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,qdu1000-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xc0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8155p.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8155p.dts new file mode 100644 index 000000000000..408d42c1649c --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8155p.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8150-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x140 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + pinctrl-names = "default"; + pinctrl-0 = <&usb2phy_ac_en1_default>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8150-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x160 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + pinctrl-names = "default"; + pinctrl-0 = <&usb2phy_ac_en2_default>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8540p.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8540p.dts new file mode 100644 index 000000000000..553e8ddb91ce --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8540p.dts @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 857 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 859 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 127 IRQ_TYPE_EDGE_BOTH>, + <&pdc 126 IRQ_TYPE_EDGE_BOTH>, + <&pdc 129 IRQ_TYPE_EDGE_BOTH>, + <&pdc 128 IRQ_TYPE_EDGE_BOTH>, + <&pdc 131 IRQ_TYPE_EDGE_BOTH>, + <&pdc 130 IRQ_TYPE_EDGE_BOTH>, + <&pdc 133 IRQ_TYPE_EDGE_BOTH>, + <&pdc 132 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "pwr_event_3", + "pwr_event_4", + "hs_phy_1", + "hs_phy_2", + "hs_phy_3", + "hs_phy_4", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "dp_hs_phy_3", + "dm_hs_phy_3", + "dp_hs_phy_4", + "dm_hs_phy_4", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x800 0x0>; + phys = <&usb_2_hsphy0>, + <&usb_2_qmpphy0>, + <&usb_2_hsphy1>, + <&usb_2_qmpphy1>, + <&usb_2_hsphy2>, + <&usb_2_hsphy3>; + phy-names = "usb2-0", + "usb3-0", + "usb2-1", + "usb3-1", + "usb2-2", + "usb2-3"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 138 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x820 0x0>; + phys = <&usb_0_hsphy>, + <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 790 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 136 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x860 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8775p.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8775p.dts new file mode 100644 index 000000000000..4f218dbbef8b --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sa8775p.dts @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sa8775p-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 292 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 12 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x80 0x0>; + phys = <&usb_0_hsphy>, + <&usb_0_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sa8775p-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 7 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xa0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sa8775p-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 442 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 443 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sar2130p.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sar2130p.dts new file mode 100644 index 000000000000..582bcf1b13da --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sar2130p.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sar2130p-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_1_hsphy>, + <&usb_dp_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7180.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7180.dts new file mode 100644 index 000000000000..cd4caa173891 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7180.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7180-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x540 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7280.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7280.dts new file mode 100644 index 000000000000..c9c921d55e3f --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc7280.dts @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8cf8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x08c00000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0xa0 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xe0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8180x.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8180x.dts new file mode 100644 index 000000000000..e875fb9a39aa --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8180x.dts @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8180x-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 654 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 656 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 655 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 658 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 657 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 59 IRQ_TYPE_EDGE_BOTH>, + <&pdc 46 IRQ_TYPE_EDGE_BOTH>, + <&pdc 71 IRQ_TYPE_EDGE_BOTH>, + <&pdc 68 IRQ_TYPE_EDGE_BOTH>, + <&pdc 7 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 30 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "hs_phy_1", + "hs_phy_2", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x60 0x0>; + phys = <&usb_mp_hsphy0>, + <&usb_mp_qmpphy0>, + <&usb_mp_hsphy1>, + <&usb_mp_qmpphy1>; + phy-names = "usb2-0", + "usb3-0", + "usb2-1", + "usb3-1"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8180x-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x140 0x0>; + phys = <&usb_prim_hsphy>, + <&usb_prim_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8180x-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 40 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x160 0x0>; + phys = <&usb_sec_hsphy>, + <&usb_sec_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp.dts new file mode 100644 index 000000000000..553e8ddb91ce --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp.dts @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 857 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 859 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 127 IRQ_TYPE_EDGE_BOTH>, + <&pdc 126 IRQ_TYPE_EDGE_BOTH>, + <&pdc 129 IRQ_TYPE_EDGE_BOTH>, + <&pdc 128 IRQ_TYPE_EDGE_BOTH>, + <&pdc 131 IRQ_TYPE_EDGE_BOTH>, + <&pdc 130 IRQ_TYPE_EDGE_BOTH>, + <&pdc 133 IRQ_TYPE_EDGE_BOTH>, + <&pdc 132 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "pwr_event_3", + "pwr_event_4", + "hs_phy_1", + "hs_phy_2", + "hs_phy_3", + "hs_phy_4", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "dp_hs_phy_3", + "dm_hs_phy_3", + "dp_hs_phy_4", + "dm_hs_phy_4", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x800 0x0>; + phys = <&usb_2_hsphy0>, + <&usb_2_qmpphy0>, + <&usb_2_hsphy1>, + <&usb_2_qmpphy1>, + <&usb_2_hsphy2>, + <&usb_2_hsphy3>; + phy-names = "usb2-0", + "usb3-0", + "usb2-1", + "usb3-1", + "usb2-2", + "usb2-3"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 138 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x820 0x0>; + phys = <&usb_0_hsphy>, + <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 790 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 136 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x860 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp_microsoft_blackrock.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp_microsoft_blackrock.dts new file mode 100644 index 000000000000..ce33abdccccf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sc8280xp_microsoft_blackrock.dts @@ -0,0 +1,121 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 857 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 860 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 859 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 127 IRQ_TYPE_EDGE_BOTH>, + <&pdc 126 IRQ_TYPE_EDGE_BOTH>, + <&pdc 129 IRQ_TYPE_EDGE_BOTH>, + <&pdc 128 IRQ_TYPE_EDGE_BOTH>, + <&pdc 131 IRQ_TYPE_EDGE_BOTH>, + <&pdc 130 IRQ_TYPE_EDGE_BOTH>, + <&pdc 133 IRQ_TYPE_EDGE_BOTH>, + <&pdc 132 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "pwr_event_3", + "pwr_event_4", + "hs_phy_1", + "hs_phy_2", + "hs_phy_3", + "hs_phy_4", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "dp_hs_phy_3", + "dm_hs_phy_3", + "dp_hs_phy_4", + "dm_hs_phy_4", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x800 0x0>; + phys = <&usb_2_hsphy0>, + <&usb_2_qmpphy0>; + phy-names = "usb2-0", + "usb3-0"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 138 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x820 0x0>; + phys = <&usb_0_hsphy>, + <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 790 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 136 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x860 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sda660.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sda660.dts new file mode 100644 index 000000000000..9628fea2adff --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sda660.dts @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xccd0>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&qusb2phy0>, + <&usb3_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@c2f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0c200000 0xccd0>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&qusb2phy1>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm450.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm450.dts new file mode 100644 index 000000000000..3970f8e38e0f --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm450.dts @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@70f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8953-dwc3", "qcom,snps-dwc3"; + reg = <0x07000000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&hsusb_phy>; + phy-names = "usb2-phy"; + }; + }; + +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm630.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm630.dts new file mode 100644 index 000000000000..eaa7ed8f8062 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm630.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xccd0>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&qusb2phy0>; + phy-names = "usb2-phy"; + extcon = <&extcon_usb>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@c2f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0c200000 0xccd0>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&qusb2phy1>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm632.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm632.dts new file mode 100644 index 000000000000..2c2d8e00ab78 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm632.dts @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@70f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,msm8953-dwc3", "qcom,snps-dwc3"; + reg = <0x07000000 0xd000>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "ss_phy_irq"; + phys = <&hsusb_phy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm636.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm636.dts new file mode 100644 index 000000000000..9628fea2adff --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm636.dts @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xccd0>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&qusb2phy0>, + <&usb3_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + extcon = <&extcon_usb>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@c2f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0c200000 0xccd0>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&qusb2phy1>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm660.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm660.dts new file mode 100644 index 000000000000..eaa7ed8f8062 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm660.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0a800000 0xccd0>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + phys = <&qusb2phy0>; + phy-names = "usb2-phy"; + extcon = <&extcon_usb>; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@c2f8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sdm660-dwc3", "qcom,snps-dwc3"; + reg = <0x0c200000 0xccd0>; + interrupts = , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq"; + phys = <&qusb2phy1>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm670.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm670.dts new file mode 100644 index 000000000000..baf418df6b54 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm670.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm670-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845.dts new file mode 100644 index 000000000000..292ea571e040 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845.dts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lenovo_yoga_c630.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lenovo_yoga_c630.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lenovo_yoga_c630.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyln.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyln.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyln.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyp.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyp.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_lg_judyp.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_qcom_sdm845_mtp.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_qcom_sdm845_mtp.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_qcom_sdm845_mtp.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_starqltechn.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_starqltechn.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_starqltechn.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_w737.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_w737.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_samsung_w737.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_shift_axolotl.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_shift_axolotl.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_shift_axolotl.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_thundercomm_db845c.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_thundercomm_db845c.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_thundercomm_db845c.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium_ebbg.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium_ebbg.dts new file mode 100644 index 000000000000..4226f03daba5 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdm845_xiaomi_beryllium_ebbg.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x740 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdm845-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc_intc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc_intc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x760 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx75.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx75.dts new file mode 100644 index 000000000000..b1ce092b3231 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx75.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sdx75-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_RISING>, + <&pdc 10 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "dwc_usb3", + "hs_phy_irq", + "ss_phy_irq", + "dm_hs_phy_irq", + "dp_hs_phy_irq"; + iommus = <&apps_smmu 0x80 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250.dts new file mode 100644 index 000000000000..a05c49f22fd3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sm6115-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x120 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250_oneplus_billie2.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250_oneplus_billie2.dts new file mode 100644 index 000000000000..f250d65b780a --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm4250_oneplus_billie2.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sm6115-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x120 0x0>; + phys = <&usb_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115.dts new file mode 100644 index 000000000000..a05c49f22fd3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115.dts @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sm6115-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x120 0x0>; + phys = <&usb_hsphy>, + <&usb_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115_lenovo_j606f.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115_lenovo_j606f.dts new file mode 100644 index 000000000000..f250d65b780a --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6115_lenovo_j606f.dts @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sm6115-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x120 0x0>; + phys = <&usb_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6125.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6125.dts new file mode 100644 index 000000000000..a01921cc6c13 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6125.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + __overlay__ { + compatible = "qcom,sm6125-dwc3", "qcom,snps-dwc3"; + reg = <0x04e00000 0xd100>; + interrupts = , + , + , + , + ; + interrupt-names = "dwc_usb3", + "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x100 0x0>; + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + extcon = <&extcon_usb>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6350.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6350.dts new file mode 100644 index 000000000000..b5063b99fe64 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6350.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm6350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x540 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6375.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6375.dts new file mode 100644 index 000000000000..a6d83c3d913b --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm6375.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@4ef8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm6375-dwc3", "qcom,snps-dwc3"; + reg = <0 0x04e00000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>, + <&mpm 94 IRQ_TYPE_EDGE_BOTH>, + <&mpm 93 IRQ_TYPE_EDGE_BOTH>, + <&mpm 12 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xe0 0x0>; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7125.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7125.dts new file mode 100644 index 000000000000..cd4caa173891 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7125.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7180-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x540 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7225.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7225.dts new file mode 100644 index 000000000000..b5063b99fe64 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7225.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm6350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x540 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7325.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7325.dts new file mode 100644 index 000000000000..04a9ba7a63d6 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm7325.dts @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@8cf8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x08c00000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0xa0 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sc7280-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xe400>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0xe0 0x0>; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8150.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8150.dts new file mode 100644 index 000000000000..7ce8433b3f85 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8150.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8150-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 6 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x140 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8150-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 7 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x160 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250.dts new file mode 100644 index 000000000000..874569a52924 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8250-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8250-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250_xiaomi_elish.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250_xiaomi_elish.dts new file mode 100644 index 000000000000..52fe5eb3f40e --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8250_xiaomi_elish.dts @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8250-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8250-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350.dts new file mode 100644 index 000000000000..f25c7d330eb2 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_microsoft_surface_duo2.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_microsoft_surface_duo2.dts new file mode 100644 index 000000000000..f25c7d330eb2 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_microsoft_surface_duo2.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_hdk.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_hdk.dts new file mode 100644 index 000000000000..a68a5bb194b3 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_hdk.dts @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + pinctrl-names = "default"; + pinctrl-0 = <&usb_hub_enabled_state>; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_mtp.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_mtp.dts new file mode 100644 index 000000000000..f25c7d330eb2 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_qcom_sm8350_mtp.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx214_generic.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx214_generic.dts new file mode 100644 index 000000000000..f25c7d330eb2 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx214_generic.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx215_generic.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx215_generic.dts new file mode 100644 index 000000000000..f25c7d330eb2 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8350_sony_pdx215_generic.dts @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8350-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>, + <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x20 0x0>; + phys = <&usb_2_hsphy>, + <&usb_2_qmpphy>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8450.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8450.dts new file mode 100644 index 000000000000..c3454cc229cf --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8450.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8450-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x0 0x0>; + phys = <&usb_1_hsphy>, + <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8550.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8550.dts new file mode 100644 index 000000000000..3d94046e75ae --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8550.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8550-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x40 0x0>; + phys = <&usb_1_hsphy>, + <&usb_dp_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8650.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8650.dts new file mode 100644 index 000000000000..dd0f6a727d5c --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sm8650.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,sm8650-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 14 IRQ_TYPE_EDGE_RISING>, + <&pdc 15 IRQ_TYPE_EDGE_RISING>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "hs_phy_irq", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x40 0x0>; + phys = <&usb_1_hsphy>, + <&usb_dp_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100.dts new file mode 100644 index 000000000000..231c9b3c0357 --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100.dts @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a0f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a000000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 58 IRQ_TYPE_EDGE_BOTH>, + <&pdc 57 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x14a0 0x0>; + phys = <&usb_1_ss2_hsphy>, + <&usb_1_ss2_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a2f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a200000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 50 IRQ_TYPE_EDGE_BOTH>, + <&pdc 49 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0x14e0 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 52 IRQ_TYPE_EDGE_BOTH>, + <&pdc 51 IRQ_TYPE_EDGE_BOTH>, + <&pdc 54 IRQ_TYPE_EDGE_BOTH>, + <&pdc 53 IRQ_TYPE_EDGE_BOTH>, + <&pdc 55 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 56 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "hs_phy_1", + "hs_phy_2", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x1400 0x0>; + phys = <&usb_mp_hsphy0>, + <&usb_mp_qmpphy0>, + <&usb_mp_hsphy1>, + <&usb_mp_qmpphy1>; + phy-names = "usb2-0", + "usb3-0", + "usb2-1", + "usb3-1"; + }; + }; + + fragment@3 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 61 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1420 0x0>; + phys = <&usb_1_ss0_hsphy>, + <&usb_1_ss0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@4 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 60 IRQ_TYPE_EDGE_BOTH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 47 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1460 0x0>; + phys = <&usb_1_ss1_hsphy>, + <&usb_1_ss1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100_hp_omnibook_x14.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100_hp_omnibook_x14.dts new file mode 100644 index 000000000000..29e9a870c20c --- /dev/null +++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_x1e80100_hp_omnibook_x14.dts @@ -0,0 +1,149 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ +/dts-v1/; +/plugin/; + +#include +#include + +/ { + fragment@0 { + target-path = "/soc@0/usb@a0f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a000000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 58 IRQ_TYPE_EDGE_BOTH>, + <&pdc 57 IRQ_TYPE_EDGE_BOTH>, + <&pdc 10 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x14a0 0x0>; + phys = <&usb_1_ss2_hsphy>, + <&usb_1_ss2_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@1 { + target-path = "/soc@0/usb@a2f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a200000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 50 IRQ_TYPE_EDGE_BOTH>, + <&pdc 49 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq"; + iommus = <&apps_smmu 0x14e0 0x0>; + phys = <&usb_2_hsphy>; + phy-names = "usb2-phy"; + }; + }; + + fragment@2 { + target-path = "/soc@0/usb@a4f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 52 IRQ_TYPE_EDGE_BOTH>, + <&pdc 51 IRQ_TYPE_EDGE_BOTH>, + <&pdc 54 IRQ_TYPE_EDGE_BOTH>, + <&pdc 53 IRQ_TYPE_EDGE_BOTH>, + <&pdc 55 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 56 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event_1", + "pwr_event_2", + "hs_phy_1", + "hs_phy_2", + "dp_hs_phy_1", + "dm_hs_phy_1", + "dp_hs_phy_2", + "dm_hs_phy_2", + "ss_phy_1", + "ss_phy_2"; + iommus = <&apps_smmu 0x1400 0x0>; + phys = <&usb_mp_hsphy0>, + <&usb_mp_qmpphy0>; + phy-names = "usb2-0", + "usb3-0"; + }; + }; + + fragment@3 { + target-path = "/soc@0/usb@a6f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 61 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1420 0x0>; + phys = <&usb_1_ss0_hsphy>, + <&usb_1_ss0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; + + fragment@4 { + target-path = "/soc@0/usb@a8f8800"; + #address-cells = <2>; + #size-cells = <2>; + + __overlay__ { + compatible = "qcom,x1e80100-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0xd100>; + interrupts-extended = <&intc GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>, + <&pdc 60 IRQ_TYPE_EDGE_BOTH>, + <&pdc 11 IRQ_TYPE_EDGE_BOTH>, + <&pdc 47 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "dwc_usb3", + "pwr_event", + "dp_hs_phy_irq", + "dm_hs_phy_irq", + "ss_phy_irq"; + iommus = <&apps_smmu 0x1460 0x0>; + phys = <&usb_1_ss1_hsphy>, + <&usb_1_ss1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", + "usb3-phy"; + }; + }; +}; From patchwork Tue Jan 14 05:11:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938427 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 B665723A113 for ; Tue, 14 Jan 2025 05:06:29 +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=1736831192; cv=none; b=VXaZpLu8m5Fo3vKNqczL/K3o98btd8HpxwSztLMSNeO+xUKbyHhs+nIo3/2ayWtsgeOEMekM1lfOhK2+1DudLoCi2zS+NvjQUIPa9gdBIR9u8WlsaVep5llMZ3k2fVqWu5RW/7LeME4AXjqUpgEd+FiufurgwcHSM9men6mo+q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831192; c=relaxed/simple; bh=AuHP26w4yhegi2R/4yfc7MsQcEPJbsVzNrNbEdoBi6U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AKB3zUet9KyUjt4iiI3RpQMCjx1R/xkohBZQNKEbwpzN4ToI6fDqAR835v/ye5592Yf4n9cyf/Q9KXcwdlQ64R27/hiXnEWjiN1nqbg4MEHr8Gb8nqkeleV09d3wzAl0gpnoI/z7DxZJF9+lZzrYK74ZeJcZn63+zCTfWRvs64s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GVHzyz+2; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GVHzyz+2" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50DKsKjb026110 for ; Tue, 14 Jan 2025 05:06:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LHxNYTywNZiQtqTOnpGKq9gUGs6jmn3b0BzTWYuTxxw=; b=GVHzyz+2z9W7HMt/ E9gJK+9MFfeliRzz0ELFluMvsec4/HR+E1Z34vawgTPrysuzsZWwsC+cUgthK45k OtW/+MoSSfZAE+XBbnbHJ/MngNQTU9MMh5lt0SKNBvM0ZZBpNVWNpzjdi9Fd9G0M LTJYP2+FGJO9VKcUAtjloJTo9485dM4NjiYEypZ4Fn3SuUIYvD0U+gzO1TYllhs6 /i4IP39aYfLRGBD8evR2gU/dWPJhYzt7w6H7c+ZZtQwGx9wVjFQyk+aGzngVj2gA y4h+dVe/a62Y8SBr5H9rcj7Oe0lnuDEFUvLOssXVUfCgjjkYCwFIt4j5M9MlODTM AugcYA== Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445a928v8b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:28 +0000 (GMT) Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-721b3237805so3345231a34.3 for ; Mon, 13 Jan 2025 21:06:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831169; x=1737435969; 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=LHxNYTywNZiQtqTOnpGKq9gUGs6jmn3b0BzTWYuTxxw=; b=XJiXdrlMBfgnvQ2lAh6jeFKGobqcPEGv0Yvb+LKY7FmAwaPYTUr9dXox/sStn56kyd JZqDgce5RdqVRjLfBhyMVVA9sg/n+elvldcey+bi/+YEhJJW02V2aDeVdLKiw6K5sCtw p8jg6bKtub1y4TiZwFcFgDm0nOxyD76ZJ3trq/G/Mlw6mT7hgdzWS19krw26kd/5WNqP nKpAjEgbEcAHse/rFrAcNvDY/KCF+D3Pn798kVJRL8vbxj2f+oOQ1oEJSC0WeYt+MGji /NgqHzSlubAC467IzCRbVfr1fdY4woIlO8pa1O6m9jH2plZ/SMbEbCZ8OR0xkPrhgV6b A0Mw== X-Forwarded-Encrypted: i=1; AJvYcCUSKtLmhB+Zz3egAWLJ935TO9XFMR+DPbXXCkEo/e7G+rIZ44S/GHwbgM25azQkRrvTdoAx7Zao8xM=@vger.kernel.org X-Gm-Message-State: AOJu0YwewwvqF8v8+PEQw/+th5QZnpEg82LKbjLCQ8NO2xgqfznf6THE 6MS4FYH87sfK4i0E8DpVG8NO+LJCT/LqfTNTRkuTYJ7wBe7LxjPUN3LtXmr2vYTaWvB+pY2Z7g5 SCihM9F2Ajpd8/xBU+yFvFKUfI7wGK67BKRHra7FSZoxir2bcnn0b1oIjdo0= X-Gm-Gg: ASbGnctfsXX6KoVC4dvM3xXZmo+8SxHreyWQOUhhw+l9CFWNX+Q488OJbW01l3G/wAQ 35zJpLA8VQFJs3mjuJz7PZkeVW1U6MpZTi9D3jXTUmewluY8huGLi4zUfsYflpLdvUshNpoD6zT Eqsjn5iS4I+/jbipYJvVkBzELeEFPeOJafzJPcTcitmgZQyxb/g8UnW6bQKBOPRJE+etnUfSe9u G1n9UYtGpadxvsQAgwnL+RDONCrzBp119SzcbwHPwxve8WCgO1r5AD7qNDfdTw/3/uR3s91Quq5 0oO+W/5HBCeijfnVWz1KcXypkX4LPpjngsviP8QiKQQcAeiuZ6zbAvHZ X-Received: by 2002:a05:6830:611a:b0:71d:f9f1:7f3a with SMTP id 46e09a7af769-721e2ec9d03mr14624013a34.24.1736831168094; Mon, 13 Jan 2025 21:06:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnWR6Z1RNcjpuYCaWtX6P5hvwhxoRNoAimCWjyQ7z1kiDZzsM+Gn4+PXzLkz/ZlOxswztXlg== X-Received: by 2002:a05:6830:611a:b0:71d:f9f1:7f3a with SMTP id 46e09a7af769-721e2ec9d03mr14623666a34.24.1736831152553; Mon, 13 Jan 2025 21:05:52 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:05:51 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:40 -0800 Subject: [PATCH v3 07/12] of: overlays: dwc3-flattening: Provide overlay symbols Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-7-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=48679; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=AuHP26w4yhegi2R/4yfc7MsQcEPJbsVzNrNbEdoBi6U=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVwlbndoIHLJjxdNIoNXPVaSFMiaAg3EXCt N9JnNMuWWKJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcU54hAApv2Ugwcl+MqqFFVFVtEHuCl70k5rAJ//gaW4l+y PksvrHTPhxxSOXoPBtEAkDxaqYZzOWTmdGkTSqkR0Zn1IOj71GZv2KUtORw2gNeuRo+Gcq8+ak7 vS2ybcE/eFeolZ73Ggoi48jgmP/Zi/H0VRyIpfnNs4sDi8e6Yk2EXDHxfsK1PE2SV8z2w+IDssY JIQOFhXkrzWoY2V7ME0cYoBrcSrtErmIkb4b747Nus2qc0iwx++Mg+79d1AlfZ0NeLKk51MnfZ5 pGc2uv0FFetwi8IHsROIFj9DHxBipBD+lJG5QoqMlmNOiDJQGYeiPfas2Lges0k8A/cNfKosOQL xWdFeEbfAxHn+AGCjDhgmO2s6QkxPWPkuTbyoBlu5vl1n/hzQXliXzQBhRMTy6yGf+X+8AZMWV2 FOY9MPi41bh8vVdy3Xv6CJmU0xqlr1DKPytzLFgoDc+RDZtmeXuzysqSpKhYFSu2jluOcv1BNeK ybKbAZN7oLdzC/6LmJr9PzyVWSsSZkJ4v7rzUNprj2Mjgw5QSizZmGMUPEsqa8daqVbeDBzNrsJ jqNvX1KpcuFPNXk91jdLVp10QbXJlF3vfZXRhMWjN55PzYwVsr26VY/15CX6UY4+8JW09etyc6p 0z2to+wXQEBR7cBnNXLHwclT0ji8a3NYX4/RnQHu0MhE= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-GUID: KO6tVDugFCwDLZ9gP3166JkYgLx7hzOK X-Proofpoint-ORIG-GUID: KO6tVDugFCwDLZ9gP3166JkYgLx7hzOK 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 malwarescore=0 suspectscore=0 impostorscore=0 adultscore=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=883 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 The overlays introduced to apply the migration to the flattened Qualcomm DWC3 binding depends on symbols to be applied, but in general the DeviceTree blobs in circulation on people's devices wasn't built with symbols - and hence they can not be applied. Work around this problem by detecting when the live DeviceTree is lacking symbols and inject the necessary symbols for each target, for the duration of the dwc3-flattening overlay application. Signed-off-by: Bjorn Andersson --- .../of/overlays/dwc3-flattening/dwc3-flattening.c | 765 +++++++++++++++++++++ 1 file changed, 765 insertions(+) diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c index d33cdf6661c0..07f90360c04d 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c @@ -19,546 +19,1273 @@ struct dwc3_overlay_data { const void *fdt; const void *end; const char *migrate_match; + struct dwc3_overlay_symbol *symbols; }; static const struct dwc3_overlay_data dwc3_qcom_apq8094_overlay = { .fdt = __dtb_dwc3_qcom_apq8094_begin, .end = __dtb_dwc3_qcom_apq8094_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@f9000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_apq8096_overlay = { .fdt = __dtb_dwc3_qcom_apq8096_begin, .end = __dtb_dwc3_qcom_apq8096_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb2_id", "/usb2-id" }, + { "usb3_id", "/usb3-id" }, + { "usb3phy", "/soc@0/phy@7410000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_apq8096_inforce_ifc6640_overlay = { .fdt = __dtb_dwc3_qcom_apq8096_inforce_ifc6640_begin, .end = __dtb_dwc3_qcom_apq8096_inforce_ifc6640_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb3phy", "/soc@0/phy@7410000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq4018_overlay = { .fdt = __dtb_dwc3_qcom_ipq4018_begin, .end = __dtb_dwc3_qcom_ipq4018_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "usb2_hs_phy", "/soc/usb-phy@a8000" }, + { "usb3_hs_phy", "/soc/usb-phy@a6000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq4018_8dev_jalapeno_overlay = { .fdt = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin, .end = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "usb2_hs_phy", "/soc/usb-phy@a8000" }, + { "usb3_hs_phy", "/soc/usb-phy@a6000" }, + { "usb3_ss_phy", "/soc/usb-phy@9a000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq4019_overlay = { .fdt = __dtb_dwc3_qcom_ipq4019_begin, .end = __dtb_dwc3_qcom_ipq4019_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "usb2_hs_phy", "/soc/usb-phy@a8000" }, + { "usb3_hs_phy", "/soc/usb-phy@a6000" }, + { "usb3_ss_phy", "/soc/usb-phy@9a000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq5018_overlay = { .fdt = __dtb_dwc3_qcom_ipq5018_begin, .end = __dtb_dwc3_qcom_ipq5018_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "usbphy0", "/soc@0/phy@5b000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq5332_overlay = { .fdt = __dtb_dwc3_qcom_ipq5332_begin, .end = __dtb_dwc3_qcom_ipq5332_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "usbphy0", "/soc@0/phy@7b000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq5424_overlay = { .fdt = __dtb_dwc3_qcom_ipq5424_begin, .end = __dtb_dwc3_qcom_ipq5424_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "qusb_phy_0", "/soc@0/phy@7b000" }, + { "qusb_phy_1", "/soc@0/phy@71000" }, + { "ssphy_0", "/soc@0/phy@7d000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq6018_overlay = { .fdt = __dtb_dwc3_qcom_ipq6018_begin, .end = __dtb_dwc3_qcom_ipq6018_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "qusb_phy_0", "/soc@0/qusb@79000" }, + { "qusb_phy_1", "/soc@0/qusb@59000" }, + { "ssphy_0", "/soc@0/ssphy@78000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq8064_overlay = { .fdt = __dtb_dwc3_qcom_ipq8064_begin, .end = __dtb_dwc3_qcom_ipq8064_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hs_phy_0", "/soc/phy@100f8800" }, + { "hs_phy_1", "/soc/phy@110f8800" }, + { "ss_phy_0", "/soc/phy@100f8830" }, + { "ss_phy_1", "/soc/phy@110f8830" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq8074_overlay = { .fdt = __dtb_dwc3_qcom_ipq8074_begin, .end = __dtb_dwc3_qcom_ipq8074_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "qusb_phy_0", "/soc@0/phy@79000" }, + { "qusb_phy_1", "/soc@0/phy@59000" }, + { "ssphy_0", "/soc@0/phy@78000" }, + { "ssphy_1", "/soc@0/phy@58000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_ipq9574_overlay = { .fdt = __dtb_dwc3_qcom_ipq9574_begin, .end = __dtb_dwc3_qcom_ipq9574_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "usb_0_qmpphy", "/soc@0/phy@7d000" }, + { "usb_0_qusbphy", "/soc@0/phy@7b000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8953_overlay = { .fdt = __dtb_dwc3_qcom_msm8953_begin, .end = __dtb_dwc3_qcom_msm8953_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy", "/soc@0/phy@79000" }, + { "intc", "/soc@0/interrupt-controller@b000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8992_overlay = { .fdt = __dtb_dwc3_qcom_msm8992_begin, .end = __dtb_dwc3_qcom_msm8992_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@f9000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8994_overlay = { .fdt = __dtb_dwc3_qcom_msm8994_begin, .end = __dtb_dwc3_qcom_msm8994_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@f9000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_begin, .end = __dtb_dwc3_qcom_msm8996_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb3phy", "/soc@0/phy@7410000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_oneplus_oneplus3_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_begin, .end = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_oneplus_oneplus3t_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_begin, .end = __dtb_dwc3_qcom_msm8996_oneplus_oneplus3t_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_dora_row_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_sony_dora_row_begin, .end = __dtb_dwc3_qcom_msm8996_sony_dora_row_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb3_id", "/usb3-id" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_kagura_row_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_sony_kagura_row_begin, .end = __dtb_dwc3_qcom_msm8996_sony_kagura_row_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb3_id", "/usb3-id" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_sony_keyaki_row_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_sony_keyaki_row_begin, .end = __dtb_dwc3_qcom_msm8996_sony_keyaki_row_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "usb3_id", "/usb3-id" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_gemini_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_gemini_begin, .end = __dtb_dwc3_qcom_msm8996_xiaomi_gemini_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "typec", "/soc@0/i2c@75b7000/typec@47" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_natrium_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_natrium_begin, .end = __dtb_dwc3_qcom_msm8996_xiaomi_natrium_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "typec", "/soc@0/i2c@75b7000/typec@47" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8996_xiaomi_scorpio_overlay = { .fdt = __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_begin, .end = __dtb_dwc3_qcom_msm8996_xiaomi_scorpio_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy1", "/soc@0/phy@7411000" }, + { "hsusb_phy2", "/soc@0/phy@7412000" }, + { "intc", "/soc@0/interrupt-controller@9bc0000" }, + { "typec", "/soc@0/i2c@75b7000/typec@47" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_begin, .end = __dtb_dwc3_qcom_msm8998_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + { "usb3phy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_fxtec_pro1_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_fxtec_pro1_begin, .end = __dtb_dwc3_qcom_msm8998_fxtec_pro1_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + { "usb3phy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_oneplus_cheeseburger_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_begin, .end = __dtb_dwc3_qcom_msm8998_oneplus_cheeseburger_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_oneplus_dumpling_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_oneplus_dumpling_begin, .end = __dtb_dwc3_qcom_msm8998_oneplus_dumpling_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_lilac_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_begin, .end = __dtb_dwc3_qcom_msm8998_sony_xperia_lilac_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + { "usb3phy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_maple_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_maple_begin, .end = __dtb_dwc3_qcom_msm8998_sony_xperia_maple_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + { "usb3phy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_sony_xperia_poplar_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_begin, .end = __dtb_dwc3_qcom_msm8998_sony_xperia_poplar_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + { "usb3phy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_msm8998_xiaomi_sagit_overlay = { .fdt = __dtb_dwc3_qcom_msm8998_xiaomi_sagit_begin, .end = __dtb_dwc3_qcom_msm8998_xiaomi_sagit_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy", "/soc@0/phy@c012000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qcm2290_overlay = { .fdt = __dtb_dwc3_qcom_qcm2290_begin, .end = __dtb_dwc3_qcom_qcm2290_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "mpm", "/remoteproc/interrupt-controller" }, + { "usb_hsphy", "/soc@0/phy@1613000" }, + { "usb_qmpphy", "/soc@0/phy@1615000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qcm6490_overlay = { .fdt = __dtb_dwc3_qcom_qcm6490_begin, .end = __dtb_dwc3_qcom_qcm6490_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qcs404_overlay = { .fdt = __dtb_dwc3_qcom_qcs404_begin, .end = __dtb_dwc3_qcom_qcs404_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@b000000" }, + { "usb2_phy_prim", "/soc@0/phy@7a000" }, + { "usb2_phy_sec", "/soc@0/phy@7c000" }, + { "usb3_phy", "/soc@0/phy@78000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qcs615_overlay = { .fdt = __dtb_dwc3_qcom_qcs615_begin, .end = __dtb_dwc3_qcom_qcs615_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_hsphy_2", "/soc@0/phy@88e3000" }, + { "usb_qmpphy", "/soc@0/phy@88e6000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qcs8300_overlay = { .fdt = __dtb_dwc3_qcom_qcs8300_begin, .end = __dtb_dwc3_qcom_qcs8300_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@8904000" }, + { "usb_2_hsphy", "/soc@0/phy@8906000" }, + { "usb_qmpphy", "/soc@0/phy@8907000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qdu1000_overlay = { .fdt = __dtb_dwc3_qcom_qdu1000_begin, .end = __dtb_dwc3_qcom_qdu1000_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17200000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e5000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_qru1000_overlay = { .fdt = __dtb_dwc3_qcom_qru1000_begin, .end = __dtb_dwc3_qcom_qru1000_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17200000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e5000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sa8155p_overlay = { .fdt = __dtb_dwc3_qcom_sa8155p_begin, .end = __dtb_dwc3_qcom_sa8155p_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb2phy_ac_en1_default", "/soc@0/pinctrl@3100000/usb2phy-ac-en1-default-state" }, + { "usb2phy_ac_en2_default", "/soc@0/pinctrl@3100000/usb2phy-ac-en2-default-state" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sa8540p_overlay = { .fdt = __dtb_dwc3_qcom_sa8540p_begin, .end = __dtb_dwc3_qcom_sa8540p_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_0_hsphy", "/soc@0/phy@88e5000" }, + { "usb_0_qmpphy", "/soc@0/phy@88eb000" }, + { "usb_1_hsphy", "/soc@0/phy@8902000" }, + { "usb_1_qmpphy", "/soc@0/phy@8903000" }, + { "usb_2_hsphy0", "/soc@0/phy@88e7000" }, + { "usb_2_hsphy1", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy2", "/soc@0/phy@88e9000" }, + { "usb_2_hsphy3", "/soc@0/phy@88ea000" }, + { "usb_2_qmpphy0", "/soc@0/phy@88ef000" }, + { "usb_2_qmpphy1", "/soc@0/phy@88f1000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sa8775p_overlay = { .fdt = __dtb_dwc3_qcom_sa8775p_begin, .end = __dtb_dwc3_qcom_sa8775p_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_0_hsphy", "/soc@0/phy@88e4000" }, + { "usb_0_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_1_hsphy", "/soc@0/phy@88e6000" }, + { "usb_1_qmpphy", "/soc@0/phy@88ea000" }, + { "usb_2_hsphy", "/soc@0/phy@88e7000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sar2130p_overlay = { .fdt = __dtb_dwc3_qcom_sar2130p_begin, .end = __dtb_dwc3_qcom_sar2130p_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17200000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_dp_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sc7180_overlay = { .fdt = __dtb_dwc3_qcom_sc7180_begin, .end = __dtb_dwc3_qcom_sc7180_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sc7280_overlay = { .fdt = __dtb_dwc3_qcom_sc7280_begin, .end = __dtb_dwc3_qcom_sc7280_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sc8180x_overlay = { .fdt = __dtb_dwc3_qcom_sc8180x_begin, .end = __dtb_dwc3_qcom_sc8180x_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_mp_hsphy0", "/soc@0/phy@88e4000" }, + { "usb_mp_hsphy1", "/soc@0/phy@88e5000" }, + { "usb_mp_qmpphy0", "/soc@0/phy@88eb000" }, + { "usb_mp_qmpphy1", "/soc@0/phy@88ec000" }, + { "usb_prim_hsphy", "/soc@0/phy@88e2000" }, + { "usb_prim_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_sec_hsphy", "/soc@0/phy@88e3000" }, + { "usb_sec_qmpphy", "/soc@0/phy@88ee000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sc8280xp_overlay = { .fdt = __dtb_dwc3_qcom_sc8280xp_begin, .end = __dtb_dwc3_qcom_sc8280xp_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_0_hsphy", "/soc@0/phy@88e5000" }, + { "usb_0_qmpphy", "/soc@0/phy@88eb000" }, + { "usb_1_hsphy", "/soc@0/phy@8902000" }, + { "usb_1_qmpphy", "/soc@0/phy@8903000" }, + { "usb_2_hsphy0", "/soc@0/phy@88e7000" }, + { "usb_2_hsphy1", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy2", "/soc@0/phy@88e9000" }, + { "usb_2_hsphy3", "/soc@0/phy@88ea000" }, + { "usb_2_qmpphy0", "/soc@0/phy@88ef000" }, + { "usb_2_qmpphy1", "/soc@0/phy@88f1000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sc8280xp_microsoft_blackrock_overlay = { .fdt = __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_begin, .end = __dtb_dwc3_qcom_sc8280xp_microsoft_blackrock_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_0_hsphy", "/soc@0/phy@88e5000" }, + { "usb_0_qmpphy", "/soc@0/phy@88eb000" }, + { "usb_1_hsphy", "/soc@0/phy@8902000" }, + { "usb_1_qmpphy", "/soc@0/phy@8903000" }, + { "usb_2_hsphy0", "/soc@0/phy@88e7000" }, + { "usb_2_qmpphy0", "/soc@0/phy@88ef000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sda660_overlay = { .fdt = __dtb_dwc3_qcom_sda660_begin, .end = __dtb_dwc3_qcom_sda660_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy0", "/soc@0/phy@c012000" }, + { "qusb2phy1", "/soc@0/phy@c014000" }, + { "usb3_qmpphy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm450_overlay = { .fdt = __dtb_dwc3_qcom_sdm450_begin, .end = __dtb_dwc3_qcom_sdm450_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy", "/soc@0/phy@79000" }, + { "intc", "/soc@0/interrupt-controller@b000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm630_overlay = { .fdt = __dtb_dwc3_qcom_sdm630_begin, .end = __dtb_dwc3_qcom_sdm630_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy0", "/soc@0/phy@c012000" }, + { "qusb2phy1", "/soc@0/phy@c014000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm632_overlay = { .fdt = __dtb_dwc3_qcom_sdm632_begin, .end = __dtb_dwc3_qcom_sdm632_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "hsusb_phy", "/soc@0/phy@79000" }, + { "intc", "/soc@0/interrupt-controller@b000000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm636_overlay = { .fdt = __dtb_dwc3_qcom_sdm636_begin, .end = __dtb_dwc3_qcom_sdm636_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy0", "/soc@0/phy@c012000" }, + { "qusb2phy1", "/soc@0/phy@c014000" }, + { "usb3_qmpphy", "/soc@0/phy@c010000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm660_overlay = { .fdt = __dtb_dwc3_qcom_sdm660_begin, .end = __dtb_dwc3_qcom_sdm660_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "extcon_usb", "/extcon-usb" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "qusb2phy0", "/soc@0/phy@c012000" }, + { "qusb2phy1", "/soc@0/phy@c014000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm670_overlay = { .fdt = __dtb_dwc3_qcom_sdm670_begin, .end = __dtb_dwc3_qcom_sdm670_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_begin, .end = __dtb_dwc3_qcom_sdm845_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_lenovo_yoga_c630_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_begin, .end = __dtb_dwc3_qcom_sdm845_lenovo_yoga_c630_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_lg_judyln_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_lg_judyln_begin, .end = __dtb_dwc3_qcom_sdm845_lg_judyln_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_lg_judyp_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_lg_judyp_begin, .end = __dtb_dwc3_qcom_sdm845_lg_judyp_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_qcom_sdm845_mtp_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_begin, .end = __dtb_dwc3_qcom_sdm845_qcom_sdm845_mtp_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_samsung_starqltechn_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_samsung_starqltechn_begin, .end = __dtb_dwc3_qcom_sdm845_samsung_starqltechn_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_samsung_w737_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_samsung_w737_begin, .end = __dtb_dwc3_qcom_sdm845_samsung_w737_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_shift_axolotl_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_shift_axolotl_begin, .end = __dtb_dwc3_qcom_sdm845_shift_axolotl_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_thundercomm_db845c_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_thundercomm_db845c_begin, .end = __dtb_dwc3_qcom_sdm845_thundercomm_db845c_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_xiaomi_beryllium_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_begin, .end = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_overlay = { .fdt = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_begin, .end = __dtb_dwc3_qcom_sdm845_xiaomi_beryllium_ebbg_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc_intc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdx55_overlay = { .fdt = __dtb_dwc3_qcom_sdx55_begin, .end = __dtb_dwc3_qcom_sdx55_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc/iommu@15000000" }, + { "intc", "/soc/interrupt-controller@17800000" }, + { "pdc", "/soc/interrupt-controller@b210000" }, + { "usb_hsphy", "/soc/phy@ff4000" }, + { "usb_qmpphy", "/soc/phy@ff6000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdx65_overlay = { .fdt = __dtb_dwc3_qcom_sdx65_begin, .end = __dtb_dwc3_qcom_sdx65_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc/iommu@15000000" }, + { "intc", "/soc/interrupt-controller@17800000" }, + { "pdc", "/soc/interrupt-controller@b210000" }, + { "usb_hsphy", "/soc/phy@ff4000" }, + { "usb_qmpphy", "/soc/phy@ff6000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sdx75_overlay = { .fdt = __dtb_dwc3_qcom_sdx75_begin, .end = __dtb_dwc3_qcom_sdx75_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17200000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_hsphy", "/soc@0/phy@ff4000" }, + { "usb_qmpphy", "/soc@0/phy@ff6000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm4250_overlay = { .fdt = __dtb_dwc3_qcom_sm4250_begin, .end = __dtb_dwc3_qcom_sm4250_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "usb_hsphy", "/soc@0/phy@1613000" }, + { "usb_qmpphy", "/soc@0/phy@1615000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm4250_oneplus_billie2_overlay = { .fdt = __dtb_dwc3_qcom_sm4250_oneplus_billie2_begin, .end = __dtb_dwc3_qcom_sm4250_oneplus_billie2_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "usb_hsphy", "/soc@0/phy@1613000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm6115_overlay = { .fdt = __dtb_dwc3_qcom_sm6115_begin, .end = __dtb_dwc3_qcom_sm6115_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "usb_hsphy", "/soc@0/phy@1613000" }, + { "usb_qmpphy", "/soc@0/phy@1615000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm6115_lenovo_j606f_overlay = { .fdt = __dtb_dwc3_qcom_sm6115_lenovo_j606f_begin, .end = __dtb_dwc3_qcom_sm6115_lenovo_j606f_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "usb_hsphy", "/soc@0/phy@1613000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm6125_overlay = { .fdt = __dtb_dwc3_qcom_sm6125_begin, .end = __dtb_dwc3_qcom_sm6125_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "extcon_usb", "/extcon-usb" }, + { "hsusb_phy1", "/soc@0/phy@1613000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm6350_overlay = { .fdt = __dtb_dwc3_qcom_sm6350_begin, .end = __dtb_dwc3_qcom_sm6350_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm6375_overlay = { .fdt = __dtb_dwc3_qcom_sm6375_begin, .end = __dtb_dwc3_qcom_sm6375_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@c600000" }, + { "intc", "/soc@0/interrupt-controller@f200000" }, + { "mpm", "/interrupt-controller" }, + { "usb_1_hsphy", "/soc@0/phy@162b000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm7125_overlay = { .fdt = __dtb_dwc3_qcom_sm7125_begin, .end = __dtb_dwc3_qcom_sm7125_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm7225_overlay = { .fdt = __dtb_dwc3_qcom_sm7225_begin, .end = __dtb_dwc3_qcom_sm7225_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm7325_overlay = { .fdt = __dtb_dwc3_qcom_sm7325_begin, .end = __dtb_dwc3_qcom_sm7325_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8150_overlay = { .fdt = __dtb_dwc3_qcom_sm8150_begin, .end = __dtb_dwc3_qcom_sm8150_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e2000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8250_overlay = { .fdt = __dtb_dwc3_qcom_sm8250_begin, .end = __dtb_dwc3_qcom_sm8250_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8250_xiaomi_elish_overlay = { .fdt = __dtb_dwc3_qcom_sm8250_xiaomi_elish_begin, .end = __dtb_dwc3_qcom_sm8250_xiaomi_elish_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8350_overlay = { .fdt = __dtb_dwc3_qcom_sm8350_begin, .end = __dtb_dwc3_qcom_sm8350_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8350_qcom_sm8350_hdk_overlay = { .fdt = __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_begin, .end = __dtb_dwc3_qcom_sm8350_qcom_sm8350_hdk_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17a00000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + { "usb_2_hsphy", "/soc@0/phy@88e4000" }, + { "usb_2_qmpphy", "/soc@0/phy@88eb000" }, + { "usb_hub_enabled_state", "/soc@0/pinctrl@f100000/usb-hub-enabled-state" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8450_overlay = { .fdt = __dtb_dwc3_qcom_sm8450_begin, .end = __dtb_dwc3_qcom_sm8450_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17100000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_1_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8550_overlay = { .fdt = __dtb_dwc3_qcom_sm8550_begin, .end = __dtb_dwc3_qcom_sm8550_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17100000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_dp_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_sm8650_overlay = { .fdt = __dtb_dwc3_qcom_sm8650_begin, .end = __dtb_dwc3_qcom_sm8650_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17100000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_hsphy", "/soc@0/phy@88e3000" }, + { "usb_dp_qmpphy", "/soc@0/phy@88e8000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_x1e80100_overlay = { .fdt = __dtb_dwc3_qcom_x1e80100_begin, .end = __dtb_dwc3_qcom_x1e80100_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17000000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_ss0_hsphy", "/soc@0/phy@fd3000" }, + { "usb_1_ss0_qmpphy", "/soc@0/phy@fd5000" }, + { "usb_1_ss1_hsphy", "/soc@0/phy@fd9000" }, + { "usb_1_ss1_qmpphy", "/soc@0/phy@fda000" }, + { "usb_1_ss2_hsphy", "/soc@0/phy@fde000" }, + { "usb_1_ss2_qmpphy", "/soc@0/phy@fdf000" }, + { "usb_2_hsphy", "/soc@0/phy@88e0000" }, + { "usb_mp_hsphy0", "/soc@0/phy@88e1000" }, + { "usb_mp_hsphy1", "/soc@0/phy@88e2000" }, + { "usb_mp_qmpphy0", "/soc@0/phy@88e3000" }, + { "usb_mp_qmpphy1", "/soc@0/phy@88e5000" }, + {} + } }; static const struct dwc3_overlay_data dwc3_qcom_x1e80100_hp_omnibook_x14_overlay = { .fdt = __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_begin, .end = __dtb_dwc3_qcom_x1e80100_hp_omnibook_x14_end, .migrate_match = "qcom,dwc3", + .symbols = (struct dwc3_overlay_symbol[]) { + { "apps_smmu", "/soc@0/iommu@15000000" }, + { "intc", "/soc@0/interrupt-controller@17000000" }, + { "pdc", "/soc@0/interrupt-controller@b220000" }, + { "usb_1_ss0_hsphy", "/soc@0/phy@fd3000" }, + { "usb_1_ss0_qmpphy", "/soc@0/phy@fd5000" }, + { "usb_1_ss1_hsphy", "/soc@0/phy@fd9000" }, + { "usb_1_ss1_qmpphy", "/soc@0/phy@fda000" }, + { "usb_1_ss2_hsphy", "/soc@0/phy@fde000" }, + { "usb_1_ss2_qmpphy", "/soc@0/phy@fdf000" }, + { "usb_2_hsphy", "/soc@0/phy@88e0000" }, + { "usb_mp_hsphy0", "/soc@0/phy@88e1000" }, + { "usb_mp_qmpphy0", "/soc@0/phy@88e3000" }, + {} + } }; static const struct of_device_id dwc3_flatten_of_match[] = { @@ -738,10 +1465,36 @@ static int dwc3_flattening_migrate(struct of_changeset *ocs, return ret; } +static int dwc3_flattening_ensure_symbols(struct of_changeset *ocs, + const struct dwc3_overlay_symbol *symbols) +{ + const struct dwc3_overlay_symbol *s; + struct device_node *symbols_np; + int ret; + + symbols_np = of_find_node_by_path("/__symbols__"); + of_node_put(symbols_np); + if (symbols_np) + return 0; + + symbols_np = of_changeset_create_node(ocs, of_root, "__symbols__"); + if (!symbols_np) + return -ENOMEM; + + for (s = symbols; s->symbol; s++) { + ret = of_changeset_add_prop_string(ocs, symbols_np, s->symbol, s->path); + if (ret) + return ret; + } + + return 0; +} + static int dwc3_flattening_init(void) { const struct dwc3_overlay_data *data; const struct of_device_id *match; + struct of_changeset symbols_ocs; struct of_changeset migrate_ocs; struct device_node *np; int overlay_ovcs; @@ -763,6 +1516,15 @@ static int dwc3_flattening_init(void) } of_node_put(np); + of_changeset_init(&symbols_ocs); + ret = dwc3_flattening_ensure_symbols(&symbols_ocs, data->symbols); + if (ret < 0) + goto out_destroy_symbols; + + ret = of_changeset_apply(&symbols_ocs); + if (ret < 0) + goto out_destroy_symbols; + of_changeset_init(&migrate_ocs); for_each_compatible_node(np, NULL, data->migrate_match) { ret = dwc3_flattening_migrate(&migrate_ocs, np); @@ -784,6 +1546,9 @@ static int dwc3_flattening_init(void) out_migrate_destroy: of_changeset_destroy(&migrate_ocs); + of_changeset_revert(&symbols_ocs); +out_destroy_symbols: + of_changeset_destroy(&symbols_ocs); return ret; } From patchwork Tue Jan 14 05:11:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938423 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 24C39235C1D for ; Tue, 14 Jan 2025 05:06:15 +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=1736831177; cv=none; b=BBm7Kmfj1goDFWEm1u0rcNjMbufQrZOsBN9M4zolwAJ6JAaRZZt6tN8zK/HRoJof1xyC6mZDvf+nnPyorMuQ93WpCeEyVc+tmNbwXKmPkCCqJwoIkv8yVqkSUDO6DL85rSau4FKuGfIy1aTpjMqhS3Bv1S9qjJChuFuWc3RKe+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831177; c=relaxed/simple; bh=muZkLA0Vp3J88ryGIQbBDqXzWQz+TbSF+4TbATR2OBQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gADc2fn+duvZjYSWJb9UjpUHFbLnxtufz+OXue52qPOX/aOwQEaYhjfpORN+zVw/cqX7UyMYqL0zVDXQkDosvhVjBfDufpqWdz7qThcSRVnI6UimSpR5fkZVvV8Ji166bHLbRh++4hIrt8BYDyq0jncGV8FSB+uW4g1D5ynJhws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=mKjypCHV; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="mKjypCHV" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E25EMa020349 for ; Tue, 14 Jan 2025 05:06:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= as68kn4FM169poQZgZX9fA/DRIYJGHKIrl9TWXwhMPc=; b=mKjypCHVjn32jqx6 Mp1XeCd0cwqfqL2Cwaub4Y7GU+Xn0ur11uR0ibLGWgcY/lQ/NqpeJHLTRuzF8Hbh gS+21hyoFjl7P52ubxuAIhE50zhCCbCoAuU/pqGx7eB4YkpV9eP8r371S4ppyQY6 atKfyEdTnbG8aIjUkLKfRVkwPLdtX4Bebo0JHgfU6QI6S3S2rpwEjuJgmZ45zV0o EAyxPJLX/SyVsWZhm5weKF6LkwTrwGe9s0TxPM07QVlEhSE07EMJ2L9Qiuz0I/9w GcjmL0xg0dX2kHiA90EjqKIEn2FcxS1JJTQdkWu1T8eDdHh9hywNYIvXgqOsfbHi j5QRdA== Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eu48ber-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:14 +0000 (GMT) Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-5f2e3b9c0b6so4141825eaf.2 for ; Mon, 13 Jan 2025 21:06:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831162; x=1737435962; 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=as68kn4FM169poQZgZX9fA/DRIYJGHKIrl9TWXwhMPc=; b=uZcqXBd2MTupT8xz1gtfZlKG5Skvy2MA+Wb6espvZHbGfWn0oGJCc31SOIK/lDiBOH thGA2HrjXLsKohoKhDfuqlVuxqfeSZCBnr5xLGsxH8rBHf40RUu3GyMexLbkoWiAODBK 6wqAoIXaiM/jh7B8sUjGeLjjmUo13O+51+KY92d9W5FuU9LXoSWmzWw1kO4L+qQQ49im qbPd1jUucn109i1XZhIbZJpv/k1hPLLR9tUVLpM1Y3BtXgj0gPECjZTkIQYdyDXBDeVj jBpxsiVucN7uF1wC1w+WCEfQrWkeEtapRzdUPhvozcihvdg3uf2bBjmnZovVxr2nGwl3 rQhw== X-Forwarded-Encrypted: i=1; AJvYcCU2lRkzWfhdaquSTMedScA15yNyX3JyzP2gckw90KFSCSHSxfdvXNj2jAvfp4Zt3VCIf6QdfaVPviE=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7mNYEn551c5Bly74U8TjwppCZNkDhtDn1BxK/8Rwg/dm2kEXt ox7uVnVBEU7zfcX2MfTLyL6AEAzzDV28yBMw4jw8Vqofwx9l+vEHPmGTfARRNtsFpNDMhl8kKdh mr+UOyv+YtxSNLZgkcrwQQcBArv1JDCGFOP2ALhzzvHnCa92TtCBHVgK6WQc= X-Gm-Gg: ASbGncuEB2LF4C4dED7I76zmNTT+oNz07embgVm0SWVU56nPK8g8JAWfCvmInSWmIqR dNXSy3bLpw9SF7xYmVwYOXv7k+zTZRXDP/Z2sVNztyf9ca0zR26d7fBvBsyCSAk5NOwOKAiplqH XTiWnUlIA4glOYKbHu2LaU1EitowqlGyXWwVvuNs4usePi91NHhOXOgsB1/2AKq3mEHFJjI78fG svEUSLTA2Z56MbhmZTeK9pKuJg7Ym7AbP8J4nIobdmV6kQ4xQzTx3V87jheVcmuRmdUajEZ+96G wtjmu+NokZuaFAisJhn9iQjj1p1pG1DeuoFzqftLzAbCOPg1SnjM2+r0 X-Received: by 2002:a05:6820:1b0b:b0:5eb:b282:5916 with SMTP id 006d021491bc7-5f73096edf3mr14815245eaf.7.1736831161688; Mon, 13 Jan 2025 21:06:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2pGHr+Y6KnrlSZ/bxvWiXcqyB7KLMUB+V5CE73EoXohy/aAF95TpGOEhWbjfnYVpc4s8DXA== X-Received: by 2002:a05:6820:1b0b:b0:5eb:b282:5916 with SMTP id 006d021491bc7-5f73096edf3mr14815230eaf.7.1736831161336; Mon, 13 Jan 2025 21:06:01 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:06:00 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:41 -0800 Subject: [PATCH v3 08/12] usb: dwc3: core: Expose core driver as library Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-8-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=9690; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=muZkLA0Vp3J88ryGIQbBDqXzWQz+TbSF+4TbATR2OBQ=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVGwwI0V5UJxSj2BP+zu6gur5o8TxPyydFi /3PL7jKKpeJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcXQ6RAAxUC3LcXfHDnYSdkkTO+DkRdEyFhcdZdT6GFcg+V Kx/xU7LFChS8Ac9hsBIGvDs0MH1TtHLoMiwCNS4317lURk4rb58mbb+ga41GbU0hKjB+EXfIsgd z6zLPam55l3dBhre9r3tGl0ziGpf4ZB+apFeS3uPk94z4L05FYTntw1NLG75Ap61uHz4vGpAnyi WBLqUOx5rSV1J1x3LNp1eg/3J876COoP+ciNna94CC91TGDR7KmFgQNkq3qgOwN3mGtuyAN8gzf N6Ae1lw/Q8n0H35zSYgc831+rtlu+GXrZSwTqhphmGpA9Ls3V9DLVQKRw7dGEhK2jPO2T/72DXB tTCZJu77ZVXzPTzHuihH8hIs//fsoRXIynGta++FmgjGcMHvqwyW+XrKSQjJtL7ALhjQkm50kGq X+YTznsMaPDp9LDWEQpalB4DfguayDqLkCcFBpdKB7cwl4M3HFHynLW3heNOyL7QaB5hLkMGSIh 0U68CaqA3t97rJuukExFgG4WmzLSBZIYAfvy2xDEjZBRqthcXsL9fGCz9juYnPL89ANvezLbl2d wni0FWrOxWrB9xQfoILjkVPptWDrQVGFK6kszO8DI/PxE3LzbIe/E/p5C+UiD5zJMz9jWi0GiRe RL2whAjMcyJUhF6iB++ZuInE33s2qvyKKLKxb2KcZIB0= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-GUID: 5Mma2a_hmjNse-MasDplvNJxZUntrrCO X-Proofpoint-ORIG-GUID: 5Mma2a_hmjNse-MasDplvNJxZUntrrCO 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 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 impostorscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 mlxlogscore=933 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 The DWC3 IP block is handled by three distinct device drivers: XHCI, DWC3 core and a platform specific (optional) DWC3 glue driver. This has resulted in, at least in the case of the Qualcomm glue, the presence of a number of layering violations, where the glue code either can't handle, or has to work around, the fact that core might not probe deterministically. An example of this is that the suspend path should operate slightly different depending on the device operating in host or peripheral mode, and the only way to determine the operating state is to peek into the core's drvdata. The Qualcomm glue driver is expected to make updates in the qscratch register region (the "glue" region) during role switch events, but with the glue and core split using the driver model, there is no reasonable way to introduce listeners for mode changes. Split the dwc3 core platform_driver callbacks and their implementation and export the implementation, to make it possible to deterministically instantiate the dwc3 core as part of the dwc3 glue drivers and to allow flattening of the DeviceTree representation. Signed-off-by: Bjorn Andersson --- drivers/usb/dwc3/core.c | 149 ++++++++++++++++++++++++++++++------------------ drivers/usb/dwc3/glue.h | 22 +++++++ 2 files changed, 117 insertions(+), 54 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c22b8678e02e..930d812a9fbb 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -36,6 +36,7 @@ #include "core.h" #include "gadget.h" +#include "glue.h" #include "io.h" #include "debug.h" @@ -2129,27 +2130,14 @@ static int dwc3_get_num_ports(struct dwc3 *dwc) return 0; } -static int dwc3_probe(struct platform_device *pdev) +int dwc3_init(struct dwc3 *dwc, struct resource *res) { - struct device *dev = &pdev->dev; - struct resource *res, dwc_res; + struct device *dev = dwc->dev; + struct resource dwc_res; unsigned int hw_mode; void __iomem *regs; - struct dwc3 *dwc; int ret; - dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL); - if (!dwc) - return -ENOMEM; - - dwc->dev = dev; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(dev, "missing memory resource\n"); - return -ENODEV; - } - dwc->xhci_resources[0].start = res->start; dwc->xhci_resources[0].end = dwc->xhci_resources[0].start + DWC3_XHCI_REGS_END; @@ -2209,7 +2197,7 @@ static int dwc3_probe(struct platform_device *pdev) goto err_disable_clks; } - platform_set_drvdata(pdev, dwc); + dev_set_drvdata(dev, dwc); dwc3_cache_hwparams(dwc); if (!dwc->sysdev_is_parent && @@ -2304,12 +2292,31 @@ static int dwc3_probe(struct platform_device *pdev) return ret; } +EXPORT_SYMBOL_GPL(dwc3_init); -static void dwc3_remove(struct platform_device *pdev) +static int dwc3_probe(struct platform_device *pdev) { - struct dwc3 *dwc = platform_get_drvdata(pdev); + struct resource *res; + struct dwc3 *dwc; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "missing memory resource\n"); + return -ENODEV; + } + + dwc = devm_kzalloc(&pdev->dev, sizeof(*dwc), GFP_KERNEL); + if (!dwc) + return -ENOMEM; - pm_runtime_get_sync(&pdev->dev); + dwc->dev = &pdev->dev; + + return dwc3_init(dwc, res); +} + +void dwc3_uninit(struct dwc3 *dwc) +{ + pm_runtime_get_sync(dwc->dev); dwc3_core_exit_mode(dwc); dwc3_debugfs_exit(dwc); @@ -2317,22 +2324,28 @@ static void dwc3_remove(struct platform_device *pdev) dwc3_core_exit(dwc); dwc3_ulpi_exit(dwc); - pm_runtime_allow(&pdev->dev); - pm_runtime_disable(&pdev->dev); - pm_runtime_dont_use_autosuspend(&pdev->dev); - pm_runtime_put_noidle(&pdev->dev); + pm_runtime_allow(dwc->dev); + pm_runtime_disable(dwc->dev); + pm_runtime_dont_use_autosuspend(dwc->dev); + pm_runtime_put_noidle(dwc->dev); /* * HACK: Clear the driver data, which is currently accessed by parent * glue drivers, before allowing the parent to suspend. */ - platform_set_drvdata(pdev, NULL); - pm_runtime_set_suspended(&pdev->dev); + dev_set_drvdata(dwc->dev, NULL); + pm_runtime_set_suspended(dwc->dev); dwc3_free_event_buffers(dwc); if (dwc->usb_psy) power_supply_put(dwc->usb_psy); } +EXPORT_SYMBOL_GPL(dwc3_uninit); + +static void dwc3_remove(struct platform_device *pdev) +{ + dwc3_uninit(platform_get_drvdata(pdev)); +} #ifdef CONFIG_PM static int dwc3_core_init_for_resume(struct dwc3 *dwc) @@ -2521,9 +2534,8 @@ static int dwc3_runtime_checks(struct dwc3 *dwc) return 0; } -static int dwc3_runtime_suspend(struct device *dev) +int dwc3_runtime_suspend(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); int ret; if (dwc3_runtime_checks(dwc)) @@ -2535,10 +2547,10 @@ static int dwc3_runtime_suspend(struct device *dev) return 0; } +EXPORT_SYMBOL_GPL(dwc3_runtime_suspend); -static int dwc3_runtime_resume(struct device *dev) +int dwc3_runtime_resume(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); int ret; ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME); @@ -2559,15 +2571,14 @@ static int dwc3_runtime_resume(struct device *dev) break; } - pm_runtime_mark_last_busy(dev); + pm_runtime_mark_last_busy(dwc->dev); return 0; } +EXPORT_SYMBOL_GPL(dwc3_runtime_resume); -static int dwc3_runtime_idle(struct device *dev) +int dwc3_runtime_idle(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); - switch (dwc->current_dr_role) { case DWC3_GCTL_PRTCAP_DEVICE: if (dwc3_runtime_checks(dwc)) @@ -2579,50 +2590,65 @@ static int dwc3_runtime_idle(struct device *dev) break; } - pm_runtime_mark_last_busy(dev); - pm_runtime_autosuspend(dev); + pm_runtime_mark_last_busy(dwc->dev); + pm_runtime_autosuspend(dwc->dev); return 0; } +EXPORT_SYMBOL_GPL(dwc3_runtime_idle); + +static int dwc3_plat_runtime_suspend(struct device *dev) +{ + return dwc3_runtime_suspend(dev_get_drvdata(dev)); +} + +static int dwc3_plat_runtime_resume(struct device *dev) +{ + return dwc3_runtime_resume(dev_get_drvdata(dev)); +} + +static int dwc3_plat_runtime_idle(struct device *dev) +{ + return dwc3_runtime_idle(dev_get_drvdata(dev)); +} #endif /* CONFIG_PM */ #ifdef CONFIG_PM_SLEEP -static int dwc3_suspend(struct device *dev) +int dwc3_suspend(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); int ret; ret = dwc3_suspend_common(dwc, PMSG_SUSPEND); if (ret) return ret; - pinctrl_pm_select_sleep_state(dev); + pinctrl_pm_select_sleep_state(dwc->dev); return 0; } +EXPORT_SYMBOL_GPL(dwc3_suspend); -static int dwc3_resume(struct device *dev) +int dwc3_resume(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); int ret = 0; - pinctrl_pm_select_default_state(dev); + pinctrl_pm_select_default_state(dwc->dev); - pm_runtime_disable(dev); - pm_runtime_set_active(dev); + pm_runtime_disable(dwc->dev); + pm_runtime_set_active(dwc->dev); ret = dwc3_resume_common(dwc, PMSG_RESUME); if (ret) - pm_runtime_set_suspended(dev); + pm_runtime_set_suspended(dwc->dev); - pm_runtime_enable(dev); + pm_runtime_enable(dwc->dev); return ret; } +EXPORT_SYMBOL_GPL(dwc3_resume); -static void dwc3_complete(struct device *dev) +void dwc3_complete(struct dwc3 *dwc) { - struct dwc3 *dwc = dev_get_drvdata(dev); u32 reg; if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_HOST && @@ -2632,21 +2658,36 @@ static void dwc3_complete(struct device *dev) dwc3_writel(dwc->regs, DWC3_GUCTL3, reg); } } +EXPORT_SYMBOL_GPL(dwc3_complete); + +static int dwc3_plat_suspend(struct device *dev) +{ + return dwc3_suspend(dev_get_drvdata(dev)); +} + +static int dwc3_plat_resume(struct device *dev) +{ + return dwc3_resume(dev_get_drvdata(dev)); +} + +static void dwc3_plat_complete(struct device *dev) +{ + dwc3_complete(dev_get_drvdata(dev)); +} #else -#define dwc3_complete NULL +#define dwc3_plat_complete NULL #endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops dwc3_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(dwc3_suspend, dwc3_resume) - .complete = dwc3_complete, - + SET_SYSTEM_SLEEP_PM_OPS(dwc3_plat_suspend, dwc3_plat_resume) + .complete = dwc3_plat_complete, /* * Runtime suspend halts the controller on disconnection. It relies on * platforms with custom connection notification to start the controller * again. */ - SET_RUNTIME_PM_OPS(dwc3_runtime_suspend, dwc3_runtime_resume, - dwc3_runtime_idle) + SET_RUNTIME_PM_OPS(dwc3_plat_runtime_suspend, dwc3_plat_runtime_resume, + dwc3_plat_runtime_idle) }; #ifdef CONFIG_OF diff --git a/drivers/usb/dwc3/glue.h b/drivers/usb/dwc3/glue.h new file mode 100644 index 000000000000..f6a513e43f53 --- /dev/null +++ b/drivers/usb/dwc3/glue.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * glue.h - DesignWare USB3 DRD glue header + */ + +#ifndef __DRIVERS_USB_DWC3_GLUE_H +#define __DRIVERS_USB_DWC3_GLUE_H + +#include +#include "core.h" + +int dwc3_init(struct dwc3 *dwc, struct resource *res); +void dwc3_uninit(struct dwc3 *dwc); + +int dwc3_runtime_suspend(struct dwc3 *dwc); +int dwc3_runtime_resume(struct dwc3 *dwc); +int dwc3_runtime_idle(struct dwc3 *dwc); +int dwc3_suspend(struct dwc3 *dwc); +int dwc3_resume(struct dwc3 *dwc); +void dwc3_complete(struct dwc3 *dwc); + +#endif From patchwork Tue Jan 14 05:11:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938426 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 09CEB24632A for ; Tue, 14 Jan 2025 05:06:20 +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=1736831182; cv=none; b=nQ6DUI/STGhBBg/6qnN3leyN8seh/wrWSm0owoQVjrJDXjGkvu1qvTKCj7AU6gh70IaDAQ10mU1+7JwsROtO/IquH4DxB1oyNpNeINxYbZvOT/jsPKjfGCngVTNfj9M5BwBY0qsVrw7k3L/zadFNXdOS2h+REiy1qRJiwXzGToU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831182; c=relaxed/simple; bh=M8a05g5QhGIDQGcQr0ozZere4otNUOUy0SpBYsjJCpI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m49tLH9IsX9g30eBuhAiMFbrkQvk0v7xPaIJbOgUCKpEoPYT5vvRUTyvJLw8hdhAMW7+PW83hr/PDBWTPwAPbLgwslrdEH8mwyNpZGkjhmxJQxPeGFHX7+9WcErnE0k6siIm3HWSHttgPTBspGAHKt+Zq3zUttWfOU2UuOH0qfo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hIJJlZsO; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hIJJlZsO" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E23i9a008530 for ; Tue, 14 Jan 2025 05:06:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= qbPNDUgAq9khxXzdnGO7xYrRsfNyJmja9qPh+54W2wg=; b=hIJJlZsOOlO5wOJI 7/zNmwU7s/GoQ5NekgyVAVhx1utvGYpbBjJfbfAI2xnp4Md+o/JDJu9fTNjHNtle apbfydlCInZ/Z/8/tM9lad0rMqgWriU7cHB2lRJt6fStJ0dmwZ07a7DN6YjdASjg YyDYBg6jQMa2nqYcDGuuW4gHuU6566p5ndjcH9ezc/OGIPc3zVHZUF20M47hRbPl wr8gDkyPlVO4iNfkT/1Z1kVGFAbXXJ0V+Oet6/Kie6J2+LzaIj4HAq4R6qoOOkHq k7wtj6+NRj+YN9UH8sVAjmXhgdlnQpWgVgjaYOemNlBLgO5dN7EmR33IUWf8DX1i N0sJgg== Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eterbmp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:20 +0000 (GMT) Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-5f696a2ee38so4153428eaf.1 for ; Mon, 13 Jan 2025 21:06:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831163; x=1737435963; 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=qbPNDUgAq9khxXzdnGO7xYrRsfNyJmja9qPh+54W2wg=; b=KH+40E9FzVKZApXgSYAlC8BnhyAhP/lapvwMxn+hGJHXtej1Fp/yWJ1+Kzu82J0cay NXe2PpKbIDpzPHsevXf+wUafEJ4fYSg80+UiiRj1oWlKdkLHoieB/L1TbzwMwD5LX/5v /3Am/lDX5DBGU6/nqJxytze370dgis7+Tov39LOKvaY/kO6wUnveitzEXreHc1Gv+m9H hKGS2a7I4aLT3kI1bDY89S/4uTZTjGcINLGBFMMXydnQ7C+wg2WqR1P4YKY9auIiT9GT +oXeWAXrLcitrsRPCPfwe2/y0nzBiKxqwgw01dZk2s55lZqSmLwBfu4rXQot7Ww9LhHD aRtA== X-Forwarded-Encrypted: i=1; AJvYcCVk2rZdvEx7UJMz2X9PxAAfcggvP6v+JcKCG5lY/tNA56uxIi19wqlrVT+Ywq+pvkO6pFdNR6GI4Nk=@vger.kernel.org X-Gm-Message-State: AOJu0YwDwzVrH/SQEGK9NPVg5EHNyBv45uWq93RLGnSzY/g1u4vbkd+2 i3OYxFSFhxdYE5YstM/QPlYdrM9FCtzoVtMrP+8cBVj91CFnjQyGvNosTRkMattUry3vbuoVZmV jZHhiE1zk5/HIbci+02e0JZfLOInyByaE4I2Zn8EeJ6lqxhoz3jdgRwwdJ7Y= X-Gm-Gg: ASbGncvgHHpjWGRW0/YCcPwO3BBVwZfZnycKANY6caUiPaKylg3RQrdTnm/AE/tphAP FMUf/AFOZcaXUplOKzv2rrzwMWZdq5HBhQdg1OnX2ua1A4uYBCC6DwL2kFOic10dNZsP7aPkhZs Wkv0pRNGlgn8tsERzCdoll43sK5Yb5tOcPu6OjIBEe8S2ucBM+7f4esc0Zec0WxAOaB965rz73s Hzo7kNqpxc/+yiK1EMDy6GuqKkQxNpmSVcsS+MRMU282oU+V5VhkmeKjHNmqWzMuMjqY+jGCBvm wSOa8+HCX1oDHU5QHgSU0CucpVu0zbwTaKbvbL2HjdSTzgeDIzvK6MPM X-Received: by 2002:a05:6820:210e:b0:5f6:8c7e:f59e with SMTP id 006d021491bc7-5f730989363mr16287563eaf.6.1736831162746; Mon, 13 Jan 2025 21:06:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnfKXoeeeA8NBKomAIGTBbHrl8rTKa1hnJ9t51uButBIKoClFHi11qMo2YLC0zEXH94GPIrw== X-Received: by 2002:a05:6820:210e:b0:5f6:8c7e:f59e with SMTP id 006d021491bc7-5f730989363mr16287554eaf.6.1736831162451; Mon, 13 Jan 2025 21:06:02 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.06.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:06:01 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:42 -0800 Subject: [PATCH v3 09/12] usb: dwc3: core: Don't touch resets and clocks Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-9-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2329; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=M8a05g5QhGIDQGcQr0ozZere4otNUOUy0SpBYsjJCpI=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVOsfUzZ+vsMvlEhHlwzfQcaWwEzB0h35m9 R0ifsSqmjiJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcXZ9RAA0iQqg0EmNJYeqqOjc0dfJ1H7b0UIC3sUd0vmjr4 hAHB6O0u19HbWk3nE443PWV0bPSiDznlnH+L8kuLoo7CzouLyZjIu0tICAzB8V3iGU+KnfxpzXu 1bC5DRQkKOYA/R+oDE+/dY37NUMq+ftw9umdwfjdGR4is5oTtvcoXbuN/Rrf4JEIUXhgtY68Kr9 YLCDzYyCOrm5MKDLXWXcNDHg3Rk2vF5F4Ra6PmfrL+RLg/l0HvKL4SdSm7y9VFnNspfdiJIGyxw QLVzgNVif7flOHOzxgmA6gnrZoZKHxxkjxF6EdQCNP1yCoKMCI48EtX1zvhpkaeoyBKD+I4bjMN 7Rn2rBrE29msQRpAnwuRC+GBt0pTPXEopaQT7B7SEJAL2NPYqUHyUE0p4nuGF/NBSS6IYmdEz0O lJI+IfPVQSLErZn2sM9HBAMl5GKcL+HMDtxeggHULotixy2mj2fYhAPLUpopCRhN9XFTnQvBzlw 0NF22KdtnvPyO/GYtR1oWgYdgAnyYYegodpLiZUMdzq3+SjJP4IALcLyQAoC4/2w8/LKJOqVhvl 3rjh9RYXOA1F3VGwyi2P9Z/hesplGvUFMR6PAjbI1HwzCCfz/NmHi/gpae5gDvBDr669vVxneyM J30LQrxIKUlzQXxto9hIwajsle3z8plZRYo7uwZj//Rg= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: cAeBCxT8GQCCO7qZbW-_WMHMsDHfRbcc X-Proofpoint-GUID: cAeBCxT8GQCCO7qZbW-_WMHMsDHfRbcc 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 clxscore=1015 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 When the core is integrated with glue, it's expected that the glue IP will require, and hence handle, the clocks and resets of the IP-block. Allow the platform or glue layer to indicate if the core logic for clocks and resets should be skipped to deal with this. Signed-off-by: Bjorn Andersson --- drivers/usb/dwc3/core.c | 22 ++++++++++++---------- drivers/usb/dwc3/glue.h | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 930d812a9fbb..c0b2398b8c18 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -2130,7 +2130,7 @@ static int dwc3_get_num_ports(struct dwc3 *dwc) return 0; } -int dwc3_init(struct dwc3 *dwc, struct resource *res) +int dwc3_init(struct dwc3 *dwc, struct resource *res, bool ignore_clocks_and_resets) { struct device *dev = dwc->dev; struct resource dwc_res; @@ -2173,15 +2173,17 @@ int dwc3_init(struct dwc3 *dwc, struct resource *res) dwc3_get_software_properties(dwc); - dwc->reset = devm_reset_control_array_get_optional_shared(dev); - if (IS_ERR(dwc->reset)) { - ret = PTR_ERR(dwc->reset); - goto err_put_psy; - } + if (!ignore_clocks_and_resets) { + dwc->reset = devm_reset_control_array_get_optional_shared(dev); + if (IS_ERR(dwc->reset)) { + ret = PTR_ERR(dwc->reset); + goto err_put_psy; + } - ret = dwc3_get_clocks(dwc); - if (ret) - goto err_put_psy; + ret = dwc3_get_clocks(dwc); + if (ret) + goto err_put_psy; + } ret = reset_control_deassert(dwc->reset); if (ret) @@ -2311,7 +2313,7 @@ static int dwc3_probe(struct platform_device *pdev) dwc->dev = &pdev->dev; - return dwc3_init(dwc, res); + return dwc3_init(dwc, res, false); } void dwc3_uninit(struct dwc3 *dwc) diff --git a/drivers/usb/dwc3/glue.h b/drivers/usb/dwc3/glue.h index f6a513e43f53..ac87491bfdeb 100644 --- a/drivers/usb/dwc3/glue.h +++ b/drivers/usb/dwc3/glue.h @@ -9,7 +9,7 @@ #include #include "core.h" -int dwc3_init(struct dwc3 *dwc, struct resource *res); +int dwc3_init(struct dwc3 *dwc, struct resource *res, bool ignore_clocks_and_resets); void dwc3_uninit(struct dwc3 *dwc); int dwc3_runtime_suspend(struct dwc3 *dwc); From patchwork Tue Jan 14 05:11:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938424 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 656F5237A2E for ; Tue, 14 Jan 2025 05:06:14 +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=1736831177; cv=none; b=cwCPwHAbhaXBvzWe69eNpNt4snR5ezhqUp2yj5lDvsvJbrESD+VteOke9LMD/Q/xClodx/Oz73/on5tL9u0KQyo2oR14LTG4Bw9SRI0NhHYNjtQ/DIBT6rUp+3U+xnJ0073s0ppIzVHp+N1PUpi2tUKVhX9/lE37gB+ZrZXkZY4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831177; c=relaxed/simple; bh=XMhUGa9jASilaYKmAqPhGJDF9Z/4W7QRLCZ3ziNou6Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fXEc8/p+sMzOlhizGc+Y16dBxILRC0Ml/BWN65ipbf2igapnwckqnQUrBiOcsB8h5PrrhPiCtaGBYUE0EKxHOkPMaNozzI3oJ43NM4yzbptZo91gJGphOkfGwITp05GcfhQw/FCWyEH3UL1mh13wop/tIptqRzRGBz/n53D8ZIk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QSVd4DAs; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QSVd4DAs" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E25d2L021069 for ; Tue, 14 Jan 2025 05:06:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= I+pBckYQT8kiWYR+JN/p8P4x1oQKu26Ua1lLR/Lpzog=; b=QSVd4DAsKdwYaYgf 3vvU5PHmgkLUkNimXdrG1zL2dsOXFhz6GoRAAExKjWVItfRD3G2eH7Qx0SgYz4A7 Yet++oGsXDB30qyWpWFuAZKV/moRfDx8586fUlkjiUnpdSekmssF/eBf/JeO4q7Z FaMWqmb3GDPa6u8OfQXP9Y0RC95GfdfdKNvxgAO2jTrfDhGtn25FTBsUduoRjEpI hMS6oT5I5l5GMmtUAdCtd1tFewNhs87Rhlefw/+TPTK8dE+ncfYfwQnqq19WYl3b 4u8Ll/XqRvI1KUZKViWv5YudWZnP48xI/Tf4jUZr/lhw3PIwtvqR6lm2Z9zBG8Ly IpiQWw== Received: from mail-oa1-f71.google.com (mail-oa1-f71.google.com [209.85.160.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445eu48bf2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:14 +0000 (GMT) Received: by mail-oa1-f71.google.com with SMTP id 586e51a60fabf-29fec25e14cso1539137fac.2 for ; Mon, 13 Jan 2025 21:06:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831164; x=1737435964; 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=I+pBckYQT8kiWYR+JN/p8P4x1oQKu26Ua1lLR/Lpzog=; b=IHOHiolE4+whiZAdNG84aS4eQUZFC8NF0Ysu2S5gAlZKJEQXvp6nyz6ZCskQejv4HU zi/2lVS3+KodH1Oes9T28LACn1hKdvYMBvvHyfiPPHZE1jHBq2Rta86VOTisrOSqmA8F /MplbyMVenF4wfD1KGPRLIAFwKA1y9eatBpZnU5JzbpBJG9jb8gjt6uucrQ6wuWk43GN OTeJb/VAvrSAqggrmTgKD9Xp8s2P2ixZZTAu4x2AtfdhQWMwHPCYAy8AEomfuTHWFFqv HLwNKrf+M/ip/VLrBuxHZQZ8ZTgZ2+Nt569XL9vBUkC+tiP7eu9notypfG35FlaFZN+v PNPg== X-Forwarded-Encrypted: i=1; AJvYcCXnQxsrit4V2VIUJJaz3ZGQ5cxB//0Dx/qqNSkH5XnqLQiSZViZ1GIeTQG47ksWdbGmCaAdEUmBDBQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3S+QK8VNxgoBLYYy4SLNjrdvwyolHQN7gjgyOLtTAalbzhSnP GAfxdgjRI1vxfz1tmmOJn4i50m0apCV6W+NgK9HX1V33BfMnZU91RyUcs9D6CPpkarLCQqeegS+ ZwDUzmW+xk+HE+NkzMyrOkGYW1N+t3tvRaFg7IW5HLmufABNaBxRV94Toe08= X-Gm-Gg: ASbGnct/CbVVkW2ASb4zleonI6RvW1QpUPzYKZ+7PS2USA41AhmdiXV7dX+S5ft5Cmi p1DOwlTo9ek9wdBLSYdVU6qlk8vrQ3buUIIwWuSO2zSFgrQyx1Op2Wl+1WHJyijbg0DTYN2Y2aK QhtuEGFMqy/g8M6dR6vTv7mcNlcBu7RAj6ha0SIAy3JnP42ZfkUH/H9MDLT1cUiysl0C5EZAQit uN8pFpCphXMZk9auAliMJe7kLj/20LqHE91cN7cr1kLrcnyHbx8iBrkkCoBcqJp0gIvPrnMUxBJ Z+xd7ttIjFdvZytxSoUrQRbAb2WR2qR4QOHRPoZ/QNBCCGw3+UA0467B X-Received: by 2002:a05:6820:1745:b0:5f2:ae23:767 with SMTP id 006d021491bc7-5f73070b54emr12596453eaf.0.1736831163822; Mon, 13 Jan 2025 21:06:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbssb+eGXtilc3CQwmUCInY0FJo024TV9q9MgOQ1o2yh8BjC4LvpO8WQxaIXj/9OPLVL5LDQ== X-Received: by 2002:a05:6820:1745:b0:5f2:ae23:767 with SMTP id 006d021491bc7-5f73070b54emr12596444eaf.0.1736831163517; Mon, 13 Jan 2025 21:06:03 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:06:03 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:43 -0800 Subject: [PATCH v3 10/12] usb: dwc3: qcom: Don't rely on drvdata during probe Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-10-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3028; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=XMhUGa9jASilaYKmAqPhGJDF9Z/4W7QRLCZ3ziNou6Y=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIV5pP9H4VjRY3SSghjy9khuqpLriBrkV5Mk c3mImvjAoCJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWiIxAA3ix6QgOfLXqse2uIvzzXX+PnesgNISy7rEC4vRx IJ+ja8hGVH3KEXq75BzF5HIUnVcO4fZNXgPKJeujbboK0MNEg47Rexnjr2K2Jd0yvexT+9t3axr GZoCF3ZeeWixsL3xl4bxF0ii4AN5Cnz13zCVeGaMDSh1AMMJUZ8q84jUG55FQiJ7/ZmTsP8bt+I 6JwlogNEv1FqsvRGEftz3jmkRF8HAz7m0VW9MDY0IgsX8VtBX3MNMvjXK6g8ZhXBF7iktQZLaYY NcTvDwz1H0roZ87gXrUMttokFuynDWnhie3KDaenMKqZRlzqHEJGJv8JQLPhJNhXsb9IyOnk2QM 7rW7IZtgxae+KTr0Y1JfquJ+l+FOQBdfbXm5kvrp2irW4Zt8CzqD3oEzmuJUFO42/JqQEpIqS27 1qd3uuWlOTIcwJbm250B0owWg12wul45gPA0C3TIpxzW2Bb+hhx26jmOnXv3ij6SWTin3zwzzj/ R7sHoCpOjvyI1tydlTcKdPl3ZkKcyLvOAB5PQKKtMdvRkDXgYhZdGMBnwU0D5ikWA7MRujqWFJx 4NQ1QcopQdfWyYN1XalT6ubUvOVmc0wPLzcpIeNefv5e45UaqSsRBEpK8Yeo52TelEG8Heduc3/ TVet5aqRZx5IM/tUNkpe6vO7Do7atDcvoa05Z86VFxGI= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-GUID: aOWau56ZtG2OFcBECNVQy67Qb9MQ45Zb X-Proofpoint-ORIG-GUID: aOWau56ZtG2OFcBECNVQy67Qb9MQ45Zb 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 priorityscore=1501 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 impostorscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 With the upcoming transition to a model where DWC3 core and glue operate on a single struct device the drvdata datatype will change to be owned by the core. The drvdata is however used by the Qualcomm DWC3 glue to pass the qcom glue context around before the core is allocated. Remove this problem, and clean up the code, by passing the dwc3_qcom struct around during probe, instead of acquiring it from the drvdata. Signed-off-by: Bjorn Andersson --- drivers/usb/dwc3/dwc3-qcom.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 58683bb672e9..50b1da845113 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -547,9 +547,10 @@ static int dwc3_qcom_request_irq(struct dwc3_qcom *qcom, int irq, return ret; } -static int dwc3_qcom_setup_port_irq(struct platform_device *pdev, int port_index, bool is_multiport) +static int dwc3_qcom_setup_port_irq(struct dwc3_qcom *qcom, + struct platform_device *pdev, + int port_index, bool is_multiport) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); const char *irq_name; int irq; int ret; @@ -634,9 +635,8 @@ static int dwc3_qcom_find_num_ports(struct platform_device *pdev) return DWC3_QCOM_MAX_PORTS; } -static int dwc3_qcom_setup_irq(struct platform_device *pdev) +static int dwc3_qcom_setup_irq(struct dwc3_qcom *qcom, struct platform_device *pdev) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); bool is_multiport; int ret; int i; @@ -645,7 +645,7 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) is_multiport = (qcom->num_ports > 1); for (i = 0; i < qcom->num_ports; i++) { - ret = dwc3_qcom_setup_port_irq(pdev, i, is_multiport); + ret = dwc3_qcom_setup_port_irq(qcom, pdev, i, is_multiport); if (ret) return ret; } @@ -700,9 +700,8 @@ static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count) return 0; } -static int dwc3_qcom_of_register_core(struct platform_device *pdev) +static int dwc3_qcom_of_register_core(struct dwc3_qcom *qcom, struct platform_device *pdev) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; int ret; @@ -778,7 +777,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev) goto clk_disable; } - ret = dwc3_qcom_setup_irq(pdev); + ret = dwc3_qcom_setup_irq(qcom, pdev); if (ret) { dev_err(dev, "failed to setup IRQs, err=%d\n", ret); goto clk_disable; @@ -793,7 +792,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev) if (ignore_pipe_clk) dwc3_qcom_select_utmi_clk(qcom); - ret = dwc3_qcom_of_register_core(pdev); + ret = dwc3_qcom_of_register_core(qcom, pdev); if (ret) { dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret); goto clk_disable; From patchwork Tue Jan 14 05:11:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938422 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 28055235BF0 for ; Tue, 14 Jan 2025 05:06:14 +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=1736831176; cv=none; b=DZaCcIqjr+8BtUSdvKVOI+EnqT0ulDgfsH1rB6lSsvna/FRRRK4dmHtk76AgyviFZo0IcjK3KkdFJOIlPx/2fwD6sim00pAB+Qp8gqRL3T7cvMqxNGCJ7heRVVblnSvCZTB2OPry/e0eHiddYCAu24yiyXsvwaSqhoaNBvWLicU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831176; c=relaxed/simple; bh=jlR6+ARwM/Lr0teTiCl1CKnctX2uH9kwYJiHn4/8YKg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PllVhkXM1RBQa21zIWQt4fnjsuEVrX6y3fb74Xq1IPaYVfzcpD1w6rZZHHCLoQgrB7KcIW53sSD3o8IfA+N5Qtc1IKivLLZoq+pjyVCRxDlSi/3IgblG+DFyxJLo5lZku8S/lE4DLgT1poXJZtMezjBcsPNkFLfUQ4v7Xgy5G+M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=DSJ9/9GG; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="DSJ9/9GG" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E40lMX020880 for ; Tue, 14 Jan 2025 05:06:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= wVofHqa/Meq48kmXydox7fcxL/v6GrgcWjFrX0DvEHE=; b=DSJ9/9GGoaSIOZom E2qWTn23GWKiPwTT1EG41yhWugpnWdK76D55Ly/8jiB3K60x3xTtv1vEP3guZaox 7k4jmqe1JDhA821imkFOp0aCBd08TN8W0Rln7aT4Rjz4LdnhDUzAK+LIdmy1eL7I 26n14HNcHZCDUKmfWJfny298cY03J31q0XL1zwGdTIPgnhST0t/JTsEbz8yc9Pz0 2gFwauz9lT3QzJe63bYbXgxxVvvd3rR2i8EQJIELoMXwPXpBhpB0ccimwBGEdZHr ZCtBNuCRFj6gWB3isdh1ey7MltKWSfpqPRcr3ML2Z1UJ4UQpghRX4aY97S3/a31n 4zuZlg== Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445gh603c1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:13 +0000 (GMT) Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-5f336936512so3569182eaf.3 for ; Mon, 13 Jan 2025 21:06:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831165; x=1737435965; 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=wVofHqa/Meq48kmXydox7fcxL/v6GrgcWjFrX0DvEHE=; b=e/Nd6ObMF8ujXFg0DTz2vJfsSSd59IkyJXZNMxZFTqemvG7D/TghWyNcC7PSSFjo7G Tc+y+5BnUvXc3ArnDomOwh4icuItZkpj9SsUbrCBq7g2VvupV7Xu7Murm2vFiv/GalJ4 7mfsOZqNdqZEWH9PY4Gw5f3nUWpwCDwAA1cwebGAFQ9jthH2GNs7Oi9aMqRaCvOITT1q m6XCprptI966jw/ScJtyTck7F2kCS5s3JkLPKCJ4VzreqCVmaJMlmllH+AtRssv1zUaT +hPG+mejIB5SrlvuPurjnL1quv0xjl9F2CpjIA/wqjZp1fj6PfpbsZ8SLgPf8ZY+NS1L 4dpg== X-Forwarded-Encrypted: i=1; AJvYcCVSTGi3FfNMtB353vicMnTHSeiz9rzdBROxjn9/MlVD1Xp7iMRm5uH+EtdK6Zz/9lQhc/oxFTmW1nc=@vger.kernel.org X-Gm-Message-State: AOJu0YxPt6CsCa+iu6xYBULZbnbLPn+2HCXmtHMk8Av/79vdMG5xoU1v B9BZrngqkBWfL1NzFgbPn2f1wzD2CnxsQr5gcsryaNDdN3AvrWiBEoMSAtQe0wB4q6bXJuQHgR0 gqD9/BR4zJnJwYtKemMxIPlBUwZBNlMpjVOtaCVOHclyfckPQyTnnAQb6mhQ= X-Gm-Gg: ASbGncuBMqpaReBpexr2CYgB9H85x8FP5LeigGBQdY/iOnMK0WMHAQ+vJCWWgtaFLAT iZ/uXBpCJaYLyfh73HPG3JgZIAJYLTrK36S6BiV0lc9BWT4Cu1t5IhGupSdCkNV3HANrn6sm6Qo Y04fOoOD1uUAiaLFqXykJcqcW5nmDsvDEkgZLNzOGZ5qP1jTovZoWU3NxbXgFDLSz6l9CmsNNTk KNLWbV2CWuKCGC9dE6l9Gi0b+uzCI7+KNe+e0l7sRpjtnR6hOyF01EXKOQmP6cZ/vvhEavwy0tM Pi+dcQZLgMpDpFZpPWFxJoWLSbpsmU0kPftL3tKVJYaxmo9LCEz4u5/t X-Received: by 2002:a4a:b18c:0:b0:5f7:339c:27a3 with SMTP id 006d021491bc7-5f7339c2a17mr10442485eaf.2.1736831165096; Mon, 13 Jan 2025 21:06:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqwl+eWCMyO3CPeK27lGBS3soliNfv/oFDlsvsyLoUOt2edrVJrjKWfLPHuUuRhDEwv+gaWQ== X-Received: by 2002:a4a:b18c:0:b0:5f7:339c:27a3 with SMTP id 006d021491bc7-5f7339c2a17mr10442472eaf.2.1736831164686; Mon, 13 Jan 2025 21:06:04 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:06:04 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:44 -0800 Subject: [PATCH v3 11/12] usb: dwc3: qcom: Transition to flattened model Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-11-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12227; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=jlR6+ARwM/Lr0teTiCl1CKnctX2uH9kwYJiHn4/8YKg=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVF8ZS6KvJ35selAj1vSpjlZm3Yeq9BWchE bCGp6PFz96JAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcXySxAArHI/3Zvmt0ED3fxHD4ZMqHAT0B3JgArgbUgZRjE 4Y3nZaS85rWC5dvHXyLDraiWhb0QRR98qJJ0syGjbLN4+MYjX+BZyvnPjfBGHSEN+CHyXqBXEuM OR2zb/k8luHfhX6cghWBNusirfXcrHQ74wnv2PECTk1KQtbnuQ3fx0JCxJcVsMEgxaesV4g680T 2wAc8ueRWvVhTqDSXodcmGwWkPaS/zPMneRGBcbcBsTvxVfDXtbvwLxYa090scSvrj+md9NxdoV mxA6lR0iOGfhrg9M+jQsyJ690Xzo1Rf0UCZefuRbhLm0lGx9P+AK1x34JG3MPEEig2SfDoY4/Dz p0KfOwXC9yXM4OFyW6Z8ElMxbkECBXfc5VAQl1d45RJHQrpZpvaTHFtNUzqBzFS8tORuX+7ssos +EbMuX6arRYPaVQM+IhLrJXGdU/4E/VSZ69ck97nL2wdZnxL46+4KWGQKtahDK8nPqgMG3v0vXr jIfo3zuq7WODv6TanIEFbYm05Bq/+4k2WOKYN+BAXuyzwptwtf+tmDKzAIAeN8nGRkreViUelDb EoVe2CdiuKXcOKOipttVacU/lOsgaX58XiodEXqP2Ssv5tKj9VzCzfD0O7FOkCA6NqZt8VyRYyf XmaLpKUslNELRTmrhxy2B/0bieZOyi99pF8dsqR9RIqA= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: BFNOPQ--aH3_jYVuMUrplmaOxlAKB8Zn X-Proofpoint-GUID: BFNOPQ--aH3_jYVuMUrplmaOxlAKB8Zn 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 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 The USB IP-block found in most Qualcomm platforms is modelled in the Linux kernel as 3 different independent device drivers, but as shown by the already existing layering violations in the Qualcomm glue driver they can not be operated independently. With the current implementation, the glue driver registers the core and has no way to know when this is done. As a result, e.g. the suspend callbacks needs to guard against NULL pointer dereferences when trying to peek into the struct dwc3 found in the drvdata of the child. Even with these checks, there are no way to fully protect ourselves from the race conditions that occur if the DWC3 is unbound. Missing from the upstream Qualcomm USB support is handling of role switching, in which the glue needs to be notified upon DRD mode changes. Several attempts has been made through the years to register callbacks etc, but they always fall short when it comes to handling of the core's probe deferral on resources etc. Moving to a model where the DWC3 core is instantiated in a synchronous fashion avoids above described race conditions. It is however not feasible to do so without also flattening the DeviceTree binding, as assumptions are made in the DWC3 core and frameworks used that the device's associated of_node will the that of the core. Furthermore, the DeviceTree binding is a direct representation of the Linux driver model, and doesn't necessarily describe "the USB IP-block". The Qualcomm DWC3 glue driver is therefor transitioned to initialize and operate the DWC3 within the one device context, in synchronous fashion. To handle backwards compatibility, and to remove the two-device model, of_nodes of the old compatible are converted to the new one, early during probe. This happens in the event that a DWC3 core child node is present, the content of the reg and interrupt properties of this node are merged into the shared properties, all remaining properties are copied and the core node is dropped. Effectively transitioning the node from qcom,dwc3 to qcom,snps-dwc3. As the dwc3-qcom driver is migrated to support (and only support) the qcom,snps-dwc3 binding, the kill-switch in the dwc3-flattening overlay code is removed. Signed-off-by: Bjorn Andersson --- .../of/overlays/dwc3-flattening/dwc3-flattening.c | 3 - drivers/usb/dwc3/dwc3-qcom.c | 136 ++++++++++----------- 2 files changed, 66 insertions(+), 73 deletions(-) diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c index 07f90360c04d..44bc97ac53c0 100644 --- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c +++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c @@ -1500,9 +1500,6 @@ static int dwc3_flattening_init(void) int overlay_ovcs; int ret; - /* TODO: Remove kill-switch as dwc3-qcom is migrated to qcom,snps-dwc */ - return 0; - match = of_match_node(dwc3_flatten_of_match, of_root); if (!match) return 0; diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 50b1da845113..df1ee6961c9e 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -14,7 +14,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -23,6 +24,7 @@ #include #include #include "core.h" +#include "glue.h" /* USB QSCRATCH Hardware registers */ #define QSCRATCH_HS_PHY_CTRL 0x10 @@ -73,7 +75,7 @@ struct dwc3_qcom_port { struct dwc3_qcom { struct device *dev; void __iomem *qscratch_base; - struct platform_device *dwc3; + struct dwc3 dwc; struct clk **clks; int num_clocks; struct reset_control *resets; @@ -92,6 +94,8 @@ struct dwc3_qcom { struct icc_path *icc_path_apps; }; +#define to_dwc3_qcom(d) container_of((d), struct dwc3_qcom, dwc) + static inline void dwc3_qcom_setbits(void __iomem *base, u32 offset, u32 val) { u32 reg; @@ -260,7 +264,7 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom) goto put_path_ddr; } - max_speed = usb_get_maximum_speed(&qcom->dwc3->dev); + max_speed = usb_get_maximum_speed(qcom->dwc.dev); if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) { ret = icc_set_bw(qcom->icc_path_ddr, USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW); @@ -303,25 +307,14 @@ static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom) /* Only usable in contexts where the role can not change. */ static bool dwc3_qcom_is_host(struct dwc3_qcom *qcom) { - struct dwc3 *dwc; - - /* - * FIXME: Fix this layering violation. - */ - dwc = platform_get_drvdata(qcom->dwc3); - - /* Core driver may not have probed yet. */ - if (!dwc) - return false; - - return dwc->xhci; + return qcom->dwc.xhci; } static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom, int port_index) { - struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); struct usb_device *udev; struct usb_hcd __maybe_unused *hcd; + struct dwc3 *dwc = &qcom->dwc; /* * FIXME: Fix this layering violation. @@ -498,7 +491,7 @@ static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup) static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data) { struct dwc3_qcom *qcom = data; - struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); + struct dwc3 *dwc = &qcom->dwc; /* If pm_suspended then let pm_resume take care of resuming h/w */ if (qcom->pm_suspended) @@ -700,40 +693,13 @@ static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count) return 0; } -static int dwc3_qcom_of_register_core(struct dwc3_qcom *qcom, struct platform_device *pdev) -{ - struct device_node *np = pdev->dev.of_node; - struct device *dev = &pdev->dev; - int ret; - - struct device_node *dwc3_np __free(device_node) = of_get_compatible_child(np, - "snps,dwc3"); - if (!dwc3_np) { - dev_err(dev, "failed to find dwc3 core child\n"); - return -ENODEV; - } - - ret = of_platform_populate(np, NULL, NULL, dev); - if (ret) { - dev_err(dev, "failed to register dwc3 core - %d\n", ret); - return ret; - } - - qcom->dwc3 = of_find_device_by_node(dwc3_np); - if (!qcom->dwc3) { - ret = -ENODEV; - dev_err(dev, "failed to get dwc3 platform device\n"); - of_platform_depopulate(dev); - } - - return ret; -} - static int dwc3_qcom_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct device *dev = &pdev->dev; struct dwc3_qcom *qcom; + struct resource res; + struct resource *r; int ret, i; bool ignore_pipe_clk; bool wakeup_source; @@ -742,7 +708,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev) if (!qcom) return -ENOMEM; - platform_set_drvdata(pdev, qcom); qcom->dev = &pdev->dev; qcom->resets = devm_reset_control_array_get_optional_exclusive(dev); @@ -771,8 +736,15 @@ static int dwc3_qcom_probe(struct platform_device *pdev) goto reset_assert; } - qcom->qscratch_base = devm_platform_ioremap_resource(pdev, 0); + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!r) + goto clk_disable; + res = *r; + res.end = res.start + SDM845_QSCRATCH_BASE_OFFSET; + + qcom->qscratch_base = devm_ioremap(dev, res.end, SDM845_QSCRATCH_SIZE); if (IS_ERR(qcom->qscratch_base)) { + dev_err(dev, "failed to map qscratch region: %pe\n", qcom->qscratch_base); ret = PTR_ERR(qcom->qscratch_base); goto clk_disable; } @@ -792,17 +764,18 @@ static int dwc3_qcom_probe(struct platform_device *pdev) if (ignore_pipe_clk) dwc3_qcom_select_utmi_clk(qcom); - ret = dwc3_qcom_of_register_core(qcom, pdev); - if (ret) { - dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret); + qcom->dwc.dev = dev; + ret = dwc3_init(&qcom->dwc, &res, true); + if (ret) { + ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n"); goto clk_disable; } ret = dwc3_qcom_interconnect_init(qcom); if (ret) - goto depopulate; + goto remove_core; - qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev); + qcom->mode = usb_get_dr_mode(dev); /* enable vbus override for device mode */ if (qcom->mode != USB_DR_MODE_HOST) @@ -815,20 +788,15 @@ static int dwc3_qcom_probe(struct platform_device *pdev) wakeup_source = of_property_read_bool(dev->of_node, "wakeup-source"); device_init_wakeup(&pdev->dev, wakeup_source); - device_init_wakeup(&qcom->dwc3->dev, wakeup_source); qcom->is_suspended = false; - pm_runtime_set_active(dev); - pm_runtime_enable(dev); - pm_runtime_forbid(dev); return 0; interconnect_exit: dwc3_qcom_interconnect_exit(qcom); -depopulate: - of_platform_depopulate(&pdev->dev); - platform_device_put(qcom->dwc3); +remove_core: + dwc3_uninit(&qcom->dwc); clk_disable: for (i = qcom->num_clocks - 1; i >= 0; i--) { clk_disable_unprepare(qcom->clks[i]); @@ -842,13 +810,11 @@ static int dwc3_qcom_probe(struct platform_device *pdev) static void dwc3_qcom_remove(struct platform_device *pdev) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); + struct dwc3 *dwc = platform_get_drvdata(pdev); + struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); struct device *dev = &pdev->dev; int i; - of_platform_depopulate(&pdev->dev); - platform_device_put(qcom->dwc3); - for (i = qcom->num_clocks - 1; i >= 0; i--) { clk_disable_unprepare(qcom->clks[i]); clk_put(qcom->clks[i]); @@ -864,10 +830,15 @@ static void dwc3_qcom_remove(struct platform_device *pdev) static int __maybe_unused dwc3_qcom_pm_suspend(struct device *dev) { - struct dwc3_qcom *qcom = dev_get_drvdata(dev); + struct dwc3 *dwc = dev_get_drvdata(dev); + struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); bool wakeup = device_may_wakeup(dev); int ret; + ret = dwc3_suspend(&qcom->dwc); + if (ret) + return ret; + ret = dwc3_qcom_suspend(qcom, wakeup); if (ret) return ret; @@ -879,7 +850,8 @@ static int __maybe_unused dwc3_qcom_pm_suspend(struct device *dev) static int __maybe_unused dwc3_qcom_pm_resume(struct device *dev) { - struct dwc3_qcom *qcom = dev_get_drvdata(dev); + struct dwc3 *dwc = dev_get_drvdata(dev); + struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); bool wakeup = device_may_wakeup(dev); int ret; @@ -889,31 +861,55 @@ static int __maybe_unused dwc3_qcom_pm_resume(struct device *dev) qcom->pm_suspended = false; + ret = dwc3_resume(&qcom->dwc); + if (ret) + return ret; + return 0; } static int __maybe_unused dwc3_qcom_runtime_suspend(struct device *dev) { - struct dwc3_qcom *qcom = dev_get_drvdata(dev); + struct dwc3 *dwc = dev_get_drvdata(dev); + struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); + int ret; + + ret = dwc3_runtime_suspend(&qcom->dwc); + if (ret) + return ret; return dwc3_qcom_suspend(qcom, true); } +static void __maybe_unused dwc3_qcom_complete(struct device *dev) +{ + struct dwc3 *dwc = dev_get_drvdata(dev); + + dwc3_complete(dwc); +} + static int __maybe_unused dwc3_qcom_runtime_resume(struct device *dev) { - struct dwc3_qcom *qcom = dev_get_drvdata(dev); + struct dwc3 *dwc = dev_get_drvdata(dev); + struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); + int ret; + + ret = dwc3_qcom_resume(qcom, true); + if (ret) + return ret; - return dwc3_qcom_resume(qcom, true); + return dwc3_runtime_resume(&qcom->dwc); } static const struct dev_pm_ops dwc3_qcom_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(dwc3_qcom_pm_suspend, dwc3_qcom_pm_resume) SET_RUNTIME_PM_OPS(dwc3_qcom_runtime_suspend, dwc3_qcom_runtime_resume, NULL) + .complete = dwc3_qcom_complete, }; static const struct of_device_id dwc3_qcom_of_match[] = { - { .compatible = "qcom,dwc3" }, + { .compatible = "qcom,snps-dwc3" }, { } }; MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match); From patchwork Tue Jan 14 05:11:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 13938425 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 EAD7724334E for ; Tue, 14 Jan 2025 05:06:18 +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=1736831181; cv=none; b=D6TgyiqDlWx/zJiNe+wxBT0G7uOqCHRAVBTe1wr5TBrV0Kdp/Z8i9ZJJVpdrhg650V8xbrA4clenJxg+un8wCtf7cU0Nru7PSaMIT2uSOFlLYdm3HWS0dnLIfrKWhNi2kAt22uFKP76UutFp2l400OO+2QYr7gnzilZ59vdEdwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736831181; c=relaxed/simple; bh=QZCpZlu53quw6nL6TnKxy5fmS1nRzhqSoUP2GUKX9/c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oeWjW1JylB8l0Mh16Hfqmawx6yLJTB3VCwKDf7rnNTrzWzBNJLvfhM9iqWxD3FPmc32Bh7x6wd4C/b/WL8Pav1t7pysrTLN6g+KULNe0EhHHhdb2m6Wl3poJAFwqBk1zdyxT4pk3FCjtSf8DiVIWzFLAb5pVyqWxj98Up+cCKRI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=KGf7NYt4; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="KGf7NYt4" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E27RHo027624 for ; Tue, 14 Jan 2025 05:06:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 7sVaiMs2t/yghLl4ZXum6gfPzebES0AYVlGI7YtV98s=; b=KGf7NYt4oOGnRDHO wwN0i9O/t7QZJqhpGXfDqSvWdbX4t5XeO1SGPHQ/EoCZDXsrkIy8wnd0/GJ93jQz 18XlEk4s7uCheAWgA/zsVVk7fYzCH8m8blH2XJrAUHG0ELjWuY7PTHtq2MkTrxrT EDy626Yfc0AFQHyATsOLhyhwSn6KLYdP92uJ3kQBXlb3+7oS2q0GCuenmVAditBX vO/T/kbf/NLsUFlz7KhPjX7FdBVi+Dm80/VljM09/cYWNL/pFNBMhlrmSwKSW1tL ulvORhyfpJmoPpy3POInnXExNsIqcvfe9duFocTaJf5uNMcj7A0Ge1V7up7GuVzh pgh6uA== Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 445ev78be9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 14 Jan 2025 05:06:18 +0000 (GMT) Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-5f368647450so3782675eaf.0 for ; Mon, 13 Jan 2025 21:06:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736831166; x=1737435966; 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=7sVaiMs2t/yghLl4ZXum6gfPzebES0AYVlGI7YtV98s=; b=G+AJuVUk4M2AMjrSRcQbQ6gxDJMQWnJtU9hoghxpT95/jhC4LYtvpiXv6PueLAiEiA tb7faZvyeJDqr0QTkhFEUwRu9u7ZkfjMSPRJd8cIvxY3bJkCm820sqwjX5dE5thrvo+U qqi1CRm5m0j1Ukg4yJiYDkjFCGjg03u6tMViM5d99lyzudGsW+NrD/arArITxa/h3ntV xJ0gHZbLpIeBQ6Xj8tmdM68ZG4SATNkKY/3j7Pk8ZO2B5AoLjmMWDfPUibCNwiqeQWYr KE8vajaTZwzVyoibCyZA5Qh9Jh/cOOPa7vSDZsh0ZM+iomrOoaEai2CseNJU12UehPna ABtQ== X-Forwarded-Encrypted: i=1; AJvYcCWw19BUqF8Ld8pyYMLyO6whqbUQsdi+TCbrsYcF64s7fDlgD0M7Ea1iEEyVVcf/Sc5izUjsHzkRpJo=@vger.kernel.org X-Gm-Message-State: AOJu0YyJQBMj2Jb2TCVsPkGmKT7Lx2a5NrUpZML6MLg4q63XqL2oMb9j lJjeCnW/bNFFr12ukPMfyx14iLXYtAPNTa/H/j14KS5+KEY+7Xtq1V6lneUxHTfq28i1rRGlsoQ GaI15o1XIzfV8N31ahn7sUCbYAk5O+aba0LkrZBf2D9yN52J0mmV0QvWuH4A= X-Gm-Gg: ASbGncv2X2c/26Yb69aWyWVlG2ph4gRYRyoAM0Inle19BU6if0yXXzxsoXbhpTSJDf0 jXBcoR2fWS/haUYsZuJk7oENR1593x6gkaaqtix3GHdncTbQ2tRVU+13jbIrSW0FlxHO0FhQw7w 054Sl+Q7GsZU8K4ti8K0uX6pBrcoqGwuNmlrfXAKtkaEb5OJngTquyZjtwW+FxFgiWG5tkfqsOa 2/yKCsr8w3481GFT5iyY1ddzgHBcYATY56PMHCXsDG9Iwzp1LOCJUeMHoVbkdvJ2OTJY3icIo2A tT8HB1oJtyf7THyBKyI/WcfLGbaBSki86laE4IjqSmoboJvH30mevRfz X-Received: by 2002:a05:6820:c92:b0:5f8:b916:2516 with SMTP id 006d021491bc7-5f8b91627fbmr3634073eaf.0.1736831166257; Mon, 13 Jan 2025 21:06:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmEHuVW5qi2sAI1oDKa1nMWAv2Gy9K/Nus/ICcutZpYln8LjviPaQBro2NNf9FeuBaY8drYA== X-Received: by 2002:a05:6820:c92:b0:5f8:b916:2516 with SMTP id 006d021491bc7-5f8b91627fbmr3634048eaf.0.1736831165840; Mon, 13 Jan 2025 21:06:05 -0800 (PST) Received: from [192.168.86.65] (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5f882756603sm4001750eaf.29.2025.01.13.21.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 21:06:05 -0800 (PST) From: Bjorn Andersson Date: Mon, 13 Jan 2025 21:11:45 -0800 Subject: [PATCH v3 12/12] arm64: dts: qcom: sc8280x: Flatten the USB nodes Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250113-dwc3-refactor-v3-12-d1722075df7b@oss.qualcomm.com> References: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com> To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felipe Balbi , Wesley Cheng , Saravana Kannan , Thinh Nguyen , Philipp Zabel , Bjorn Andersson , Konrad Dybcio , Frank Li Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=13628; i=bjorn.andersson@oss.qualcomm.com; h=from:subject:message-id; bh=QZCpZlu53quw6nL6TnKxy5fmS1nRzhqSoUP2GUKX9/c=; b=owEBgwJ8/ZANAwAIAQsfOT8Nma3FAcsmYgBnhfIVd3y2cF3CBIEhCUos5UwVC6LpTGBrNcMcM jJsSfDrykKJAkkEAAEIADMWIQQF3gPMXzXqTwlm1SULHzk/DZmtxQUCZ4XyFRUcYW5kZXJzc29u QGtlcm5lbC5vcmcACgkQCx85Pw2ZrcWzgA//Waq1cGSgv95hOttvPTD7GbCp6dOzDOe/tgWFHRu DH1v3Ci83L/ardMEoT0NmeZ74dGw6JTgwwiboJjDJlG2M77vEFH4mRjWarUeUR+CO9QK7AbrAG9 V9QUrItL2bVZkULHRth8qmbnK9+9jdsFL3lRN8bkRA5RoUCOPlBx7trVY+/jQ4RHfurnTUQaHMc GRIX8c5Zd3Gsf3gdpimu6w4TV2UyRplL60Wlb4VRSoIjsPqi8F9RaqzQfx59Xr0eCCcyMI3cwyC 2jN6APDFKj1QipC/VrmIRiSTOH583/ltUs231+PuAqTcRiSARHlqh0zCAqMmaR6nl214U3IenR8 3SrIZSvS/iqE79EdS7dscCt9Q4lacUHdJ5pTCdyk+gokEzblLFPbEGvIRUoS1ew/rb5fkLtufr2 YX6Wd4yLMxEoe8LAU7NM4zkggAMQ2noC0CXTTqTPZUMlTPaFsoY7AWNPnkiCcejavNiffYh8Gtf 79mPjzL4C0Aad6l7ztAvxXybEMcZkHYhzCe3wjULdlN5DTBzNIsuQ+ewfkWfFhLlQaZWTdO0eXX h70ws80mOwPWRaIUt9bRo/jxUO8aKoFWJtslKlTXUhzduW6ITTF+krYsstD76mkPZfecQm6eHW3 db6yaB8AskzXOIfcTCoY29c9QG7qNTv4x5bACIVtOcFo= X-Developer-Key: i=bjorn.andersson@oss.qualcomm.com; a=openpgp; fpr=05DE03CC5F35EA4F0966D5250B1F393F0D99ADC5 X-Proofpoint-ORIG-GUID: ZRFvyV385kVsxFPeKnpo2XHm3IGsnmFS X-Proofpoint-GUID: ZRFvyV385kVsxFPeKnpo2XHm3IGsnmFS 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 priorityscore=1501 impostorscore=0 spamscore=0 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501140040 Transition the three USB controllers found in sc8280xp to the newly introduced, flattened representation of the Qualcomm USB block, i.e. qcom,snps-dwc3, to show the end result. The reg and interrupts properties from the usb child node are merged with their counterpart in the outer node, remaining properties and child nodes are simply moved. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 12 +- arch/arm64/boot/dts/qcom/sa8540p-ride.dts | 5 +- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 12 +- .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 10 +- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 11 +- .../boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 10 +- .../boot/dts/qcom/sc8280xp-microsoft-blackrock.dts | 18 +-- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 157 ++++++++++----------- 8 files changed, 95 insertions(+), 140 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts index 2fd1dafe63ce..3d84cbf5af31 100644 --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts @@ -631,12 +631,10 @@ &ufs_card_phy { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { /* TODO: Define USB-C connector properly */ dr_mode = "peripheral"; + + status = "okay"; }; &usb_0_hsphy { @@ -655,12 +653,10 @@ &usb_0_qmpphy { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { /* TODO: Define USB-C connector properly */ dr_mode = "host"; + + status = "okay"; }; &usb_1_hsphy { diff --git a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts index 177b9dad6ff7..7be803fb7cbe 100644 --- a/arch/arm64/boot/dts/qcom/sa8540p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8540p-ride.dts @@ -466,11 +466,8 @@ &ufs_mem_phy { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "peripheral"; + status = "okay"; }; &usb_0_hsphy { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 75adaa19d1c3..05fe5793f1f1 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -795,11 +795,9 @@ &ufs_mem_phy { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "host"; + + status = "okay"; }; &usb_0_dwc3_hs { @@ -832,11 +830,9 @@ &usb_0_qmpphy_out { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "host"; + + status = "okay"; }; &usb_1_dwc3_hs { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts index 09b95f89ee58..300c7dc999a4 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts @@ -997,11 +997,8 @@ bluetooth { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "host"; + status = "okay"; }; &usb_0_hsphy { @@ -1026,11 +1023,8 @@ &usb_0_qmpphy_dp_in { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "host"; + status = "okay"; }; &usb_1_hsphy { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index f3190f408f4b..1b9501cc82f4 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -1343,11 +1343,9 @@ bluetooth { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "host"; + + status = "okay"; }; &usb_0_dwc3_hs { @@ -1380,11 +1378,8 @@ &usb_0_qmpphy_out { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "host"; + status = "okay"; }; &usb_1_dwc3_hs { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts index ae5daeac8fe2..82672f441ea2 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts @@ -749,11 +749,8 @@ embedded-controller { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "host"; + status = "okay"; }; &usb_0_dwc3_hs { @@ -786,11 +783,8 @@ &usb_0_qmpphy_out { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "host"; + status = "okay"; }; &usb_1_dwc3_hs { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts index fa9d94105052..eeb69cfd4422 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-blackrock.dts @@ -982,11 +982,9 @@ bluetooth { }; &usb_0 { - status = "okay"; -}; - -&usb_0_dwc3 { dr_mode = "host"; + + status = "okay"; }; &usb_0_dwc3_hs { @@ -1019,11 +1017,9 @@ &usb_0_qmpphy_out { }; &usb_1 { - status = "okay"; -}; - -&usb_1_dwc3 { dr_mode = "host"; + + status = "okay"; }; &usb_1_dwc3_hs { @@ -1059,12 +1055,10 @@ &usb_2 { pinctrl-0 = <&usb2_en_state>; pinctrl-names = "default"; - status = "okay"; -}; - -&usb_2_dwc3 { phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>; phy-names = "usb2-0", "usb3-0"; + + status = "okay"; }; &usb_2_hsphy0 { diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index 01501acb1790..3dea86b0e13d 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -3457,12 +3457,9 @@ system-cache-controller@9200000 { interrupts = ; }; - usb_2: usb@a4f8800 { - compatible = "qcom,sc8280xp-dwc3-mp", "qcom,dwc3"; - reg = <0 0x0a4f8800 0 0x400>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + usb_2: usb@a400000 { + compatible = "qcom,sc8280xp-dwc3-mp", "qcom,snps-dwc3"; + reg = <0 0x0a400000 0 0x10000>; clocks = <&gcc GCC_CFG_NOC_USB3_MP_AXI_CLK>, <&gcc GCC_USB30_MP_MASTER_CLK>, @@ -3480,7 +3477,8 @@ usb_2: usb@a4f8800 { <&gcc GCC_USB30_MP_MASTER_CLK>; assigned-clock-rates = <19200000>, <200000000>; - interrupts-extended = <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 857 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 856 IRQ_TYPE_LEVEL_HIGH>, @@ -3499,7 +3497,8 @@ usb_2: usb@a4f8800 { <&pdc 16 IRQ_TYPE_LEVEL_HIGH>, <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "pwr_event_1", "pwr_event_2", + interrupt-names = "dwc_usb3", + "pwr_event_1", "pwr_event_2", "pwr_event_3", "pwr_event_4", "hs_phy_1", "hs_phy_2", "hs_phy_3", "hs_phy_4", @@ -3509,6 +3508,7 @@ usb_2: usb@a4f8800 { "dp_hs_phy_4", "dm_hs_phy_4", "ss_phy_1", "ss_phy_2"; + iommus = <&apps_smmu 0x800 0x0>; power-domains = <&gcc USB30_MP_GDSC>; required-opps = <&rpmhpd_opp_nom>; @@ -3518,35 +3518,28 @@ usb_2: usb@a4f8800 { <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_MP 0>; interconnect-names = "usb-ddr", "apps-usb"; + phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>, + <&usb_2_hsphy1>, <&usb_2_qmpphy1>, + <&usb_2_hsphy2>, + <&usb_2_hsphy3>; + phy-names = "usb2-0", "usb3-0", + "usb2-1", "usb3-1", + "usb2-2", + "usb2-3"; + wakeup-source; + dr_mode = "host"; + + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + status = "disabled"; + }; - usb_2_dwc3: usb@a400000 { - compatible = "snps,dwc3"; - reg = <0 0x0a400000 0 0xcd00>; - interrupts = ; - iommus = <&apps_smmu 0x800 0x0>; - phys = <&usb_2_hsphy0>, <&usb_2_qmpphy0>, - <&usb_2_hsphy1>, <&usb_2_qmpphy1>, - <&usb_2_hsphy2>, - <&usb_2_hsphy3>; - phy-names = "usb2-0", "usb3-0", - "usb2-1", "usb3-1", - "usb2-2", - "usb2-3"; - dr_mode = "host"; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; - }; - }; - - usb_0: usb@a6f8800 { - compatible = "qcom,sc8280xp-dwc3", "qcom,dwc3"; - reg = <0 0x0a6f8800 0 0x400>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + usb_0: usb@a600000 { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a600000 0 0x20000>; clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, <&gcc GCC_USB30_PRIM_MASTER_CLK>, @@ -3564,17 +3557,20 @@ usb_0: usb@a6f8800 { <&gcc GCC_USB30_PRIM_MASTER_CLK>; assigned-clock-rates = <19200000>, <200000000>; - interrupts-extended = <&intc GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 803 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 804 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 805 IRQ_TYPE_LEVEL_HIGH>, <&pdc 14 IRQ_TYPE_EDGE_BOTH>, <&pdc 15 IRQ_TYPE_EDGE_BOTH>, <&pdc 138 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "pwr_event", + interrupt-names = "dwc_usb3", + "pwr_event", "hs_phy_irq", "dp_hs_phy_irq", "dm_hs_phy_irq", "ss_phy_irq"; + iommus = <&apps_smmu 0x820 0x0>; power-domains = <&gcc USB30_PRIM_GDSC>; required-opps = <&rpmhpd_opp_nom>; @@ -3584,45 +3580,40 @@ usb_0: usb@a6f8800 { <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_0 0>; interconnect-names = "usb-ddr", "apps-usb"; + phys = <&usb_0_hsphy>, <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", "usb3-phy"; + wakeup-source; - status = "disabled"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; - usb_0_dwc3: usb@a600000 { - compatible = "snps,dwc3"; - reg = <0 0x0a600000 0 0xcd00>; - interrupts = ; - iommus = <&apps_smmu 0x820 0x0>; - phys = <&usb_0_hsphy>, <&usb_0_qmpphy QMP_USB43DP_USB3_PHY>; - phy-names = "usb2-phy", "usb3-phy"; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; + status = "disabled"; - ports { - #address-cells = <1>; - #size-cells = <0>; + ports { + #address-cells = <1>; + #size-cells = <0>; - port@0 { - reg = <0>; + port@0 { + reg = <0>; - usb_0_dwc3_hs: endpoint { - }; + usb_0_dwc3_hs: endpoint { }; + }; - port@1 { - reg = <1>; + port@1 { + reg = <1>; - usb_0_dwc3_ss: endpoint { - remote-endpoint = <&usb_0_qmpphy_usb_ss_in>; - }; + usb_0_dwc3_ss: endpoint { + remote-endpoint = <&usb_0_qmpphy_usb_ss_in>; }; }; }; }; - usb_1: usb@a8f8800 { - compatible = "qcom,sc8280xp-dwc3", "qcom,dwc3"; - reg = <0 0x0a8f8800 0 0x400>; + usb_1: usb@a800000 { + compatible = "qcom,sc8280xp-dwc3", "qcom,snps-dwc3"; + reg = <0 0x0a800000 0 0x10000>; #address-cells = <2>; #size-cells = <2>; ranges; @@ -3643,17 +3634,20 @@ usb_1: usb@a8f8800 { <&gcc GCC_USB30_SEC_MASTER_CLK>; assigned-clock-rates = <19200000>, <200000000>; - interrupts-extended = <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, + interrupts-extended = <&intc GIC_SPI 810 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 811 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 790 IRQ_TYPE_LEVEL_HIGH>, <&pdc 12 IRQ_TYPE_EDGE_BOTH>, <&pdc 13 IRQ_TYPE_EDGE_BOTH>, <&pdc 136 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "pwr_event", + interrupt-names = "dwc_usb3", + "pwr_event", "hs_phy_irq", "dp_hs_phy_irq", "dm_hs_phy_irq", "ss_phy_irq"; + iommus = <&apps_smmu 0x860 0x0>; power-domains = <&gcc USB30_SEC_GDSC>; required-opps = <&rpmhpd_opp_nom>; @@ -3663,37 +3657,32 @@ usb_1: usb@a8f8800 { <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB3_1 0>; interconnect-names = "usb-ddr", "apps-usb"; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; + phy-names = "usb2-phy", "usb3-phy"; + wakeup-source; - status = "disabled"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; - usb_1_dwc3: usb@a800000 { - compatible = "snps,dwc3"; - reg = <0 0x0a800000 0 0xcd00>; - interrupts = ; - iommus = <&apps_smmu 0x860 0x0>; - phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; - phy-names = "usb2-phy", "usb3-phy"; - snps,dis-u1-entry-quirk; - snps,dis-u2-entry-quirk; + status = "disabled"; - ports { - #address-cells = <1>; - #size-cells = <0>; + ports { + #address-cells = <1>; + #size-cells = <0>; - port@0 { - reg = <0>; + port@0 { + reg = <0>; - usb_1_dwc3_hs: endpoint { - }; + usb_1_dwc3_hs: endpoint { }; + }; - port@1 { - reg = <1>; + port@1 { + reg = <1>; - usb_1_dwc3_ss: endpoint { - remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; - }; + usb_1_dwc3_ss: endpoint { + remote-endpoint = <&usb_1_qmpphy_usb_ss_in>; }; }; };