Commit 5d5d353b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull remoteproc updates from Bjorn Andersson:
 "This introduces support for the remoteproc on Mediatek MT8188, and
  enables caches for MT8186 SCP. It adds support for PRU cores found on
  the TI K3 AM62x SoCs.

  It moves the recovery work after a firmware crash to an unbound
  workqueue, to allow recovery to happen in parallel.

  A new DMA API is introduced to release dma_mem for a device.

  It adds support a panic handler for the Qualcomm modem remoteproc,
  with the goal of having caches flushed in memory dumps for post-mortem
  debugging and it introduces a mechanism to wait for the modem firmware
  on SM8450 to decrypt part of its memory for post-mortem debugging.

  Qualcomm sysmon is restricted to only inform remote processors about
  peers that are actually running, to avoid a race where Linux tries to
  notify a recovering remote processor about its peers new state. A
  mechanism for waiting for the sysmon connection to be established is
  also introduced, to avoid out-of-sync updates for rapidly restarting
  remote processors.

  A number of Devicetree binding cleanups and conversions to YAML are
  introduced, to facilitate Devicetree validation. Lastly it introduces
  a number of smaller fixes and cleanups in the core and a few different
  drivers"

* tag 'rproc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (42 commits)
  remoteproc: qcom_q6v5_pas: Do not fail if regulators are not found
  drivers/remoteproc: fix repeated words in comments
  remoteproc: Directly use ida_alloc()/free()
  remoteproc: Use unbounded workqueue for recovery work
  remoteproc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
  remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators
  remoteproc: sysmon: Send sysmon state only for running rprocs
  remoteproc: sysmon: Wait for SSCTL service to come up
  remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq
  remoteproc: qcom: pas: Check if coredump is enabled
  remoteproc: qcom: pas: Mark devices as wakeup capable
  remoteproc: qcom: pas: Mark va as io memory
  remoteproc: qcom: pas: Add decrypt shutdown support for modem
  remoteproc: qcom: q6v5-mss: add powerdomains to MSM8996 config
  remoteproc: qcom_q6v5: Introduce panic handler for MSS
  remoteproc: qcom_q6v5_mss: Update MBA log info
  remoteproc: qcom: correct kerneldoc
  remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use
  remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code
  remoteproc: mediatek: Support MT8188 SCP
  ...
parents c7268761 8447d0e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ properties:
    enum:
      - mediatek,mt8183-scp
      - mediatek,mt8186-scp
      - mediatek,mt8188-scp
      - mediatek,mt8192-scp
      - mediatek,mt8195-scp

@@ -80,6 +81,7 @@ allOf:
          enum:
            - mediatek,mt8183-scp
            - mediatek,mt8186-scp
            - mediatek,mt8188-scp
    then:
      properties:
        reg:
+28 −46
Original line number Diff line number Diff line
@@ -67,13 +67,28 @@ properties:
    minItems: 1
    maxItems: 8

  interconnects:
    maxItems: 1

  interrupts:
    minItems: 5
    maxItems: 6
    items:
      - description: Watchdog interrupt
      - description: Fatal interrupt
      - description: Ready interrupt
      - description: Handover interrupt
      - description: Stop acknowledge interrupt
      - description: Shutdown acknowledge interrupt

  interrupt-names:
    minItems: 5
    maxItems: 6
    items:
      - const: wdog
      - const: fatal
      - const: ready
      - const: handover
      - const: stop-ack
      - const: shutdown-ack

  resets:
    minItems: 1
@@ -116,7 +131,6 @@ properties:
      - description: Stop the modem

  qcom,smem-state-names:
    $ref: /schemas/types.yaml#/definitions/string-array
    description: The names of the state bits used for SMP2P output
    items:
      - const: stop
@@ -134,13 +148,13 @@ properties:
      three offsets within syscon for q6, modem and nc halt registers.

  smd-edge:
    type: object
    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
    description:
      Qualcomm Shared Memory subnode which represents communication edge,
      channels and devices related to the ADSP.

  glink-edge:
    type: object
    $ref: /schemas/remoteproc/qcom,glink-edge.yaml#
    description:
      Qualcomm G-Link subnode which represents communication edge, channels
      and devices related to the ADSP.
@@ -315,19 +329,9 @@ allOf:
    then:
      properties:
        interrupts:
          items:
            - description: Watchdog interrupt
            - description: Fatal interrupt
            - description: Ready interrupt
            - description: Handover interrupt
            - description: Stop acknowledge interrupt
          maxItems: 5
        interrupt-names:
          items:
            - const: wdog
            - const: fatal
            - const: ready
            - const: handover
            - const: stop-ack
          maxItems: 5

  - if:
      properties:
@@ -345,21 +349,9 @@ allOf:
    then:
      properties:
        interrupts:
          items:
            - description: Watchdog interrupt
            - description: Fatal interrupt
            - description: Ready interrupt
            - description: Handover interrupt
            - description: Stop acknowledge interrupt
            - description: Shutdown acknowledge interrupt
          minItems: 6
        interrupt-names:
          items:
            - const: wdog
            - const: fatal
            - const: ready
            - const: handover
            - const: stop-ack
            - const: shutdown-ack
          minItems: 6

  - if:
      properties:
@@ -379,6 +371,8 @@ allOf:
              - qcom,msm8226-adsp-pil
              - qcom,msm8996-adsp-pil
              - qcom,msm8998-adsp-pas
              - qcom,sm8150-adsp-pas
              - qcom,sm8150-cdsp-pas
    then:
      properties:
        power-domains:
@@ -442,19 +436,6 @@ allOf:
            - const: cx
            - const: mx

  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,sm8150-adsp-pas
              - qcom,sm8150-cdsp-pas
    then:
      properties:
        power-domains:
          items:
            - description: CX power domain

  - if:
      properties:
        compatible:
@@ -594,11 +575,12 @@ allOf:
examples:
  - |
    #include <dt-bindings/clock/qcom,rpmcc.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    adsp {
        compatible = "qcom,msm8974-adsp-pil";

        interrupts-extended = <&intc 0 162 IRQ_TYPE_EDGE_RISING>,
        interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_EDGE_RISING>,
                      <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
                      <&adsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
                      <&adsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
@@ -620,7 +602,7 @@ examples:
        qcom,smem-state-names = "stop";

        smd-edge {
            interrupts = <0 156 IRQ_TYPE_EDGE_RISING>;
            interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;

            qcom,ipc = <&apcs 8 8>;
            qcom,smd-edge = <1>;
+72 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/qcom,glink-edge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm G-Link Edge communication channel nodes

maintainers:
  - Bjorn Andersson <bjorn.andersson@linaro.org>

description:
  Qualcomm G-Link subnode represents communication edge, channels and devices
  related to the remote processor.

properties:
  $nodename:
    const: "glink-edge"

  apr:
    $ref: /schemas/soc/qcom/qcom,apr.yaml#
    description:
      Qualcomm APR/GPR (Asynchronous/Generic Packet Router)

  fastrpc:
    type: object
    description:
      See Documentation/devicetree/bindings/misc/qcom,fastrpc.txt

  interrupts:
    maxItems: 1

  label:
    description: The names of the state bits used for SMP2P output

  mboxes:
    maxItems: 1

  qcom,remote-pid:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      ID of the shared memory used by GLINK for communication with remote
      processor.

required:
  - interrupts
  - label
  - mboxes
  - qcom,remote-pid

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/mailbox/qcom-ipcc.h>

    remoteproc@8a00000 {
        reg = <0x08a00000 0x10000>;
        // ...

        glink-edge {
            interrupts-extended = <&ipcc IPCC_CLIENT_WPSS
                                         IPCC_MPROC_SIGNAL_GLINK_QMP
                                         IRQ_TYPE_EDGE_RISING>;
            mboxes = <&ipcc IPCC_CLIENT_WPSS
                            IPCC_MPROC_SIGNAL_GLINK_QMP>;

            label = "wpss";
            qcom,remote-pid = <13>;
        };
    };
+25 −63
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ on the Qualcomm Hexagon core.
		    "qcom,msm8974-mss-pil"
		    "qcom,msm8996-mss-pil"
		    "qcom,msm8998-mss-pil"
		    "qcom,sc7180-mss-pil"
		    "qcom,sc7280-mss-pil"
		    "qcom,sdm845-mss-pil"

- reg:
@@ -47,8 +45,6 @@ on the Qualcomm Hexagon core.
		    must be "wdog", "fatal", "ready", "handover", "stop-ack"
	qcom,msm8996-mss-pil:
	qcom,msm8998-mss-pil:
	qcom,sc7180-mss-pil:
	qcom,sc7280-mss-pil:
	qcom,sdm845-mss-pil:
		    must be "wdog", "fatal", "ready", "handover", "stop-ack",
		    "shutdown-ack"
@@ -86,11 +82,6 @@ on the Qualcomm Hexagon core.
	qcom,msm8998-mss-pil:
		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
		    "snoc_axi", "mnoc_axi", "qdss"
	qcom,sc7180-mss-pil:
		    must be "iface", "bus", "xo", "snoc_axi", "mnoc_axi",
		    "nav"
	qcom,sc7280-mss-pil:
		    must be "iface", "xo", "snoc_axi", "offline", "pka"
	qcom,sdm845-mss-pil:
		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
		    "snoc_axi", "mnoc_axi", "prng"
@@ -102,7 +93,7 @@ on the Qualcomm Hexagon core.
		    reference to the list of 3 reset-controllers for the
		    wcss sub-system
		    reference to the list of 2 reset-controllers for the modem
		    sub-system on SC7180, SC7280, SDM845 SoCs
		    sub-system on SDM845 SoCs

- reset-names:
	Usage: required
@@ -111,7 +102,7 @@ on the Qualcomm Hexagon core.
		    must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset"
		    for the wcss sub-system
		    must be "mss_restart", "pdc_reset" for the modem
		    sub-system on SC7180, SC7280, SDM845 SoCs
		    sub-system on SDM845 SoCs

For devices where the mba and mpss sub-nodes are not specified, mba/mpss region
should be referenced as follows:
@@ -176,10 +167,6 @@ For the compatible string below the following supplies are required:
	qcom,msm8996-mss-pil:
	qcom,msm8998-mss-pil:
		    must be "cx", "mx"
	qcom,sc7180-mss-pil:
		    must be "cx", "mx", "mss"
	qcom,sc7280-mss-pil:
		    must be "cx", "mss"
	qcom,sdm845-mss-pil:
		    must be "cx", "mx", "mss"

@@ -205,36 +192,6 @@ For the compatible string below the following supplies are required:
	Definition: a phandle reference to a syscon representing TCSR followed
		    by the three offsets within syscon for q6, modem and nc
		    halt registers.
		    a phandle reference to a syscon representing TCSR followed
		    by the four offsets within syscon for q6, modem, nc and vq6
		    halt registers on SC7280 SoCs.

For the compatible strings below the following phandle references are required:
  "qcom,sc7180-mss-pil"
- qcom,spare-regs:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: a phandle reference to a syscon representing TCSR followed
		    by the offset within syscon for conn_box_spare0 register
		    used by the modem sub-system running on SC7180 SoC.

For the compatible strings below the following phandle references are required:
  "qcom,sc7280-mss-pil"
- qcom,ext-regs:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: two phandle references to syscons representing TCSR_REG and
		    TCSR register space followed by the two offsets within the syscon
		    to force_clk_en/rscc_disable and axim1_clk_off/crypto_clk_off
		    registers respectively.

- qcom,qaccept-regs:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: a phandle reference to a syscon representing TCSR followed
		    by the three offsets within syscon for mdm, cx and axi
		    qaccept registers used by the modem sub-system running on
		    SC7280 SoC.

The Hexagon node must contain iommus property as described in ../iommu/iommu.txt
on platforms which do not have TrustZone.
@@ -257,29 +214,23 @@ related to the Hexagon. See ../soc/qcom/qcom,smd.yaml and
The following example describes the resources needed to boot control the
Hexagon, as it is found on MSM8974 boards.

	modem-rproc@fc880000 {
		compatible = "qcom,q6v5-pil";
		reg = <0xfc880000 0x100>,
		      <0xfc820000 0x020>;
	remoteproc@fc880000 {
		compatible = "qcom,msm8974-mss-pil";
		reg = <0xfc880000 0x100>, <0xfc820000 0x020>;
		reg-names = "qdsp6", "rmb";

		interrupts-extended = <&intc 0 24 1>,
				      <&modem_smp2p_in 0 0>,
				      <&modem_smp2p_in 1 0>,
				      <&modem_smp2p_in 2 0>,
				      <&modem_smp2p_in 3 0>;
		interrupt-names = "wdog",
				  "fatal",
				  "ready",
				  "handover",
				  "stop-ack";
		interrupts-extended = <&intc GIC_SPI 24 IRQ_TYPE_EDGE_RISING>,
				      <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
				      <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
				      <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
				      <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
		interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";

		clocks = <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
			 <&gcc GCC_MSS_CFG_AHB_CLK>,
			 <&gcc GCC_BOOT_ROM_AHB_CLK>;
		clock-names = "iface", "bus", "mem";

		qcom,halt-regs = <&tcsr_mutex_block 0x1180 0x1200 0x1280>;
			 <&gcc GCC_BOOT_ROM_AHB_CLK>,
			 <&xo_board>;
		clock-names = "iface", "bus", "mem", "xo";

		resets = <&gcc GCC_MSS_RESTART>;
		reset-names = "mss_restart";
@@ -289,6 +240,8 @@ Hexagon, as it is found on MSM8974 boards.
		mx-supply = <&pm8841_s1>;
		pll-supply = <&pm8941_l12>;

		qcom,halt-regs = <&tcsr_mutex_block 0x1180 0x1200 0x1280>;

		qcom,smem-states = <&modem_smp2p_out 0>;
		qcom,smem-state-names = "stop";

@@ -299,4 +252,13 @@ Hexagon, as it is found on MSM8974 boards.
		mpss {
			memory-region = <&mpss_region>;
		};

		smd-edge {
			interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;

			qcom,ipc = <&apcs 8 12>;
			qcom,smd-edge = <0>;

			label = "modem";
		};
	};
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ properties:
      - description: Stop the modem

  qcom,smem-state-names:
    $ref: /schemas/types.yaml#/definitions/string
    description: The names of the state bits used for SMP2P output
    items:
      - const: stop
Loading