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:
18*409db7b7SSireesh Kodali    description:
19*409db7b7SSireesh Kodali      Append "qcom,pronto" if the device is actually pronto, and not riva
20*409db7b7SSireesh Kodali    oneOf:
21*409db7b7SSireesh Kodali      - items:
22*409db7b7SSireesh Kodali          - enum:
239a660c7fSSireesh Kodali              - qcom,pronto-v1-pil
249a660c7fSSireesh Kodali              - qcom,pronto-v2-pil
25*409db7b7SSireesh Kodali          - const: qcom,pronto
26*409db7b7SSireesh Kodali      - const: qcom,riva-pil
279a660c7fSSireesh Kodali
289a660c7fSSireesh Kodali  reg:
299a660c7fSSireesh Kodali    maxItems: 3
309a660c7fSSireesh Kodali    description:
319a660c7fSSireesh Kodali      The base address and size of the CCU, DXE and PMU register blocks
329a660c7fSSireesh Kodali
339a660c7fSSireesh Kodali  reg-names:
349a660c7fSSireesh Kodali    items:
359a660c7fSSireesh Kodali      - const: ccu
369a660c7fSSireesh Kodali      - const: dxe
379a660c7fSSireesh Kodali      - const: pmu
389a660c7fSSireesh Kodali
399a660c7fSSireesh Kodali  interrupts:
409a660c7fSSireesh Kodali    minItems: 2
419a660c7fSSireesh Kodali    maxItems: 5
429a660c7fSSireesh Kodali
439a660c7fSSireesh Kodali  interrupt-names:
449a660c7fSSireesh Kodali    minItems: 2
459a660c7fSSireesh Kodali    items:
469a660c7fSSireesh Kodali      - const: wdog
479a660c7fSSireesh Kodali      - const: fatal
489a660c7fSSireesh Kodali      - const: ready
499a660c7fSSireesh Kodali      - const: handover
509a660c7fSSireesh Kodali      - const: stop-ack
519a660c7fSSireesh Kodali
529a660c7fSSireesh Kodali  firmware-name:
539a660c7fSSireesh Kodali    $ref: /schemas/types.yaml#/definitions/string
549a660c7fSSireesh Kodali    description:
559a660c7fSSireesh Kodali      Relative firmware image path for the WCNSS core. Defaults to
569a660c7fSSireesh Kodali      "wcnss.mdt".
579a660c7fSSireesh Kodali
589a660c7fSSireesh Kodali  vddpx-supply:
599a660c7fSSireesh Kodali    description:
609a660c7fSSireesh Kodali      PX regulator to be held on behalf of the booting of the WCNSS core
619a660c7fSSireesh Kodali
629a660c7fSSireesh Kodali  vddmx-supply:
639a660c7fSSireesh Kodali    description:
649a660c7fSSireesh Kodali      MX regulator to be held on behalf of the booting of the WCNSS core.
659a660c7fSSireesh Kodali
669a660c7fSSireesh Kodali  vddcx-supply:
679a660c7fSSireesh Kodali    description:
689a660c7fSSireesh Kodali      CX regulator to be held on behalf of the booting of the WCNSS core.
699a660c7fSSireesh Kodali
709a660c7fSSireesh Kodali  power-domains:
719a660c7fSSireesh Kodali    maxItems: 2
729a660c7fSSireesh Kodali
739a660c7fSSireesh Kodali  power-domain-names:
749a660c7fSSireesh Kodali    items:
759a660c7fSSireesh Kodali      - const: cx
769a660c7fSSireesh Kodali      - const: mx
779a660c7fSSireesh Kodali
789a660c7fSSireesh Kodali  qcom,smem-states:
799a660c7fSSireesh Kodali    $ref: /schemas/types.yaml#/definitions/phandle-array
809a660c7fSSireesh Kodali    description:
819a660c7fSSireesh Kodali      States used by the AP to signal the WCNSS core that it should shutdown
829a660c7fSSireesh Kodali    items:
839a660c7fSSireesh Kodali      - description: Stop the modem
849a660c7fSSireesh Kodali
859a660c7fSSireesh Kodali  qcom,smem-state-names:
869a660c7fSSireesh Kodali    description: The names of the state bits used for SMP2P output
879a660c7fSSireesh Kodali    items:
889a660c7fSSireesh Kodali      - const: stop
899a660c7fSSireesh Kodali
909a660c7fSSireesh Kodali  memory-region:
919a660c7fSSireesh Kodali    maxItems: 1
929a660c7fSSireesh Kodali    description: reserved-memory for the WCNSS core
939a660c7fSSireesh Kodali
949a660c7fSSireesh Kodali  smd-edge:
959a660c7fSSireesh Kodali    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
969a660c7fSSireesh Kodali    description:
979a660c7fSSireesh Kodali      Qualcomm Shared Memory subnode which represents communication edge,
989a660c7fSSireesh Kodali      channels and devices related to the ADSP.
999a660c7fSSireesh Kodali
1009a660c7fSSireesh Kodali  iris:
1019a660c7fSSireesh Kodali    type: object
1029a660c7fSSireesh Kodali    description:
1039a660c7fSSireesh Kodali      The iris subnode of the WCNSS PIL is used to describe the attached RF module
1049a660c7fSSireesh Kodali      and its resource dependencies.
1059a660c7fSSireesh Kodali
1069a660c7fSSireesh Kodali    properties:
1079a660c7fSSireesh Kodali      compatible:
1089a660c7fSSireesh Kodali        enum:
1099a660c7fSSireesh Kodali          - qcom,wcn3620
1109a660c7fSSireesh Kodali          - qcom,wcn3660
1119a660c7fSSireesh Kodali          - qcom,wcn3660b
1129a660c7fSSireesh Kodali          - qcom,wcn3680
1139a660c7fSSireesh Kodali
1149a660c7fSSireesh Kodali      clocks:
1159a660c7fSSireesh Kodali        minItems: 1
1169a660c7fSSireesh Kodali        items:
1179a660c7fSSireesh Kodali          - description: XO clock
1189a660c7fSSireesh Kodali          - description: RF clock
1199a660c7fSSireesh Kodali
1209a660c7fSSireesh Kodali      clock-names:
1219a660c7fSSireesh Kodali        minItems: 1
1229a660c7fSSireesh Kodali        items:
1239a660c7fSSireesh Kodali          - const: xo
1249a660c7fSSireesh Kodali          - const: rf
1259a660c7fSSireesh Kodali
1269a660c7fSSireesh Kodali      vddxo-supply:
1279a660c7fSSireesh Kodali        description:
1289a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1299a660c7fSSireesh Kodali          core
1309a660c7fSSireesh Kodali
1319a660c7fSSireesh Kodali      vddrfa-supply:
1329a660c7fSSireesh Kodali        description:
1339a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1349a660c7fSSireesh Kodali          core
1359a660c7fSSireesh Kodali
1369a660c7fSSireesh Kodali      vddpa-supply:
1379a660c7fSSireesh Kodali        description:
1389a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1399a660c7fSSireesh Kodali          core
1409a660c7fSSireesh Kodali
1419a660c7fSSireesh Kodali      vdddig-supply:
1429a660c7fSSireesh Kodali        description:
1439a660c7fSSireesh Kodali          Reference to the regulator to be held on behalf of the booting WCNSS
1449a660c7fSSireesh Kodali          core
1459a660c7fSSireesh Kodali
1469a660c7fSSireesh Kodali    required:
1479a660c7fSSireesh Kodali      - compatible
1489a660c7fSSireesh Kodali      - clocks
1499a660c7fSSireesh Kodali      - clock-names
1509a660c7fSSireesh Kodali      - vddxo-supply
1519a660c7fSSireesh Kodali      - vddrfa-supply
1529a660c7fSSireesh Kodali      - vddpa-supply
1539a660c7fSSireesh Kodali      - vdddig-supply
1549a660c7fSSireesh Kodali
1559a660c7fSSireesh Kodali    additionalProperties: false
1569a660c7fSSireesh Kodali
1579a660c7fSSireesh Kodalirequired:
1589a660c7fSSireesh Kodali  - compatible
1599a660c7fSSireesh Kodali  - reg
1609a660c7fSSireesh Kodali  - reg-names
1619a660c7fSSireesh Kodali  - interrupts
1629a660c7fSSireesh Kodali  - interrupt-names
1639a660c7fSSireesh Kodali  - iris
1649a660c7fSSireesh Kodali  - vddpx-supply
1659a660c7fSSireesh Kodali  - memory-region
1669a660c7fSSireesh Kodali  - smd-edge
1679a660c7fSSireesh Kodali
1689a660c7fSSireesh KodaliadditionalProperties: false
1699a660c7fSSireesh Kodali
1709a660c7fSSireesh KodaliallOf:
1719a660c7fSSireesh Kodali  - if:
1729a660c7fSSireesh Kodali      properties:
1739a660c7fSSireesh Kodali        compatible:
1749a660c7fSSireesh Kodali          contains:
1759a660c7fSSireesh Kodali            const: qcom,riva-pil
1769a660c7fSSireesh Kodali    then:
1779a660c7fSSireesh Kodali      required:
1789a660c7fSSireesh Kodali        - vddcx-supply
1799a660c7fSSireesh Kodali        - vddmx-supply
1809a660c7fSSireesh Kodali
1819a660c7fSSireesh Kodali  - if:
1829a660c7fSSireesh Kodali      properties:
1839a660c7fSSireesh Kodali        compatible:
1849a660c7fSSireesh Kodali          contains:
1859a660c7fSSireesh Kodali            enum:
1869a660c7fSSireesh Kodali              - qcom,pronto-v1-pil
1879a660c7fSSireesh Kodali              - qcom,pronto-v2-pil
1889a660c7fSSireesh Kodali    then:
1899a660c7fSSireesh Kodali      properties:
1909a660c7fSSireesh Kodali        vddmx-supply:
1919a660c7fSSireesh Kodali          deprecated: true
1929a660c7fSSireesh Kodali          description: Deprecated for qcom,pronto-v1/2-pil
1939a660c7fSSireesh Kodali
1949a660c7fSSireesh Kodali        vddcx-supply:
1959a660c7fSSireesh Kodali          deprecated: true
1969a660c7fSSireesh Kodali          description: Deprecated for qcom,pronto-v1/2-pil
1979a660c7fSSireesh Kodali
1989a660c7fSSireesh Kodali      required:
1999a660c7fSSireesh Kodali        - power-domains
2009a660c7fSSireesh Kodali        - power-domain-names
2019a660c7fSSireesh Kodali
2029a660c7fSSireesh Kodaliexamples:
2039a660c7fSSireesh Kodali  - |
2049a660c7fSSireesh Kodali    #include <dt-bindings/interrupt-controller/arm-gic.h>
2059a660c7fSSireesh Kodali    #include <dt-bindings/clock/qcom,rpmcc.h>
2069a660c7fSSireesh Kodali    #include <dt-bindings/power/qcom-rpmpd.h>
2079a660c7fSSireesh Kodali    pronto@a21b000 {
208*409db7b7SSireesh Kodali        compatible = "qcom,pronto-v2-pil", "qcom,pronto";
2099a660c7fSSireesh Kodali        reg = <0x0a204000 0x2000>, <0x0a202000 0x1000>, <0x0a21b000 0x3000>;
2109a660c7fSSireesh Kodali        reg-names = "ccu", "dxe", "pmu";
2119a660c7fSSireesh Kodali
2129a660c7fSSireesh Kodali        interrupts-extended = <&intc GIC_SPI 149 IRQ_TYPE_EDGE_RISING>,
2139a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
2149a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
2159a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
2169a660c7fSSireesh Kodali                              <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
2179a660c7fSSireesh Kodali        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
2189a660c7fSSireesh Kodali
2199a660c7fSSireesh Kodali        power-domains = <&rpmpd MSM8916_VDDCX>, <&rpmpd MSM8916_VDDMX>;
2209a660c7fSSireesh Kodali        power-domain-names = "cx", "mx";
2219a660c7fSSireesh Kodali
2229a660c7fSSireesh Kodali        vddpx-supply = <&pm8916_l7>;
2239a660c7fSSireesh Kodali
2249a660c7fSSireesh Kodali        qcom,smem-states = <&wcnss_smp2p_out 0>;
2259a660c7fSSireesh Kodali        qcom,smem-state-names = "stop";
2269a660c7fSSireesh Kodali
2279a660c7fSSireesh Kodali        memory-region = <&wcnss_region>;
2289a660c7fSSireesh Kodali
2299a660c7fSSireesh Kodali        pinctrl-names = "default";
2309a660c7fSSireesh Kodali        pinctrl-0 = <&wcnss_pin_a>;
2319a660c7fSSireesh Kodali
2329a660c7fSSireesh Kodali        iris {
2339a660c7fSSireesh Kodali            compatible = "qcom,wcn3620";
2349a660c7fSSireesh Kodali            vddxo-supply = <&pm8916_l7>;
2359a660c7fSSireesh Kodali            vddrfa-supply = <&pm8916_s3>;
2369a660c7fSSireesh Kodali            vddpa-supply = <&pm8916_l9>;
2379a660c7fSSireesh Kodali            vdddig-supply = <&pm8916_l5>;
2389a660c7fSSireesh Kodali
2399a660c7fSSireesh Kodali            clocks = <&rpmcc RPM_SMD_RF_CLK2>;
2409a660c7fSSireesh Kodali            clock-names = "xo";
2419a660c7fSSireesh Kodali        };
2429a660c7fSSireesh Kodali
2439a660c7fSSireesh Kodali        smd-edge {
2449a660c7fSSireesh Kodali            interrupts = <GIC_SPI 142 IRQ_TYPE_EDGE_RISING>;
2459a660c7fSSireesh Kodali
2469a660c7fSSireesh Kodali            qcom,ipc = <&apcs 8 17>;
2479a660c7fSSireesh Kodali            qcom,smd-edge = <6>;
2489a660c7fSSireesh Kodali            qcom,remote-pid = <4>;
2499a660c7fSSireesh Kodali
2509a660c7fSSireesh Kodali            label = "pronto";
2519a660c7fSSireesh Kodali
2529a660c7fSSireesh Kodali            wcnss_ctrl: wcnss {
2539a660c7fSSireesh Kodali                compatible = "qcom,wcnss";
2549a660c7fSSireesh Kodali                qcom,smd-channels = "WCNSS_CTRL";
2559a660c7fSSireesh Kodali
2569a660c7fSSireesh Kodali                qcom,mmio = <&pronto>;
2579a660c7fSSireesh Kodali
2589a660c7fSSireesh Kodali                bluetooth {
2599a660c7fSSireesh Kodali                    compatible = "qcom,wcnss-bt";
2609a660c7fSSireesh Kodali                };
2619a660c7fSSireesh Kodali
2629a660c7fSSireesh Kodali                wifi {
2639a660c7fSSireesh Kodali                    compatible = "qcom,wcnss-wlan";
2649a660c7fSSireesh Kodali
2659a660c7fSSireesh Kodali                    interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
2669a660c7fSSireesh Kodali                                 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
2679a660c7fSSireesh Kodali                    interrupt-names = "tx", "rx";
2689a660c7fSSireesh Kodali
2699a660c7fSSireesh Kodali                    qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
2709a660c7fSSireesh Kodali                    qcom,smem-state-names = "tx-enable", "tx-rings-empty";
2719a660c7fSSireesh Kodali                };
2729a660c7fSSireesh Kodali            };
2739a660c7fSSireesh Kodali        };
2749a660c7fSSireesh Kodali    };
275