1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/qcom,ipa.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Qualcomm IP Accelerator (IPA) 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Alex Elder <elder@kernel.org> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: 13c66ec88fSEmmanuel Vadot This binding describes the Qualcomm IPA. The IPA is capable of offloading 14c66ec88fSEmmanuel Vadot certain network processing tasks (e.g. filtering, routing, and NAT) from 15c66ec88fSEmmanuel Vadot the main processor. 16c66ec88fSEmmanuel Vadot 17c66ec88fSEmmanuel Vadot The IPA sits between multiple independent "execution environments," 18c66ec88fSEmmanuel Vadot including the Application Processor (AP) and the modem. The IPA presents 19c66ec88fSEmmanuel Vadot a Generic Software Interface (GSI) to each execution environment. 20c66ec88fSEmmanuel Vadot The GSI is an integral part of the IPA, but it is logically isolated 21c66ec88fSEmmanuel Vadot and has a distinct interrupt and a separately-defined address space. 22c66ec88fSEmmanuel Vadot 23c66ec88fSEmmanuel Vadot See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. See 24c66ec88fSEmmanuel Vadot iommu/iommu.txt and iommu/arm,smmu.yaml for more information about SMMU 25c66ec88fSEmmanuel Vadot bindings. 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel Vadot - | 29c66ec88fSEmmanuel Vadot -------- --------- 30c66ec88fSEmmanuel Vadot | | | | 31c66ec88fSEmmanuel Vadot | AP +<---. .----+ Modem | 32c66ec88fSEmmanuel Vadot | +--. | | .->+ | 33c66ec88fSEmmanuel Vadot | | | | | | | | 34c66ec88fSEmmanuel Vadot -------- | | | | --------- 35c66ec88fSEmmanuel Vadot v | v | 36c66ec88fSEmmanuel Vadot --+-+---+-+-- 37c66ec88fSEmmanuel Vadot | GSI | 38c66ec88fSEmmanuel Vadot |-----------| 39c66ec88fSEmmanuel Vadot | | 40c66ec88fSEmmanuel Vadot | IPA | 41c66ec88fSEmmanuel Vadot | | 42c66ec88fSEmmanuel Vadot ------------- 43c66ec88fSEmmanuel Vadot 44c66ec88fSEmmanuel Vadotproperties: 45c66ec88fSEmmanuel Vadot compatible: 468d13bc63SEmmanuel Vadot oneOf: 478d13bc63SEmmanuel Vadot - enum: 485956d97fSEmmanuel Vadot - qcom,msm8998-ipa 492eb4d8dcSEmmanuel Vadot - qcom,sc7180-ipa 502eb4d8dcSEmmanuel Vadot - qcom,sc7280-ipa 512eb4d8dcSEmmanuel Vadot - qcom,sdm845-ipa 522eb4d8dcSEmmanuel Vadot - qcom,sdx55-ipa 53fac71e4eSEmmanuel Vadot - qcom,sdx65-ipa 548bab661aSEmmanuel Vadot - qcom,sm6350-ipa 552eb4d8dcSEmmanuel Vadot - qcom,sm8350-ipa 568d13bc63SEmmanuel Vadot - qcom,sm8550-ipa 578d13bc63SEmmanuel Vadot - items: 588d13bc63SEmmanuel Vadot - enum: 598d13bc63SEmmanuel Vadot - qcom,sm8650-ipa 608d13bc63SEmmanuel Vadot - const: qcom,sm8550-ipa 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel Vadot reg: 63c66ec88fSEmmanuel Vadot items: 64c66ec88fSEmmanuel Vadot - description: IPA registers 65c66ec88fSEmmanuel Vadot - description: IPA shared memory 66c66ec88fSEmmanuel Vadot - description: GSI registers 67c66ec88fSEmmanuel Vadot 68c66ec88fSEmmanuel Vadot reg-names: 69c66ec88fSEmmanuel Vadot items: 70c66ec88fSEmmanuel Vadot - const: ipa-reg 71c66ec88fSEmmanuel Vadot - const: ipa-shared 72c66ec88fSEmmanuel Vadot - const: gsi 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot iommus: 758cc087a1SEmmanuel Vadot minItems: 1 768cc087a1SEmmanuel Vadot maxItems: 2 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot clocks: 79c66ec88fSEmmanuel Vadot maxItems: 1 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot clock-names: 82c66ec88fSEmmanuel Vadot const: core 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot interrupts: 85c66ec88fSEmmanuel Vadot items: 86c66ec88fSEmmanuel Vadot - description: IPA interrupt (hardware IRQ) 87c66ec88fSEmmanuel Vadot - description: GSI interrupt (hardware IRQ) 88c66ec88fSEmmanuel Vadot - description: Modem clock query interrupt (smp2p interrupt) 89c66ec88fSEmmanuel Vadot - description: Modem setup ready interrupt (smp2p interrupt) 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot interrupt-names: 92c66ec88fSEmmanuel Vadot items: 93c66ec88fSEmmanuel Vadot - const: ipa 94c66ec88fSEmmanuel Vadot - const: gsi 95c66ec88fSEmmanuel Vadot - const: ipa-clock-query 96c66ec88fSEmmanuel Vadot - const: ipa-setup-ready 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadot interconnects: 99354d7675SEmmanuel Vadot oneOf: 100354d7675SEmmanuel Vadot - items: 101354d7675SEmmanuel Vadot - description: Path leading to system memory 102354d7675SEmmanuel Vadot - description: Path between the AP and IPA config space 103354d7675SEmmanuel Vadot - items: 104354d7675SEmmanuel Vadot - description: Path leading to system memory 105354d7675SEmmanuel Vadot - description: Path leading to internal memory 106354d7675SEmmanuel Vadot - description: Path between the AP and IPA config space 107c66ec88fSEmmanuel Vadot 108c66ec88fSEmmanuel Vadot interconnect-names: 109354d7675SEmmanuel Vadot oneOf: 110354d7675SEmmanuel Vadot - items: 111354d7675SEmmanuel Vadot - const: memory 112354d7675SEmmanuel Vadot - const: config 113354d7675SEmmanuel Vadot - items: 114c66ec88fSEmmanuel Vadot - const: memory 115c66ec88fSEmmanuel Vadot - const: imem 116c66ec88fSEmmanuel Vadot - const: config 117c66ec88fSEmmanuel Vadot 118e67e8565SEmmanuel Vadot qcom,qmp: 119e67e8565SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 120e67e8565SEmmanuel Vadot description: phandle to the AOSS side-channel message RAM 121e67e8565SEmmanuel Vadot 122c66ec88fSEmmanuel Vadot qcom,smem-states: 123c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 124c66ec88fSEmmanuel Vadot description: State bits used in by the AP to signal the modem. 125c66ec88fSEmmanuel Vadot items: 126c66ec88fSEmmanuel Vadot - description: Whether the "ipa-clock-enabled" state bit is valid 127c66ec88fSEmmanuel Vadot - description: Whether the IPA clock is enabled (if valid) 128c66ec88fSEmmanuel Vadot 129c66ec88fSEmmanuel Vadot qcom,smem-state-names: 130c66ec88fSEmmanuel Vadot description: The names of the state bits used for SMP2P output 131c66ec88fSEmmanuel Vadot items: 132c66ec88fSEmmanuel Vadot - const: ipa-clock-enabled-valid 133c66ec88fSEmmanuel Vadot - const: ipa-clock-enabled 134c66ec88fSEmmanuel Vadot 1358bab661aSEmmanuel Vadot qcom,gsi-loader: 1368bab661aSEmmanuel Vadot enum: 1378bab661aSEmmanuel Vadot - self 1388bab661aSEmmanuel Vadot - modem 1398bab661aSEmmanuel Vadot - skip 1408bab661aSEmmanuel Vadot description: 1418bab661aSEmmanuel Vadot Indicates how GSI firmware should be loaded. If the AP loads 1428bab661aSEmmanuel Vadot and validates GSI firmware, this property has value "self". 1438bab661aSEmmanuel Vadot If the modem does this, this property has value "modem". 1448bab661aSEmmanuel Vadot Otherwise, "skip" means GSI firmware loading is not required. 1458bab661aSEmmanuel Vadot 146c66ec88fSEmmanuel Vadot modem-init: 1478bab661aSEmmanuel Vadot deprecated: true 148c66ec88fSEmmanuel Vadot type: boolean 149c66ec88fSEmmanuel Vadot description: 1508bab661aSEmmanuel Vadot This is the older (deprecated) way of indicating how GSI firmware 1518bab661aSEmmanuel Vadot should be loaded. If present, the modem loads GSI firmware; if 1528bab661aSEmmanuel Vadot absent, the AP loads GSI firmware. 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadot memory-region: 155c66ec88fSEmmanuel Vadot maxItems: 1 156c66ec88fSEmmanuel Vadot description: 157c66ec88fSEmmanuel Vadot If present, a phandle for a reserved memory area that holds 158c66ec88fSEmmanuel Vadot the firmware passed to Trust Zone for authentication. Required 1598bab661aSEmmanuel Vadot when the AP (not the modem) performs early initialization. 160c66ec88fSEmmanuel Vadot 1612eb4d8dcSEmmanuel Vadot firmware-name: 162*01950c46SEmmanuel Vadot maxItems: 1 1632eb4d8dcSEmmanuel Vadot description: 1642eb4d8dcSEmmanuel Vadot If present, name (or relative path) of the file within the 1652eb4d8dcSEmmanuel Vadot firmware search path containing the firmware image used when 1662eb4d8dcSEmmanuel Vadot initializing IPA hardware. Optional, and only used when 1672eb4d8dcSEmmanuel Vadot Trust Zone performs early initialization. 1682eb4d8dcSEmmanuel Vadot 169c66ec88fSEmmanuel Vadotrequired: 170c66ec88fSEmmanuel Vadot - compatible 171c66ec88fSEmmanuel Vadot - iommus 172c66ec88fSEmmanuel Vadot - reg 173c66ec88fSEmmanuel Vadot - clocks 174c66ec88fSEmmanuel Vadot - interrupts 175c66ec88fSEmmanuel Vadot - interconnects 176c66ec88fSEmmanuel Vadot - qcom,smem-states 177c66ec88fSEmmanuel Vadot 1788bab661aSEmmanuel VadotallOf: 1798bab661aSEmmanuel Vadot # If qcom,gsi-loader is present, modem-init must not be present 1808bab661aSEmmanuel Vadot - if: 1818bab661aSEmmanuel Vadot required: 1828bab661aSEmmanuel Vadot - qcom,gsi-loader 1838bab661aSEmmanuel Vadot then: 1848bab661aSEmmanuel Vadot properties: 1858bab661aSEmmanuel Vadot modem-init: false 186c66ec88fSEmmanuel Vadot 1878bab661aSEmmanuel Vadot # If qcom,gsi-loader is "self", the AP loads GSI firmware, and 1888bab661aSEmmanuel Vadot # memory-region must be specified 1892eb4d8dcSEmmanuel Vadot if: 1908bab661aSEmmanuel Vadot properties: 1918bab661aSEmmanuel Vadot qcom,gsi-loader: 1928bab661aSEmmanuel Vadot contains: 1938bab661aSEmmanuel Vadot const: self 1948bab661aSEmmanuel Vadot then: 1958bab661aSEmmanuel Vadot required: 1968bab661aSEmmanuel Vadot - memory-region 1978bab661aSEmmanuel Vadot else: 1988bab661aSEmmanuel Vadot # If qcom,gsi-loader is not present, we use deprecated behavior. 1998bab661aSEmmanuel Vadot # If modem-init is not present, the AP loads GSI firmware, and 2008bab661aSEmmanuel Vadot # memory-region must be specified. 2018bab661aSEmmanuel Vadot if: 2028bab661aSEmmanuel Vadot not: 2032eb4d8dcSEmmanuel Vadot required: 2042eb4d8dcSEmmanuel Vadot - modem-init 2052eb4d8dcSEmmanuel Vadot then: 2062eb4d8dcSEmmanuel Vadot required: 2078bab661aSEmmanuel Vadot - memory-region 2082eb4d8dcSEmmanuel Vadot 2096be33864SEmmanuel VadotadditionalProperties: false 2106be33864SEmmanuel Vadot 211c66ec88fSEmmanuel Vadotexamples: 212c66ec88fSEmmanuel Vadot - | 2135def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 214c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/qcom,rpmh.h> 215c66ec88fSEmmanuel Vadot #include <dt-bindings/interconnect/qcom,sdm845.h> 216c66ec88fSEmmanuel Vadot 217c66ec88fSEmmanuel Vadot smp2p-mpss { 218c66ec88fSEmmanuel Vadot compatible = "qcom,smp2p"; 219d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 576 IRQ_TYPE_EDGE_RISING>; 220d5b0e70fSEmmanuel Vadot mboxes = <&apss_shared 6>; 221d5b0e70fSEmmanuel Vadot qcom,smem = <94>, <432>; 222d5b0e70fSEmmanuel Vadot qcom,local-pid = <0>; 223d5b0e70fSEmmanuel Vadot qcom,remote-pid = <5>; 224d5b0e70fSEmmanuel Vadot 225c66ec88fSEmmanuel Vadot ipa_smp2p_out: ipa-ap-to-modem { 226c66ec88fSEmmanuel Vadot qcom,entry-name = "ipa"; 227c66ec88fSEmmanuel Vadot #qcom,smem-state-cells = <1>; 228c66ec88fSEmmanuel Vadot }; 229c66ec88fSEmmanuel Vadot 230c66ec88fSEmmanuel Vadot ipa_smp2p_in: ipa-modem-to-ap { 231c66ec88fSEmmanuel Vadot qcom,entry-name = "ipa"; 232c66ec88fSEmmanuel Vadot interrupt-controller; 233c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 234c66ec88fSEmmanuel Vadot }; 235c66ec88fSEmmanuel Vadot }; 236d5b0e70fSEmmanuel Vadot 237c66ec88fSEmmanuel Vadot ipa@1e40000 { 2388bab661aSEmmanuel Vadot compatible = "qcom,sc7180-ipa"; 239c66ec88fSEmmanuel Vadot 2408bab661aSEmmanuel Vadot qcom,gsi-loader = "self"; 2418bab661aSEmmanuel Vadot memory-region = <&ipa_fw_mem>; 2428bab661aSEmmanuel Vadot firmware-name = "qcom/sc7180-trogdor/modem/modem.mdt"; 243c66ec88fSEmmanuel Vadot 2448bab661aSEmmanuel Vadot iommus = <&apps_smmu 0x440 0x0>, 2458bab661aSEmmanuel Vadot <&apps_smmu 0x442 0x0>; 246c66ec88fSEmmanuel Vadot reg = <0x1e40000 0x7000>, 247c66ec88fSEmmanuel Vadot <0x1e47000 0x2000>, 248c66ec88fSEmmanuel Vadot <0x1e04000 0x2c000>; 249c66ec88fSEmmanuel Vadot reg-names = "ipa-reg", 250c66ec88fSEmmanuel Vadot "ipa-shared", 251c66ec88fSEmmanuel Vadot "gsi"; 252c66ec88fSEmmanuel Vadot 2535def4c47SEmmanuel Vadot interrupts-extended = <&intc GIC_SPI 311 IRQ_TYPE_EDGE_RISING>, 2545def4c47SEmmanuel Vadot <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>, 255c66ec88fSEmmanuel Vadot <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, 256c66ec88fSEmmanuel Vadot <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>; 257c66ec88fSEmmanuel Vadot interrupt-names = "ipa", 258c66ec88fSEmmanuel Vadot "gsi", 259c66ec88fSEmmanuel Vadot "ipa-clock-query", 260c66ec88fSEmmanuel Vadot "ipa-setup-ready"; 261c66ec88fSEmmanuel Vadot 262c66ec88fSEmmanuel Vadot clocks = <&rpmhcc RPMH_IPA_CLK>; 263c66ec88fSEmmanuel Vadot clock-names = "core"; 264c66ec88fSEmmanuel Vadot 265c66ec88fSEmmanuel Vadot interconnects = 2668bab661aSEmmanuel Vadot <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>, 2678bab661aSEmmanuel Vadot <&aggre2_noc MASTER_IPA 0 &system_noc SLAVE_IMEM 0>, 2688bab661aSEmmanuel Vadot <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>; 269c66ec88fSEmmanuel Vadot interconnect-names = "memory", 270c66ec88fSEmmanuel Vadot "imem", 271c66ec88fSEmmanuel Vadot "config"; 272c66ec88fSEmmanuel Vadot 273e67e8565SEmmanuel Vadot qcom,qmp = <&aoss_qmp>; 274e67e8565SEmmanuel Vadot 275c66ec88fSEmmanuel Vadot qcom,smem-states = <&ipa_smp2p_out 0>, 276c66ec88fSEmmanuel Vadot <&ipa_smp2p_out 1>; 277c66ec88fSEmmanuel Vadot qcom,smem-state-names = "ipa-clock-enabled-valid", 278c66ec88fSEmmanuel Vadot "ipa-clock-enabled"; 279c66ec88fSEmmanuel Vadot }; 280