All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
To: <agross@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <mathieu.poirier@linaro.org>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <mturquette@baylibre.com>,
	<sboyd@kernel.org>, <quic_eberman@quicinc.com>,
	<quic_gurus@quicinc.com>, <bartosz.golaszewski@linaro.org>,
	<quic_mmanikan@quicinc.com>, <linux-arm-msm@vger.kernel.org>,
	<linux-remoteproc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-clk@vger.kernel.org>
Cc: <quic_srichara@quicinc.com>, <quic_sjaganat@quicinc.com>,
	<quic_kathirav@quicinc.com>, <quic_anusha@quicinc.com>,
	<quic_varada@quicinc.com>
Subject: [PATCH v6 00/11] Add multipd remoteproc support
Date: Fri, 10 Nov 2023 14:49:28 +0530	[thread overview]
Message-ID: <20231110091939.3025413-1-quic_mmanikan@quicinc.com> (raw)

APSS brings Q6 out of reset and then Q6 brings
WCSS block (wifi radio's) out of reset.

				   ---------------
			      -->  |WiFi 2G radio|
			      |	   --------------
			      |
--------	-------	      |
| APSS | --->   |QDSP6|  -----|
---------	-------       |
                              |
      			      |
			      |   --------------
			      --> |WiFi 5G radio|
				  --------------

Problem here is if any radio crashes, subsequently other
radio also should crash because Q6 crashed. Let's say
2G radio crashed, Q6 should pass this info to APSS. Only
Q6 processor interrupts registered with APSS. Obviously
Q6 should crash and raise fatal interrupt to APSS. Due
to this 5G radio also crashed. But no issue in 5G radio,
because of 2G radio crash 5G radio also impacted.

In multi pd model, this problem is resolved. Here WCSS
functionality (WiFi radio's) moved out from Q6 root pd
to a separate user pd. Due to this, radio's independently
pass their status info to APPS with out crashing Q6. So
other radio's won't be impacted.

Pd means protection domain. It's similar to process in Linux.
Here QDSP6 processor runs each wifi radio functionality on a
separate process. One process can't access other process
resources, so this is termed as PD i.e protection domain.

 APPS				QDSP6
-------                      -------------
|     |	 Crash notification  |		|	----------
|     |<---------------------|----------|-------|WiFi    |
|     |			     |		|    |->|2G radio|
|     |			     |	-------	|    | 	----------
|     |	     		     |	|     |	|    |
|Root |	 Start/stop  Q6	     |	|  R  | |    |
|PD   |<---------------------|->|     | |    |
|rproc|  Crash notification  |	|  O  | |    |
|     |			     |	|     |	|    |
|User |Start/stop UserPD1(2G)|  |  O  | |    |
|PD1  |----------------------|->|     |-|----|
|rproc|			     |	|  T  |	|    |
|     |			     |	|     | |    |
|User |Start/stop UserPD2(5G)|	|  P  | |    |
|PD2  |----------------------|->|     |-|----|
|rproc|			     |	|  D  |	|    |
|     |			     |	-------	|    |	-----------
|     |	Crash notification   |		|    |->|WiFi	  |
|     |<---------------------|----------|-------|5G radio |
-------			     |		|	-----------
                             ------------

According to linux terminology, here consider Q6 as root
i.e it provide all services, WCSS (wifi radio's) as user
i.e it uses services provided by root.

Since Q6 root & WCSS user pd's able to communicate with
APSS individually, multipd remoteproc driver registers
each PD with rproc framework. Here clients (Wifi host drivers)
intrested on WCSS PD rproc, so multipd driver start's root
pd in the context of WCSS user pd rproc start. Similarly
on down path, root pd will be stopped after wcss user pd
stopped.

Here WCSS(user) PD is dependent on Q6(root) PD, so first
q6 pd should be up before wcss pd. After wcss pd goes down,
q6 pd should be turned off.

IPQ5332, IPQ9574 supports multipd remoteproc driver.

[V6]:
	- Added user pd remoteproc nodes in RDP442 dts
	- Removed extern keyword from msa lock/unlock
	  function prototype

[V5]:
	- Fixed all comments and rebased on linux-next.
	- Exported symbols to resolve errors reported here
https://lore.kernel.org/oe-kbuild-all/202307301307.LGjSxmY8-lkp@intel.com/

[V4]:
	- Fixed all comments and rebased on linux-next.
	- All userpd's rproc handles stored in linked list.
	- Removed data members from compatible specific data structure.
	- In probe itself, traverse for each userpd and call
	  'q6_register_userpd()'.

[V3]:
	- Fixed all comments and rebased on linux-next.
	- IPQ5018 support is dropped because it's base port
	  patches not yet merged.
	- IPQ5332 support is added with below patches.
	  [03/11], [05/11], [06/11], [07/11], [10/11].

[V2]:
	- Fixed all comments and rebased on linux-next.
	- since clocks handled by QDSP6 firmware
 	  Added [04/13], [05/13], [06/13], [07/13] patches.

Manikanta Mylavarapu (11):
  dt-bindings: remoteproc: qcom: Add support for multipd model
  clk: qcom: ipq5332: remove q6 bring up clocks
  clk: qcom: ipq9574: remove q6 bring up clocks
  dt-bindings: clock: qcom: gcc-ipq5332: remove q6 bring up clock macros
  dt-bindings: clock: qcom: gcc-ipq9574: remove q6 bring up clock macros
  firmware: qcom_scm: ipq5332: add support to pass metadata size
  firmware: qcom_scm: ipq5332: add msa lock/unlock support
  remoteproc: qcom: q6v5: Add multipd interrupts support
  remoteproc: qcom: Add Hexagon based multipd rproc driver
  arm64: dts: qcom: ipq5332: Add nodes to bringup multipd
  arm64: dts: qcom: ipq9574: Add nodes to bring up multipd

 .../bindings/remoteproc/qcom,multipd-pil.yaml | 189 +++++
 arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts   |  21 +
 arch/arm64/boot/dts/qcom/ipq5332-rdp442.dts   |  59 ++
 arch/arm64/boot/dts/qcom/ipq5332.dtsi         |  59 ++
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         |  59 ++
 drivers/clk/qcom/gcc-ipq5332.c                | 380 ---------
 drivers/clk/qcom/gcc-ipq9574.c                | 326 -------
 drivers/firmware/qcom/qcom_scm.c              |  86 ++
 drivers/firmware/qcom/qcom_scm.h              |   3 +
 drivers/remoteproc/Kconfig                    |  19 +
 drivers/remoteproc/Makefile                   |   1 +
 drivers/remoteproc/qcom_q6v5.c                |  41 +-
 drivers/remoteproc/qcom_q6v5.h                |  11 +
 drivers/remoteproc/qcom_q6v5_mpd.c            | 802 ++++++++++++++++++
 include/dt-bindings/clock/qcom,ipq5332-gcc.h  |  20 -
 include/dt-bindings/clock/qcom,ipq9574-gcc.h  |  18 -
 include/linux/firmware/qcom/qcom_scm.h        |   2 +
 17 files changed, 1349 insertions(+), 747 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,multipd-pil.yaml
 create mode 100644 drivers/remoteproc/qcom_q6v5_mpd.c


base-commit: 8728c14129df7a6e29188a2e737b4774fb200953
-- 
2.34.1


             reply	other threads:[~2023-11-10 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  9:19 Manikanta Mylavarapu [this message]
2023-11-10  9:19 ` [PATCH v6 01/11] dt-bindings: remoteproc: qcom: Add support for multipd model Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 02/11] clk: qcom: ipq5332: remove q6 bring up clocks Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 03/11] clk: qcom: ipq9574: " Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 04/11] dt-bindings: clock: qcom: gcc-ipq5332: remove q6 bring up clock macros Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 05/11] dt-bindings: clock: qcom: gcc-ipq9574: " Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 06/11] firmware: qcom_scm: ipq5332: add support to pass metadata size Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 07/11] firmware: qcom_scm: ipq5332: add msa lock/unlock support Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 08/11] remoteproc: qcom: q6v5: Add multipd interrupts support Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 09/11] remoteproc: qcom: Add Hexagon based multipd rproc driver Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 10/11] arm64: dts: qcom: ipq5332: Add nodes to bringup multipd Manikanta Mylavarapu
2023-11-10  9:19 ` [PATCH v6 11/11] arm64: dts: qcom: ipq9574: Add nodes to bring up multipd Manikanta Mylavarapu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231110091939.3025413-1-quic_mmanikan@quicinc.com \
    --to=quic_mmanikan@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_anusha@quicinc.com \
    --cc=quic_eberman@quicinc.com \
    --cc=quic_gurus@quicinc.com \
    --cc=quic_kathirav@quicinc.com \
    --cc=quic_sjaganat@quicinc.com \
    --cc=quic_srichara@quicinc.com \
    --cc=quic_varada@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.