All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible
@ 2023-06-21 17:50 Alexey Minnekhanov
  2023-06-21 17:50 ` [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 Alexey Minnekhanov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alexey Minnekhanov @ 2023-06-21 17:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Alexey Minnekhanov,
	Krzysztof Kozlowski

Mention sdm660-mss-pil in compatibles list.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml
index c1ac6ca1e759..09da5616e1e5 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8996-mss-pil.yaml
@@ -19,6 +19,7 @@ properties:
     enum:
       - qcom,msm8996-mss-pil
       - qcom,msm8998-mss-pil
+      - qcom,sdm660-mss-pil
       - qcom,sdm845-mss-pil
 
   reg:
@@ -245,7 +246,9 @@ allOf:
   - if:
       properties:
         compatible:
-          const: qcom,msm8998-mss-pil
+          enum:
+            - qcom,msm8998-mss-pil
+            - qcom,sdm660-mss-pil
     then:
       properties:
         clocks:
-- 
2.39.3


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

* [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660
  2023-06-21 17:50 [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Alexey Minnekhanov
@ 2023-06-21 17:50 ` Alexey Minnekhanov
  2023-06-22 13:41   ` Konrad Dybcio
  2023-06-21 17:50 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc Alexey Minnekhanov
  2023-07-15 22:13 ` (subset) [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Bjorn Andersson
  2 siblings, 1 reply; 7+ messages in thread
From: Alexey Minnekhanov @ 2023-06-21 17:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Alexey Minnekhanov,
	Konrad Dybcio

Snapdragon 630/660 modem subsystem is similar to one in MSM8998
and can almost reuse it's reset sequence.

Downstream sources call this q6v5 version "qdsp6v62-1-5" and its
code path has additional checks for QDSP6v55_BHS_EN_REST_ACK
status [2].

Inspiration is taken from Konrad Dybcio's work in [1], but reworked
to use common code path with MSM8996/8998, instead of completely
separate "if" block for SDM660.

[1] https://github.com/SoMainline/linux/commit/7dd6dd9b936dc8d6c1f1abe299e5b065c33741e8
[2] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/lavender-q-oss/drivers/soc/qcom/pil-q6v5.c#L393

Co-developed-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>

---

V2: use readl_relaxed_poll_timeout instead of hand-coded for loop.

In his commit Konrad mentions that modem was unstable, but I don't
observe such behaviour on my device. Modem does not restart by itself,
and I could successfully enable ath10k wcn3990 Wi-Fi with this.

Also worth saying that in my initial tests just using qcom,msm8998-mss-pil
as-is, without separate resource struct and separate code paths for
SDM660, was also working fine.
---
 drivers/remoteproc/qcom_q6v5_mss.c | 51 ++++++++++++++++++++++++++++--
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index 8e15e4f85de1..dcbecae675e2 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -71,6 +71,7 @@
 #define QDSP6SS_MEM_PWR_CTL		0x0B0
 #define QDSP6V6SS_MEM_PWR_CTL		0x034
 #define QDSP6SS_STRAP_ACC		0x110
+#define QDSP6V62SS_BHS_STATUS		0x0C4
 
 /* AXI Halt Register Offsets */
 #define AXI_HALTREQ_REG			0x0
@@ -123,6 +124,7 @@
 #define QDSP6v56_CLAMP_QMC_MEM		BIT(22)
 #define QDSP6SS_XO_CBCR		0x0038
 #define QDSP6SS_ACC_OVERRIDE_VAL		0x20
+#define QDSP6v55_BHS_EN_REST_ACK	BIT(0)
 
 /* QDSP6v65 parameters */
 #define QDSP6SS_CORE_CBCR		0x20
@@ -130,6 +132,7 @@
 #define QDSP6SS_BOOT_CORE_START         0x400
 #define QDSP6SS_BOOT_CMD                0x404
 #define BOOT_FSM_TIMEOUT                10000
+#define BHS_CHECK_MAX_LOOPS             200
 
 struct reg_info {
 	struct regulator *reg;
@@ -250,6 +253,7 @@ enum {
 	MSS_MSM8998,
 	MSS_SC7180,
 	MSS_SC7280,
+	MSS_SDM660,
 	MSS_SDM845,
 };
 
@@ -700,7 +704,8 @@ static int q6v5proc_reset(struct q6v5 *qproc)
 	} else if (qproc->version == MSS_MSM8909 ||
 		   qproc->version == MSS_MSM8953 ||
 		   qproc->version == MSS_MSM8996 ||
-		   qproc->version == MSS_MSM8998) {
+		   qproc->version == MSS_MSM8998 ||
+		   qproc->version == MSS_SDM660) {
 
 		if (qproc->version != MSS_MSM8909 &&
 		    qproc->version != MSS_MSM8953)
@@ -734,6 +739,16 @@ static int q6v5proc_reset(struct q6v5 *qproc)
 		val |= readl(qproc->reg_base + QDSP6SS_PWR_CTL_REG);
 		udelay(1);
 
+		if (qproc->version == MSS_SDM660) {
+			ret = readl_relaxed_poll_timeout(qproc->reg_base + QDSP6V62SS_BHS_STATUS,
+							 i, (i & QDSP6v55_BHS_EN_REST_ACK),
+							 1, BHS_CHECK_MAX_LOOPS);
+			if (ret == -ETIMEDOUT) {
+				dev_err(qproc->dev, "BHS_EN_REST_ACK not set!\n");
+				return -ETIMEDOUT;
+			}
+		}
+
 		/* Put LDO in bypass mode */
 		val |= QDSP6v56_LDO_BYP;
 		writel(val, qproc->reg_base + QDSP6SS_PWR_CTL_REG);
@@ -756,7 +771,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
 				mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
 				i = 19;
 			} else {
-				/* MSS_MSM8998 */
+				/* MSS_MSM8998, MSS_SDM660 */
 				mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL;
 				i = 28;
 			}
@@ -2193,6 +2208,37 @@ static const struct rproc_hexagon_res sc7280_mss = {
 	.version = MSS_SC7280,
 };
 
+static const struct rproc_hexagon_res sdm660_mss = {
+	.hexagon_mba_image = "mba.mbn",
+	.proxy_clk_names = (char*[]){
+			"xo",
+			"qdss",
+			"mem",
+			NULL
+	},
+	.active_clk_names = (char*[]){
+			"iface",
+			"bus",
+			"gpll0_mss",
+			"mnoc_axi",
+			"snoc_axi",
+			NULL
+	},
+	.proxy_pd_names = (char*[]){
+			"cx",
+			"mx",
+			NULL
+	},
+	.need_mem_protection = true,
+	.has_alt_reset = false,
+	.has_mba_logs = false,
+	.has_spare_reg = false,
+	.has_qaccept_regs = false,
+	.has_ext_cntl_regs = false,
+	.has_vq6 = false,
+	.version = MSS_SDM660,
+};
+
 static const struct rproc_hexagon_res sdm845_mss = {
 	.hexagon_mba_image = "mba.mbn",
 	.proxy_clk_names = (char*[]){
@@ -2475,6 +2521,7 @@ static const struct of_device_id q6v5_of_match[] = {
 	{ .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss},
 	{ .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss},
 	{ .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss},
+	{ .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss},
 	{ .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss},
 	{ },
 };
-- 
2.39.3


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

* [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc
  2023-06-21 17:50 [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Alexey Minnekhanov
  2023-06-21 17:50 ` [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 Alexey Minnekhanov
@ 2023-06-21 17:50 ` Alexey Minnekhanov
  2023-06-22  6:22   ` Krzysztof Kozlowski
  2023-07-15 22:13 ` (subset) [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Bjorn Andersson
  2 siblings, 1 reply; 7+ messages in thread
From: Alexey Minnekhanov @ 2023-06-21 17:50 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Alexey Minnekhanov

Modem subsystem in SDM630/660 is similar to MSM8998 and
device tree node for it is based on the one from msm8998.dtsi.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
---
 arch/arm64/boot/dts/qcom/sdm630.dtsi | 65 ++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
index 014237d4b5b2..ad01f2951154 100644
--- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
@@ -1028,6 +1028,71 @@ data-pins {
 			};
 		};
 
+		remoteproc_mss: remoteproc@4080000 {
+			compatible = "qcom,sdm660-mss-pil";
+			reg = <0x04080000 0x100>, <0x04180000 0x40>;
+			reg-names = "qdsp6", "rmb";
+
+			interrupts-extended = <&intc GIC_SPI 448 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_BIMC_MSS_Q6_AXI_CLK>,
+				 <&gcc GCC_BOOT_ROM_AHB_CLK>,
+				 <&gcc GPLL0_OUT_MSSCC>,
+				 <&gcc GCC_MSS_SNOC_AXI_CLK>,
+				 <&gcc GCC_MSS_MNOC_BIMC_AXI_CLK>,
+				 <&rpmcc RPM_SMD_QDSS_CLK>,
+				 <&rpmcc RPM_SMD_XO_CLK_SRC>;
+			clock-names = "iface",
+				      "bus",
+				      "mem",
+				      "gpll0_mss",
+				      "snoc_axi",
+				      "mnoc_axi",
+				      "qdss",
+				      "xo";
+
+			qcom,smem-states = <&modem_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
+
+			resets = <&gcc GCC_MSS_RESTART>;
+			reset-names = "mss_restart";
+
+			qcom,halt-regs = <&tcsr_regs_1 0x3000 0x5000 0x4000>;
+
+			power-domains = <&rpmpd SDM660_VDDCX>,
+					<&rpmpd SDM660_VDDMX>;
+			power-domain-names = "cx", "mx";
+
+			status = "disabled";
+
+			mba {
+				memory-region = <&mba_region>;
+			};
+
+			mpss {
+				memory-region = <&mpss_region>;
+			};
+
+			glink-edge {
+				interrupts = <GIC_SPI 452 IRQ_TYPE_EDGE_RISING>;
+				label = "modem";
+				qcom,remote-pid = <1>;
+				mboxes = <&apcs_glb 15>;
+			};
+		};
+
 		adreno_gpu: gpu@5000000 {
 			compatible = "qcom,adreno-508.0", "qcom,adreno";
 
-- 
2.39.3


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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc
  2023-06-21 17:50 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc Alexey Minnekhanov
@ 2023-06-22  6:22   ` Krzysztof Kozlowski
  2023-06-22 11:04     ` Alexey Minnekhanov
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-22  6:22 UTC (permalink / raw)
  To: Alexey Minnekhanov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel

On 21/06/2023 19:50, Alexey Minnekhanov wrote:
> Modem subsystem in SDM630/660 is similar to MSM8998 and
> device tree node for it is based on the one from msm8998.dtsi.
> 
> Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
> ---
>  arch/arm64/boot/dts/qcom/sdm630.dtsi | 65 ++++++++++++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 

...
> +
> +			qcom,halt-regs = <&tcsr_regs_1 0x3000 0x5000 0x4000>;
> +
> +			power-domains = <&rpmpd SDM660_VDDCX>,
> +					<&rpmpd SDM660_VDDMX>;
> +			power-domain-names = "cx", "mx";
> +
> +			status = "disabled";
> +
> +			mba {
> +				memory-region = <&mba_region>;
> +			};
> +
> +			mpss {
> +				memory-region = <&mpss_region>;
> +			};

mba and mpss are deprecated. I think this was changed to memory-regions
in remoteproc node.

Best regards,
Krzysztof


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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc
  2023-06-22  6:22   ` Krzysztof Kozlowski
@ 2023-06-22 11:04     ` Alexey Minnekhanov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexey Minnekhanov @ 2023-06-22 11:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel

On 22.06.2023 09:22, Krzysztof Kozlowski wrote:
> On 21/06/2023 19:50, Alexey Minnekhanov wrote:
>> Modem subsystem in SDM630/660 is similar to MSM8998 and
>> device tree node for it is based on the one from msm8998.dtsi.
>>
>> Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
>> ---
>>   arch/arm64/boot/dts/qcom/sdm630.dtsi | 65 ++++++++++++++++++++++++++++
>>   1 file changed, 65 insertions(+)
>>
> 
> ...
>> +
>> +			mba {
>> +				memory-region = <&mba_region>;
>> +			};
>> +
>> +			mpss {
>> +				memory-region = <&mpss_region>;
>> +			};
> 
> mba and mpss are deprecated. I think this was changed to memory-regions
> in remoteproc node.
> 

That's what I thought after reading DT bindings document, but none of 
closest siblings (msm8996.dtsi, msm8998.dtsi) use the new way.

Will change in V3.

-- 
Regards,
Alexey Minnekhanov

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

* Re: [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660
  2023-06-21 17:50 ` [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 Alexey Minnekhanov
@ 2023-06-22 13:41   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-06-22 13:41 UTC (permalink / raw)
  To: Alexey Minnekhanov, Andy Gross, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel
  Cc: ~postmarketos/upstreaming, phone-devel, Konrad Dybcio

On 21.06.2023 19:50, Alexey Minnekhanov wrote:
> Snapdragon 630/660 modem subsystem is similar to one in MSM8998
> and can almost reuse it's reset sequence.
> 
> Downstream sources call this q6v5 version "qdsp6v62-1-5" and its
> code path has additional checks for QDSP6v55_BHS_EN_REST_ACK
> status [2].
> 
> Inspiration is taken from Konrad Dybcio's work in [1], but reworked
> to use common code path with MSM8996/8998, instead of completely
> separate "if" block for SDM660.
> 
> [1] https://github.com/SoMainline/linux/commit/7dd6dd9b936dc8d6c1f1abe299e5b065c33741e8
> [2] https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/lavender-q-oss/drivers/soc/qcom/pil-q6v5.c#L393
> 
> Co-developed-by: Konrad Dybcio <konradybcio@gmail.com>
> Signed-off-by: Konrad Dybcio <konradybcio@gmail.com>
> Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
> 
> ---
> 
> V2: use readl_relaxed_poll_timeout instead of hand-coded for loop.
> 
> In his commit Konrad mentions that modem was unstable, but I don't
> observe such behaviour on my device. Modem does not restart by itself,
> and I could successfully enable ath10k wcn3990 Wi-Fi with this.
> 
> Also worth saying that in my initial tests just using qcom,msm8998-mss-pil
> as-is, without separate resource struct and separate code paths for
> SDM660, was also working fine.
> ---
Looks like pre-SMxxxx Sony devices have some touchy watchdog..

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  drivers/remoteproc/qcom_q6v5_mss.c | 51 ++++++++++++++++++++++++++++--
>  1 file changed, 49 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index 8e15e4f85de1..dcbecae675e2 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -71,6 +71,7 @@
>  #define QDSP6SS_MEM_PWR_CTL		0x0B0
>  #define QDSP6V6SS_MEM_PWR_CTL		0x034
>  #define QDSP6SS_STRAP_ACC		0x110
> +#define QDSP6V62SS_BHS_STATUS		0x0C4
>  
>  /* AXI Halt Register Offsets */
>  #define AXI_HALTREQ_REG			0x0
> @@ -123,6 +124,7 @@
>  #define QDSP6v56_CLAMP_QMC_MEM		BIT(22)
>  #define QDSP6SS_XO_CBCR		0x0038
>  #define QDSP6SS_ACC_OVERRIDE_VAL		0x20
> +#define QDSP6v55_BHS_EN_REST_ACK	BIT(0)
>  
>  /* QDSP6v65 parameters */
>  #define QDSP6SS_CORE_CBCR		0x20
> @@ -130,6 +132,7 @@
>  #define QDSP6SS_BOOT_CORE_START         0x400
>  #define QDSP6SS_BOOT_CMD                0x404
>  #define BOOT_FSM_TIMEOUT                10000
> +#define BHS_CHECK_MAX_LOOPS             200
>  
>  struct reg_info {
>  	struct regulator *reg;
> @@ -250,6 +253,7 @@ enum {
>  	MSS_MSM8998,
>  	MSS_SC7180,
>  	MSS_SC7280,
> +	MSS_SDM660,
>  	MSS_SDM845,
>  };
>  
> @@ -700,7 +704,8 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  	} else if (qproc->version == MSS_MSM8909 ||
>  		   qproc->version == MSS_MSM8953 ||
>  		   qproc->version == MSS_MSM8996 ||
> -		   qproc->version == MSS_MSM8998) {
> +		   qproc->version == MSS_MSM8998 ||
> +		   qproc->version == MSS_SDM660) {
>  
>  		if (qproc->version != MSS_MSM8909 &&
>  		    qproc->version != MSS_MSM8953)
> @@ -734,6 +739,16 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  		val |= readl(qproc->reg_base + QDSP6SS_PWR_CTL_REG);
>  		udelay(1);
>  
> +		if (qproc->version == MSS_SDM660) {
> +			ret = readl_relaxed_poll_timeout(qproc->reg_base + QDSP6V62SS_BHS_STATUS,
> +							 i, (i & QDSP6v55_BHS_EN_REST_ACK),
> +							 1, BHS_CHECK_MAX_LOOPS);
> +			if (ret == -ETIMEDOUT) {
> +				dev_err(qproc->dev, "BHS_EN_REST_ACK not set!\n");
> +				return -ETIMEDOUT;
> +			}
> +		}
> +
>  		/* Put LDO in bypass mode */
>  		val |= QDSP6v56_LDO_BYP;
>  		writel(val, qproc->reg_base + QDSP6SS_PWR_CTL_REG);
> @@ -756,7 +771,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  				mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
>  				i = 19;
>  			} else {
> -				/* MSS_MSM8998 */
> +				/* MSS_MSM8998, MSS_SDM660 */
>  				mem_pwr_ctl = QDSP6V6SS_MEM_PWR_CTL;
>  				i = 28;
>  			}
> @@ -2193,6 +2208,37 @@ static const struct rproc_hexagon_res sc7280_mss = {
>  	.version = MSS_SC7280,
>  };
>  
> +static const struct rproc_hexagon_res sdm660_mss = {
> +	.hexagon_mba_image = "mba.mbn",
> +	.proxy_clk_names = (char*[]){
> +			"xo",
> +			"qdss",
> +			"mem",
> +			NULL
> +	},
> +	.active_clk_names = (char*[]){
> +			"iface",
> +			"bus",
> +			"gpll0_mss",
> +			"mnoc_axi",
> +			"snoc_axi",
> +			NULL
> +	},
> +	.proxy_pd_names = (char*[]){
> +			"cx",
> +			"mx",
> +			NULL
> +	},
> +	.need_mem_protection = true,
> +	.has_alt_reset = false,
> +	.has_mba_logs = false,
> +	.has_spare_reg = false,
> +	.has_qaccept_regs = false,
> +	.has_ext_cntl_regs = false,
> +	.has_vq6 = false,
> +	.version = MSS_SDM660,
> +};
> +
>  static const struct rproc_hexagon_res sdm845_mss = {
>  	.hexagon_mba_image = "mba.mbn",
>  	.proxy_clk_names = (char*[]){
> @@ -2475,6 +2521,7 @@ static const struct of_device_id q6v5_of_match[] = {
>  	{ .compatible = "qcom,msm8998-mss-pil", .data = &msm8998_mss},
>  	{ .compatible = "qcom,sc7180-mss-pil", .data = &sc7180_mss},
>  	{ .compatible = "qcom,sc7280-mss-pil", .data = &sc7280_mss},
> +	{ .compatible = "qcom,sdm660-mss-pil", .data = &sdm660_mss},
>  	{ .compatible = "qcom,sdm845-mss-pil", .data = &sdm845_mss},
>  	{ },
>  };

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

* Re: (subset) [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible
  2023-06-21 17:50 [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Alexey Minnekhanov
  2023-06-21 17:50 ` [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 Alexey Minnekhanov
  2023-06-21 17:50 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc Alexey Minnekhanov
@ 2023-07-15 22:13 ` Bjorn Andersson
  2 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-07-15 22:13 UTC (permalink / raw)
  To: Andy Gross, Konrad Dybcio, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Alexey Minnekhanov
  Cc: ~postmarketos/upstreaming, phone-devel, Krzysztof Kozlowski


On Wed, 21 Jun 2023 20:50:44 +0300, Alexey Minnekhanov wrote:
> Mention sdm660-mss-pil in compatibles list.
> 
> 

Applied, thanks!

[1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible
      commit: ed50ac266f67829d4732c8ca61ef1953c2cc63d0
[2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660
      commit: 10b6fec2c8c99b5d1ccbcd070da1fc8e96da0046

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-07-15 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 17:50 [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Alexey Minnekhanov
2023-06-21 17:50 ` [PATCH v2 2/3] remoteproc: qcom: q6v5-mss: Add support for SDM630/636/660 Alexey Minnekhanov
2023-06-22 13:41   ` Konrad Dybcio
2023-06-21 17:50 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add support for modem remoteproc Alexey Minnekhanov
2023-06-22  6:22   ` Krzysztof Kozlowski
2023-06-22 11:04     ` Alexey Minnekhanov
2023-07-15 22:13 ` (subset) [PATCH v2 1/3] dt-bindings: remoteproc: qcom,msm8996-mss-pil: Add SDM660 compatible Bjorn Andersson

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.