Commit 929e134c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'rproc-v4.20' of git://github.com/andersson/remoteproc

Pull remoteproc updates from Bjorn Andersson:
 "This contains a series of patches that reworks the memory carveout
  handling in remoteproc, in order to allow this to be reused for
  statically allocated memory regions to be used for e.g. firmware.

  It adds support for audio DSP (both TZ-assisted and non-TZ assisted)
  and compute DSP on Qualcomm SDM845, TZ-assisted audio DSP, compute DSP
  and WiFi processor on Qualcomm QCS404 and through some renaming of the
  drivers cleans up the naming situation.

  Finally support for custom coreudmp segment handlers is added and is
  used in the Qualcomm modem remoteproc driver to gather memory dumps of
  the firmware"

* tag 'rproc-v4.20' of git://github.com/andersson/remoteproc: (36 commits)
  remoteproc: qcom: q6v5-mss: Register segments/dumpfn for coredump
  remoteproc: qcom: q6v5-mss: Add custom dump function for modem
  remoteproc: qcom: q6v5-mss: Refactor mba load/unload sequence
  remoteproc: Add mechanism for custom dump function assignment
  remoteproc: Introduce custom dump function for each remoteproc segment
  remoteproc: modify vring allocation to rely on centralized carveout allocator
  remoteproc: qcom: q6v5: shore up resource probe handling
  remoteproc: qcom: qcom_q6v5_adsp: Fix some return value check
  remoteproc: modify rproc_handle_carveout to support pre-registered region
  remoteproc: add helper function to check carveout device address
  remoteproc: add helper function to allocate rproc_mem_entry from reserved memory
  remoteproc: add alloc ops in rproc_mem_entry struct
  remoteproc: introduce rproc_find_carveout_by_name function
  remoteproc: introduce rproc_add_carveout function
  remoteproc: add helper function to allocate and init rproc_mem_entry struct
  remoteproc: add name in rproc_mem_entry struct
  remoteproc: add release ops in rproc_mem_entry struct
  remoteproc: add rproc_va_to_pa function
  remoteproc: configure IOMMU only if device address requested
  remoteproc: qcom: q6v5-mss: add SCM probe dependency
  ...
parents 4b427452 f18b7e91
Loading
Loading
Loading
Loading
+126 −0
Original line number Diff line number Diff line
Qualcomm Technology Inc. ADSP Peripheral Image Loader

This document defines the binding for a component that loads and boots firmware
on the Qualcomm Technology Inc. ADSP Hexagon core.

- compatible:
	Usage: required
	Value type: <string>
	Definition: must be one of:
		    "qcom,sdm845-adsp-pil"

- reg:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: must specify the base address and size of the qdsp6ss register

- interrupts-extended:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: must list the watchdog, fatal IRQs ready, handover and
		    stop-ack IRQs

- interrupt-names:
	Usage: required
	Value type: <stringlist>
	Definition: must be "wdog", "fatal", "ready", "handover", "stop-ack"

- clocks:
	Usage: required
	Value type: <prop-encoded-array>
	Definition:  List of 8 phandle and clock specifier pairs for the adsp.

- clock-names:
	Usage: required
	Value type: <stringlist>
	Definition: List of clock input name strings sorted in the same
		    order as the clocks property. Definition must have
		    "xo", "sway_cbcr", "lpass_aon", "lpass_ahbs_aon_cbcr",
		    "lpass_ahbm_aon_cbcr", "qdsp6ss_xo", "qdsp6ss_sleep"
		    and "qdsp6ss_core".

- power-domains:
	Usage: required
	Value type: <phandle>
	Definition: reference to cx power domain node.

- resets:
	Usage: required
	Value type: <phandle>
	Definition: reference to the list of 2 reset-controller for the adsp.

- reset-names:
        Usage: required
        Value type: <stringlist>
        Definition: must be "pdc_sync" and "cc_lpass"

- qcom,halt-regs:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: a phandle reference to a syscon representing TCSR followed
			by the offset within syscon for lpass halt register.

- memory-region:
	Usage: required
	Value type: <phandle>
	Definition: reference to the reserved-memory for the ADSP

- qcom,smem-states:
	Usage: required
	Value type: <phandle>
	Definition: reference to the smem state for requesting the ADSP to
		    shut down

- qcom,smem-state-names:
	Usage: required
	Value type: <stringlist>
	Definition: must be "stop"


= SUBNODES
The adsp node may have an subnode named "glink-edge" that describes the
communication edge, channels and devices related to the ADSP.
See ../soc/qcom/qcom,glink.txt for details on how to describe these.

= EXAMPLE
The following example describes the resources needed to boot control the
ADSP, as it is found on SDM845 boards.

	remoteproc@17300000 {
		compatible = "qcom,sdm845-adsp-pil";
		reg = <0x17300000 0x40c>;

		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>,
			<&adsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
		interrupt-names = "wdog", "fatal", "ready",
			"handover", "stop-ack";

		clocks = <&rpmhcc RPMH_CXO_CLK>,
			<&gcc GCC_LPASS_SWAY_CLK>,
			<&lpasscc LPASS_AUDIO_WRAPPER_AON_CLK>,
			<&lpasscc LPASS_Q6SS_AHBS_AON_CLK>,
			<&lpasscc LPASS_Q6SS_AHBM_AON_CLK>,
			<&lpasscc LPASS_QDSP6SS_XO_CLK>,
			<&lpasscc LPASS_QDSP6SS_SLEEP_CLK>,
			<&lpasscc LPASS_QDSP6SS_CORE_CLK>;
		clock-names = "xo", "sway_cbcr", "lpass_aon",
			"lpass_ahbs_aon_cbcr",
			"lpass_ahbm_aon_cbcr", "qdsp6ss_xo",
			"qdsp6ss_sleep", "qdsp6ss_core";

		power-domains = <&rpmhpd SDM845_CX>;

		resets = <&pdc_reset PDC_AUDIO_SYNC_RESET>,
			 <&aoss_reset AOSS_CC_LPASS_RESTART>;
		reset-names = "pdc_sync", "cc_lpass";

		qcom,halt-regs = <&tcsr_mutex_regs 0x22000>;

		memory-region = <&pil_adsp_mem>;

		qcom,smem-states = <&adsp_smp2p_out 0>;
		qcom,smem-state-names = "stop";
	};
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,11 @@ on the Qualcomm ADSP Hexagon core.
		    "qcom,msm8974-adsp-pil"
		    "qcom,msm8996-adsp-pil"
		    "qcom,msm8996-slpi-pil"
		    "qcom,qcs404-adsp-pas"
		    "qcom,qcs404-cdsp-pas"
		    "qcom,qcs404-wcss-pas"
		    "qcom,sdm845-adsp-pas"
		    "qcom,sdm845-cdsp-pas"

- interrupts-extended:
	Usage: required
+6 −2
Original line number Diff line number Diff line
@@ -53,13 +53,17 @@ on the Qualcomm Hexagon core.
	Definition: reference to the reset-controller for the modem sub-system
		    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 SDM845 SoCs

- reset-names:
	Usage: required
	Value type: <stringlist>
	Definition: must be "mss_restart" for the modem sub-system
	Definition: must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset"
		    for the wcss syb-system
		    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 SDM845 SoCs

- cx-supply:
- mss-supply:
+31 −15
Original line number Diff line number Diff line
@@ -84,8 +84,16 @@ config KEYSTONE_REMOTEPROC
	  It's safe to say N here if you're not interested in the Keystone
	  DSPs or just want to use a bare minimum kernel.

config QCOM_ADSP_PIL
	tristate "Qualcomm ADSP Peripheral Image Loader"
config QCOM_RPROC_COMMON
	tristate

config QCOM_Q6V5_COMMON
	tristate
	depends on ARCH_QCOM
	depends on QCOM_SMEM

config QCOM_Q6V5_ADSP
	tristate "Qualcomm Technology Inc ADSP Peripheral Image Loader"
	depends on OF && ARCH_QCOM
	depends on QCOM_SMEM
	depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
@@ -95,33 +103,41 @@ config QCOM_ADSP_PIL
	select QCOM_MDT_LOADER
	select QCOM_Q6V5_COMMON
	select QCOM_RPROC_COMMON
	select QCOM_SCM
	help
	  Say y here to support the TrustZone based Peripherial Image Loader
	  for the Qualcomm ADSP remote processors.
	  Say y here to support the Peripheral Image Loader
	  for the Qualcomm Technology Inc. ADSP remote processors.

config QCOM_RPROC_COMMON
	tristate

config QCOM_Q6V5_COMMON
	tristate
	depends on ARCH_QCOM
config QCOM_Q6V5_MSS
	tristate "Qualcomm Hexagon V5 self-authenticating modem subsystem support"
	depends on OF && ARCH_QCOM
	depends on QCOM_SMEM
	depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
	depends on QCOM_SYSMON || QCOM_SYSMON=n
	select MFD_SYSCON
	select QCOM_Q6V5_COMMON
	select QCOM_RPROC_COMMON
	select QCOM_SCM
	help
	  Say y here to support the Qualcomm self-authenticating modem
	  subsystem based on Hexagon V5.

config QCOM_Q6V5_PIL
	tristate "Qualcomm Hexagon V5 Peripherial Image Loader"
config QCOM_Q6V5_PAS
	tristate "Qualcomm Hexagon v5 Peripheral Authentication Service support"
	depends on OF && ARCH_QCOM
	depends on QCOM_SMEM
	depends on RPMSG_QCOM_SMD || (COMPILE_TEST && RPMSG_QCOM_SMD=n)
	depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n
	depends on QCOM_SYSMON || QCOM_SYSMON=n
	select MFD_SYSCON
	select QCOM_MDT_LOADER
	select QCOM_Q6V5_COMMON
	select QCOM_RPROC_COMMON
	select QCOM_SCM
	help
	  Say y here to support the Qualcomm Peripherial Image Loader for the
	  Hexagon V5 based remote processors.
	  Say y here to support the TrustZone based Peripherial Image Loader
	  for the Qualcomm Hexagon v5 based remote processors. This is commonly
	  used to control subsystems such as ADSP, Compute and Sensor.

config QCOM_Q6V5_WCSS
	tristate "Qualcomm Hexagon based WCSS Peripheral Image Loader"
+3 −2
Original line number Diff line number Diff line
@@ -14,10 +14,11 @@ obj-$(CONFIG_OMAP_REMOTEPROC) += omap_remoteproc.o
obj-$(CONFIG_WKUP_M3_RPROC)		+= wkup_m3_rproc.o
obj-$(CONFIG_DA8XX_REMOTEPROC)		+= da8xx_remoteproc.o
obj-$(CONFIG_KEYSTONE_REMOTEPROC)	+= keystone_remoteproc.o
obj-$(CONFIG_QCOM_ADSP_PIL)		+= qcom_adsp_pil.o
obj-$(CONFIG_QCOM_RPROC_COMMON)		+= qcom_common.o
obj-$(CONFIG_QCOM_Q6V5_COMMON)		+= qcom_q6v5.o
obj-$(CONFIG_QCOM_Q6V5_PIL)		+= qcom_q6v5_pil.o
obj-$(CONFIG_QCOM_Q6V5_ADSP)		+= qcom_q6v5_adsp.o
obj-$(CONFIG_QCOM_Q6V5_MSS)		+= qcom_q6v5_mss.o
obj-$(CONFIG_QCOM_Q6V5_PAS)		+= qcom_q6v5_pas.o
obj-$(CONFIG_QCOM_Q6V5_WCSS)		+= qcom_q6v5_wcss.o
obj-$(CONFIG_QCOM_SYSMON)		+= qcom_sysmon.o
obj-$(CONFIG_QCOM_WCNSS_PIL)		+= qcom_wcnss_pil.o
Loading