All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/5] Enable crashdump collection support for IPQ9574
@ 2023-02-01  9:05 ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Crashdump collection is enabled based on the DLOAD bit in the TCSR register.
This bit is set during bootup and cleared during shutdown. During crash,
dload bit is not cleared, due to which uboot starts crashdump collection.

This patch series adds the support for crashdump collection.

This series depends on the below patch set.
https://lore.kernel.org/linux-arm-msm/20230201060319.20434-1-quic_devipriy@quicinc.com/

Changes in V2:
	- rebased on linux-next/master
        - dropped co-developed by tag wherever applicable
	- V1 can be found at
	  https://lore.kernel.org/linux-arm-kernel/20230113160012.14893-1-quic_poovendh@quicinc.com/

Poovendhan Selvaraj (5):
  dt-bindings: scm: Add compatible for IPQ9574
  arm64: dts: Add support for Crashdump collection on IPQ9574
  firmware: scm: Modify only the DLOAD bit in TCSR register for download
    mode
  arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
  dt-bindings: tcsr: Add compatible for IPQ9574

 .../bindings/firmware/qcom,scm.yaml           |  1 +
 .../devicetree/bindings/mfd/qcom,tcsr.yaml    |  1 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         | 26 ++++++++++++++++++-
 arch/arm64/configs/defconfig                  |  1 +
 drivers/firmware/qcom_scm.c                   | 12 ++++++---
 5 files changed, 36 insertions(+), 5 deletions(-)


base-commit: 80bd9028fecadae4e8e3a278cd32d74badc2a6e0
-- 
2.17.1


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

* [PATCH V2 0/5] Enable crashdump collection support for IPQ9574
@ 2023-02-01  9:05 ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Crashdump collection is enabled based on the DLOAD bit in the TCSR register.
This bit is set during bootup and cleared during shutdown. During crash,
dload bit is not cleared, due to which uboot starts crashdump collection.

This patch series adds the support for crashdump collection.

This series depends on the below patch set.
https://lore.kernel.org/linux-arm-msm/20230201060319.20434-1-quic_devipriy@quicinc.com/

Changes in V2:
	- rebased on linux-next/master
        - dropped co-developed by tag wherever applicable
	- V1 can be found at
	  https://lore.kernel.org/linux-arm-kernel/20230113160012.14893-1-quic_poovendh@quicinc.com/

Poovendhan Selvaraj (5):
  dt-bindings: scm: Add compatible for IPQ9574
  arm64: dts: Add support for Crashdump collection on IPQ9574
  firmware: scm: Modify only the DLOAD bit in TCSR register for download
    mode
  arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
  dt-bindings: tcsr: Add compatible for IPQ9574

 .../bindings/firmware/qcom,scm.yaml           |  1 +
 .../devicetree/bindings/mfd/qcom,tcsr.yaml    |  1 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         | 26 ++++++++++++++++++-
 arch/arm64/configs/defconfig                  |  1 +
 drivers/firmware/qcom_scm.c                   | 12 ++++++---
 5 files changed, 36 insertions(+), 5 deletions(-)


base-commit: 80bd9028fecadae4e8e3a278cd32d74badc2a6e0
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
  2023-02-01  9:05 ` Poovendhan Selvaraj
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  -1 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add the scm compatible string for IPQ9574 SoC

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
index 4193492ba73e..82120b98af56 100644
--- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
+++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
@@ -27,6 +27,7 @@ properties:
           - qcom,scm-ipq6018
           - qcom,scm-ipq806x
           - qcom,scm-ipq8074
+          - qcom,scm-ipq9574
           - qcom,scm-mdm9607
           - qcom,scm-msm8226
           - qcom,scm-msm8660
-- 
2.17.1


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

* [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add the scm compatible string for IPQ9574 SoC

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
index 4193492ba73e..82120b98af56 100644
--- a/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
+++ b/Documentation/devicetree/bindings/firmware/qcom,scm.yaml
@@ -27,6 +27,7 @@ properties:
           - qcom,scm-ipq6018
           - qcom,scm-ipq806x
           - qcom,scm-ipq8074
+          - qcom,scm-ipq9574
           - qcom,scm-mdm9607
           - qcom,scm-msm8226
           - qcom,scm-msm8660
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 2/5] arm64: dts: Add support for Crashdump collection on IPQ9574
  2023-02-01  9:05 ` Poovendhan Selvaraj
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  -1 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Enable Crashdump collection in ipq9574

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index a425b1865129..3b615acedfd5 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -81,6 +81,13 @@
 		reg = <0x0 0x40000000 0x0 0x0>;
 	};
 
+	firmware {
+		scm {
+			compatible = "qcom,scm-ipq9574", "qcom,scm";
+			qcom,dload-mode = <&tcsr_boot_misc 0>;
+		};
+	};
+
 	pmu {
 		compatible = "arm,cortex-a73-pmu";
 		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
@@ -95,11 +102,17 @@
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges;
-
 		tz_region: tz@4a600000 {
 			reg = <0x0 0x4a600000 0x0 0x400000>;
 			no-map;
 		};
+
+		smem@4aa00000 {
+			compatible = "qcom,smem";
+			reg = <0x0 0x4aa00000 0x0 0x00100000>;
+			hwlocks = <&tcsr_mutex 0>;
+			no-map;
+		};
 	};
 
 	soc: soc@0 {
@@ -150,6 +163,17 @@
 			#power-domain-cells = <1>;
 		};
 
+		tcsr_mutex: hwlock@1905000 {
+			compatible = "qcom,tcsr-mutex";
+			reg = <0x01905000 0x8000>;
+			#hwlock-cells = <1>;
+		};
+
+		tcsr_boot_misc: syscon@193d100 {
+			ompatible = "qcom,tcsr-ipq9574", "syscon";
+			reg = <0x0193d100 0x4>;
+		};
+
 		sdhc_1: mmc@7804000 {
 			compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0x07804000 0x1000>, <0x07805000 0x1000>;
-- 
2.17.1


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

* [PATCH V2 2/5] arm64: dts: Add support for Crashdump collection on IPQ9574
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Enable Crashdump collection in ipq9574

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index a425b1865129..3b615acedfd5 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -81,6 +81,13 @@
 		reg = <0x0 0x40000000 0x0 0x0>;
 	};
 
+	firmware {
+		scm {
+			compatible = "qcom,scm-ipq9574", "qcom,scm";
+			qcom,dload-mode = <&tcsr_boot_misc 0>;
+		};
+	};
+
 	pmu {
 		compatible = "arm,cortex-a73-pmu";
 		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
@@ -95,11 +102,17 @@
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges;
-
 		tz_region: tz@4a600000 {
 			reg = <0x0 0x4a600000 0x0 0x400000>;
 			no-map;
 		};
+
+		smem@4aa00000 {
+			compatible = "qcom,smem";
+			reg = <0x0 0x4aa00000 0x0 0x00100000>;
+			hwlocks = <&tcsr_mutex 0>;
+			no-map;
+		};
 	};
 
 	soc: soc@0 {
@@ -150,6 +163,17 @@
 			#power-domain-cells = <1>;
 		};
 
+		tcsr_mutex: hwlock@1905000 {
+			compatible = "qcom,tcsr-mutex";
+			reg = <0x01905000 0x8000>;
+			#hwlock-cells = <1>;
+		};
+
+		tcsr_boot_misc: syscon@193d100 {
+			ompatible = "qcom,tcsr-ipq9574", "syscon";
+			reg = <0x0193d100 0x4>;
+		};
+
 		sdhc_1: mmc@7804000 {
 			compatible = "qcom,ipq9574-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0x07804000 0x1000>, <0x07805000 0x1000>;
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode
  2023-02-01  9:05 ` Poovendhan Selvaraj
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  -1 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add support to read-modify-write TCSR register to modify only DLOAD bit.

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 drivers/firmware/qcom_scm.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index 2000323722bf..e3435587a72d 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -407,7 +407,7 @@ int qcom_scm_set_remote_state(u32 state, u32 id)
 }
 EXPORT_SYMBOL(qcom_scm_set_remote_state);
 
-static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
+static int __qcom_scm_set_dload_mode(struct device *dev, u32 val, bool enable)
 {
 	struct qcom_scm_desc desc = {
 		.svc = QCOM_SCM_SVC_BOOT,
@@ -417,7 +417,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
 		.owner = ARM_SMCCC_OWNER_SIP,
 	};
 
-	desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
+	desc.args[1] = enable ? val | QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
 
 	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
 }
@@ -426,15 +426,19 @@ static void qcom_scm_set_download_mode(bool enable)
 {
 	bool avail;
 	int ret = 0;
+	u32 dload_addr_val;
 
 	avail = __qcom_scm_is_call_available(__scm->dev,
 					     QCOM_SCM_SVC_BOOT,
 					     QCOM_SCM_BOOT_SET_DLOAD_MODE);
+	ret = qcom_scm_io_readl(__scm->dload_mode_addr, &dload_addr_val);
+
 	if (avail) {
-		ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
+		ret = __qcom_scm_set_dload_mode(__scm->dev, dload_addr_val, enable);
 	} else if (__scm->dload_mode_addr) {
 		ret = qcom_scm_io_writel(__scm->dload_mode_addr,
-				enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
+				enable ? dload_addr_val |
+					QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
 	} else {
 		dev_err(__scm->dev,
 			"No available mechanism for setting download mode\n");
-- 
2.17.1


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

* [PATCH V2 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add support to read-modify-write TCSR register to modify only DLOAD bit.

Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 drivers/firmware/qcom_scm.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index 2000323722bf..e3435587a72d 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -407,7 +407,7 @@ int qcom_scm_set_remote_state(u32 state, u32 id)
 }
 EXPORT_SYMBOL(qcom_scm_set_remote_state);
 
-static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
+static int __qcom_scm_set_dload_mode(struct device *dev, u32 val, bool enable)
 {
 	struct qcom_scm_desc desc = {
 		.svc = QCOM_SCM_SVC_BOOT,
@@ -417,7 +417,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
 		.owner = ARM_SMCCC_OWNER_SIP,
 	};
 
-	desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
+	desc.args[1] = enable ? val | QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
 
 	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
 }
@@ -426,15 +426,19 @@ static void qcom_scm_set_download_mode(bool enable)
 {
 	bool avail;
 	int ret = 0;
+	u32 dload_addr_val;
 
 	avail = __qcom_scm_is_call_available(__scm->dev,
 					     QCOM_SCM_SVC_BOOT,
 					     QCOM_SCM_BOOT_SET_DLOAD_MODE);
+	ret = qcom_scm_io_readl(__scm->dload_mode_addr, &dload_addr_val);
+
 	if (avail) {
-		ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
+		ret = __qcom_scm_set_dload_mode(__scm->dev, dload_addr_val, enable);
 	} else if (__scm->dload_mode_addr) {
 		ret = qcom_scm_io_writel(__scm->dload_mode_addr,
-				enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
+				enable ? dload_addr_val |
+					QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
 	} else {
 		dev_err(__scm->dev,
 			"No available mechanism for setting download mode\n");
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
  2023-02-01  9:05 ` Poovendhan Selvaraj
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  -1 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Enables scm download mode config.

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 5d6a54deef02..eb2709af1d11 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -256,6 +256,7 @@ CONFIG_ARM_SCPI_PROTOCOL=y
 CONFIG_RASPBERRYPI_FIRMWARE=y
 CONFIG_INTEL_STRATIX10_SERVICE=y
 CONFIG_INTEL_STRATIX10_RSU=m
+CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT=y
 CONFIG_EFI_CAPSULE_LOADER=y
 CONFIG_IMX_SCU=y
 CONFIG_IMX_SCU_PD=y
-- 
2.17.1


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

* [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Enables scm download mode config.

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 5d6a54deef02..eb2709af1d11 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -256,6 +256,7 @@ CONFIG_ARM_SCPI_PROTOCOL=y
 CONFIG_RASPBERRYPI_FIRMWARE=y
 CONFIG_INTEL_STRATIX10_SERVICE=y
 CONFIG_INTEL_STRATIX10_RSU=m
+CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT=y
 CONFIG_EFI_CAPSULE_LOADER=y
 CONFIG_IMX_SCU=y
 CONFIG_IMX_SCU_PD=y
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
  2023-02-01  9:05 ` Poovendhan Selvaraj
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  -1 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add the tcsr compatible string for IPQ9574 SoC

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
index d463fb47278f..8cd0005fc8c7 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
@@ -30,6 +30,7 @@ properties:
           - qcom,tcsr-apq8084
           - qcom,tcsr-ipq6018
           - qcom,tcsr-ipq8064
+          - qcom,tcsr-ipq9574
           - qcom,tcsr-mdm9615
           - qcom,tcsr-msm8226
           - qcom,tcsr-msm8660
-- 
2.17.1


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

* [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
@ 2023-02-01  9:05   ` Poovendhan Selvaraj
  0 siblings, 0 replies; 28+ messages in thread
From: Poovendhan Selvaraj @ 2023-02-01  9:05 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

Add the tcsr compatible string for IPQ9574 SoC

Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
---
 Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
index d463fb47278f..8cd0005fc8c7 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
@@ -30,6 +30,7 @@ properties:
           - qcom,tcsr-apq8084
           - qcom,tcsr-ipq6018
           - qcom,tcsr-ipq8064
+          - qcom,tcsr-ipq9574
           - qcom,tcsr-mdm9615
           - qcom,tcsr-msm8226
           - qcom,tcsr-msm8660
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
  2023-02-01  9:05   ` Poovendhan Selvaraj
@ 2023-02-01  9:29     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:29 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Add the scm compatible string for IPQ9574 SoC
> 
> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>

I don't think this improved. This patch adds one line with one value -
one new compatible. Are you sure that three people were working on
exactly that line and that compatible? Especially that it is essentially
copy-paste of other compatibles so there is nothing to work on here?

Best regards,
Krzysztof


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

* Re: [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
@ 2023-02-01  9:29     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:29 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Add the scm compatible string for IPQ9574 SoC
> 
> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>

I don't think this improved. This patch adds one line with one value -
one new compatible. Are you sure that three people were working on
exactly that line and that compatible? Especially that it is essentially
copy-paste of other compatibles so there is nothing to work on here?

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
  2023-02-01  9:05   ` Poovendhan Selvaraj
@ 2023-02-01  9:30     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:30 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Enables scm download mode config.

Subject: drop full stop.

This patch misses explanation why it is needed and why it should be
enabled for all SoCs.

> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---

Best regards,
Krzysztof


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

* Re: [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
@ 2023-02-01  9:30     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:30 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Enables scm download mode config.

Subject: drop full stop.

This patch misses explanation why it is needed and why it should be
enabled for all SoCs.

> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
  2023-02-01  9:05   ` Poovendhan Selvaraj
@ 2023-02-01  9:30     ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:30 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Add the tcsr compatible string for IPQ9574 SoC
> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
@ 2023-02-01  9:30     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 28+ messages in thread
From: Krzysztof Kozlowski @ 2023-02-01  9:30 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy

On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
> Add the tcsr compatible string for IPQ9574 SoC
> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
  2023-02-01  9:05   ` Poovendhan Selvaraj
@ 2023-02-01 10:06     ` Lee Jones
  -1 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2023-02-01 10:06 UTC (permalink / raw)
  To: Poovendhan Selvaraj
  Cc: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, quic_srichara, quic_gokulsri, quic_sjaganat,
	quic_kathirav, quic_arajkuma, quic_anusha, quic_devipriy

On Wed, 01 Feb 2023, Poovendhan Selvaraj wrote:

> Add the tcsr compatible string for IPQ9574 SoC
> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
>  1 file changed, 1 insertion(+)

Nit: Subject should be "dt-bindings: mfd: ..."

> diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> index d463fb47278f..8cd0005fc8c7 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> @@ -30,6 +30,7 @@ properties:
>            - qcom,tcsr-apq8084
>            - qcom,tcsr-ipq6018
>            - qcom,tcsr-ipq8064
> +          - qcom,tcsr-ipq9574
>            - qcom,tcsr-mdm9615
>            - qcom,tcsr-msm8226
>            - qcom,tcsr-msm8660
> -- 
> 2.17.1
> 

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
@ 2023-02-01 10:06     ` Lee Jones
  0 siblings, 0 replies; 28+ messages in thread
From: Lee Jones @ 2023-02-01 10:06 UTC (permalink / raw)
  To: Poovendhan Selvaraj
  Cc: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, quic_srichara, quic_gokulsri, quic_sjaganat,
	quic_kathirav, quic_arajkuma, quic_anusha, quic_devipriy

On Wed, 01 Feb 2023, Poovendhan Selvaraj wrote:

> Add the tcsr compatible string for IPQ9574 SoC
> 
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---
>  Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
>  1 file changed, 1 insertion(+)

Nit: Subject should be "dt-bindings: mfd: ..."

> diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> index d463fb47278f..8cd0005fc8c7 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
> @@ -30,6 +30,7 @@ properties:
>            - qcom,tcsr-apq8084
>            - qcom,tcsr-ipq6018
>            - qcom,tcsr-ipq8064
> +          - qcom,tcsr-ipq9574
>            - qcom,tcsr-mdm9615
>            - qcom,tcsr-msm8226
>            - qcom,tcsr-msm8660
> -- 
> 2.17.1
> 

-- 
Lee Jones [李琼斯]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
  2023-02-01 10:06     ` Lee Jones
@ 2023-02-01 11:11       ` POOVENDHAN SELVARAJ
  -1 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-01 11:11 UTC (permalink / raw)
  To: Lee Jones
  Cc: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, quic_srichara, quic_gokulsri, quic_sjaganat,
	quic_kathirav, quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 3:36 PM, Lee Jones wrote:
> On Wed, 01 Feb 2023, Poovendhan Selvaraj wrote:
>
>> Add the tcsr compatible string for IPQ9574 SoC
>>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
>> ---
>>   Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
>>   1 file changed, 1 insertion(+)
> Nit: Subject should be "dt-bindings: mfd: ..."
Sure, Okay.

Regards,
Poovendhan S

>> diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> index d463fb47278f..8cd0005fc8c7 100644
>> --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> @@ -30,6 +30,7 @@ properties:
>>             - qcom,tcsr-apq8084
>>             - qcom,tcsr-ipq6018
>>             - qcom,tcsr-ipq8064
>> +          - qcom,tcsr-ipq9574
>>             - qcom,tcsr-mdm9615
>>             - qcom,tcsr-msm8226
>>             - qcom,tcsr-msm8660
>> -- 
>> 2.17.1
>>

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

* Re: [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574
@ 2023-02-01 11:11       ` POOVENDHAN SELVARAJ
  0 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-01 11:11 UTC (permalink / raw)
  To: Lee Jones
  Cc: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel, quic_srichara, quic_gokulsri, quic_sjaganat,
	quic_kathirav, quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 3:36 PM, Lee Jones wrote:
> On Wed, 01 Feb 2023, Poovendhan Selvaraj wrote:
>
>> Add the tcsr compatible string for IPQ9574 SoC
>>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
>> ---
>>   Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 1 +
>>   1 file changed, 1 insertion(+)
> Nit: Subject should be "dt-bindings: mfd: ..."
Sure, Okay.

Regards,
Poovendhan S

>> diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> index d463fb47278f..8cd0005fc8c7 100644
>> --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
>> @@ -30,6 +30,7 @@ properties:
>>             - qcom,tcsr-apq8084
>>             - qcom,tcsr-ipq6018
>>             - qcom,tcsr-ipq8064
>> +          - qcom,tcsr-ipq9574
>>             - qcom,tcsr-mdm9615
>>             - qcom,tcsr-msm8226
>>             - qcom,tcsr-msm8660
>> -- 
>> 2.17.1
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
  2023-02-01  9:29     ` Krzysztof Kozlowski
@ 2023-02-01 11:15       ` POOVENDHAN SELVARAJ
  -1 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-01 11:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 2:59 PM, Krzysztof Kozlowski wrote:
> On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
>> Add the scm compatible string for IPQ9574 SoC
>>
>> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
>> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
>> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
>> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> I don't think this improved. This patch adds one line with one value -
> one new compatible. Are you sure that three people were working on
> exactly that line and that compatible? Especially that it is essentially
> copy-paste of other compatibles so there is nothing to work on here?
Sorry, missed it here. Will address in V3.

Regards,
Poovendhan S
> Best regards,
> Krzysztof
>

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

* Re: [PATCH V2 1/5] dt-bindings: scm: Add compatible for IPQ9574
@ 2023-02-01 11:15       ` POOVENDHAN SELVARAJ
  0 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-01 11:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 2:59 PM, Krzysztof Kozlowski wrote:
> On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
>> Add the scm compatible string for IPQ9574 SoC
>>
>> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
>> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
>> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
>> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> I don't think this improved. This patch adds one line with one value -
> one new compatible. Are you sure that three people were working on
> exactly that line and that compatible? Especially that it is essentially
> copy-paste of other compatibles so there is nothing to work on here?
Sorry, missed it here. Will address in V3.

Regards,
Poovendhan S
> Best regards,
> Krzysztof
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode
  2023-02-01  9:05   ` Poovendhan Selvaraj
@ 2023-02-01 12:01     ` Srinivas Kandagatla
  -1 siblings, 0 replies; 28+ messages in thread
From: Srinivas Kandagatla @ 2023-02-01 12:01 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy



On 01/02/2023 09:05, Poovendhan Selvaraj wrote:
> Add support to read-modify-write TCSR register to modify only DLOAD bit.
> 
> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---
>   drivers/firmware/qcom_scm.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index 2000323722bf..e3435587a72d 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -407,7 +407,7 @@ int qcom_scm_set_remote_state(u32 state, u32 id)
>   }
>   EXPORT_SYMBOL(qcom_scm_set_remote_state);
>   
> -static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
> +static int __qcom_scm_set_dload_mode(struct device *dev, u32 val, bool enable)
>   {
>   	struct qcom_scm_desc desc = {
>   		.svc = QCOM_SCM_SVC_BOOT,
> @@ -417,7 +417,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
>   		.owner = ARM_SMCCC_OWNER_SIP,
>   	};
>   
> -	desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
> +	desc.args[1] = enable ? val | QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;


It is not read-modify-write when enable == false, its just writing 0.

Is this intentional?


>   
>   	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
>   }
> @@ -426,15 +426,19 @@ static void qcom_scm_set_download_mode(bool enable)
>   {
>   	bool avail;
>   	int ret = 0;
> +	u32 dload_addr_val;
>   
>   	avail = __qcom_scm_is_call_available(__scm->dev,
>   					     QCOM_SCM_SVC_BOOT,
>   					     QCOM_SCM_BOOT_SET_DLOAD_MODE);
> +	ret = qcom_scm_io_readl(__scm->dload_mode_addr, &dload_addr_val);
> +
>   	if (avail) {
> -		ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
> +		ret = __qcom_scm_set_dload_mode(__scm->dev, dload_addr_val, enable);
>   	} else if (__scm->dload_mode_addr) {
>   		ret = qcom_scm_io_writel(__scm->dload_mode_addr,
> -				enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
> +				enable ? dload_addr_val |
> +					QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);

same here.


--srini

>   	} else {
>   		dev_err(__scm->dev,
>   			"No available mechanism for setting download mode\n");

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

* Re: [PATCH V2 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode
@ 2023-02-01 12:01     ` Srinivas Kandagatla
  0 siblings, 0 replies; 28+ messages in thread
From: Srinivas Kandagatla @ 2023-02-01 12:01 UTC (permalink / raw)
  To: Poovendhan Selvaraj, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy



On 01/02/2023 09:05, Poovendhan Selvaraj wrote:
> Add support to read-modify-write TCSR register to modify only DLOAD bit.
> 
> Co-developed-by: Anusha Rao <quic_anusha@quicinc.com>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> Co-developed-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
> ---
>   drivers/firmware/qcom_scm.c | 12 ++++++++----
>   1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index 2000323722bf..e3435587a72d 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -407,7 +407,7 @@ int qcom_scm_set_remote_state(u32 state, u32 id)
>   }
>   EXPORT_SYMBOL(qcom_scm_set_remote_state);
>   
> -static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
> +static int __qcom_scm_set_dload_mode(struct device *dev, u32 val, bool enable)
>   {
>   	struct qcom_scm_desc desc = {
>   		.svc = QCOM_SCM_SVC_BOOT,
> @@ -417,7 +417,7 @@ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
>   		.owner = ARM_SMCCC_OWNER_SIP,
>   	};
>   
> -	desc.args[1] = enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;
> +	desc.args[1] = enable ? val | QCOM_SCM_BOOT_SET_DLOAD_MODE : 0;


It is not read-modify-write when enable == false, its just writing 0.

Is this intentional?


>   
>   	return qcom_scm_call_atomic(__scm->dev, &desc, NULL);
>   }
> @@ -426,15 +426,19 @@ static void qcom_scm_set_download_mode(bool enable)
>   {
>   	bool avail;
>   	int ret = 0;
> +	u32 dload_addr_val;
>   
>   	avail = __qcom_scm_is_call_available(__scm->dev,
>   					     QCOM_SCM_SVC_BOOT,
>   					     QCOM_SCM_BOOT_SET_DLOAD_MODE);
> +	ret = qcom_scm_io_readl(__scm->dload_mode_addr, &dload_addr_val);
> +
>   	if (avail) {
> -		ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
> +		ret = __qcom_scm_set_dload_mode(__scm->dev, dload_addr_val, enable);
>   	} else if (__scm->dload_mode_addr) {
>   		ret = qcom_scm_io_writel(__scm->dload_mode_addr,
> -				enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
> +				enable ? dload_addr_val |
> +					QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);

same here.


--srini

>   	} else {
>   		dev_err(__scm->dev,
>   			"No available mechanism for setting download mode\n");

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
  2023-02-01  9:30     ` Krzysztof Kozlowski
@ 2023-02-06  5:06       ` POOVENDHAN SELVARAJ
  -1 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-06  5:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 3:00 PM, Krzysztof Kozlowski wrote:
> On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
>> Enables scm download mode config.
> Subject: drop full stop.
>
> This patch misses explanation why it is needed and why it should be
> enabled for all SoCs.

Sure, will address this in next patch series.

Regards,
Poovendhan S

>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
>> ---
> Best regards,
> Krzysztof
>

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

* Re: [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC.
@ 2023-02-06  5:06       ` POOVENDHAN SELVARAJ
  0 siblings, 0 replies; 28+ messages in thread
From: POOVENDHAN SELVARAJ @ 2023-02-06  5:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, lee, mturquette, sboyd, jassisinghbrar,
	catalin.marinas, will, shawnguo, arnd, marcel.ziswiler,
	robimarko, dmitry.baryshkov, nfraprado, broonie, quic_gurus,
	linux-arm-msm, linux-clk, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_anusha, quic_devipriy


On 2/1/2023 3:00 PM, Krzysztof Kozlowski wrote:
> On 01/02/2023 10:05, Poovendhan Selvaraj wrote:
>> Enables scm download mode config.
> Subject: drop full stop.
>
> This patch misses explanation why it is needed and why it should be
> enabled for all SoCs.

Sure, will address this in next patch series.

Regards,
Poovendhan S

>
>> Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
>> ---
> Best regards,
> Krzysztof
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-02-06  5:08 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01  9:05 [PATCH V2 0/5] Enable crashdump collection support for IPQ9574 Poovendhan Selvaraj
2023-02-01  9:05 ` Poovendhan Selvaraj
2023-02-01  9:05 ` [PATCH V2 1/5] dt-bindings: scm: Add compatible " Poovendhan Selvaraj
2023-02-01  9:05   ` Poovendhan Selvaraj
2023-02-01  9:29   ` Krzysztof Kozlowski
2023-02-01  9:29     ` Krzysztof Kozlowski
2023-02-01 11:15     ` POOVENDHAN SELVARAJ
2023-02-01 11:15       ` POOVENDHAN SELVARAJ
2023-02-01  9:05 ` [PATCH V2 2/5] arm64: dts: Add support for Crashdump collection on IPQ9574 Poovendhan Selvaraj
2023-02-01  9:05   ` Poovendhan Selvaraj
2023-02-01  9:05 ` [PATCH V2 3/5] firmware: scm: Modify only the DLOAD bit in TCSR register for download mode Poovendhan Selvaraj
2023-02-01  9:05   ` Poovendhan Selvaraj
2023-02-01 12:01   ` Srinivas Kandagatla
2023-02-01 12:01     ` Srinivas Kandagatla
2023-02-01  9:05 ` [PATCH V2 4/5] arm64: defconfig: Enable scm download mode config for IPQ9574 SoC Poovendhan Selvaraj
2023-02-01  9:05   ` Poovendhan Selvaraj
2023-02-01  9:30   ` Krzysztof Kozlowski
2023-02-01  9:30     ` Krzysztof Kozlowski
2023-02-06  5:06     ` POOVENDHAN SELVARAJ
2023-02-06  5:06       ` POOVENDHAN SELVARAJ
2023-02-01  9:05 ` [PATCH V2 5/5] dt-bindings: tcsr: Add compatible for IPQ9574 Poovendhan Selvaraj
2023-02-01  9:05   ` Poovendhan Selvaraj
2023-02-01  9:30   ` Krzysztof Kozlowski
2023-02-01  9:30     ` Krzysztof Kozlowski
2023-02-01 10:06   ` Lee Jones
2023-02-01 10:06     ` Lee Jones
2023-02-01 11:11     ` POOVENDHAN SELVARAJ
2023-02-01 11:11       ` POOVENDHAN SELVARAJ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.