|
| 1 | +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/net/qcom,ipa.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Qualcomm IP Accelerator (IPA) |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Alex Elder <elder@kernel.org> |
| 11 | + |
| 12 | +description: |
| 13 | + This binding describes the Qualcomm IPA. The IPA is capable of offloading |
| 14 | + certain network processing tasks (e.g. filtering, routing, and NAT) from |
| 15 | + the main processor. |
| 16 | + |
| 17 | + The IPA sits between multiple independent "execution environments," |
| 18 | + including the Application Processor (AP) and the modem. The IPA presents |
| 19 | + a Generic Software Interface (GSI) to each execution environment. |
| 20 | + The GSI is an integral part of the IPA, but it is logically isolated |
| 21 | + and has a distinct interrupt and a separately-defined address space. |
| 22 | + |
| 23 | + See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. |
| 24 | + |
| 25 | + - | |
| 26 | + -------- --------- |
| 27 | + | | | | |
| 28 | + | AP +<---. .----+ Modem | |
| 29 | + | +--. | | .->+ | |
| 30 | + | | | | | | | | |
| 31 | + -------- | | | | --------- |
| 32 | + v | v | |
| 33 | + --+-+---+-+-- |
| 34 | + | GSI | |
| 35 | + |-----------| |
| 36 | + | | |
| 37 | + | IPA | |
| 38 | + | | |
| 39 | + ------------- |
| 40 | +
|
| 41 | +properties: |
| 42 | + compatible: |
| 43 | + const: "qcom,sdm845-ipa" |
| 44 | + |
| 45 | + reg: |
| 46 | + items: |
| 47 | + - description: IPA registers |
| 48 | + - description: IPA shared memory |
| 49 | + - description: GSI registers |
| 50 | + |
| 51 | + reg-names: |
| 52 | + items: |
| 53 | + - const: ipa-reg |
| 54 | + - const: ipa-shared |
| 55 | + - const: gsi |
| 56 | + |
| 57 | + clocks: |
| 58 | + maxItems: 1 |
| 59 | + |
| 60 | + clock-names: |
| 61 | + const: core |
| 62 | + |
| 63 | + interrupts: |
| 64 | + items: |
| 65 | + - description: IPA interrupt (hardware IRQ) |
| 66 | + - description: GSI interrupt (hardware IRQ) |
| 67 | + - description: Modem clock query interrupt (smp2p interrupt) |
| 68 | + - description: Modem setup ready interrupt (smp2p interrupt) |
| 69 | + |
| 70 | + interrupt-names: |
| 71 | + items: |
| 72 | + - const: ipa |
| 73 | + - const: gsi |
| 74 | + - const: ipa-clock-query |
| 75 | + - const: ipa-setup-ready |
| 76 | + |
| 77 | + interconnects: |
| 78 | + items: |
| 79 | + - description: Interconnect path between IPA and main memory |
| 80 | + - description: Interconnect path between IPA and internal memory |
| 81 | + - description: Interconnect path between IPA and the AP subsystem |
| 82 | + |
| 83 | + interconnect-names: |
| 84 | + items: |
| 85 | + - const: memory |
| 86 | + - const: imem |
| 87 | + - const: config |
| 88 | + |
| 89 | + qcom,smem-states: |
| 90 | + $ref: /schemas/types.yaml#/definitions/phandle-array |
| 91 | + description: State bits used in by the AP to signal the modem. |
| 92 | + items: |
| 93 | + - description: Whether the "ipa-clock-enabled" state bit is valid |
| 94 | + - description: Whether the IPA clock is enabled (if valid) |
| 95 | + |
| 96 | + qcom,smem-state-names: |
| 97 | + $ref: /schemas/types.yaml#/definitions/string-array |
| 98 | + description: The names of the state bits used for SMP2P output |
| 99 | + items: |
| 100 | + - const: ipa-clock-enabled-valid |
| 101 | + - const: ipa-clock-enabled |
| 102 | + |
| 103 | + modem-init: |
| 104 | + type: boolean |
| 105 | + description: |
| 106 | + If present, it indicates that the modem is responsible for |
| 107 | + performing early IPA initialization, including loading and |
| 108 | + validating firwmare used by the GSI. |
| 109 | + |
| 110 | + modem-remoteproc: |
| 111 | + $ref: /schemas/types.yaml#definitions/phandle |
| 112 | + description: |
| 113 | + This defines the phandle to the remoteproc node representing |
| 114 | + the modem subsystem. This is requied so the IPA driver can |
| 115 | + receive and act on notifications of modem up/down events. |
| 116 | + |
| 117 | + memory-region: |
| 118 | + $ref: /schemas/types.yaml#/definitions/phandle-array |
| 119 | + maxItems: 1 |
| 120 | + description: |
| 121 | + If present, a phandle for a reserved memory area that holds |
| 122 | + the firmware passed to Trust Zone for authentication. Required |
| 123 | + when Trust Zone (not the modem) performs early initialization. |
| 124 | + |
| 125 | +required: |
| 126 | + - compatible |
| 127 | + - reg |
| 128 | + - clocks |
| 129 | + - interrupts |
| 130 | + - interconnects |
| 131 | + - qcom,smem-states |
| 132 | + - modem-remoteproc |
| 133 | + |
| 134 | +oneOf: |
| 135 | + - required: |
| 136 | + - modem-init |
| 137 | + - required: |
| 138 | + - memory-region |
| 139 | + |
| 140 | +examples: |
| 141 | + - | |
| 142 | + smp2p-mpss { |
| 143 | + compatible = "qcom,smp2p"; |
| 144 | + ipa_smp2p_out: ipa-ap-to-modem { |
| 145 | + qcom,entry-name = "ipa"; |
| 146 | + #qcom,smem-state-cells = <1>; |
| 147 | + }; |
| 148 | +
|
| 149 | + ipa_smp2p_in: ipa-modem-to-ap { |
| 150 | + qcom,entry-name = "ipa"; |
| 151 | + interrupt-controller; |
| 152 | + #interrupt-cells = <2>; |
| 153 | + }; |
| 154 | + }; |
| 155 | + ipa@1e40000 { |
| 156 | + compatible = "qcom,sdm845-ipa"; |
| 157 | +
|
| 158 | + modem-init; |
| 159 | + modem-remoteproc = <&mss_pil>; |
| 160 | +
|
| 161 | + reg = <0 0x1e40000 0 0x7000>, |
| 162 | + <0 0x1e47000 0 0x2000>, |
| 163 | + <0 0x1e04000 0 0x2c000>; |
| 164 | + reg-names = "ipa-reg", |
| 165 | + "ipa-shared"; |
| 166 | + "gsi"; |
| 167 | +
|
| 168 | + interrupts-extended = <&intc 0 311 IRQ_TYPE_EDGE_RISING>, |
| 169 | + <&intc 0 432 IRQ_TYPE_LEVEL_HIGH>, |
| 170 | + <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, |
| 171 | + <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>; |
| 172 | + interrupt-names = "ipa", |
| 173 | + "gsi", |
| 174 | + "ipa-clock-query", |
| 175 | + "ipa-setup-ready"; |
| 176 | +
|
| 177 | + clocks = <&rpmhcc RPMH_IPA_CLK>; |
| 178 | + clock-names = "core"; |
| 179 | +
|
| 180 | + interconnects = |
| 181 | + <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_EBI1>, |
| 182 | + <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_IMEM>, |
| 183 | + <&rsc_hlos MASTER_APPSS_PROC &rsc_hlos SLAVE_IPA_CFG>; |
| 184 | + interconnect-names = "memory", |
| 185 | + "imem", |
| 186 | + "config"; |
| 187 | +
|
| 188 | + qcom,smem-states = <&ipa_smp2p_out 0>, |
| 189 | + <&ipa_smp2p_out 1>; |
| 190 | + qcom,smem-state-names = "ipa-clock-enabled-valid", |
| 191 | + "ipa-clock-enabled"; |
| 192 | + }; |
0 commit comments