Skip to contentSkip to conversation

arm64: dts: qcom: sdm845: Add Q6V5 MSS node

PATCH Superseded Sibi Sankar 3 participants 5 messages Nov 27, 2018 – Dec 14, 2018

Subsystems (3)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: qcom: sdm845: Add Q6V5 MSS node

This patch adds Q6V5 MSS remoteproc node for SDM845 SoCs.

---

The remoteproc mss node depends on the following bindings:
https://patchwork.kernel.org/patch/10490559/ - rpmhp dt bindings
https://patchwork.kernel.org/patch/10678301/ - AOP QMP dt bindings
https://patchwork.kernel.org/patch/10691215/ - mss power-domain dt bindings
https://patchwork.kernel.org/patch/10691213/ - shutdown-ack dt bindings

It also depends on the mpss and mba memory regions and pdc reset node.
https://patchwork.kernel.org/patch/10662089/
https://patchwork.kernel.org/patch/10657325/

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 63 ++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +63 -0
index 58870273dbc9..df16ee464872 100644
@@ -1095,6 +1095,69 @@
 			};
 		};
 
+		remoteproc@4080000 {
+			compatible = "qcom,sdm845-mss-pil";
+			reg = <0x04080000 0x408>, <0x04180000 0x48>;
+
+			reg-names = "qdsp6", "rmb";
+
+			interrupts-extended =
+				<&intc GIC_SPI 266 IRQ_TYPE_EDGE_RISING>,
+				<&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+				<&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+				<&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+				<&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+				<&modem_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+
+			interrupt-names = "wdog", "fatal", "ready",
+					  "handover", "stop-ack",
+					  "shutdown-ack";
+
+			clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
+				 <&gcc GCC_MSS_Q6_MEMNOC_AXI_CLK>,
+				 <&gcc GCC_BOOT_ROM_AHB_CLK>,
+				 <&gcc GCC_MSS_GPLL0_DIV_CLK_SRC>,
+				 <&gcc GCC_MSS_SNOC_AXI_CLK>,
+				 <&gcc GCC_MSS_MFAB_AXIS_CLK>,
+				 <&gcc GCC_PRNG_AHB_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>;
+
+			clock-names = "iface", "bus", "mem", "gpll0_mss",
+				      "snoc_axi", "mnoc_axi", "prng", "xo";
+
+			qcom,smem-states = <&modem_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			resets = <&aoss_reset AOSS_CC_MSS_RESTART>,
+				 <&pdc_reset PDC_MODEM_SYNC_RESET>;
+			reset-names = "mss_restart", "pdc_reset";
+
+			qcom,halt-regs = <&tcsr_mutex_regs
+						0x23000 0x25000 0x24000>;
+
+			power-domains = <&aoss_qmp_pd AOSS_QMP_LS_MODEM>,
+					<&rpmhpd SDM845_CX>,
+					<&rpmhpd SDM845_MX>,
+					<&rpmhpd SDM845_MSS>;
+			power-domain-names = "aop", "cx", "mx", "mss";
+
+			mba {
+				memory-region = <&mba_region>;
+			};
+
+			mpss {
+				memory-region = <&mpss_region>;
+			};
+
+			glink-edge {
+				interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>;
+				label = "modem";
+				qcom,remote-pid = <1>;
+				mboxes = <&apss_shared 12>;
+				mbox-names = "mpss_smem";
+			};
+		};
+
 		usb_1_hsphy: phy@88e2000 {
 			compatible = "qcom,sdm845-qusb2-phy";
 			reg = <0x88e2000 0x400>;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

Hi,

Quoted 8 lines · Sibi Sankar

This patch adds Q6V5 MSS remoteproc node for SDM845 SoCs.

---

The remoteproc mss node depends on the following bindings:
https://patchwork.kernel.org/patch/10490559/ - rpmhp dt bindings

This is an older version of the patch. Now at v7 at
<https://patchwork.kernel.org/patch/10725801/>

Quoted 16 lines

https://patchwork.kernel.org/patch/10678301/ - AOP QMP dt bindings
https://patchwork.kernel.org/patch/10691215/ - mss power-domain dt bindings
https://patchwork.kernel.org/patch/10691213/ - shutdown-ack dt bindings

It also depends on the mpss and mba memory regions and pdc reset node.
https://patchwork.kernel.org/patch/10662089/
https://patchwork.kernel.org/patch/10657325/

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 63 ++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 58870273dbc9..df16ee464872 100644

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1100

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
@@ -1095,6 +1095,69 @@
                        };
                };
 
+               remoteproc@4080000 {
+                       compatible = "qcom,sdm845-mss-pil";
+                       reg = <0x04080000 0x408>, <0x04180000 0x48>;

s/0x04080000/0x4080000 to appease the DT folks.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1114

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +13 -0
+                       reg-names = "qdsp6", "rmb";
+
+                       interrupts-extended =
+                               <&intc GIC_SPI 266 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
+
+                       interrupt-names = "wdog", "fatal", "ready",
+                                         "handover", "stop-ack",
+                                         "shutdown-ack";

nit: maybe remove blank line between "interrupts-extended" and "interrupt-names". Nice to keep -names close to the things they're naming.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1126

Quoted 11 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +11 -0
+                       clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
+                                <&gcc GCC_MSS_Q6_MEMNOC_AXI_CLK>,
+                                <&gcc GCC_BOOT_ROM_AHB_CLK>,
+                                <&gcc GCC_MSS_GPLL0_DIV_CLK_SRC>,
+                                <&gcc GCC_MSS_SNOC_AXI_CLK>,
+                                <&gcc GCC_MSS_MFAB_AXIS_CLK>,
+                                <&gcc GCC_PRNG_AHB_CLK>,
+                                <&rpmhcc RPMH_CXO_CLK>;
+
+                       clock-names = "iface", "bus", "mem", "gpll0_mss",
+                                     "snoc_axi", "mnoc_axi", "prng", "xo";

Bindings list clock-names as "iface", "bus", "mem". You have "iface", "bus", "mem", "gpll0_mss", "snoc_axi", "mnoc_axi", "prng", "xo". It looks like these extra clocks were added in commit 231f67d1fb2f ("remoteproc: q6v5: Add support for mss remoteproc on SDM845") but you forgot to update the bindings. Looking in that patch I also see an "axis2" which you seem to be missing. Do you need it?

Quoted 18 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +18 -0
+                       qcom,smem-states = <&modem_smp2p_out 0>;
+                       qcom,smem-state-names = "stop";
+
+                       resets = <&aoss_reset AOSS_CC_MSS_RESTART>,
+                                <&pdc_reset PDC_MODEM_SYNC_RESET>;
+                       reset-names = "mss_restart", "pdc_reset";
+
+                       qcom,halt-regs = <&tcsr_mutex_regs
+                                               0x23000 0x25000 0x24000>;
+
+                       power-domains = <&aoss_qmp_pd AOSS_QMP_LS_MODEM>,
+                                       <&rpmhpd SDM845_CX>,
+                                       <&rpmhpd SDM845_MX>,
+                                       <&rpmhpd SDM845_MSS>;
+                       power-domain-names = "aop", "cx", "mx", "mss";
+
+                       mba {
+                               memory-region = <&mba_region>;

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1155

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                       };
+
+                       mpss {
+                               memory-region = <&mpss_region>;
+                       };
+
+                       glink-edge {
+                               interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>;
+                               label = "modem";
+                               qcom,remote-pid = <1>;

The "qcom,remote-pid" property isn't documented for "glink-edge". Do you need it? ...if you do, please send a patch to update the bindings.

-Doug

#2 lore raw
Quoted 1 line · Doug Anderson

On Tue, Nov 27, 2018 at 12:58 AM Sibi Sankar <[email protected]> wrote:

[..]

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 58870273dbc9..df16ee464872 100644
@@ -1095,6 +1095,69 @@
                        };
                };
 
Quoted 6 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1100

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+               remoteproc@4080000 {
+                       compatible = "qcom,sdm845-mss-pil";
+                       reg = <0x04080000 0x408>, <0x04180000 0x48>;

s/0x04080000/0x4080000 to appease the DT folks.

Andy requests this to be padded to 8 digits, and I've come to really appreciate this as it makes sorting much easier.

But perhaps there's a verdict on this?

Regards,
Bjorn

#3 lore raw

Hi,

Quoted 19 lines · Bjorn Andersson
Quoted 1 line · Doug Anderson

On Tue, Nov 27, 2018 at 12:58 AM Sibi Sankar <[email protected]> wrote:

[..]

Quoted 8 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 58870273dbc9..df16ee464872 100644
@@ -1095,6 +1095,69 @@
                        };
                };
 
Quoted 6 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1100

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+               remoteproc@4080000 {
+                       compatible = "qcom,sdm845-mss-pil";
+                       reg = <0x04080000 0x408>, <0x04180000 0x48>;

s/0x04080000/0x4080000 to appease the DT folks.

Quoted 4 lines

Andy requests this to be padded to 8 digits, and I've come to really appreciate this as it makes sorting much easier.

But perhaps there's a verdict on this?

Hrm. First I've heard of that. ...and all of the other addresses in this file aren't padded to 8 digits. Ugh. I could submit a patch to fix them all (I actually like them padded too) but given the current number of outstanding patches against sdm845.dtsi it's just going to cause lots of merge conflicts?

I thought it was general DT practice to always omit leading zeros but I just searched and it appears that policy only applies to unit addresses. Specifically I note that in
<https://lkml.kernel.org/r/[email protected]>
Rob H asked you to remove the leading zero from the unit address but _not_ the "reg". So I guess padding the reg to 8 digits is OK.

tl;dr: Sure, keep the padding the 8 digits here and eventually we can fix-up the other nodes when there's not so much churn to sdm845.dtsi (or maybe Andy can do it himself?) Sound like a plan?

-Doug

#4 lore raw
In reply to Doug Anderson

Hi Doug,
Thanks for the review!

Quoted 36 lines · Doug Anderson

Hi,

Quoted 8 lines · Sibi Sankar

This patch adds Q6V5 MSS remoteproc node for SDM845 SoCs.

---

The remoteproc mss node depends on the following bindings:
https://patchwork.kernel.org/patch/10490559/ - rpmhp dt bindings

This is an older version of the patch. Now at v7 at
<https://patchwork.kernel.org/patch/10725801/>

Quoted 20 lines

https://patchwork.kernel.org/patch/10678301/ - AOP QMP dt bindings
https://patchwork.kernel.org/patch/10691215/ - mss power-domain dt bindings
https://patchwork.kernel.org/patch/10691213/ - shutdown-ack dt bindings

It also depends on the mpss and mba memory regions and pdc reset node.
https://patchwork.kernel.org/patch/10662089/
https://patchwork.kernel.org/patch/10657325/

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 63 
++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 58870273dbc9..df16ee464872 100644
@@ -1095,6 +1095,69 @@
                        };
                };
 
Quoted 6 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1100

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+               remoteproc@4080000 {
+                       compatible = "qcom,sdm845-mss-pil";
+                       reg = <0x04080000 0x408>, <0x04180000 0x48>;

s/0x04080000/0x4080000 to appease the DT folks.

as you said in the other thread will leave the
padding untouched

Quoted 16 lines
Quoted 16 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +7 -0
+                       reg-names = "qdsp6", "rmb";
+
+                       interrupts-extended =
+                               <&intc GIC_SPI 266 
 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 0 
 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 1 
 IRQ_TYPE_EDGE_RISING>,
+                               <&modem_smp2p_in 2 

IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 3
IRQ_TYPE_EDGE_RISING>,
+ <&modem_smp2p_in 7
IRQ_TYPE_EDGE_RISING>;

Quoted 9 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1114

Quoted 4 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +4 -0
+
+                       interrupt-names = "wdog", "fatal", "ready",
+                                         "handover", "stop-ack",
+                                         "shutdown-ack";

nit: maybe remove blank line between "interrupts-extended" and "interrupt-names". Nice to keep -names close to the things they're naming.

sure will do that.. I guess I'll have to remove
the blank line in clock-names as well

Quoted 15 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                       clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
+                                <&gcc GCC_MSS_Q6_MEMNOC_AXI_CLK>,
+                                <&gcc GCC_BOOT_ROM_AHB_CLK>,
+                                <&gcc GCC_MSS_GPLL0_DIV_CLK_SRC>,
+                                <&gcc GCC_MSS_SNOC_AXI_CLK>,
+                                <&gcc GCC_MSS_MFAB_AXIS_CLK>,
+                                <&gcc GCC_PRNG_AHB_CLK>,
+                                <&rpmhcc RPMH_CXO_CLK>;
+
+                       clock-names = "iface", "bus", "mem", 
Quoted 3 lines

"gpll0_mss",
+ "snoc_axi", "mnoc_axi", "prng",
"xo";

Quoted 7 lines

Bindings list clock-names as "iface", "bus", "mem". You have "iface", "bus", "mem", "gpll0_mss", "snoc_axi", "mnoc_axi", "prng", "xo". It looks like these extra clocks were added in commit 231f67d1fb2f ("remoteproc: q6v5: Add support for mss remoteproc on SDM845") but you forgot to update the bindings. Looking in that patch I also see an "axis2" which you seem to be missing. Do you need it?

yes missed adding them..will add them in the next respin

Quoted 28 lines
Quoted 28 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +9 -0
+                       qcom,smem-states = <&modem_smp2p_out 0>;
+                       qcom,smem-state-names = "stop";
+
+                       resets = <&aoss_reset AOSS_CC_MSS_RESTART>,
+                                <&pdc_reset PDC_MODEM_SYNC_RESET>;
+                       reset-names = "mss_restart", "pdc_reset";
+
+                       qcom,halt-regs = <&tcsr_mutex_regs
+                                               0x23000 0x25000 

0x24000>;

arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -0
+
+                       power-domains = <&aoss_qmp_pd 

AOSS_QMP_LS_MODEM>,

arch/arm64/boot/dts/qcom/sdm845.dtsi +14 -0
+                                       <&rpmhpd SDM845_CX>,
+                                       <&rpmhpd SDM845_MX>,
+                                       <&rpmhpd SDM845_MSS>;
+                       power-domain-names = "aop", "cx", "mx", "mss";
+
+                       mba {
+                               memory-region = <&mba_region>;
+                       };
+
+                       mpss {
+                               memory-region = <&mpss_region>;
+                       };
+
+                       glink-edge {
Quoted 9 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1155

Quoted 4 lines

+ interrupts = <GIC_SPI 449
IRQ_TYPE_EDGE_RISING>;

arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -0
+                               label = "modem";
+                               qcom,remote-pid = <1>;

The "qcom,remote-pid" property isn't documented for "glink-edge". Do you need it? ...if you do, please send a patch to update the bindings.

yes glink seems to be missing the remote-pid..
I will add that as well in v2

Quoted 2 lines

-Doug

Signature · 3 lines
-- Sibi Sankar --
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project.