mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: sdm845-starqltechn: add support for slpi
@ 2025-09-11 20:56 Dzmitry Sankouski
  2025-09-11 20:56 ` [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem Dzmitry Sankouski
  2025-09-11 20:56 ` [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support Dzmitry Sankouski
  0 siblings, 2 replies; 6+ messages in thread
From: Dzmitry Sankouski @ 2025-09-11 20:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

This series add support for Qualcomm sensor low power island for Galaxy
S9 (starqltechn).

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
Dzmitry Sankouski (2):
      arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem
      arm64: dts: qcom: sdm845-starqltechn: add slpi support

 .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)
---
base-commit: be5d4872e528796df9d7425f2bd9b3893eb3a42c
change-id: 20250911-starqltechn_slpi-677008f4e06f

Best regards,
-- 
Dzmitry Sankouski <dsankouski@gmail.com>


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

* [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem
  2025-09-11 20:56 [PATCH 0/2] arm64: dts: qcom: sdm845-starqltechn: add support for slpi Dzmitry Sankouski
@ 2025-09-11 20:56 ` Dzmitry Sankouski
  2025-09-12 10:58   ` Konrad Dybcio
  2025-09-11 20:56 ` [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support Dzmitry Sankouski
  1 sibling, 1 reply; 6+ messages in thread
From: Dzmitry Sankouski @ 2025-09-11 20:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

When adding adsp reserved mem, slpi reserved memory was shrunk
according to vendor kernel log:

`Removed memory: created DMA memory pool at 0x0000000096700000, size 15 M`

However, kernel refuses to boot firmware with 15MiB reserved region.
Increase slpi reserved region to 16MiB.

Fixes: 58782c229e3e ("arm64: dts: qcom: sdm845-starqltechn: add initial sound support")
Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
 arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 9eeb4b807465..32ce666fc57e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -118,7 +118,7 @@ removed_region: removed-region@88f00000 {
 		};
 
 		slpi_mem: slpi@96700000 {
-			reg = <0 0x96700000 0 0xf00000>;
+			reg = <0 0x96700000 0 0x1000000>;
 			no-map;
 		};
 

-- 
2.39.5


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

* [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support
  2025-09-11 20:56 [PATCH 0/2] arm64: dts: qcom: sdm845-starqltechn: add support for slpi Dzmitry Sankouski
  2025-09-11 20:56 ` [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem Dzmitry Sankouski
@ 2025-09-11 20:56 ` Dzmitry Sankouski
  2025-09-12 12:24   ` Konrad Dybcio
  1 sibling, 1 reply; 6+ messages in thread
From: Dzmitry Sankouski @ 2025-09-11 20:56 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Dzmitry Sankouski

Add support for Qualcomm sensor low power island.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---
 .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
index 32ce666fc57e..2c1157ee7b2d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
@@ -902,6 +902,14 @@ &ipa {
 	status = "okay";
 };
 
+&slpi_pas {
+	firmware-name = "qcom/sdm845/starqltechn/slpi.mbn";
+	pinctrl-0 = <&slpi_ldo_active_state>;
+	pinctrl-1 = <&slpi_ldo_sleep_state>;
+	pinctrl-names = "default", "sleep";
+	status = "okay";
+};
+
 &usb_1 {
 	status = "okay";
 };
@@ -1028,6 +1036,22 @@ sd_card_det_n_state: sd-card-det-n-state {
 		bias-pull-up;
 	};
 
+	slpi_ldo_active_state: slpi-ldo-active-state {
+		pins = "gpio8";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-high;
+	};
+
+	slpi_ldo_sleep_state: slpi-ldo-sleep-state {
+		pins = "gpio8";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		output-low;
+	};
+
 	touch_irq_state: touch-irq-state {
 		pins = "gpio120";
 		function = "gpio";

-- 
2.39.5


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

* Re: [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem
  2025-09-11 20:56 ` [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem Dzmitry Sankouski
@ 2025-09-12 10:58   ` Konrad Dybcio
  2025-09-12 18:07     ` Dzmitry Sankouski
  0 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2025-09-12 10:58 UTC (permalink / raw)
  To: Dzmitry Sankouski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 9/11/25 10:56 PM, Dzmitry Sankouski wrote:
> When adding adsp reserved mem, slpi reserved memory was shrunk
> according to vendor kernel log:
> 
> `Removed memory: created DMA memory pool at 0x0000000096700000, size 15 M`
> 
> However, kernel refuses to boot firmware with 15MiB reserved region.

Why so?

> Increase slpi reserved region to 16MiB.

It would make sense, given the PIL reserved range is now almost
contiguous (bar the hole between spss_mem and adsp_mem.. you might
want to check that one out as well)

Konrad

> 
> Fixes: 58782c229e3e ("arm64: dts: qcom: sdm845-starqltechn: add initial sound support")
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index 9eeb4b807465..32ce666fc57e 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -118,7 +118,7 @@ removed_region: removed-region@88f00000 {
>  		};
>  
>  		slpi_mem: slpi@96700000 {
> -			reg = <0 0x96700000 0 0xf00000>;
> +			reg = <0 0x96700000 0 0x1000000>;
>  			no-map;
>  		};
>  
> 

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

* Re: [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support
  2025-09-11 20:56 ` [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support Dzmitry Sankouski
@ 2025-09-12 12:24   ` Konrad Dybcio
  0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2025-09-12 12:24 UTC (permalink / raw)
  To: Dzmitry Sankouski, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 9/11/25 10:56 PM, Dzmitry Sankouski wrote:
> Add support for Qualcomm sensor low power island.
> 
> Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
> ---
>  .../boot/dts/qcom/sdm845-samsung-starqltechn.dts   | 24 ++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> index 32ce666fc57e..2c1157ee7b2d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts
> @@ -902,6 +902,14 @@ &ipa {
>  	status = "okay";
>  };
>  
> +&slpi_pas {
> +	firmware-name = "qcom/sdm845/starqltechn/slpi.mbn";
> +	pinctrl-0 = <&slpi_ldo_active_state>;
> +	pinctrl-1 = <&slpi_ldo_sleep_state>;

It would perhaps make sense to model it as a GPIO regulator..

I found a downstream kernel for this device and it seems like
this is indeed a Samsung addition

The vendor kernel gates the regulator when the SLPI is shut
off, but I think it would be reasonable to keep it always-on
given you don't really want that to happen, and if you need
to restart the subsystem, not pulsing the regulator should
also likely work
> +	pinctrl-names = "default", "sleep";
> +	status = "okay";

a newline before status is customary

> +};
> +
>  &usb_1 {
>  	status = "okay";
>  };
> @@ -1028,6 +1036,22 @@ sd_card_det_n_state: sd-card-det-n-state {
>  		bias-pull-up;
>  	};
>  
> +	slpi_ldo_active_state: slpi-ldo-active-state {
> +		pins = "gpio8";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +		output-high;

Modeling the gpio-regulator will let you get rid of output-
properties here, which are discouraged in favor of gpiod_ APIs
in drivers

Konrad

> +	};
> +
> +	slpi_ldo_sleep_state: slpi-ldo-sleep-state {
> +		pins = "gpio8";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +		output-low;
> +	};
> +
>  	touch_irq_state: touch-irq-state {
>  		pins = "gpio120";
>  		function = "gpio";
> 

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

* Re: [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem
  2025-09-12 10:58   ` Konrad Dybcio
@ 2025-09-12 18:07     ` Dzmitry Sankouski
  0 siblings, 0 replies; 6+ messages in thread
From: Dzmitry Sankouski @ 2025-09-12 18:07 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel

пт, 12 сент. 2025 г. в 1-3:58, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>:
>
> >
> > However, kernel refuses to boot firmware with 15MiB reserved region.
>
> Why so?
>

It fails with load firmware with:
```
[   22.452709] qcom_q6v5_pas 5c00000.remoteproc: segment outside memory range
[   22.453163] remoteproc remoteproc1: can't start rproc slpi: -22
```

I tried to debug print addresses, but those numbers didn't make sense for me.
I updated the commit message to be more clear.

> > Increase slpi reserved region to 16MiB.
>
> It would make sense, given the PIL reserved range is now almost
> contiguous (bar the hole between spss_mem and adsp_mem.. you might
> want to check that one out as well)
>

Actually there's no gap between spss_mem and adsp_mem, adsp starts from
0x97800000, while spss starts from 0x97700000 and occupies 0x100000, so
0x97700000 + 0x100000 = 0x97800000.

Also, I noticed, spss_mem is not referenced anywhere.

-- 
Best regards and thanks for review,
Dzmitry

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

end of thread, other threads:[~2025-09-12 18:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-11 20:56 [PATCH 0/2] arm64: dts: qcom: sdm845-starqltechn: add support for slpi Dzmitry Sankouski
2025-09-11 20:56 ` [PATCH 1/2] arm64: dts: qcom: sdm845-starqltechn: fix slpi reserved mem Dzmitry Sankouski
2025-09-12 10:58   ` Konrad Dybcio
2025-09-12 18:07     ` Dzmitry Sankouski
2025-09-11 20:56 ` [PATCH 2/2] arm64: dts: qcom: sdm845-starqltechn: add slpi support Dzmitry Sankouski
2025-09-12 12:24   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®