devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Qualcomm WCNSS remoteproc
@ 2016-03-29  3:36 Bjorn Andersson
  2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:36 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Ohad Ben-Cohen
  Cc: Pawel Moll, Ian Campbell, Mark Rutland, John Stultz, Rob Herring,
	Suman Anna, devicetree, linux-arm-kernel, linux-arm-msm,
	linux-kernel, linux-remoteproc, linux-soc

This series introduces the remoteproc driver for controlling the Qualcomm
Wireless Connectivity Subsystem (WCNSS). The WCNSS is a builtin ARM9 inside the
Qualcomm SoC with an externally connected RF module (iris).

Supports booting and shutting down wcnss on 8064, 8974 and 8016. The driver
will call the crash handler in remoteproc, but further work is needed in the
framework for this not to bring down the kernel.

Changes since v1:
- Split iris definition into separate driver/dt-node
- Move constants from DT to code
- Make stop-state and some of interrupts optional to properly work on 8064
- Cleaned up and made mdt loader support relocation, which is needed on 8016.
- Add dts patches

Bjorn Andersson (9):
  dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
  remoteproc: core: Make the loaded resource table optional
  remoteproc: Add additional crash reasons
  remoteproc: Introduce Qualcomm WCNSS firmware loader
  ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node
  ARM: dts: qcom: apq8064: Add syscon for sic-non-secure
  ARM: dts: qcom: apq8064: Add complete smsm node
  ARM: dts: qcom: apq8064: Add smd node and all edges
  ARM: dts: qcom: apq8064: Introduce wcnss remoteproc

 .../bindings/remoteproc/qcom,wcnss-pil.txt         | 117 +++++
 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |   4 +
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 151 ++++++
 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts   |  32 ++
 arch/arm/boot/dts/qcom-msm8974.dtsi                |  36 +-
 drivers/remoteproc/Kconfig                         |  12 +
 drivers/remoteproc/Makefile                        |   2 +
 drivers/remoteproc/qcom_mdt_loader.c               | 172 ++++++
 drivers/remoteproc/qcom_mdt_loader.h               |   7 +
 drivers/remoteproc/qcom_wcnss.c                    | 579 +++++++++++++++++++++
 drivers/remoteproc/qcom_wcnss.h                    |  22 +
 drivers/remoteproc/qcom_wcnss_iris.c               | 185 +++++++
 drivers/remoteproc/remoteproc_core.c               |  10 +-
 include/linux/remoteproc.h                         |   4 +
 14 files changed, 1326 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
 create mode 100644 drivers/remoteproc/qcom_mdt_loader.c
 create mode 100644 drivers/remoteproc/qcom_mdt_loader.h
 create mode 100644 drivers/remoteproc/qcom_wcnss.c
 create mode 100644 drivers/remoteproc/qcom_wcnss.h
 create mode 100644 drivers/remoteproc/qcom_wcnss_iris.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
@ 2016-03-29  3:36 ` Bjorn Andersson
  2016-03-31 14:31   ` Rob Herring
  2016-04-21 17:20   ` [PATCH v2.1 " Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node Bjorn Andersson
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:36 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell
  Cc: Suman Anna, John Stultz, devicetree, linux-kernel,
	linux-arm-kernel, linux-arm-msm, linux-remoteproc,
	Bjorn Andersson

From: Bjorn Andersson <bjorn.andersson@sonymobile.com>

The document defines the binding for a component that loads firmware for
and boots the Qualcomm WCNSS core.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- Dropped non-variable properties (crash reason, firmware name)
- Split wcnss and iris definitions into separate nodes
- Dropped qcom, prefix of regulator supplies (standard binding)
- Interrupts and stop-state is made optional to support 8064

 .../bindings/remoteproc/qcom,wcnss-pil.txt         | 117 +++++++++++++++++++++
 1 file changed, 117 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
new file mode 100644
index 000000000000..e317731ec0c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
@@ -0,0 +1,117 @@
+Qualcomm WCNSS Peripheral Image Loader
+
+This document defines the binding for a component that loads and boots firmware
+on the Qualcomm WCNSS core.
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be one of:
+		    "qcom,riva-pil",
+		    "qcom,pronto-v1-pil",
+		    "qcom,pronto-v2-pil"
+
+- reg:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: base address and size of riva/pronto PMU registers
+
+- interrupts-extended:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: must list the watchdog and fatal IRQs and may specify the
+		    ready, handover and stop-ack IRQs
+
+- interrupt-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: should be "wdog", "fatal", optionally followed by "ready",
+		    "handover", "stop-ack"
+
+- vddmx-supply:
+- vddcx-supply:
+- vddpx-supply:
+	Usage: required
+	Value type: <phandle>
+	Definition: reference to the regulators to be held on behalf of the
+		    booting of the WCNSS core
+
+- qcom,state:
+	Usage: optional
+	Value type: <prop-encoded-array>
+	Definition: reference to the SMEM state used to indicate to WCNSS that
+		    it should shut down
+
+- qcom,state-names:
+	Usage: optional
+	Value type: <stringlist>
+	Definition: should be "stop"
+
+= SUBNODES
+A single subnode of the WCNSS PIL describes the attached rf module and its
+resource dependencies.
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be one of:
+		    "qcom,wcn3620",
+		    "qcom,wcn3660",
+		    "qcom,wcn3680"
+
+- clocks:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: should specify the xo clock and optionally the rf clock
+
+- clock-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: should be "xo", optionally followed by "rf"
+
+- vddxo-supply:
+- vddrfa-supply:
+- vddpa-supply:
+- vdddig-supply:
+	Usage: required
+	Value type: <phandle>
+	Definition: reference to the regulators to be held on behalf of the
+		    booting of the WCNSS core
+
+= EXAMPLE
+The following example describes the resources needed to boot control the WCNSS,
+with attached WCN3680, as it is commonly found on MSM8974 boards.
+
+pronto@fb21b000 {
+	compatible = "qcom,pronto-v2-pil";
+	reg = <0xfb21b000 0x3000>;
+
+	interrupts-extended = <&intc 0 149 1>,
+			      <&wcnss_smp2p_slave 0 0>,
+			      <&wcnss_smp2p_slave 1 0>,
+			      <&wcnss_smp2p_slave 2 0>,
+			      <&wcnss_smp2p_slave 3 0>;
+	interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+
+	vddmx-supply = <&pm8841_s1>;
+	vddcx-supply = <&pm8841_s2>;
+	vddpx-supply = <&pm8941_s3>;
+
+	qcom,state = <&wcnss_smp2p_out 0>;
+	qcom,state-names = "stop";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&wcnss_pin_a>;
+
+	iris {
+		compatible = "qcom,wcn3680";
+
+		clocks = <&rpmcc RPM_CXO_CLK_SRC>, <&rpmcc RPM_CXO_A2>;
+		clock-names = "xo", "rf";
+
+		vddxo-supply = <&pm8941_l6>;
+		vddrfa-supply = <&pm8941_l11>;
+		vddpa-supply = <&pm8941_l19>;
+		vdddig-supply = <&pm8941_s3>;
+	};
+};
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
  2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
@ 2016-03-29  3:37 ` Bjorn Andersson
  2016-03-29  6:03   ` kbuild test robot
  2016-03-29  3:37 ` [PATCH v2 6/9] ARM: dts: qcom: apq8064: Add syscon for sic-non-secure Bjorn Andersson
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:37 UTC (permalink / raw)
  To: Andy Gross, Rob Herring
  Cc: linux-arm-msm, John Stultz, linux-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-remoteproc, Bjorn Andersson

From: Bjorn Andersson <bjorn.andersson@sonymobile.com>

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- Added dts patches

 .../boot/dts/qcom-msm8974-sony-xperia-honami.dts   | 32 +++++++++++++++++++
 arch/arm/boot/dts/qcom-msm8974.dtsi                | 36 +++++++++++++++++++++-
 2 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index a0398b69f4f2..74faa291d213 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -311,6 +311,13 @@
 		pinctrl-0 = <&blsp1_uart2_pin_a>;
 	};
 
+	wcnss-rproc@fb21b000 {
+		status = "ok";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcnss_pin_a>;
+	};
+
 	pinctrl@fd510000 {
 		blsp1_uart2_pin_a: blsp1-uart2-pin-active {
 			rx {
@@ -366,6 +373,31 @@
 			};
 		};
 
+		wcnss_pin_a: wcnss-pin-active {
+			wlan {
+				pins =  "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
+				function = "wlan";
+
+				drive-strength = <6>;
+				bias-pull-down;
+			};
+
+			bt {
+				pins = "gpio35", "gpio43", "gpio44";
+				function = "bt";
+
+				drive-strength = <2>;
+				bias-pull-down;
+			};
+
+			fm {
+				pins = "gpio41", "gpio42";
+				function = "fm";
+
+				drive-strength = <2>;
+				bias-pull-down;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index ef5330578431..5c0d1a46baeb 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -2,6 +2,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
+#include <dt-bindings/clock/qcom,rpmcc.h>
 #include "skeleton.dtsi"
 
 / {
@@ -24,7 +25,7 @@
 			no-map;
 		};
 
-		reserved@0d200000 {
+		wcnss_region: wcnss@0d200000 {
 			reg = <0x0d200000 0xa00000>;
 			no-map;
 		};
@@ -430,6 +431,39 @@
 			clock-names = "core";
 		};
 
+		wcnss-rproc@fb21b000 {
+			compatible = "qcom,pronto-v2-pil";
+			reg = <0xfb21b000 0x3000>;
+
+			memory-region = <&wcnss_region>;
+
+			interrupts-extended = <&intc 0 149 IRQ_TYPE_EDGE_RISING>,
+					      <&wcnss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+					      <&wcnss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+					      <&wcnss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+					      <&wcnss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+
+			vddpx-supply = <&pm8941_s3>;
+
+			qcom,state = <&wcnss_smp2p_out 0>;
+			qcom,state-names = "stop";
+
+			status = "disabled";
+
+			iris {
+				compatible = "qcom,wcn3680";
+
+				clocks = <&rpmcc RPM_CXO_A2>;
+				clock-names = "xo";
+
+				vddxo-supply = <&pm8941_l6>;
+				vddrfa-supply = <&pm8941_l11>;
+				vddpa-supply = <&pm8941_l19>;
+				vdddig-supply = <&pm8941_s3>;
+			};
+		};
+
 		msmgpio: pinctrl@fd510000 {
 			compatible = "qcom,msm8974-pinctrl";
 			reg = <0xfd510000 0x4000>;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 6/9] ARM: dts: qcom: apq8064: Add syscon for sic-non-secure
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
  2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node Bjorn Andersson
@ 2016-03-29  3:37 ` Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 7/9] ARM: dts: qcom: apq8064: Add complete smsm node Bjorn Andersson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:37 UTC (permalink / raw)
  To: Andy Gross
  Cc: Rob Herring, John Stultz, linux-arm-msm, linux-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-remoteproc

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Andy, this is only here for context, please apply separately.

Changes since v1:
- Added dts patches

 arch/arm/boot/dts/qcom-apq8064.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 65d0e8d98259..9d45c4ef4a97 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -212,6 +212,11 @@
 			regulator;
 		};
 
+		sic_non_secure: sic-non-secure@12100000 {
+			compatible	= "syscon";
+			reg		= <0x12100000 0x10000>;
+		};
+
 		gsbi1: gsbi@12440000 {
 			status = "disabled";
 			compatible = "qcom,gsbi-v1.0.0";
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 7/9] ARM: dts: qcom: apq8064: Add complete smsm node
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
                   ` (2 preceding siblings ...)
  2016-03-29  3:37 ` [PATCH v2 6/9] ARM: dts: qcom: apq8064: Add syscon for sic-non-secure Bjorn Andersson
@ 2016-03-29  3:37 ` Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 8/9] ARM: dts: qcom: apq8064: Add smd node and all edges Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 9/9] ARM: dts: qcom: apq8064: Introduce wcnss remoteproc Bjorn Andersson
  5 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:37 UTC (permalink / raw)
  To: Andy Gross
  Cc: Rob Herring, John Stultz, linux-arm-msm, linux-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-remoteproc

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Andy, this is only here for context, please apply separately.

Changes since v1:
- Added dts patches

 arch/arm/boot/dts/qcom-apq8064.dtsi | 49 +++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 9d45c4ef4a97..5a9d68287840 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -124,6 +124,55 @@
 		hwlocks = <&sfpb_mutex 3>;
 	};
 
+	smsm {
+		compatible = "qcom,smsm";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		qcom,ipc-1 = <&l2cc 8 4>;
+		qcom,ipc-2 = <&l2cc 8 14>;
+		qcom,ipc-3 = <&l2cc 8 23>;
+		qcom,ipc-4 = <&sic_non_secure 0x4094 0>;
+
+		apps_smsm: apps@0 {
+			reg = <0>;
+			#qcom,state-cells = <1>;
+		};
+
+		modem_smsm: modem@1 {
+			reg = <1>;
+			interrupts = <0 38 IRQ_TYPE_EDGE_RISING>;
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		q6_smsm: q6@2 {
+			reg = <2>;
+			interrupts = <0 89 IRQ_TYPE_EDGE_RISING>;
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		wcnss_smsm: wcnss@3 {
+			reg = <3>;
+			interrupts = <0 204 IRQ_TYPE_EDGE_RISING>;
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+
+		dsps_smsm: dsps@4 {
+			reg = <4>;
+			interrupts = <0 137 IRQ_TYPE_EDGE_RISING>;
+
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
 	soc: soc {
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 8/9] ARM: dts: qcom: apq8064: Add smd node and all edges
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
                   ` (3 preceding siblings ...)
  2016-03-29  3:37 ` [PATCH v2 7/9] ARM: dts: qcom: apq8064: Add complete smsm node Bjorn Andersson
@ 2016-03-29  3:37 ` Bjorn Andersson
  2016-03-29  3:37 ` [PATCH v2 9/9] ARM: dts: qcom: apq8064: Introduce wcnss remoteproc Bjorn Andersson
  5 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:37 UTC (permalink / raw)
  To: Andy Gross
  Cc: devicetree, linux-arm-msm, linux-remoteproc, linux-kernel,
	Rob Herring, John Stultz, linux-soc, linux-arm-kernel

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Andy, this is only here for context, please apply separately.

Changes since v1:
- Added dts patches

 arch/arm/boot/dts/qcom-apq8064.dtsi | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 5a9d68287840..ad7bc3c2aad1 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -124,6 +124,46 @@
 		hwlocks = <&sfpb_mutex 3>;
 	};
 
+	smd {
+		compatible = "qcom,smd";
+
+		modem@0 {
+			interrupts = <0 37 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,ipc = <&l2cc 8 3>;
+			qcom,smd-edge = <0>;
+
+			status = "disabled";
+		};
+
+		q6@1 {
+			interrupts = <0 90 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,ipc = <&l2cc 8 15>;
+			qcom,smd-edge = <1>;
+
+			status = "disabled";
+		};
+
+		dsps@3 {
+			interrupts = <0 138 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,ipc = <&sic_non_secure 0x4080 0>;
+			qcom,smd-edge = <3>;
+
+			status = "disabled";
+		};
+
+		riva@6 {
+			interrupts = <0 198 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,ipc = <&l2cc 8 25>;
+			qcom,smd-edge = <6>;
+
+			status = "disabled";
+		};
+	};
+
 	smsm {
 		compatible = "qcom,smsm";
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 9/9] ARM: dts: qcom: apq8064: Introduce wcnss remoteproc
  2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
                   ` (4 preceding siblings ...)
  2016-03-29  3:37 ` [PATCH v2 8/9] ARM: dts: qcom: apq8064: Add smd node and all edges Bjorn Andersson
@ 2016-03-29  3:37 ` Bjorn Andersson
  5 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-03-29  3:37 UTC (permalink / raw)
  To: Andy Gross
  Cc: Rob Herring, John Stultz, linux-arm-msm, linux-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-remoteproc

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Changes since v1:
- Added dts patches

 .../arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts |  4 ++
 arch/arm/boot/dts/qcom-apq8064.dtsi                | 57 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
index 06b3c76c3e41..276f529383e8 100644
--- a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
+++ b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
@@ -432,5 +432,9 @@
 				pinctrl-0 = <&sdcc3_pin_a>, <&sdcc3_cd_pin_a>;
 			};
 		};
+
+		wcnss@3204000 {
+			status = "okay";
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index ad7bc3c2aad1..2c213ce80acc 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -20,6 +20,11 @@
 			reg = <0x80000000 0x200000>;
 			no-map;
 		};
+
+		wcnss_mem: wcnss@8f000000 {
+			reg = <0x8f000000 0x700000>;
+			no-map;
+		};
 	};
 
 	cpus {
@@ -231,6 +236,26 @@
 
 			pinctrl-names = "default";
 			pinctrl-0 = <&ps_hold>;
+
+			wcnss_pin_a: wcnss-pins-active {
+				fm {
+					pins = "gpio14", "gpio15";
+					function = "riva_fm";
+				};
+
+				bt {
+					pins = "gpio16", "gpio17";
+					function = "riva_bt";
+				};
+
+				wlan {
+					pins = "gpio64", "gpio65", "gpio66", "gpio67", "gpio68";
+					function = "riva_wlan";
+
+					drive-strength = <6>;
+					bias-pull-down;
+				};
+			};
 		};
 
 		sfpb_wrapper_mutex: syscon@1200000 {
@@ -916,6 +941,38 @@
 			reset-names = "axi", "ahb", "por", "pci", "phy";
 			status = "disabled";
 		};
+
+		wcnss@3204000 {
+			compatible = "qcom,riva-pil";
+			reg = <0x03204000 0x100>;
+
+			interrupts-extended = <&intc 0 199 IRQ_TYPE_EDGE_RISING>,
+					      <&wcnss_smsm 6 IRQ_TYPE_EDGE_RISING>;
+			interrupt-names = "wdog", "fatal";
+
+			memory-region = <&wcnss_mem>;
+
+			vddcx-supply = <&pm8921_s3>;
+			vddmx-supply = <&pm8921_lvs7>;
+			vddpx-supply = <&pm8921_s4>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&wcnss_pin_a>;
+
+			status = "disabled";
+
+			iris {
+				compatible = "qcom,wcn3660";
+
+				clocks = <&rpmcc 2>;
+				clock-names = "xo";
+
+				vddxo-supply = <&pm8921_l4>;
+				vddrfa-supply = <&pm8921_s2>;
+				vddpa-supply = <&pm8921_l10>;
+				vdddig-supply = <&pm8921_lvs2>;
+			};
+		};
 	};
 };
 #include "qcom-apq8064-pins.dtsi"
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node
  2016-03-29  3:37 ` [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node Bjorn Andersson
@ 2016-03-29  6:03   ` kbuild test robot
  0 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2016-03-29  6:03 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: kbuild-all, Andy Gross, Rob Herring, linux-arm-msm, John Stultz,
	linux-soc, devicetree, linux-arm-kernel, linux-kernel,
	linux-remoteproc, Bjorn Andersson

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

Hi Bjorn,

[auto build test ERROR on v4.6-rc1]
[also build test ERROR on next-20160329]
[cannot apply to robh/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Bjorn-Andersson/Qualcomm-WCNSS-remoteproc/20160329-114231
config: arm-multi_v7_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   In file included from arch/arm/boot/dts/qcom-apq8074-dragonboard.dts:1:0:
>> arch/arm/boot/dts/qcom-msm8974.dtsi:5:42: fatal error: dt-bindings/clock/qcom,rpmcc.h: No such file or directory
    #include <dt-bindings/clock/qcom,rpmcc.h>
                                             ^
   compilation terminated.

vim +5 arch/arm/boot/dts/qcom-msm8974.dtsi

     1	/dts-v1/;
     2	
     3	#include <dt-bindings/interrupt-controller/arm-gic.h>
     4	#include <dt-bindings/clock/qcom,gcc-msm8974.h>
   > 5	#include <dt-bindings/clock/qcom,rpmcc.h>
     6	#include "skeleton.dtsi"
     7	
     8	/ {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 37221 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
  2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
@ 2016-03-31 14:31   ` Rob Herring
  2016-04-21 17:20   ` [PATCH v2.1 " Bjorn Andersson
  1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2016-03-31 14:31 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Pawel Moll, Mark Rutland, Ian Campbell, Suman Anna, John Stultz,
	devicetree, linux-kernel, linux-arm-kernel, linux-arm-msm,
	linux-remoteproc, Bjorn Andersson

On Mon, Mar 28, 2016 at 08:36:57PM -0700, Bjorn Andersson wrote:
> From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> 
> The document defines the binding for a component that loads firmware for
> and boots the Qualcomm WCNSS core.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> 
> Changes since v1:
> - Dropped non-variable properties (crash reason, firmware name)
> - Split wcnss and iris definitions into separate nodes
> - Dropped qcom, prefix of regulator supplies (standard binding)
> - Interrupts and stop-state is made optional to support 8064
> 
>  .../bindings/remoteproc/qcom,wcnss-pil.txt         | 117 +++++++++++++++++++++
>  1 file changed, 117 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
  2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
  2016-03-31 14:31   ` Rob Herring
@ 2016-04-21 17:20   ` Bjorn Andersson
  2016-04-22 16:22     ` Rob Herring
  1 sibling, 1 reply; 12+ messages in thread
From: Bjorn Andersson @ 2016-04-21 17:20 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pawel Moll, Mark Rutland, Ian Campbell, Suman Anna, John Stultz,
	devicetree, linux-kernel, linux-arm-kernel, linux-arm-msm,
	linux-remoteproc, Bjorn Andersson

From: Bjorn Andersson <bjorn.andersson@sonymobile.com>

The document defines the binding for a component that loads firmware for
and boots the Qualcomm WCNSS core.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---

Rob,

I got your Ack on v2, but I would like to make a small amendment before merging
this.


As we discussed related to the WiFi binding I should reference the mmio
registers by a phandle to a DT node specifying the two necessary register
blocks (ccu & dxe).

These two register blocks are part of the riva/pronto (the two major versions)
subsystem, that also contains the "pmu" register block, which is what I access
here.

Further more, the ccu block contains valuable information for debugging
purposes that the implementation of this binding would find useful.


I would therefor like to double this node (in the dts) as both the
riva/pronto-pil and the target for the mmio phandle reference from the WiFi
node.

This works fine, but unless using reg-names for defining the order or the regs
I get a messy ordering dependency between the two bindings. I do not know which
of the other 7-8 register blocks we will add for debugging, but with the below
change I can keep them in block order regardless of the order we implement them
in.

So, can I update the "reg" and add "reg-names" as below to the binding and
depend on reg-names for the ordering of reg? Or should I speculatively add all
ranges I know of to keep the order sane?

Regards,
Bjorn

Changes since v2:
- Modify definition of "reg"
- Add "reg-names"
- Update example

 .../bindings/remoteproc/qcom,wcnss-pil.txt         | 124 +++++++++++++++++++++
 1 file changed, 124 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
new file mode 100644
index 000000000000..2ddca9be893e
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,wcnss-pil.txt
@@ -0,0 +1,124 @@
+Qualcomm WCNSS Peripheral Image Loader
+
+This document defines the binding for a component that loads and boots firmware
+on the Qualcomm WCNSS core.
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be one of:
+		    "qcom,riva-pil",
+		    "qcom,pronto-v1-pil",
+		    "qcom,pronto-v2-pil"
+
+- reg:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: must contain base address and size of riva/pronto PMU
+		    registers
+
+- reg-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must contain "pmu"
+
+- interrupts-extended:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: must list the watchdog and fatal IRQs and may specify the
+		    ready, handover and stop-ack IRQs
+
+- interrupt-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: should be "wdog", "fatal", optionally followed by "ready",
+		    "handover", "stop-ack"
+
+- vddmx-supply:
+- vddcx-supply:
+- vddpx-supply:
+	Usage: required
+	Value type: <phandle>
+	Definition: reference to the regulators to be held on behalf of the
+		    booting of the WCNSS core
+
+- qcom,state:
+	Usage: optional
+	Value type: <prop-encoded-array>
+	Definition: reference to the SMEM state used to indicate to WCNSS that
+		    it should shut down
+
+- qcom,state-names:
+	Usage: optional
+	Value type: <stringlist>
+	Definition: should be "stop"
+
+= SUBNODES
+A single subnode of the WCNSS PIL describes the attached rf module and its
+resource dependencies.
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be one of:
+		    "qcom,wcn3620",
+		    "qcom,wcn3660",
+		    "qcom,wcn3680"
+
+- clocks:
+	Usage: required
+	Value type: <prop-encoded-array>
+	Definition: should specify the xo clock and optionally the rf clock
+
+- clock-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: should be "xo", optionally followed by "rf"
+
+- vddxo-supply:
+- vddrfa-supply:
+- vddpa-supply:
+- vdddig-supply:
+	Usage: required
+	Value type: <phandle>
+	Definition: reference to the regulators to be held on behalf of the
+		    booting of the WCNSS core
+
+= EXAMPLE
+The following example describes the resources needed to boot control the WCNSS,
+with attached WCN3680, as it is commonly found on MSM8974 boards.
+
+pronto@fb21b000 {
+	compatible = "qcom,pronto-v2-pil";
+	reg = <0xfb21b000 0x3000>;
+	reg-names = "pmu";
+
+	interrupts-extended = <&intc 0 149 1>,
+			      <&wcnss_smp2p_slave 0 0>,
+			      <&wcnss_smp2p_slave 1 0>,
+			      <&wcnss_smp2p_slave 2 0>,
+			      <&wcnss_smp2p_slave 3 0>;
+	interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+
+	vddmx-supply = <&pm8841_s1>;
+	vddcx-supply = <&pm8841_s2>;
+	vddpx-supply = <&pm8941_s3>;
+
+	qcom,state = <&wcnss_smp2p_out 0>;
+	qcom,state-names = "stop";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&wcnss_pin_a>;
+
+	iris {
+		compatible = "qcom,wcn3680";
+
+		clocks = <&rpmcc RPM_CXO_CLK_SRC>, <&rpmcc RPM_CXO_A2>;
+		clock-names = "xo", "rf";
+
+		vddxo-supply = <&pm8941_l6>;
+		vddrfa-supply = <&pm8941_l11>;
+		vddpa-supply = <&pm8941_l19>;
+		vdddig-supply = <&pm8941_s3>;
+	};
+};
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
  2016-04-21 17:20   ` [PATCH v2.1 " Bjorn Andersson
@ 2016-04-22 16:22     ` Rob Herring
       [not found]       ` <CAL_JsqLgehfMVXgDQdHaC6SJ7MU3oRKFn4ogLbtgp_31keX95g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Rob Herring @ 2016-04-22 16:22 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Pawel Moll, Mark Rutland, Ian Campbell, Suman Anna, John Stultz,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-arm-msm,
	linux-remoteproc, Bjorn Andersson

On Thu, Apr 21, 2016 at 12:20 PM, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
>
> The document defines the binding for a component that loads firmware for
> and boots the Qualcomm WCNSS core.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Rob,
>
> I got your Ack on v2, but I would like to make a small amendment before merging
> this.
>
>
> As we discussed related to the WiFi binding I should reference the mmio
> registers by a phandle to a DT node specifying the two necessary register
> blocks (ccu & dxe).
>
> These two register blocks are part of the riva/pronto (the two major versions)
> subsystem, that also contains the "pmu" register block, which is what I access
> here.
>
> Further more, the ccu block contains valuable information for debugging
> purposes that the implementation of this binding would find useful.
>
>
> I would therefor like to double this node (in the dts) as both the
> riva/pronto-pil and the target for the mmio phandle reference from the WiFi
> node.
>
> This works fine, but unless using reg-names for defining the order or the regs
> I get a messy ordering dependency between the two bindings. I do not know which
> of the other 7-8 register blocks we will add for debugging, but with the below
> change I can keep them in block order regardless of the order we implement them
> in.

You should know based on the compatible string what the number and
order of register ranges are. reg is not something we want evolving
over time.

> So, can I update the "reg" and add "reg-names" as below to the binding and
> depend on reg-names for the ordering of reg? Or should I speculatively add all
> ranges I know of to keep the order sane?

I'm okay with using this for convenience of the client not having to
care which compatible the block is, but the above should still be met.

Also, you could add a cell which is the index to the register range you need.

Rob

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2.1 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding
       [not found]       ` <CAL_JsqLgehfMVXgDQdHaC6SJ7MU3oRKFn4ogLbtgp_31keX95g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-04-22 16:54         ` Bjorn Andersson
  0 siblings, 0 replies; 12+ messages in thread
From: Bjorn Andersson @ 2016-04-22 16:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Pawel Moll, Mark Rutland, Ian Campbell, Suman Anna, John Stultz,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-arm-msm, linux-remoteproc-u79uwXL29TY76Z2rM5mHXA,
	Bjorn Andersson

On Fri 22 Apr 09:22 PDT 2016, Rob Herring wrote:

> On Thu, Apr 21, 2016 at 12:20 PM, Bjorn Andersson
> <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> > From: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> >
> > The document defines the binding for a component that loads firmware for
> > and boots the Qualcomm WCNSS core.
> >
> > Signed-off-by: Bjorn Andersson <bjorn.andersson-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
> > Signed-off-by: Bjorn Andersson <bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > ---
> >
> > Rob,
> >
> > I got your Ack on v2, but I would like to make a small amendment before merging
> > this.
> >
> >
> > As we discussed related to the WiFi binding I should reference the mmio
> > registers by a phandle to a DT node specifying the two necessary register
> > blocks (ccu & dxe).
> >
> > These two register blocks are part of the riva/pronto (the two major versions)
> > subsystem, that also contains the "pmu" register block, which is what I access
> > here.
> >
> > Further more, the ccu block contains valuable information for debugging
> > purposes that the implementation of this binding would find useful.
> >
> >
> > I would therefor like to double this node (in the dts) as both the
> > riva/pronto-pil and the target for the mmio phandle reference from the WiFi
> > node.
> >
> > This works fine, but unless using reg-names for defining the order or the regs
> > I get a messy ordering dependency between the two bindings. I do not know which
> > of the other 7-8 register blocks we will add for debugging, but with the below
> > change I can keep them in block order regardless of the order we implement them
> > in.
> 
> You should know based on the compatible string what the number and
> order of register ranges are. reg is not something we want evolving
> over time.
> 

At best I can make an educated guess based on some downstream debug code
on what regs we do have. But I've already found two of the ranges being
incorrect.

> > So, can I update the "reg" and add "reg-names" as below to the binding and
> > depend on reg-names for the ordering of reg? Or should I speculatively add all
> > ranges I know of to keep the order sane?
> 
> I'm okay with using this for convenience of the client not having to
> care which compatible the block is, but the above should still be met.
> 

Okay, I will throw in the 3 I know for now, saying those are required.
And then we add the debug regions as optionals after those, based on
which ones we need. Hopefully I haven't missed any required regions...

> Also, you could add a cell which is the index to the register range you need.
> 

I'm afraid I feel that is just reimplementing reg-names, for the sake of
not using reg-names.


Thanks for your answer, I'll spin the two bindings and send them about
again.

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-22 16:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29  3:36 [PATCH v2 0/9] Qualcomm WCNSS remoteproc Bjorn Andersson
2016-03-29  3:36 ` [PATCH v2 1/9] dt-binding: remoteproc: Introduce Qualcomm WCNSS loader binding Bjorn Andersson
2016-03-31 14:31   ` Rob Herring
2016-04-21 17:20   ` [PATCH v2.1 " Bjorn Andersson
2016-04-22 16:22     ` Rob Herring
     [not found]       ` <CAL_JsqLgehfMVXgDQdHaC6SJ7MU3oRKFn4ogLbtgp_31keX95g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-22 16:54         ` Bjorn Andersson
2016-03-29  3:37 ` [PATCH v2 5/9] ARM: dts: qcom: msm8974: Introduce the wcnss remoteproc node Bjorn Andersson
2016-03-29  6:03   ` kbuild test robot
2016-03-29  3:37 ` [PATCH v2 6/9] ARM: dts: qcom: apq8064: Add syscon for sic-non-secure Bjorn Andersson
2016-03-29  3:37 ` [PATCH v2 7/9] ARM: dts: qcom: apq8064: Add complete smsm node Bjorn Andersson
2016-03-29  3:37 ` [PATCH v2 8/9] ARM: dts: qcom: apq8064: Add smd node and all edges Bjorn Andersson
2016-03-29  3:37 ` [PATCH v2 9/9] ARM: dts: qcom: apq8064: Introduce wcnss remoteproc Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).