Skip to content

Commit

Permalink
Merge tag 'rproc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/andersson/remoteproc

Pull remoteproc updates from Bjorn Andersson:
 "This introduces support for controlling the TI PRU, adds hooks for
  remoteproc drivers to override the default ELF based coredump format,
  introduces a library function for coredumps using named sections (aka
  the Qualcomm "minidump" format).

  It also fixes a problem with inconsistent notifications sent by the
  Qualcomm sysmon driver to the remote processors and it migrates the
  Qualcomm MSS driver to use power-domains for resources that aren't
  actually regulators.

  Lastly it contains a number of fixes for minor bugs and build warnings
  throughout the drivers"

* tag 'rproc-v5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (47 commits)
  remoteproc/mediatek: read IPI buffer offset from FW
  remoteproc/mediatek: unprepare clk if scp_before_load fails
  remoteproc: qcom: Fix potential NULL dereference in adsp_init_mmio()
  remoteproc/mediatek: Fix kernel test robot warning
  remoteproc: k3-dsp: Fix return value check in k3_dsp_rproc_of_get_memories()
  remoteproc: qcom: pas: fix error handling in adsp_pds_enable
  remoteproc: qcom: fix reference leak in adsp_start
  remoteproc: q6v5-mss: fix error handling in q6v5_pds_enable
  remoteproc/mtk_scp: surround DT device IDs with CONFIG_OF
  remoteproc: qcom: Add minidump id for sm8150 modem
  remoteproc: qcom: Add capability to collect minidumps
  remoteproc: coredump: Add minidump functionality
  remoteproc: core: Add ops to enable custom coredump functionality
  remoteproc/mediatek: change MT8192 CFG register base
  remoteproc: pru: Add support for various PRU cores on K3 J721E SoCs
  remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs
  remoteproc: pru: Add pru-specific debugfs support
  remoteproc: pru: Add support for PRU specific interrupt configuration
  remoteproc: pru: Add a PRU remoteproc driver
  dt-bindings: remoteproc: Add binding doc for PRU cores in the PRU-ICSS
  ...
  • Loading branch information
Linus Torvalds committed Dec 16, 2020
2 parents 489e9fe + 3efa0ea commit ef9df00
Show file tree
Hide file tree
Showing 31 changed files with 2,101 additions and 212 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ properties:
- st,stm32mp151-pwr-mcu
- st,stm32-syscfg
- st,stm32-power-config
- st,stm32-tamp
- const: syscon

reg:
Expand Down
12 changes: 6 additions & 6 deletions Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ should be referenced as follows:
For the compatible strings below the following supplies are required:
"qcom,q6v5-pil"
"qcom,msm8916-mss-pil",
- cx-supply:
- mx-supply:
- cx-supply: (deprecated, use power domain instead)
- mx-supply: (deprecated, use power domain instead)
- pll-supply:
Usage: required
Value type: <phandle>
Expand All @@ -123,9 +123,9 @@ For the compatible strings below the following supplies are required:

For the compatible string below the following supplies are required:
"qcom,msm8974-mss-pil"
- cx-supply:
- cx-supply: (deprecated, use power domain instead)
- mss-supply:
- mx-supply:
- mx-supply: (deprecated, use power domain instead)
- pll-supply:
Usage: required
Value type: <phandle>
Expand All @@ -149,11 +149,11 @@ For the compatible string below the following supplies are required:
Usage: required
Value type: <stringlist>
Definition: The power-domains needed depend on the compatible string:
qcom,q6v5-pil:
qcom,ipq8074-wcss-pil:
no power-domain names required
qcom,q6v5-pil:
qcom,msm8916-mss-pil:
qcom,msm8974-mss-pil:
no power-domain names required
qcom,msm8996-mss-pil:
qcom,msm8998-mss-pil:
must be "cx", "mx"
Expand Down
20 changes: 16 additions & 4 deletions Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,25 @@ on the Qualcomm WCNSS core.
Definition: should be "wdog", "fatal", optionally followed by "ready",
"handover", "stop-ack"

- vddmx-supply:
- vddcx-supply:
- vddmx-supply: (deprecated for qcom,pronto-v1/2-pil)
- vddcx-supply: (deprecated for qcom,pronto-v1/2-pil)
- vddpx-supply:
Usage: required
Value type: <phandle>
Definition: reference to the regulators to be held on behalf of the
booting of the WCNSS core

- power-domains:
Usage: required (for qcom,pronto-v1/2-pil)
Value type: <phandle>
Definition: reference to the power domains to be held on behalf of the
booting of the WCNSS core

- power-domain-names:
Usage: required (for qcom,pronto-v1/2-pil)
Value type: <stringlist>
Definition: must be "cx", "mx"

- qcom,smem-states:
Usage: optional
Value type: <prop-encoded-array>
Expand Down Expand Up @@ -111,8 +122,9 @@ pronto@fb204000 {
<&wcnss_smp2p_slave 3 0>;
interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";

vddmx-supply = <&pm8841_s1>;
vddcx-supply = <&pm8841_s2>;
power-domains = <&rpmpd MSM8974_VDDCX>, <&rpmpd MSM8974_VDDMX>;
power-domain-names = "cx", "mx";

vddpx-supply = <&pm8941_s3>;

qcom,smem-states = <&wcnss_smp2p_out 0>;
Expand Down
21 changes: 15 additions & 6 deletions Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ properties:
st,syscfg-tz:
description:
Reference to the system configuration which holds the RCC trust zone mode
- Phandle of syscon block.
- The offset of the RCC trust zone mode register.
- The field mask of the RCC trust zone mode.
$ref: "/schemas/types.yaml#/definitions/phandle-array"
maxItems: 1

Expand Down Expand Up @@ -91,9 +88,19 @@ properties:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
description: |
Reference to the system configuration which holds the remote
1st cell: phandle to syscon block
2nd cell: register offset containing the deep sleep setting
3rd cell: register bitmask for the deep sleep bit
maxItems: 1

st,syscfg-m4-state:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
description: |
Reference to the tamp register which exposes the Cortex-M4 state.
maxItems: 1

st,syscfg-rsc-tbl:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
description: |
Reference to the tamp register which references the Cortex-M4
resource table address.
maxItems: 1

st,auto-boot:
Expand Down Expand Up @@ -122,6 +129,8 @@ examples:
resets = <&rcc MCU_R>;
st,syscfg-holdboot = <&rcc 0x10C 0x1>;
st,syscfg-tz = <&rcc 0x000 0x1>;
st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>;
st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>;
};
...
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ properties:
enum:
- ti,am654-r5fss
- ti,j721e-r5fss
- ti,j7200-r5fss

power-domains:
description: |
Expand Down Expand Up @@ -95,6 +96,7 @@ patternProperties:
enum:
- ti,am654-r5f
- ti,j721e-r5f
- ti,j7200-r5f

reg:
items:
Expand Down
214 changes: 214 additions & 0 deletions Documentation/devicetree/bindings/remoteproc/ti,pru-rproc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/remoteproc/ti,pru-rproc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI Programmable Realtime Unit (PRU) cores

maintainers:
- Suman Anna <s-anna@ti.com>

description: |
Each Programmable Real-Time Unit and Industrial Communication Subsystem
(PRU-ICSS or PRUSS) has two 32-bit load/store RISC CPU cores called
Programmable Real-Time Units (PRUs), each represented by a node. Each PRU
core has a dedicated Instruction RAM, Control and Debug register sets, and
use the Data RAMs present within the PRU-ICSS for code execution.
The K3 SoCs containing ICSSG v1.0 (eg: AM65x SR1.0) also have two Auxiliary
PRU cores called RTUs with slightly different IP integration. The K3 SoCs
containing the revised ICSSG v1.1 (eg: J721E, AM65x SR2.0) have an extra two
auxiliary Transmit PRU cores called Tx_PRUs that augment the PRUs. Each RTU
or Tx_PRU core can also be used independently like a PRU, or alongside a
corresponding PRU core to provide/implement auxiliary functionality/support.
Each PRU, RTU or Tx_PRU core node should be defined as a child node of the
corresponding PRU-ICSS node. Each node can optionally be rendered inactive by
using the standard DT string property, "status".
Please see the overall PRU-ICSS bindings document for additional details
including a complete example,
Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
properties:
compatible:
enum:
- ti,am3356-pru # for AM335x SoC family (AM3356+ SoCs only)
- ti,am4376-pru # for AM437x SoC family (AM4376+ SoCs only)
- ti,am5728-pru # for AM57xx SoC family
- ti,k2g-pru # for 66AK2G SoC family
- ti,am654-pru # for PRUs in K3 AM65x SoC family
- ti,am654-rtu # for RTUs in K3 AM65x SoC family
- ti,am654-tx-pru # for Tx_PRUs in K3 AM65x SR2.0 SoCs
- ti,j721e-pru # for PRUs in K3 J721E SoC family
- ti,j721e-rtu # for RTUs in K3 J721E SoC family
- ti,j721e-tx-pru # for Tx_PRUs in K3 J721E SoC family

reg:
items:
- description: Address and Size of the PRU Instruction RAM
- description: Address and Size of the PRU CTRL sub-module registers
- description: Address and Size of the PRU Debug sub-module registers

reg-names:
items:
- const: iram
- const: control
- const: debug

firmware-name:
description: |
Should contain the name of the default firmware image
file located on the firmware search path.
if:
properties:
compatible:
enum:
- ti,am654-rtu
- ti,j721e-rtu
then:
properties:
$nodename:
pattern: "^rtu@[0-9a-f]+$"
else:
if:
properties:
compatible:
enum:
- ti,am654-tx-pru
- ti,j721e-tx-pru
then:
properties:
$nodename:
pattern: "^txpru@[0-9a-f]+"
else:
properties:
$nodename:
pattern: "^pru@[0-9a-f]+$"

required:
- compatible
- reg
- reg-names
- firmware-name

additionalProperties: false

examples:
- |
/* AM33xx PRU-ICSS */
pruss_tm: target-module@300000 { /* 0x4a300000, ap 9 04.0 */
compatible = "ti,sysc-pruss", "ti,sysc";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x300000 0x80000>;
pruss: pruss@0 {
compatible = "ti,am3356-pruss";
reg = <0x0 0x80000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
pruss_mem: memories@0 {
reg = <0x0 0x2000>,
<0x2000 0x2000>,
<0x10000 0x3000>;
reg-names = "dram0", "dram1", "shrdram2";
};
pru0: pru@34000 {
compatible = "ti,am3356-pru";
reg = <0x34000 0x2000>,
<0x22000 0x400>,
<0x22400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am335x-pru0-fw";
};
pru1: pru@38000 {
compatible = "ti,am3356-pru";
reg = <0x38000 0x2000>,
<0x24000 0x400>,
<0x24400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am335x-pru1-fw";
};
};
};
- |
/* AM65x SR2.0 ICSSG */
#include <dt-bindings/soc/ti,sci_pm_domain.h>
icssg0: icssg@b000000 {
compatible = "ti,am654-icssg";
reg = <0xb000000 0x80000>;
power-domains = <&k3_pds 62 TI_SCI_PD_EXCLUSIVE>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0xb000000 0x80000>;
icssg0_mem: memories@0 {
reg = <0x0 0x2000>,
<0x2000 0x2000>,
<0x10000 0x10000>;
reg-names = "dram0", "dram1", "shrdram2";
};
pru0_0: pru@34000 {
compatible = "ti,am654-pru";
reg = <0x34000 0x4000>,
<0x22000 0x100>,
<0x22400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-pru0_0-fw";
};
rtu0_0: rtu@4000 {
compatible = "ti,am654-rtu";
reg = <0x4000 0x2000>,
<0x23000 0x100>,
<0x23400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-rtu0_0-fw";
};
tx_pru0_0: txpru@a000 {
compatible = "ti,am654-tx-pru";
reg = <0xa000 0x1800>,
<0x25000 0x100>,
<0x25400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-txpru0_0-fw";
};
pru0_1: pru@38000 {
compatible = "ti,am654-pru";
reg = <0x38000 0x4000>,
<0x24000 0x100>,
<0x24400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-pru0_1-fw";
};
rtu0_1: rtu@6000 {
compatible = "ti,am654-rtu";
reg = <0x6000 0x2000>,
<0x23800 0x100>,
<0x23c00 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-rtu0_1-fw";
};
tx_pru0_1: txpru@c000 {
compatible = "ti,am654-tx-pru";
reg = <0xc000 0x1800>,
<0x25800 0x100>,
<0x25c00 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am65x-txpru0_1-fw";
};
};
14 changes: 13 additions & 1 deletion drivers/remoteproc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ 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 PRU_REMOTEPROC
tristate "TI PRU remoteproc support"
depends on TI_PRUSS
default TI_PRUSS
help
Support for TI PRU remote processors present within a PRU-ICSS
subsystem via the remote processor framework.

Say Y or M here to support the Programmable Realtime Unit (PRU)
processors on various TI SoCs. It's safe to say N here if you're
not interested in the PRU or if you are unsure.

config QCOM_PIL_INFO
tristate

Expand Down Expand Up @@ -183,7 +195,7 @@ config QCOM_Q6V5_PAS
select QCOM_RPROC_COMMON
select QCOM_SCM
help
Say y here to support the TrustZone based Peripherial Image Loader
Say y here to support the TrustZone based Peripheral Image Loader
for the Qualcomm Hexagon v5 based remote processors. This is commonly
used to control subsystems such as ADSP, Compute and Sensor.

Expand Down
1 change: 1 addition & 0 deletions drivers/remoteproc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ 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_PRU_REMOTEPROC) += pru_rproc.o
obj-$(CONFIG_QCOM_PIL_INFO) += qcom_pil_info.o
obj-$(CONFIG_QCOM_RPROC_COMMON) += qcom_common.o
obj-$(CONFIG_QCOM_Q6V5_COMMON) += qcom_q6v5.o
Expand Down
Loading

0 comments on commit ef9df00

Please sign in to comment.