Skip to contentSkip to conversation

arm64: dts: qcom: qcs404: Add Device tree nodes

PATCH Superseded Vinod Koul 2 participants 33 messages Nov 5, 2018 – Nov 6, 2018

Subsystems (3)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

v2 cover arm64: dts: qcom: qcs404: Add Device tree nodes

This series adds support for various nodes for QCS404-EVB.

Based on v4.20-rc1

Changes in v2:
Fix cpu binding

Bjorn Andersson (7):
arm64: dts: qcom: qcs404: Add reserved-memory regions
arm64: dts: qcom: qcs404: Add RPM GLINK related nodes
arm64: dts: qcom: qcs404: Add PMS405 RPM regulators
arm64: dts: qcom: qcs404: Add TLMM pinctrl node
arm64: dts: qcom: qcs404: Add sdcc1 node
arm64: dts: qcom: qcs404: Add scm firmware node
arm64: dts: qcom: qcs404: Add remoteproc nodes

Vinod Koul (10):
arm64: dts: qcom: qcs404: add base dts files
arm64: dts: qcom: qcs404: add smp2p nodes
arm64: dts: qcom: pms405: add spmi node
arm64: dts: qcom: qcs404: add spmi node
arm64: dts: qcom: pms405: add rtc node
arm64: dts: qcom: pms405: add gpios
arm64: dts: qcom: qcs404: add prng-ee node
arm64: dts: qcom: qcs404: Add BAM DMA node
arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2
arm64: dts: qcom: pms405: Add pon and pwrkey nodes

 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/pms405.dtsi    |  53 ++++
 arch/arm64/boot/dts/qcom/qcs404-evb.dts | 183 ++++++++++++
 arch/arm64/boot/dts/qcom/qcs404.dtsi    | 485 ++++++++++++++++++++++++++++++++
 4 files changed, 722 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pms405.dtsi
 create mode 100644 arch/arm64/boot/dts/qcom/qcs404-evb.dts
 create mode 100644 arch/arm64/boot/dts/qcom/qcs404.dtsi

Thanks

Signature · 1 line
2.14.4
author
#1 lore raw

PATCH v2 1/17 arm64: dts: qcom: qcs404: add base dts files

Add base dts files for QCS404 chipset along with cpu, timer, gcc and uart2 nodes.

---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/qcs404-evb.dts |  21 ++++
 arch/arm64/boot/dts/qcom/qcs404.dtsi    | 175 ++++++++++++++++++++++++++++++++
 3 files changed, 197 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/qcs404-evb.dts
 create mode 100644 arch/arm64/boot/dts/qcom/qcs404.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index a658c07652a7..3dffa0f58468 100644
@@ -8,3 +8,4 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8994-angler-rev-101.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8996-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8998-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb.dtb
arch/arm64/boot/dts/qcom/qcs404-evb.dts new file +21 -0
new file mode 100644
index 000000000000..74dc09ddb0d2
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018, Linaro Limited
+
+// QCS EVB DTS
+
+/dts-v1/;
+
+#include "qcs404.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
+	compatible = "qcom,qcs404-evb";
+
+	aliases {
+		serial0 = &blsp1_uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0";
+	};
+};
arch/arm64/boot/dts/qcom/qcs404.dtsi new file +175 -0

175 lines not on this page · raw message

Signature · 1 line
2.14.4
#2 lore raw

Re: [PATCH v2 01/17] arm64: dts: qcom: qcs404: add base dts files

arch/arm64/boot/dts/qcom/qcs404-evb.dts line 4

Quoted 10 lines · Vinod Koul
arch/arm64/boot/dts/qcom/qcs404-evb.dts new file +4 -0
new file mode 100644
index 000000000000..74dc09ddb0d2
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018, Linaro Limited
+
+// QCS EVB DTS

This can be read from the filename and the model a few lines down. So please drop.

Quoted 18 lines
arch/arm64/boot/dts/qcom/qcs404-evb.dts new file +17 -0
+
+/dts-v1/;
+
+#include "qcs404.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
+	compatible = "qcom,qcs404-evb";
+
+	aliases {
+		serial0 = &blsp1_uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0";
+	};
+};
arch/arm64/boot/dts/qcom/qcs404.dtsi +0 -0

[..]

arch/arm64/boot/dts/qcom/qcs404.dtsi line 76

Quoted 9 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +9 -0
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 2 0xff08>,
+			     <GIC_PPI 3 0xff08>,
+			     <GIC_PPI 4 0xff08>,
+			     <GIC_PPI 1 0xff08>;
+	};
+
+	clocks {

Please sort these nodes alphabetically.

arch/arm64/boot/dts/qcom/qcs404.dtsi line 89

Quoted 13 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +13 -0
+		xo_board: xo_board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <19200000>;
+		};
+	};
+
+	soc: soc@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;
+		compatible = "simple-bus";
+

Please pad the address in reg to 8 digits and sort these nodes by address.

arch/arm64/boot/dts/qcom/qcs404.dtsi line 97

Quoted 8 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +8 -0
+		intc: interrupt-controller@b000000 {
+			compatible = "qcom,msm-qgic2";
+			interrupt-controller;
+			#interrupt-cells = <3>;
+			reg = <0x0b000000 0x1000>,
+			      <0x0b002000 0x1000>;
+		};
+

Regards,
Bjorn

author
#3 lore raw

Re: [PATCH v2 01/17] arm64: dts: qcom: qcs404: add base dts files

Thanks for the review Bjorn,

Quoted 15 lines · Bjorn Andersson

arch/arm64/boot/dts/qcom/qcs404-evb.dts line 4

Quoted 10 lines · Vinod Koul
arch/arm64/boot/dts/qcom/qcs404-evb.dts new file +4 -0
new file mode 100644
index 000000000000..74dc09ddb0d2
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018, Linaro Limited
+
+// QCS EVB DTS

This can be read from the filename and the model a few lines down. So please drop.

Sure

Quoted 20 lines
Quoted 19 lines
arch/arm64/boot/dts/qcom/qcs404-evb.dts new file +17 -0
+
+/dts-v1/;
+
+#include "qcs404.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
+	compatible = "qcom,qcs404-evb";
+
+	aliases {
+		serial0 = &blsp1_uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0";
+	};
+};
arch/arm64/boot/dts/qcom/qcs404.dtsi +0 -0

[..]

Quoted 11 lines

arch/arm64/boot/dts/qcom/qcs404.dtsi line 76

Quoted 9 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +9 -0
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 2 0xff08>,
+			     <GIC_PPI 3 0xff08>,
+			     <GIC_PPI 4 0xff08>,
+			     <GIC_PPI 1 0xff08>;
+	};
+
+	clocks {

Please sort these nodes alphabetically.

Will do and also while adding subsequent nodes

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +8 -0
+		xo_board: xo_board {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <19200000>;
+		};
+	};
+
+	soc: soc@0 {
Quoted 8 lines

arch/arm64/boot/dts/qcom/qcs404.dtsi line 89

Quoted 5 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +5 -0
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0xffffffff>;
+		compatible = "simple-bus";
+

Please pad the address in reg to 8 digits and sort these nodes by address.

Sure

Signature · 1 line
~Vinod
author
#4 lore raw

PATCH v2 2/17 arm64: dts: qcom: qcs404: Add reserved-memory regions

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the reserved memory regions in QCS404

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 41 ++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +41 -0
index 99efde1bbce9..ba7cd707299c 100644
@@ -18,6 +18,47 @@
 		reg = <0 0x0 0 0>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		memory@85600000 {
+			reg = <0 0x85600000 0 0x90000>;
+			no-map;
+		};
+
+		smem_region: memory@85f00000 {
+			reg = <0 0x85f00000 0 0x200000>;
+			no-map;
+		};
+
+		memory@86100000 {
+			reg = <0 0x86100000 0 0x300000>;
+			no-map;
+		};
+
+		wlan_fw_mem: memory@86400000 {
+			reg = <0 0x86400000 0 0x1c00000>;
+			no-map;
+		};
+
+		adsp_fw_mem: memory@88000000 {
+			reg = <0 0x88000000 0 0x1a00000>;
+			no-map;
+		};
+
+		cdsp_fw_mem: memory@89a00000 {
+			reg = <0 0x89a00000 0 0x600000>;
+			no-map;
+		};
+
+		wlan_msa_mem: memory@8a000000 {
+			reg = <0 0x8a000000 0 0x100000>;
+			no-map;
+		};
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
Signature · 1 line
2.14.4
author
#5 lore raw

PATCH v2 3/17 arm64: dts: qcom: qcs404: Add RPM GLINK related nodes

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add RPM GLINK node and the RPM message ram, hwspinlock, APCS apps global and smem nodes it depends on.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 44 ++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +44 -0
index ba7cd707299c..c749c61225b4 100644
@@ -106,6 +106,34 @@
 		method = "smc";
 	};
 
+	rpm-glink {
+		compatible = "qcom,glink-rpm";
+
+		interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
+		qcom,rpm-msg-ram = <&rpm_msg_ram>;
+		mboxes = <&apcs_glb 0>;
+
+		rpm_requests: glink-channel {
+			compatible = "qcom,rpm-qcs404";
+			qcom,glink-channels = "rpm_requests";
+		};
+	};
+
+	smem {
+		compatible = "qcom,smem";
+
+		memory-region = <&smem_region>;
+		qcom,rpm-msg-ram = <&rpm_msg_ram>;
+
+		hwlocks = <&tcsr_mutex 3>;
+	};
+
+	tcsr_mutex: hwlock {
+		compatible = "qcom,tcsr-mutex";
+		syscon = <&tcsr_mutex_regs 0 0x1000>;
+		#hwlock-cells = <1>;
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 2 0xff08>,
@@ -128,6 +156,11 @@
 		ranges = <0 0 0 0xffffffff>;
 		compatible = "simple-bus";
 
+		rpm_msg_ram: memory@60000 {
+			compatible = "qcom,rpm-msg-ram";
+			reg = <0x60000 0x6000>;
+		};
+
 		intc: interrupt-controller@b000000 {
 			compatible = "qcom,msm-qgic2";
 			interrupt-controller;
@@ -145,6 +178,11 @@
 			assigned-clock-rates = <19200000>;
 		};
 
+		tcsr_mutex_regs: syscon@1905000 {
+			compatible = "syscon";
+			reg = <0x1905000 0x20000>;
+		};
+
 		timer@b120000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -212,5 +250,11 @@
 			clock-names = "core", "iface";
 			status = "okay";
 		};
+
+		apcs_glb: mailbox@b011000 {
+			compatible = "qcom,qcs404-apcs-apps-global", "syscon";
+			reg = <0xb011000 0x1000>;
+			#mbox-cells = <1>;
+		};
 	};
 };
Signature · 1 line
2.14.4
author
#6 lore raw

PATCH v2 4/17 arm64: dts: qcom: qcs404: Add PMS405 RPM regulators

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the RPM regulators found in PMS405 which is used in qcs404-evb

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dts | 97 +++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dts +97 -0
index 74dc09ddb0d2..5bae7163a093 100644
@@ -18,4 +18,101 @@
 	chosen {
 		stdout-path = "serial0";
 	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-always-on;
+		regulator-boot-on;
+	};
+};
+
+&rpm_requests {
+	pms405-regulators {
+		compatible = "qcom,rpm-pms405-regulators";
+
+		vdd_s1-supply = <&vph_pwr>;
+		vdd_s2-supply = <&vph_pwr>;
+		vdd_s3-supply = <&vph_pwr>;
+		vdd_s4-supply = <&vph_pwr>;
+		vdd_s5-supply = <&vph_pwr>;
+		vdd_l1_l2-supply = <&vreg_s5_1p35>;
+		vdd_l3_l8-supply = <&vreg_s5_1p35>;
+		vdd_l4-supply = <&vreg_s5_1p35>;
+		vdd_l5_l6-supply = <&vreg_s4_1p8>;
+		vdd_l7-supply = <&vph_pwr>;
+		vdd_l9-supply = <&vreg_s5_1p35>;
+		vdd_l10_l11_l12_l13-supply = <&vph_pwr>;
+
+		vreg_s4_1p8: s4 {
+			regulator-min-microvolt = <1728000>;
+			regulator-max-microvolt = <1920000>;
+		};
+
+		vreg_s5_1p35: s5 {
+			regulator-min-microvolt = <>;
+			regulator-max-microvolt = <>;
+		};
+
+		vreg_l1_1p3: l1 {
+			regulator-min-microvolt = <1240000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_l2_1p275: l2 {
+			regulator-min-microvolt = <1048000>;
+			regulator-max-microvolt = <1280000>;
+		};
+
+		vreg_l3_1p05: l3 {
+			regulator-min-microvolt = <976000>;
+			regulator-max-microvolt = <1160000>;
+		};
+
+		vreg_l4_1p2: l4 {
+			regulator-min-microvolt = <1144000>;
+			regulator-max-microvolt = <1256000>;
+		};
+
+		vreg_l5_1p8: l5 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+		};
+
+		vreg_l6_1p8: l6 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-always-on;
+		};
+
+		vreg_l7_1p8: l7 {
+			regulator-min-microvolt = <1616000>;
+			regulator-max-microvolt = <3000000>;
+		};
+
+		vreg_l8_1p2: l8 {
+			regulator-min-microvolt = <1136000>;
+			regulator-max-microvolt = <1352000>;
+		};
+
+		vreg_l10_3p3: l10 {
+			regulator-min-microvolt = <2936000>;
+			regulator-max-microvolt = <3088000>;
+		};
+
+		vreg_l11_sdc2: l11 {
+			regulator-min-microvolt = <2696000>;
+			regulator-max-microvolt = <3304000>;
+		};
+
+		vreg_l12_3p3: l12 {
+			regulator-min-microvolt = <2968000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		vreg_l13_3p3: l13 {
+			regulator-min-microvolt = <3000000>;
+			regulator-max-microvolt = <3300000>;
+		};
+	};
 };
Signature · 1 line
2.14.4
author
#7 lore raw

PATCH v2 5/17 arm64: dts: qcom: qcs404: add smp2p nodes

In reply to Vinod Koul

Add the smp2p-adsp, smp2p-cdsp and smp2p-wcss nodes found in QCS404.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 60 ++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +60 -0
index c749c61225b4..c87b0440584a 100644
@@ -257,4 +257,64 @@
 			#mbox-cells = <1>;
 		};
 	};
+
+	smp2p-adsp {
+		compatible = "qcom,smp2p";
+		qcom,smem = <443>, <429>;
+		interrupts = <GIC_SPI 291 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 10>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <2>;
+
+		adsp_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		adsp_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-cdsp {
+		compatible = "qcom,smp2p";
+		qcom,smem = <94>, <432>;
+		interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 14>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <5>;
+
+		cdsp_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		cdsp_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-wcss {
+		compatible = "qcom,smp2p";
+		qcom,smem = <435>, <428>;
+		interrupts = <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 18>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <1>;
+
+		wcss_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		wcss_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
 };
Signature · 1 line
2.14.4
Reviewed-by on v2 5/17
#8 lore raw

Re: [PATCH v2 05/17] arm64: dts: qcom: qcs404: add smp2p nodes

Quoted 3 lines · Vinod Koul

Add the smp2p-adsp, smp2p-cdsp and smp2p-wcss nodes found in QCS404.

Regards,
Bjorn

Quoted 76 lines
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 60 ++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +60 -0
index c749c61225b4..c87b0440584a 100644
@@ -257,4 +257,64 @@
 			#mbox-cells = <1>;
 		};
 	};
+
+	smp2p-adsp {
+		compatible = "qcom,smp2p";
+		qcom,smem = <443>, <429>;
+		interrupts = <GIC_SPI 291 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 10>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <2>;
+
+		adsp_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		adsp_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-cdsp {
+		compatible = "qcom,smp2p";
+		qcom,smem = <94>, <432>;
+		interrupts = <GIC_SPI 143 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 14>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <5>;
+
+		cdsp_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		cdsp_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
+
+	smp2p-wcss {
+		compatible = "qcom,smp2p";
+		qcom,smem = <435>, <428>;
+		interrupts = <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>;
+		mboxes = <&apcs_glb 18>;
+		qcom,local-pid = <0>;
+		qcom,remote-pid = <1>;
+
+		wcss_smp2p_out: master-kernel {
+			qcom,entry-name = "master-kernel";
+			#qcom,smem-state-cells = <1>;
+		};
+
+		wcss_smp2p_in: slave-kernel {
+			qcom,entry-name = "slave-kernel";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
+	};
 };
Signature · 1 line
2.14.4
author
#9 lore raw

PATCH v2 6/17 arm64: dts: qcom: qcs404: Add TLMM pinctrl node

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the QCS404 TLMM pinctrl node with its three tiles.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +14 -0
index c87b0440584a..58afdd83e7a9 100644
@@ -256,6 +256,20 @@
 			reg = <0xb011000 0x1000>;
 			#mbox-cells = <1>;
 		};
+
+		tlmm: pinctrl@1000000 {
+			compatible = "qcom,qcs404-pinctrl";
+			reg = <0x01000000 0x200000>,
+			      <0x01300000 0x200000>,
+			      <0x07b00000 0x200000>;
+			reg-names = "south", "north", "east";
+			interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>;
+			gpio-ranges = <&tlmm 0 0 120>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
 	};
 
 	smp2p-adsp {
Signature · 1 line
2.14.4
author
#10 lore raw

PATCH v2 7/17 arm64: dts: qcom: qcs404: Add sdcc1 node

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the sdcc1 node and enable it for the QCS404-EVB.

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dts | 64 +++++++++++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/qcs404.dtsi    | 17 +++++++++
 2 files changed, 81 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dts +64 -0
index 5bae7163a093..b79969153fba 100644
@@ -116,3 +116,67 @@
 		};
 	};
 };
+
+&sdcc1 {
+	status = "ok";
+
+	mmc-ddr-1_8v;
+	bus-width = <8>;
+	non-removable;
+
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&sdc1_on>;
+	pinctrl-1 = <&sdc1_off>;
+};
+
+&tlmm {
+	sdc1_on: sdc1-on {
+		clk {
+			pins = "sdc1_clk";
+			bias-disable;
+			drive-strength = <16>;
+		};
+
+		cmd {
+			pins = "sdc1_cmd";
+			bias-pull-up;
+			drive-strength = <10>;
+		};
+
+		data {
+			pins = "sdc1_data";
+			bias-pull-up;
+			dreive-strength = <10>;
+		};
+
+		rclk {
+			pins = "sdc1_rclk";
+			bias-pull-down;
+		};
+	};
+
+	sdc1_off: sdc1-off {
+		clk {
+			pins = "sdc1_clk";
+			bias-disable;
+			drive-strength = <2>;
+		};
+
+		cmd {
+			pins = "sdc1_cmd";
+			bias-pull-up;
+			drive-strength = <2>;
+		};
+
+		data {
+			pins = "sdc1_data";
+			bias-pull-up;
+			dreive-strength = <2>;
+		};
+
+		rclk {
+			pins = "sdc1_rclk";
+			bias-pull-down;
+		};
+	};
+};
arch/arm64/boot/dts/qcom/qcs404.dtsi +17 -0
index 58afdd83e7a9..970ca9a62530 100644
@@ -270,6 +270,23 @@
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
+
+		sdcc1: sdcc@7804000 {
+			compatible = "qcom,sdhci-msm-v5";
+			reg = <0x7804000 0x1000>, <0x7805000 0x1000>;
+			reg-names = "hc_mem", "cmdq_mem";
+
+			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hc_irq", "pwr_irq";
+
+			clocks = <&gcc GCC_SDCC1_APPS_CLK>,
+				 <&gcc GCC_SDCC1_AHB_CLK>,
+				 <&xo_board>;
+			clock-names = "core", "iface", "xo";
+
+			status = "disabled";
+		};
 	};
 
 	smp2p-adsp {
Signature · 1 line
2.14.4
author
#11 lore raw

PATCH v2 8/17 arm64: dts: qcom: pms405: add spmi node

In reply to Vinod Koul

Add the pms405 DT file with spmi node.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pms405.dtsi
arch/arm64/boot/dts/qcom/pms405.dtsi new file +15 -0
new file mode 100644
index 000000000000..8a585180f102
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018, Linaro Limited
+
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+
+	pms405_0: pms405@0 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x0 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+	};
+};
Signature · 1 line
2.14.4
Reviewed-by on v2 8/17
#12 lore raw

Re: [PATCH v2 08/17] arm64: dts: qcom: pms405: add spmi node

Quoted 14 lines · Vinod Koul

Add the pms405 DT file with spmi node.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/pms405.dtsi
arch/arm64/boot/dts/qcom/pms405.dtsi new file +0 -0
new file mode 100644
index 000000000000..8a585180f102

arch/arm64/boot/dts/qcom/pms405.dtsi line 7

Quoted 7 lines
arch/arm64/boot/dts/qcom/pms405.dtsi new file +7 -0
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (c) 2018, Linaro Limited
+
+#include <dt-bindings/spmi/spmi.h>
+
+&spmi_bus {
+

Please drop the empty line.

Regards,
Bjorn

Quoted 11 lines
arch/arm64/boot/dts/qcom/pms405.dtsi new file +8 -0
+	pms405_0: pms405@0 {
+		compatible = "qcom,spmi-pmic";
+		reg = <0x0 SPMI_USID>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+	};
+};
Signature · 1 line
2.14.4
author
#13 lore raw

PATCH v2 9/17 arm64: dts: qcom: qcs404: add spmi node

In reply to Vinod Koul

PMS405 is used in QCS405-EVB so include that with SPMI nodes

---
 arch/arm64/boot/dts/qcom/qcs404-evb.dts |  1 +
 arch/arm64/boot/dts/qcom/qcs404.dtsi    | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dts +1 -0
index b79969153fba..10ad05ba5ca9 100644
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "qcs404.dtsi"
+#include "pms405.dtsi"
 
 / {
 	model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
arch/arm64/boot/dts/qcom/qcs404.dtsi +18 -0
index 970ca9a62530..4d47d5e11a5a 100644
@@ -242,6 +242,24 @@
 			};
 		};
 
+		spmi_bus: spmi@200f000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg = <0x200f000 0x001000>,
+			      <0x2400000 0x800000>,
+			      <0x2c00000 0x800000>,
+			      <0x3800000 0x200000>,
+			      <0x200a000 0x002100>;
+			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+			interrupt-names = "periph_irq";
+			interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+		};
+
 		blsp1_uart2: serial@78b1000 {
 			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
 			reg = <0x78b1000 0x200>;
Signature · 1 line
2.14.4
Reviewed-by on v2 9/17
#14 lore raw

Re: [PATCH v2 09/17] arm64: dts: qcom: qcs404: add spmi node

Quoted 3 lines · Vinod Koul

PMS405 is used in QCS405-EVB so include that with SPMI nodes

Regards,
Bjorn

Quoted 49 lines
---
 arch/arm64/boot/dts/qcom/qcs404-evb.dts |  1 +
 arch/arm64/boot/dts/qcom/qcs404.dtsi    | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
arch/arm64/boot/dts/qcom/qcs404-evb.dts +1 -0
index b79969153fba..10ad05ba5ca9 100644
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "qcs404.dtsi"
+#include "pms405.dtsi"
 
 / {
 	model = "Qualcomm Technologies, Inc. QCS404 EVB 1000";
arch/arm64/boot/dts/qcom/qcs404.dtsi +18 -0
index 970ca9a62530..4d47d5e11a5a 100644
@@ -242,6 +242,24 @@
 			};
 		};
 
+		spmi_bus: spmi@200f000 {
+			compatible = "qcom,spmi-pmic-arb";
+			reg = <0x200f000 0x001000>,
+			      <0x2400000 0x800000>,
+			      <0x2c00000 0x800000>,
+			      <0x3800000 0x200000>,
+			      <0x200a000 0x002100>;
+			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+			interrupt-names = "periph_irq";
+			interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+		};
+
 		blsp1_uart2: serial@78b1000 {
 			compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
 			reg = <0x78b1000 0x200>;
Signature · 1 line
2.14.4
author
#15 lore raw

PATCH v2 10/17 arm64: dts: qcom: pms405: add rtc node

In reply to Vinod Koul

RTC is found on PMIC PMS405 and is same as other PMIC used, so add the rtc node with compatible as qcom,pm8941-rtc

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +6 -0
index 8a585180f102..cdb4547c998b 100644
@@ -11,5 +11,11 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
+		};
 	};
 };
Signature · 1 line
2.14.4
Reviewed-by on v2 10/17
#16 lore raw

Re: [PATCH v2 10/17] arm64: dts: qcom: pms405: add rtc node

Quoted 4 lines · Vinod Koul

RTC is found on PMIC PMS405 and is same as other PMIC used, so add the rtc node with compatible as qcom,pm8941-rtc

Regards,
Bjorn

Quoted 23 lines
---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +6 -0
index 8a585180f102..cdb4547c998b 100644
@@ -11,5 +11,11 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		rtc@6000 {
+			compatible = "qcom,pm8941-rtc";
+			reg = <0x6000>;
+			reg-names = "rtc", "alarm";
+			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
+		};
 	};
 };
Signature · 1 line
2.14.4
author
#17 lore raw

PATCH v2 11/17 arm64: dts: qcom: pms405: add gpios

In reply to Vinod Koul

Add the GPIOs present on PMS405 chip.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +16 -0
index cdb4547c998b..18410d9f0f8f 100644
@@ -17,5 +17,21 @@
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
+
+		pms405_gpios: gpios@c000 {
+			compatible = "qcom,pms405-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <0 0xc1 0 IRQ_TYPE_NONE>,
+				<0 0xc2 0 IRQ_TYPE_NONE>,
+				<0 0xc3 0 IRQ_TYPE_NONE>,
+				<0 0xc4 0 IRQ_TYPE_NONE>,
+				<0 0xc5 0 IRQ_TYPE_NONE>,
+				<0 0xc6 0 IRQ_TYPE_NONE>,
+				<0 0xc7 0 IRQ_TYPE_NONE>,
+				<0 0xca 0 IRQ_TYPE_NONE>,
+				<0 0xcb 0 IRQ_TYPE_NONE>;
+		};
 	};
 };
Signature · 1 line
2.14.4
#18 lore raw

Re: [PATCH v2 11/17] arm64: dts: qcom: pms405: add gpios

Quoted 20 lines · Vinod Koul

Add the GPIOs present on PMS405 chip.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +5 -0
index cdb4547c998b..18410d9f0f8f 100644
@@ -17,5 +17,21 @@
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
+
+		pms405_gpios: gpios@c000 {
+			compatible = "qcom,pms405-gpio";
+			reg = <0xc000>;
+			gpio-controller;

arch/arm64/boot/dts/qcom/pms405.dtsi line 34

Quoted 10 lines
arch/arm64/boot/dts/qcom/pms405.dtsi +10 -0
+			#gpio-cells = <2>;
+			interrupts = <0 0xc1 0 IRQ_TYPE_NONE>,
+				<0 0xc2 0 IRQ_TYPE_NONE>,
+				<0 0xc3 0 IRQ_TYPE_NONE>,
+				<0 0xc4 0 IRQ_TYPE_NONE>,
+				<0 0xc5 0 IRQ_TYPE_NONE>,
+				<0 0xc6 0 IRQ_TYPE_NONE>,
+				<0 0xc7 0 IRQ_TYPE_NONE>,
+				<0 0xca 0 IRQ_TYPE_NONE>,
+				<0 0xcb 0 IRQ_TYPE_NONE>;

Is there a reason why gpio 1, 8 and 9 are omitted from this list?

Regards,
Bjorn

Quoted 6 lines
arch/arm64/boot/dts/qcom/pms405.dtsi +1 -0
+		};
 	};
 };
Signature · 1 line
2.14.4
author
#19 lore raw

Re: [PATCH v2 11/17] arm64: dts: qcom: pms405: add gpios

Quoted 26 lines · Bjorn Andersson
Quoted 24 lines · Vinod Koul

Add the GPIOs present on PMS405 chip.

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +9 -0
index cdb4547c998b..18410d9f0f8f 100644
@@ -17,5 +17,21 @@
 			reg-names = "rtc", "alarm";
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
+
+		pms405_gpios: gpios@c000 {
+			compatible = "qcom,pms405-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <0 0xc1 0 IRQ_TYPE_NONE>,
+				<0 0xc2 0 IRQ_TYPE_NONE>,
+				<0 0xc3 0 IRQ_TYPE_NONE>,
Quoted 8 lines

arch/arm64/boot/dts/qcom/pms405.dtsi line 34

Quoted 6 lines
arch/arm64/boot/dts/qcom/pms405.dtsi +6 -0
+				<0 0xc4 0 IRQ_TYPE_NONE>,
+				<0 0xc5 0 IRQ_TYPE_NONE>,
+				<0 0xc6 0 IRQ_TYPE_NONE>,
+				<0 0xc7 0 IRQ_TYPE_NONE>,
+				<0 0xca 0 IRQ_TYPE_NONE>,
+				<0 0xcb 0 IRQ_TYPE_NONE>;

Is there a reason why gpio 1, 8 and 9 are omitted from this list?

I think I saw something in downstream code / documentation for this, I will check again to be sure

Signature · 1 line
~Vinod
author
#20 lore raw

PATCH v2 12/17 arm64: dts: qcom: qcs404: Add scm firmware node

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the scm firmware node to QCS404

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +7 -0
index 4d47d5e11a5a..8e207a25ddf0 100644
@@ -101,6 +101,13 @@
 		};
 	};
 
+	firmware {
+		scm: scm {
+			compatible = "qcom,scm-qcs404", "qcom,scm";
+			#reset-cells = <1>;
+		};
+	};
+
 	psci {
 		compatible = "arm,psci-1.0";
 		method = "smc";
Signature · 1 line
2.14.4
author
#21 lore raw

PATCH v2 13/17 arm64: dts: qcom: qcs404: Add remoteproc nodes

In reply to Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the TrustZone based remoteproc nodes and their glink edges for adsp, cdsp and wcss.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 87 ++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +87 -0
index 8e207a25ddf0..b560ab6e49ff 100644
@@ -373,4 +373,91 @@
 			#interrupt-cells = <2>;
 		};
 	};
+
+	remoteproc-adsp {
+		compatible = "qcom,qcs404-adsp-pas";
+
+		interrupts-extended = <&intc GIC_SPI 293 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 = <&xo_board>;
+		clock-names = "xo";
+
+		memory-region = <&adsp_fw_mem>;
+
+		qcom,smem-states = <&adsp_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <2>;
+			mboxes = <&apcs_glb 8>;
+
+			label = "adsp";
+		};
+	};
+
+	remoteproc-cdsp {
+		compatible = "qcom,qcs404-cdsp-pas";
+
+		interrupts-extended = <&intc GIC_SPI 229 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+		interrupt-names = "wdog", "fatal", "ready",
+				  "handover", "stop-ack";
+
+		clocks = <&xo_board>;
+		clock-names = "xo";
+
+		memory-region = <&cdsp_fw_mem>;
+
+		qcom,smem-states = <&cdsp_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <5>;
+			mboxes = <&apcs_glb 12>;
+
+			label = "cdsp";
+		};
+	};
+
+	remoteproc-wcss {
+		compatible = "qcom,qcs404-wcss-pas";
+
+		interrupts-extended = <&intc GIC_SPI 153 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+		interrupt-names = "wdog", "fatal", "ready",
+				  "handover", "stop-ack";
+
+		clocks = <&xo_board>;
+		clock-names = "xo";
+
+		memory-region = <&wlan_fw_mem>;
+
+		qcom,smem-states = <&wcss_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <1>;
+			mboxes = <&apcs_glb 16>;
+
+			label = "wcss";
+		};
+	};
 };
Signature · 1 line
2.14.4
#22 lore raw

Re: [PATCH v2 13/17] arm64: dts: qcom: qcs404: Add remoteproc nodes

Quoted 24 lines · Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the TrustZone based remoteproc nodes and their glink edges for adsp, cdsp and wcss.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 87 ++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +5 -0
index 8e207a25ddf0..b560ab6e49ff 100644
@@ -373,4 +373,91 @@
 			#interrupt-cells = <2>;
 		};
 	};
+
+	remoteproc-adsp {
+		compatible = "qcom,qcs404-adsp-pas";
+
+		interrupts-extended = <&intc GIC_SPI 293 IRQ_TYPE_EDGE_RISING>,

arch/arm64/boot/dts/qcom/qcs404.dtsi line 390

Quoted 10 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +10 -0
+				      <&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 = <&xo_board>;
+		clock-names = "xo";
+

As the TZ-backed remoteproc drivers will not be used on all variation of products on this platform please add status = "disabled"; to these nodes and enable them in the evb.

Regards,
Bjorn

Quoted 76 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +72 -0
+		memory-region = <&adsp_fw_mem>;
+
+		qcom,smem-states = <&adsp_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <2>;
+			mboxes = <&apcs_glb 8>;
+
+			label = "adsp";
+		};
+	};
+
+	remoteproc-cdsp {
+		compatible = "qcom,qcs404-cdsp-pas";
+
+		interrupts-extended = <&intc GIC_SPI 229 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+				      <&cdsp_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+		interrupt-names = "wdog", "fatal", "ready",
+				  "handover", "stop-ack";
+
+		clocks = <&xo_board>;
+		clock-names = "xo";
+
+		memory-region = <&cdsp_fw_mem>;
+
+		qcom,smem-states = <&cdsp_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 141 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <5>;
+			mboxes = <&apcs_glb 12>;
+
+			label = "cdsp";
+		};
+	};
+
+	remoteproc-wcss {
+		compatible = "qcom,qcs404-wcss-pas";
+
+		interrupts-extended = <&intc GIC_SPI 153 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+				      <&wcss_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
+		interrupt-names = "wdog", "fatal", "ready",
+				  "handover", "stop-ack";
+
+		clocks = <&xo_board>;
+		clock-names = "xo";
+
+		memory-region = <&wlan_fw_mem>;
+
+		qcom,smem-states = <&wcss_smp2p_out 0>;
+		qcom,smem-state-names = "stop";
+
+		glink-edge {
+			interrupts = <GIC_SPI 156 IRQ_TYPE_EDGE_RISING>;
+
+			qcom,remote-pid = <1>;
+			mboxes = <&apcs_glb 16>;
+
+			label = "wcss";
+		};
+	};
 };
Signature · 1 line
2.14.4
author
#23 lore raw

Re: [PATCH v2 13/17] arm64: dts: qcom: qcs404: Add remoteproc nodes

Quoted 32 lines · Bjorn Andersson
Quoted 30 lines · Vinod Koul

From: Bjorn Andersson <[email protected]>

Add the TrustZone based remoteproc nodes and their glink edges for adsp, cdsp and wcss.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 87 ++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +11 -0
index 8e207a25ddf0..b560ab6e49ff 100644
@@ -373,4 +373,91 @@
 			#interrupt-cells = <2>;
 		};
 	};
+
+	remoteproc-adsp {
+		compatible = "qcom,qcs404-adsp-pas";
+
+		interrupts-extended = <&intc GIC_SPI 293 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";
Quoted 8 lines

arch/arm64/boot/dts/qcom/qcs404.dtsi line 390

Quoted 4 lines
arch/arm64/boot/dts/qcom/qcs404.dtsi +4 -0
+
+		clocks = <&xo_board>;
+		clock-names = "xo";
+

As the TZ-backed remoteproc drivers will not be used on all variation of products on this platform please add status = "disabled"; to these nodes and enable them in the evb.

Sure will update this one

Signature · 1 line
~Vinod
author
#24 lore raw

PATCH v2 14/17 arm64: dts: qcom: qcs404: add prng-ee node

In reply to Vinod Koul

RNG hardware in QCS404 features (Execution Environment) EE for HLOS to use, add the node for prng-ee for QCS404.

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +7 -0
index b560ab6e49ff..a37930639b8d 100644
@@ -282,6 +282,13 @@
 			#mbox-cells = <1>;
 		};
 
+		rng: rng@e3000 {
+			compatible = "qcom,prng-ee";
+			reg = <0x000e3000 0x1000>;
+			clocks = <&gcc GCC_PRNG_AHB_CLK>;
+			clock-names = "core";
+		};
+
 		tlmm: pinctrl@1000000 {
 			compatible = "qcom,qcs404-pinctrl";
 			reg = <0x01000000 0x200000>,
Signature · 1 line
2.14.4
Reviewed-by on v2 14/17
#25 lore raw

Re: [PATCH v2 14/17] arm64: dts: qcom: qcs404: add prng-ee node

Quoted 4 lines · Vinod Koul

RNG hardware in QCS404 features (Execution Environment) EE for HLOS to use, add the node for prng-ee for QCS404.

Regards,
Bjorn

Quoted 25 lines
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +7 -0
index b560ab6e49ff..a37930639b8d 100644
@@ -282,6 +282,13 @@
 			#mbox-cells = <1>;
 		};
 
+		rng: rng@e3000 {
+			compatible = "qcom,prng-ee";
+			reg = <0x000e3000 0x1000>;
+			clocks = <&gcc GCC_PRNG_AHB_CLK>;
+			clock-names = "core";
+		};
+
 		tlmm: pinctrl@1000000 {
 			compatible = "qcom,qcs404-pinctrl";
 			reg = <0x01000000 0x200000>,
Signature · 1 line
2.14.4
author
#26 lore raw

PATCH v2 15/17 arm64: dts: qcom: qcs404: Add BAM DMA node

In reply to Vinod Koul

Add the BAM DMA instance found in BLSP1 node of the QCS404

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +13 -0
index a37930639b8d..88e04a0ee67f 100644
@@ -276,6 +276,19 @@
 			status = "okay";
 		};
 
+		blsp1_dma: dma@7884000 {
+			compatible = "qcom,bam-v1.7.0";
+			reg = <0x07884000 0x25000>;
+			interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
+			clock-names = "bam_clk";
+			#dma-cells = <1>;
+			qcom,controlled-remotely = <1>;
+			qcom,ee = <0>;
+
+			status = "okay";
+		};
+
 		apcs_glb: mailbox@b011000 {
 			compatible = "qcom,qcs404-apcs-apps-global", "syscon";
 			reg = <0xb011000 0x1000>;
Signature · 1 line
2.14.4
Reviewed-by on v2 15/17
#27 lore raw

Re: [PATCH v2 15/17] arm64: dts: qcom: qcs404: Add BAM DMA node

Quoted 1 line · Vinod Koul

Add the BAM DMA instance found in BLSP1 node of the QCS404

What about blsp2 bam?

Quoted 2 lines

Regards,
Bjorn

Quoted 31 lines
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +13 -0
index a37930639b8d..88e04a0ee67f 100644
@@ -276,6 +276,19 @@
 			status = "okay";
 		};
 
+		blsp1_dma: dma@7884000 {
+			compatible = "qcom,bam-v1.7.0";
+			reg = <0x07884000 0x25000>;
+			interrupts = <GIC_SPI 238 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc GCC_BLSP1_AHB_CLK>;
+			clock-names = "bam_clk";
+			#dma-cells = <1>;
+			qcom,controlled-remotely = <1>;
+			qcom,ee = <0>;
+
+			status = "okay";
+		};
+
 		apcs_glb: mailbox@b011000 {
 			compatible = "qcom,qcs404-apcs-apps-global", "syscon";
 			reg = <0xb011000 0x1000>;
Signature · 1 line
2.14.4
author
#28 lore raw

Re: [PATCH v2 15/17] arm64: dts: qcom: qcs404: Add BAM DMA node

Quoted 5 lines · Bjorn Andersson
Quoted 1 line · Vinod Koul

Add the BAM DMA instance found in BLSP1 node of the QCS404

What about blsp2 bam?

Haven't tested that yet :( Serial helped on this one so added :)

Signature · 1 line
~Vinod
author
#29 lore raw

PATCH v2 16/17 arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2

In reply to Vinod Koul

We can use BAM DAM for serial UART data transfers, so add it

---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +2 -0
index 88e04a0ee67f..23a16b7c43b6 100644
@@ -273,6 +273,8 @@
 			interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>;
 			clock-names = "core", "iface";
+			dmas = <&blsp1_dma 5>, <&blsp1_dma 4>;
+			dma-names = "rx", "tx";
 			status = "okay";
 		};
 
Signature · 1 line
2.14.4
Reviewed-by on v2 16/17
#30 lore raw

Re: [PATCH v2 16/17] arm64: dts: qcom: qcs404: Use BAM DMA for serial uart2

Quoted 3 lines · Vinod Koul

We can use BAM DAM for serial UART data transfers, so add it

Regards,
Bjorn

Quoted 20 lines
---
 arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/qcs404.dtsi +2 -0
index 88e04a0ee67f..23a16b7c43b6 100644
@@ -273,6 +273,8 @@
 			interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&gcc GCC_BLSP1_UART2_APPS_CLK>, <&gcc GCC_BLSP1_AHB_CLK>;
 			clock-names = "core", "iface";
+			dmas = <&blsp1_dma 5>, <&blsp1_dma 4>;
+			dma-names = "rx", "tx";
 			status = "okay";
 		};
 
Signature · 1 line
2.14.4
author
#31 lore raw

PATCH v2 17/17 arm64: dts: qcom: pms405: Add pon and pwrkey nodes

In reply to Vinod Koul

PMS405 also features PON block, so add PON and PWRKEY nodes

---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +16 -0
index 18410d9f0f8f..2c7cc1e94ff4 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2018, Linaro Limited
 
 #include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 &spmi_bus {
 
@@ -18,6 +19,21 @@
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
 
+		pon@800 {
+			compatible = "qcom,pms405-pon";
+			reg = <0x800>;
+			mode-bootloader = <0x2>;
+			mode-recovery = <0x1>;
+
+			pwrkey {
+				compatible = "qcom,pm8941-pwrkey";
+				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				linux,code = <KEY_POWER>;
+			};
+		};
+
 		pms405_gpios: gpios@c000 {
 			compatible = "qcom,pms405-gpio";
 			reg = <0xc000>;
Signature · 1 line
2.14.4
Reviewed-by on v2 17/17
#32 lore raw

Re: [PATCH v2 17/17] arm64: dts: qcom: pms405: Add pon and pwrkey nodes

Quoted 3 lines · Vinod Koul

PMS405 also features PON block, so add PON and PWRKEY nodes

Regards,
Bjorn

Quoted 41 lines
---
 arch/arm64/boot/dts/qcom/pms405.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/qcom/pms405.dtsi +16 -0
index 18410d9f0f8f..2c7cc1e94ff4 100644
@@ -2,6 +2,7 @@
 // Copyright (c) 2018, Linaro Limited
 
 #include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/input/linux-event-codes.h>
 
 &spmi_bus {
 
@@ -18,6 +19,21 @@
 			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
 		};
 
+		pon@800 {
+			compatible = "qcom,pms405-pon";
+			reg = <0x800>;
+			mode-bootloader = <0x2>;
+			mode-recovery = <0x1>;
+
+			pwrkey {
+				compatible = "qcom,pm8941-pwrkey";
+				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+				debounce = <15625>;
+				bias-pull-up;
+				linux,code = <KEY_POWER>;
+			};
+		};
+
 		pms405_gpios: gpios@c000 {
 			compatible = "qcom,pms405-gpio";
 			reg = <0xc000>;
Signature · 1 line
2.14.4