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: 462eb4d8dcSEmmanuel Vadot enum: 475956d97fSEmmanuel Vadot - qcom,msm8998-ipa 482eb4d8dcSEmmanuel Vadot - qcom,sc7180-ipa 492eb4d8dcSEmmanuel Vadot - qcom,sc7280-ipa 502eb4d8dcSEmmanuel Vadot - qcom,sdm845-ipa 512eb4d8dcSEmmanuel Vadot - qcom,sdx55-ipa 52*8bab661aSEmmanuel Vadot - qcom,sm6350-ipa 532eb4d8dcSEmmanuel Vadot - qcom,sm8350-ipa 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel Vadot reg: 56c66ec88fSEmmanuel Vadot items: 57c66ec88fSEmmanuel Vadot - description: IPA registers 58c66ec88fSEmmanuel Vadot - description: IPA shared memory 59c66ec88fSEmmanuel Vadot - description: GSI registers 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot reg-names: 62c66ec88fSEmmanuel Vadot items: 63c66ec88fSEmmanuel Vadot - const: ipa-reg 64c66ec88fSEmmanuel Vadot - const: ipa-shared 65c66ec88fSEmmanuel Vadot - const: gsi 66c66ec88fSEmmanuel Vadot 67c66ec88fSEmmanuel Vadot iommus: 688cc087a1SEmmanuel Vadot minItems: 1 698cc087a1SEmmanuel Vadot maxItems: 2 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot clocks: 72c66ec88fSEmmanuel Vadot maxItems: 1 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel Vadot clock-names: 75c66ec88fSEmmanuel Vadot const: core 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot interrupts: 78c66ec88fSEmmanuel Vadot items: 79c66ec88fSEmmanuel Vadot - description: IPA interrupt (hardware IRQ) 80c66ec88fSEmmanuel Vadot - description: GSI interrupt (hardware IRQ) 81c66ec88fSEmmanuel Vadot - description: Modem clock query interrupt (smp2p interrupt) 82c66ec88fSEmmanuel Vadot - description: Modem setup ready interrupt (smp2p interrupt) 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot interrupt-names: 85c66ec88fSEmmanuel Vadot items: 86c66ec88fSEmmanuel Vadot - const: ipa 87c66ec88fSEmmanuel Vadot - const: gsi 88c66ec88fSEmmanuel Vadot - const: ipa-clock-query 89c66ec88fSEmmanuel Vadot - const: ipa-setup-ready 90c66ec88fSEmmanuel Vadot 91c66ec88fSEmmanuel Vadot interconnects: 92354d7675SEmmanuel Vadot oneOf: 93354d7675SEmmanuel Vadot - items: 94354d7675SEmmanuel Vadot - description: Path leading to system memory 95354d7675SEmmanuel Vadot - description: Path between the AP and IPA config space 96354d7675SEmmanuel Vadot - items: 97354d7675SEmmanuel Vadot - description: Path leading to system memory 98354d7675SEmmanuel Vadot - description: Path leading to internal memory 99354d7675SEmmanuel Vadot - description: Path between the AP and IPA config space 100c66ec88fSEmmanuel Vadot 101c66ec88fSEmmanuel Vadot interconnect-names: 102354d7675SEmmanuel Vadot oneOf: 103354d7675SEmmanuel Vadot - items: 104354d7675SEmmanuel Vadot - const: memory 105354d7675SEmmanuel Vadot - const: config 106354d7675SEmmanuel Vadot - items: 107c66ec88fSEmmanuel Vadot - const: memory 108c66ec88fSEmmanuel Vadot - const: imem 109c66ec88fSEmmanuel Vadot - const: config 110c66ec88fSEmmanuel Vadot 111e67e8565SEmmanuel Vadot qcom,qmp: 112e67e8565SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 113e67e8565SEmmanuel Vadot description: phandle to the AOSS side-channel message RAM 114e67e8565SEmmanuel Vadot 115c66ec88fSEmmanuel Vadot qcom,smem-states: 116c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle-array 117c66ec88fSEmmanuel Vadot description: State bits used in by the AP to signal the modem. 118c66ec88fSEmmanuel Vadot items: 119c66ec88fSEmmanuel Vadot - description: Whether the "ipa-clock-enabled" state bit is valid 120c66ec88fSEmmanuel Vadot - description: Whether the IPA clock is enabled (if valid) 121c66ec88fSEmmanuel Vadot 122c66ec88fSEmmanuel Vadot qcom,smem-state-names: 123c66ec88fSEmmanuel Vadot description: The names of the state bits used for SMP2P output 124c66ec88fSEmmanuel Vadot items: 125c66ec88fSEmmanuel Vadot - const: ipa-clock-enabled-valid 126c66ec88fSEmmanuel Vadot - const: ipa-clock-enabled 127c66ec88fSEmmanuel Vadot 128*8bab661aSEmmanuel Vadot qcom,gsi-loader: 129*8bab661aSEmmanuel Vadot enum: 130*8bab661aSEmmanuel Vadot - self 131*8bab661aSEmmanuel Vadot - modem 132*8bab661aSEmmanuel Vadot - skip 133*8bab661aSEmmanuel Vadot description: 134*8bab661aSEmmanuel Vadot Indicates how GSI firmware should be loaded. If the AP loads 135*8bab661aSEmmanuel Vadot and validates GSI firmware, this property has value "self". 136*8bab661aSEmmanuel Vadot If the modem does this, this property has value "modem". 137*8bab661aSEmmanuel Vadot Otherwise, "skip" means GSI firmware loading is not required. 138*8bab661aSEmmanuel Vadot 139c66ec88fSEmmanuel Vadot modem-init: 140*8bab661aSEmmanuel Vadot deprecated: true 141c66ec88fSEmmanuel Vadot type: boolean 142c66ec88fSEmmanuel Vadot description: 143*8bab661aSEmmanuel Vadot This is the older (deprecated) way of indicating how GSI firmware 144*8bab661aSEmmanuel Vadot should be loaded. If present, the modem loads GSI firmware; if 145*8bab661aSEmmanuel Vadot absent, the AP loads GSI firmware. 146c66ec88fSEmmanuel Vadot 147c66ec88fSEmmanuel Vadot memory-region: 148c66ec88fSEmmanuel Vadot maxItems: 1 149c66ec88fSEmmanuel Vadot description: 150c66ec88fSEmmanuel Vadot If present, a phandle for a reserved memory area that holds 151c66ec88fSEmmanuel Vadot the firmware passed to Trust Zone for authentication. Required 152*8bab661aSEmmanuel Vadot when the AP (not the modem) performs early initialization. 153c66ec88fSEmmanuel Vadot 1542eb4d8dcSEmmanuel Vadot firmware-name: 1552eb4d8dcSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 1562eb4d8dcSEmmanuel Vadot description: 1572eb4d8dcSEmmanuel Vadot If present, name (or relative path) of the file within the 1582eb4d8dcSEmmanuel Vadot firmware search path containing the firmware image used when 1592eb4d8dcSEmmanuel Vadot initializing IPA hardware. Optional, and only used when 1602eb4d8dcSEmmanuel Vadot Trust Zone performs early initialization. 1612eb4d8dcSEmmanuel Vadot 162c66ec88fSEmmanuel Vadotrequired: 163c66ec88fSEmmanuel Vadot - compatible 164c66ec88fSEmmanuel Vadot - iommus 165c66ec88fSEmmanuel Vadot - reg 166c66ec88fSEmmanuel Vadot - clocks 167c66ec88fSEmmanuel Vadot - interrupts 168c66ec88fSEmmanuel Vadot - interconnects 169c66ec88fSEmmanuel Vadot - qcom,smem-states 170c66ec88fSEmmanuel Vadot 171*8bab661aSEmmanuel VadotallOf: 172*8bab661aSEmmanuel Vadot # If qcom,gsi-loader is present, modem-init must not be present 173*8bab661aSEmmanuel Vadot - if: 174*8bab661aSEmmanuel Vadot required: 175*8bab661aSEmmanuel Vadot - qcom,gsi-loader 176*8bab661aSEmmanuel Vadot then: 177*8bab661aSEmmanuel Vadot properties: 178*8bab661aSEmmanuel Vadot modem-init: false 179c66ec88fSEmmanuel Vadot 180*8bab661aSEmmanuel Vadot # If qcom,gsi-loader is "self", the AP loads GSI firmware, and 181*8bab661aSEmmanuel Vadot # memory-region must be specified 1822eb4d8dcSEmmanuel Vadot if: 183*8bab661aSEmmanuel Vadot properties: 184*8bab661aSEmmanuel Vadot qcom,gsi-loader: 185*8bab661aSEmmanuel Vadot contains: 186*8bab661aSEmmanuel Vadot const: self 187*8bab661aSEmmanuel Vadot then: 188*8bab661aSEmmanuel Vadot required: 189*8bab661aSEmmanuel Vadot - memory-region 190*8bab661aSEmmanuel Vadot else: 191*8bab661aSEmmanuel Vadot # If qcom,gsi-loader is not present, we use deprecated behavior. 192*8bab661aSEmmanuel Vadot # If modem-init is not present, the AP loads GSI firmware, and 193*8bab661aSEmmanuel Vadot # memory-region must be specified. 194*8bab661aSEmmanuel Vadot if: 195*8bab661aSEmmanuel Vadot not: 1962eb4d8dcSEmmanuel Vadot required: 1972eb4d8dcSEmmanuel Vadot - modem-init 1982eb4d8dcSEmmanuel Vadot then: 1992eb4d8dcSEmmanuel Vadot required: 200*8bab661aSEmmanuel Vadot - memory-region 2012eb4d8dcSEmmanuel Vadot 2026be33864SEmmanuel VadotadditionalProperties: false 2036be33864SEmmanuel Vadot 204c66ec88fSEmmanuel Vadotexamples: 205c66ec88fSEmmanuel Vadot - | 2065def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 207c66ec88fSEmmanuel Vadot #include <dt-bindings/clock/qcom,rpmh.h> 208c66ec88fSEmmanuel Vadot #include <dt-bindings/interconnect/qcom,sdm845.h> 209c66ec88fSEmmanuel Vadot 210c66ec88fSEmmanuel Vadot smp2p-mpss { 211c66ec88fSEmmanuel Vadot compatible = "qcom,smp2p"; 212d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 576 IRQ_TYPE_EDGE_RISING>; 213d5b0e70fSEmmanuel Vadot mboxes = <&apss_shared 6>; 214d5b0e70fSEmmanuel Vadot qcom,smem = <94>, <432>; 215d5b0e70fSEmmanuel Vadot qcom,local-pid = <0>; 216d5b0e70fSEmmanuel Vadot qcom,remote-pid = <5>; 217d5b0e70fSEmmanuel Vadot 218c66ec88fSEmmanuel Vadot ipa_smp2p_out: ipa-ap-to-modem { 219c66ec88fSEmmanuel Vadot qcom,entry-name = "ipa"; 220c66ec88fSEmmanuel Vadot #qcom,smem-state-cells = <1>; 221c66ec88fSEmmanuel Vadot }; 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot ipa_smp2p_in: ipa-modem-to-ap { 224c66ec88fSEmmanuel Vadot qcom,entry-name = "ipa"; 225c66ec88fSEmmanuel Vadot interrupt-controller; 226c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 227c66ec88fSEmmanuel Vadot }; 228c66ec88fSEmmanuel Vadot }; 229d5b0e70fSEmmanuel Vadot 230c66ec88fSEmmanuel Vadot ipa@1e40000 { 231*8bab661aSEmmanuel Vadot compatible = "qcom,sc7180-ipa"; 232c66ec88fSEmmanuel Vadot 233*8bab661aSEmmanuel Vadot qcom,gsi-loader = "self"; 234*8bab661aSEmmanuel Vadot memory-region = <&ipa_fw_mem>; 235*8bab661aSEmmanuel Vadot firmware-name = "qcom/sc7180-trogdor/modem/modem.mdt"; 236c66ec88fSEmmanuel Vadot 237*8bab661aSEmmanuel Vadot iommus = <&apps_smmu 0x440 0x0>, 238*8bab661aSEmmanuel Vadot <&apps_smmu 0x442 0x0>; 239c66ec88fSEmmanuel Vadot reg = <0x1e40000 0x7000>, 240c66ec88fSEmmanuel Vadot <0x1e47000 0x2000>, 241c66ec88fSEmmanuel Vadot <0x1e04000 0x2c000>; 242c66ec88fSEmmanuel Vadot reg-names = "ipa-reg", 243c66ec88fSEmmanuel Vadot "ipa-shared", 244c66ec88fSEmmanuel Vadot "gsi"; 245c66ec88fSEmmanuel Vadot 2465def4c47SEmmanuel Vadot interrupts-extended = <&intc GIC_SPI 311 IRQ_TYPE_EDGE_RISING>, 2475def4c47SEmmanuel Vadot <&intc GIC_SPI 432 IRQ_TYPE_LEVEL_HIGH>, 248c66ec88fSEmmanuel Vadot <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, 249c66ec88fSEmmanuel Vadot <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>; 250c66ec88fSEmmanuel Vadot interrupt-names = "ipa", 251c66ec88fSEmmanuel Vadot "gsi", 252c66ec88fSEmmanuel Vadot "ipa-clock-query", 253c66ec88fSEmmanuel Vadot "ipa-setup-ready"; 254c66ec88fSEmmanuel Vadot 255c66ec88fSEmmanuel Vadot clocks = <&rpmhcc RPMH_IPA_CLK>; 256c66ec88fSEmmanuel Vadot clock-names = "core"; 257c66ec88fSEmmanuel Vadot 258c66ec88fSEmmanuel Vadot interconnects = 259*8bab661aSEmmanuel Vadot <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>, 260*8bab661aSEmmanuel Vadot <&aggre2_noc MASTER_IPA 0 &system_noc SLAVE_IMEM 0>, 261*8bab661aSEmmanuel Vadot <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>; 262c66ec88fSEmmanuel Vadot interconnect-names = "memory", 263c66ec88fSEmmanuel Vadot "imem", 264c66ec88fSEmmanuel Vadot "config"; 265c66ec88fSEmmanuel Vadot 266e67e8565SEmmanuel Vadot qcom,qmp = <&aoss_qmp>; 267e67e8565SEmmanuel Vadot 268c66ec88fSEmmanuel Vadot qcom,smem-states = <&ipa_smp2p_out 0>, 269c66ec88fSEmmanuel Vadot <&ipa_smp2p_out 1>; 270c66ec88fSEmmanuel Vadot qcom,smem-state-names = "ipa-clock-enabled-valid", 271c66ec88fSEmmanuel Vadot "ipa-clock-enabled"; 272c66ec88fSEmmanuel Vadot }; 273