19a660c7fSSireesh Kodali# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
29a660c7fSSireesh Kodali%YAML 1.2
39a660c7fSSireesh Kodali---
49a660c7fSSireesh Kodali$id: http://devicetree.org/schemas/remoteproc/qcom,wcnss-pil.yaml#
59a660c7fSSireesh Kodali$schema: http://devicetree.org/meta-schemas/core.yaml#
69a660c7fSSireesh Kodali
79a660c7fSSireesh Kodalititle: Qualcomm WCNSS Peripheral Image Loader
89a660c7fSSireesh Kodali
99a660c7fSSireesh Kodalimaintainers:
109a660c7fSSireesh Kodali  - Bjorn Andersson <andersson@kernel.org>
119a660c7fSSireesh Kodali
129a660c7fSSireesh Kodalidescription:
139a660c7fSSireesh Kodali  This document defines the binding for a component that loads and boots
149a660c7fSSireesh Kodali  firmware on the Qualcomm WCNSS core.
159a660c7fSSireesh Kodali
169a660c7fSSireesh Kodaliproperties:
179a660c7fSSireesh Kodali  compatible:
18409db7b7SSireesh Kodali    description:
19409db7b7SSireesh Kodali      Append "qcom,pronto" if the device is actually pronto, and not riva
20409db7b7SSireesh Kodali    oneOf:
21409db7b7SSireesh Kodali      - items:
22409db7b7SSireesh Kodali          - enum:
239a660c7fSSireesh Kodali              - qcom,pronto-v1-pil
249a660c7fSSireesh Kodali              - qcom,pronto-v2-pil
25a890eebeSSireesh Kodali              - qcom,pronto-v3-pil
26409db7b7SSireesh Kodali          - const: qcom,pronto
27409db7b7SSireesh Kodali      - const: qcom,riva-pil
289a660c7fSSireesh Kodali
299a660c7fSSireesh Kodali  reg:
309a660c7fSSireesh Kodali    maxItems: 3
319a660c7fSSireesh Kodali    description:
329a660c7fSSireesh Kodali      The base address and size of the CCU, DXE and PMU register blocks
339a660c7fSSireesh Kodali
349a660c7fSSireesh Kodali  reg-names:
359a660c7fSSireesh Kodali    items:
369a660c7fSSireesh Kodali      - const: ccu
379a660c7fSSireesh Kodali      - const: dxe
389a660c7fSSireesh Kodali      - const: pmu
399a660c7fSSireesh Kodali
409a660c7fSSireesh Kodali  interrupts:
419a660c7fSSireesh Kodali    minItems: 2
429a660c7fSSireesh Kodali    maxItems: 5
439a660c7fSSireesh Kodali
449a660c7fSSireesh Kodali  interrupt-names:
459a660c7fSSireesh Kodali    minItems: 2
469a660c7fSSireesh Kodali    items:
479a660c7fSSireesh Kodali      - const: wdog
489a660c7fSSireesh Kodali      - const: fatal
499a660c7fSSireesh Kodali      - const: ready
509a660c7fSSireesh Kodali      - const: handover
519a660c7fSSireesh Kodali      - const: stop-ack
529a660c7fSSireesh Kodali
539a660c7fSSireesh Kodali  firmware-name:
549a660c7fSSireesh Kodali    $ref: /schemas/types.yaml#/definitions/string
559a660c7fSSireesh Kodali    description:
569a660c7fSSireesh Kodali      Relative firmware image path for the WCNSS core. Defaults to
579a660c7fSSireesh Kodali      "wcnss.mdt".
589a660c7fSSireesh Kodali
599a660c7fSSireesh Kodali  vddpx-supply:
609a660c7fSSireesh Kodali    description:
619a660c7fSSireesh Kodali      PX regulator to be held on behalf of the booting of the WCNSS core
629a660c7fSSireesh Kodali
639a660c7fSSireesh Kodali  vddmx-supply:
649a660c7fSSireesh Kodali    description:
659a660c7fSSireesh Kodali      MX regulator to be held on behalf of the booting of the WCNSS core.
669a660c7fSSireesh Kodali
679a660c7fSSireesh Kodali  vddcx-supply:
689a660c7fSSireesh Kodali    description:
699a660c7fSSireesh Kodali      CX regulator to be held on behalf of the booting of the WCNSS core.
709a660c7fSSireesh Kodali
719a660c7fSSireesh Kodali  power-domains:
729a660c7fSSireesh Kodali    maxItems: 2
739a660c7fSSireesh Kodali
749a660c7fSSireesh Kodali  power-domain-names:
759a660c7fSSireesh Kodali    items:
769a660c7fSSireesh Kodali      - const: cx
779a660c7fSSireesh Kodali      - const: mx
789a660c7fSSireesh Kodali
799a660c7fSSireesh Kodali  qcom,smem-states:
809a660c7fSSireesh Kodali    $ref: /schemas/types.yaml#/definitions/phandle-array
819a660c7fSSireesh Kodali    description:
829a660c7fSSireesh Kodali      States used by the AP to signal the WCNSS core that it should shutdown
839a660c7fSSireesh Kodali    items:
849a660c7fSSireesh Kodali      - description: Stop the modem
859a660c7fSSireesh Kodali
869a660c7fSSireesh Kodali  qcom,smem-state-names:
879a660c7fSSireesh Kodali    description: The names of the state bits used for SMP2P output
889a660c7fSSireesh Kodali    items:
899a660c7fSSireesh Kodali      - const: stop
909a660c7fSSireesh Kodali
919a660c7fSSireesh Kodali  memory-region:
929a660c7fSSireesh Kodali    maxItems: 1
939a660c7fSSireesh Kodali    description: reserved-memory for the WCNSS core
949a660c7fSSireesh Kodali
959a660c7fSSireesh Kodali  smd-edge:
969a660c7fSSireesh Kodali    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
979a660c7fSSireesh Kodali    description:
989a660c7fSSireesh Kodali      Qualcomm Shared Memory subnode which represents communication edge,
999a660c7fSSireesh Kodali      channels and devices related to the ADSP.
1009a660c7fSSireesh Kodali
1019a660c7fSSireesh Kodali  iris:
1029a660c7fSSireesh Kodali    type: object
1039a660c7fSSireesh Kodali    description:
1049a660c7fSSireesh Kodali      The iris subnode of the WCNSS PIL is used to describe the attached RF module
1059a660c7fSSireesh Kodali      and its resource dependencies.
1069a660c7fSSireesh Kodali
1079a660c7fSSireesh Kodali    properties:
1089a660c7fSSireesh Kodali      compatible:
1099a660c7fSSireesh Kodali        enum:
1109a660c7fSSireesh Kodali          - qcom,wcn3620
1119a660c7fSSireesh Kodali          - qcom,wcn3660
1129a660c7fSSireesh Kodali          - qcom,wcn3660b
1139a660c7fSSireesh Kodali          - qcom,wcn3680
1149a660c7fSSireesh Kodali
1159a660c7fSSireesh Kodali      clocks:
1169a660c7fSSireesh Kodali        minItems: 1
1179a660c7fSSireesh Kodali        items:
1189a660c7fSSireesh Kodali          - description: XO clock
1199a660c7fSSireesh Kodali          - description: RF clock
1209a660c7fSSireesh Kodali
1219a660c7fSSireesh Kodali      clock-names:
1229a660c7fSSireesh Kodali        minItems: 1
1239a660c7fSSireesh Kodali        items:
1249a660c7fSSireesh Kodali          - const: xo
1259a660c7fSSireesh Kodali          - const: rf
1269a660c7fSSireesh Kodali
1279a660c7fSSireesh Kodali      vddxo-supply:
1289a660c7fSSireesh Kodali        description:
1299a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1309a660c7fSSireesh Kodali          core
1319a660c7fSSireesh Kodali
1329a660c7fSSireesh Kodali      vddrfa-supply:
1339a660c7fSSireesh Kodali        description:
1349a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1359a660c7fSSireesh Kodali          core
1369a660c7fSSireesh Kodali
1379a660c7fSSireesh Kodali      vddpa-supply:
1389a660c7fSSireesh Kodali        description:
1399a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1409a660c7fSSireesh Kodali          core
1419a660c7fSSireesh Kodali
1429a660c7fSSireesh Kodali      vdddig-supply:
1439a660c7fSSireesh Kodali        description:
1449a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1459a660c7fSSireesh Kodali          core
1469a660c7fSSireesh Kodali
1479a660c7fSSireesh Kodali    required:
1489a660c7fSSireesh Kodali      - compatible
1499a660c7fSSireesh Kodali      - clocks
1509a660c7fSSireesh Kodali      - clock-names
1519a660c7fSSireesh Kodali      - vddxo-supply
1529a660c7fSSireesh Kodali      - vddrfa-supply
1539a660c7fSSireesh Kodali      - vddpa-supply
1549a660c7fSSireesh Kodali      - vdddig-supply
1559a660c7fSSireesh Kodali
1569a660c7fSSireesh Kodali    additionalProperties: false
1579a660c7fSSireesh Kodali
1589a660c7fSSireesh Kodalirequired:
1599a660c7fSSireesh Kodali  - compatible
1609a660c7fSSireesh Kodali  - reg
1619a660c7fSSireesh Kodali  - reg-names
1629a660c7fSSireesh Kodali  - interrupts
1639a660c7fSSireesh Kodali  - interrupt-names
1649a660c7fSSireesh Kodali  - iris
1659a660c7fSSireesh Kodali  - vddpx-supply
1669a660c7fSSireesh Kodali  - memory-region
1679a660c7fSSireesh Kodali  - smd-edge
1689a660c7fSSireesh Kodali
1699a660c7fSSireesh KodaliadditionalProperties: false
1709a660c7fSSireesh Kodali
1719a660c7fSSireesh KodaliallOf:
1729a660c7fSSireesh Kodali  - if:
1739a660c7fSSireesh Kodali      properties:
1749a660c7fSSireesh Kodali        compatible:
1759a660c7fSSireesh Kodali          contains:
1769a660c7fSSireesh Kodali            const: qcom,riva-pil
1779a660c7fSSireesh Kodali    then:
1789a660c7fSSireesh Kodali      required:
1799a660c7fSSireesh Kodali        - vddcx-supply
1809a660c7fSSireesh Kodali        - vddmx-supply
1819a660c7fSSireesh Kodali
1829a660c7fSSireesh Kodali  - if:
1839a660c7fSSireesh Kodali      properties:
1849a660c7fSSireesh Kodali        compatible:
1859a660c7fSSireesh Kodali          contains:
1869a660c7fSSireesh Kodali            enum:
1879a660c7fSSireesh Kodali              - qcom,pronto-v1-pil
1889a660c7fSSireesh Kodali              - qcom,pronto-v2-pil
1899a660c7fSSireesh Kodali    then:
1909a660c7fSSireesh Kodali      properties:
1919a660c7fSSireesh Kodali        vddmx-supply:
1929a660c7fSSireesh Kodali          deprecated: true
1939a660c7fSSireesh Kodali          description: Deprecated for qcom,pronto-v1/2-pil
1949a660c7fSSireesh Kodali
1959a660c7fSSireesh Kodali        vddcx-supply:
1969a660c7fSSireesh Kodali          deprecated: true
1979a660c7fSSireesh Kodali          description: Deprecated for qcom,pronto-v1/2-pil
1989a660c7fSSireesh Kodali
199*a4421a22SSireesh Kodali      oneOf:
200*a4421a22SSireesh Kodali        - required:
2019a660c7fSSireesh Kodali            - power-domains
2029a660c7fSSireesh Kodali            - power-domain-names
203*a4421a22SSireesh Kodali        - required:
204*a4421a22SSireesh Kodali            - vddmx-supply
205*a4421a22SSireesh Kodali            - vddcx-supply
2069a660c7fSSireesh Kodali
207a890eebeSSireesh Kodali  - if:
208a890eebeSSireesh Kodali      properties:
209a890eebeSSireesh Kodali        compatible:
210a890eebeSSireesh Kodali          contains:
211a890eebeSSireesh Kodali            enum:
212a890eebeSSireesh Kodali              - qcom,pronto-v3-pil
213a890eebeSSireesh Kodali    then:
214a890eebeSSireesh Kodali      properties:
215a890eebeSSireesh Kodali        vddmx-supply: false
216a890eebeSSireesh Kodali        vddcx-supply: false
217a890eebeSSireesh Kodali
218a890eebeSSireesh Kodali      required:
219a890eebeSSireesh Kodali        - power-domains
220a890eebeSSireesh Kodali        - power-domain-names
221a890eebeSSireesh Kodali
2229a660c7fSSireesh Kodaliexamples:
2239a660c7fSSireesh Kodali  - |
2249a660c7fSSireesh Kodali    #include <dt-bindings/interrupt-controller/arm-gic.h>
2259a660c7fSSireesh Kodali    #include <dt-bindings/clock/qcom,rpmcc.h>
2269a660c7fSSireesh Kodali    #include <dt-bindings/power/qcom-rpmpd.h>
2279a660c7fSSireesh Kodali    pronto@a21b000 {
228409db7b7SSireesh Kodali        compatible = "qcom,pronto-v2-pil", "qcom,pronto";
2299a660c7fSSireesh Kodali        reg = <0x0a204000 0x2000>, <0x0a202000 0x1000>, <0x0a21b000 0x3000>;
2309a660c7fSSireesh Kodali        reg-names = "ccu", "dxe", "pmu";
2319a660c7fSSireesh Kodali
2329a660c7fSSireesh Kodali        interrupts-extended = <&intc GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
2339a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
2349a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
2359a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
2369a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
2379a660c7fSSireesh Kodali        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
2389a660c7fSSireesh Kodali
2399a660c7fSSireesh Kodali        power-domains = <&rpmpd MSM8916_VDDCX>, <&rpmpd MSM8916_VDDMX>;
2409a660c7fSSireesh Kodali        power-domain-names = "cx", "mx";
2419a660c7fSSireesh Kodali
2429a660c7fSSireesh Kodali        vddpx-supply = <&pm8916_l7>;
2439a660c7fSSireesh Kodali
2449a660c7fSSireesh Kodali        qcom,smem-states = <&wcnss_smp2p_out 0>;
2459a660c7fSSireesh Kodali        qcom,smem-state-names = "stop";
2469a660c7fSSireesh Kodali
2479a660c7fSSireesh Kodali        memory-region = <&wcnss_region>;
2489a660c7fSSireesh Kodali
2499a660c7fSSireesh Kodali        pinctrl-names = "default";
2509a660c7fSSireesh Kodali        pinctrl-0 = <&wcnss_pin_a>;
2519a660c7fSSireesh Kodali
2529a660c7fSSireesh Kodali        iris {
2539a660c7fSSireesh Kodali            compatible = "qcom,wcn3620";
2549a660c7fSSireesh Kodali            vddxo-supply = <&pm8916_l7>;
2559a660c7fSSireesh Kodali            vddrfa-supply = <&pm8916_s3>;
2569a660c7fSSireesh Kodali            vddpa-supply = <&pm8916_l9>;
2579a660c7fSSireesh Kodali            vdddig-supply = <&pm8916_l5>;
2589a660c7fSSireesh Kodali
2599a660c7fSSireesh Kodali            clocks = <&rpmcc RPM_SMD_RF_CLK2>;
2609a660c7fSSireesh Kodali            clock-names = "xo";
2619a660c7fSSireesh Kodali        };
2629a660c7fSSireesh Kodali
2639a660c7fSSireesh Kodali        smd-edge {
2649a660c7fSSireesh Kodali            interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;
2659a660c7fSSireesh Kodali
2669a660c7fSSireesh Kodali            qcom,ipc = <&apcs 8 17>;
2679a660c7fSSireesh Kodali            qcom,smd-edge = <6>;
2689a660c7fSSireesh Kodali            qcom,remote-pid = <4>;
2699a660c7fSSireesh Kodali
2709a660c7fSSireesh Kodali            label = "pronto";
2719a660c7fSSireesh Kodali
2729a660c7fSSireesh Kodali            wcnss_ctrl: wcnss {
2739a660c7fSSireesh Kodali                compatible = "qcom,wcnss";
2749a660c7fSSireesh Kodali                qcom,smd-channels = "WCNSS_CTRL";
2759a660c7fSSireesh Kodali
2769a660c7fSSireesh Kodali                qcom,mmio = <&pronto>;
2779a660c7fSSireesh Kodali
2789a660c7fSSireesh Kodali                bluetooth {
2799a660c7fSSireesh Kodali                    compatible = "qcom,wcnss-bt";
2809a660c7fSSireesh Kodali                };
2819a660c7fSSireesh Kodali
2829a660c7fSSireesh Kodali                wifi {
2839a660c7fSSireesh Kodali                    compatible = "qcom,wcnss-wlan";
2849a660c7fSSireesh Kodali
2859a660c7fSSireesh Kodali                    interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
2869a660c7fSSireesh Kodali                                 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
2879a660c7fSSireesh Kodali                    interrupt-names = "tx", "rx";
2889a660c7fSSireesh Kodali
2899a660c7fSSireesh Kodali                    qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
2909a660c7fSSireesh Kodali                    qcom,smem-state-names = "tx-enable", "tx-rings-empty";
2919a660c7fSSireesh Kodali                };
2929a660c7fSSireesh Kodali            };
2939a660c7fSSireesh Kodali        };
2949a660c7fSSireesh Kodali    };
295