linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226
@ 2023-05-20 12:19 Matti Lehtimäki
  2023-05-20 12:19 ` [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226 Matti Lehtimäki
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Matti Lehtimäki @ 2023-05-20 12:19 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Bjorn Andersson, devicetree, Konrad Dybcio, linux-kernel

This series adds PMU, rpm-stats and IMEM nodes for MSM8226.
It also defines reboot modes for MSM8226.

Changes in v2:
  - Use constants instead of magic number in PMU node
  - Always enable IMEM node
  - Move reboot-mode magic numbers to platform,
    those should be always the same, drop patch for matisse-wifi

Matti Lehtimäki (4):
  dt-bindings: sram: qcom,imem: Document MSM8226
  ARM: dts: qcom: msm8226: Add PMU node
  ARM: dts: qcom: msm8226: Add rpm-stats device node
  ARM: dts: qcom: msm8226: Add IMEM node

 .../devicetree/bindings/sram/qcom,imem.yaml   |  1 +
 arch/arm/boot/dts/qcom-msm8226.dtsi           | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)

-- 
2.34.1


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

* [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226
  2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
@ 2023-05-20 12:19 ` Matti Lehtimäki
  2023-05-20 12:19 ` [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node Matti Lehtimäki
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Matti Lehtimäki @ 2023-05-20 12:19 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Conor Dooley, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, devicetree, linux-kernel

Add compatible for MSM8226 IMEM.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
 Documentation/devicetree/bindings/sram/qcom,imem.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index ba694ce4a037..318acd129ff9 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -18,6 +18,7 @@ properties:
     items:
       - enum:
           - qcom,apq8064-imem
+          - qcom,msm8226-imem
           - qcom,msm8974-imem
           - qcom,qcs404-imem
           - qcom,sc7180-imem
-- 
2.34.1


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

* [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node
  2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
  2023-05-20 12:19 ` [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226 Matti Lehtimäki
@ 2023-05-20 12:19 ` Matti Lehtimäki
  2023-05-22 16:03   ` Luca Weiss
  2023-05-20 12:19 ` [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node Matti Lehtimäki
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Matti Lehtimäki @ 2023-05-20 12:19 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

Enable perf events on MSM8226 devices by adding the PMU node.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
---
Changes in v2:
  - Use constants instead of magic number
---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index c373081bc21b..cb4b4a6d0447 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -46,6 +46,12 @@ scm {
 		};
 	};
 
+	pmu {
+		compatible = "arm,cortex-a7-pmu";
+		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
+					 IRQ_TYPE_LEVEL_HIGH)>;
+	};
+
 	reserved-memory {
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.34.1


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

* [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node
  2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
  2023-05-20 12:19 ` [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226 Matti Lehtimäki
  2023-05-20 12:19 ` [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node Matti Lehtimäki
@ 2023-05-20 12:19 ` Matti Lehtimäki
  2023-05-22 16:09   ` Luca Weiss
  2023-05-20 12:19 ` [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node Matti Lehtimäki
  2023-05-25  4:54 ` (subset) [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Bjorn Andersson
  4 siblings, 1 reply; 9+ messages in thread
From: Matti Lehtimäki @ 2023-05-20 12:19 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

Add device node for the rpm-stats pseudo device.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index cb4b4a6d0447..8644540f5aae 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -592,6 +592,11 @@ frame@f9028000 {
 			};
 		};
 
+		sram@fc190000 {
+			compatible = "qcom,msm8226-rpm-stats";
+			reg = <0xfc190000 0x10000>;
+		};
+
 		rpm_msg_ram: sram@fc428000 {
 			compatible = "qcom,rpm-msg-ram";
 			reg = <0xfc428000 0x4000>;
-- 
2.34.1


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

* [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node
  2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
                   ` (2 preceding siblings ...)
  2023-05-20 12:19 ` [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node Matti Lehtimäki
@ 2023-05-20 12:19 ` Matti Lehtimäki
  2023-05-22 16:11   ` Luca Weiss
  2023-05-25  4:54 ` (subset) [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Bjorn Andersson
  4 siblings, 1 reply; 9+ messages in thread
From: Matti Lehtimäki @ 2023-05-20 12:19 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel

This enables userspace to signal the bootloader to go into the
bootloader or recovery mode.

The magic values can be found in both the downstream kernel and the LK
kernel (bootloader).

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
---
Changes in v2:
  - Always enable IMEM node
  - Move reboot-mode magic numbers to platform,
    those should be always the same
---
 arch/arm/boot/dts/qcom-msm8226.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi
index 8644540f5aae..284b7c666fea 100644
--- a/arch/arm/boot/dts/qcom-msm8226.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
@@ -641,6 +641,20 @@ smd-edge {
 				label = "lpass";
 			};
 		};
+
+		sram@fe805000 {
+			compatible = "qcom,msm8226-imem", "syscon", "simple-mfd";
+			reg = <0xfe805000 0x1000>;
+
+			reboot-mode {
+				compatible = "syscon-reboot-mode";
+				offset = <0x65c>;
+
+				mode-bootloader = <0x77665500>;
+				mode-normal     = <0x77665501>;
+				mode-recovery   = <0x77665502>;
+			};
+		};
 	};
 
 	timer {
-- 
2.34.1


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

* Re: [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node
  2023-05-20 12:19 ` [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node Matti Lehtimäki
@ 2023-05-22 16:03   ` Luca Weiss
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Weiss @ 2023-05-22 16:03 UTC (permalink / raw)
  To: linux-arm-msm, ~postmarketos/upstreaming
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel,
	Matti Lehtimäki

On Samstag, 20. Mai 2023 14:19:31 CEST Matti Lehtimäki wrote:
> Enable perf events on MSM8226 devices by adding the PMU node.
> 
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>

Reviewed-by: Luca Weiss <luca@z3ntu.xyz>

> ---
> Changes in v2:
>   - Use constants instead of magic number
> ---
>  arch/arm/boot/dts/qcom-msm8226.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi
> b/arch/arm/boot/dts/qcom-msm8226.dtsi index c373081bc21b..cb4b4a6d0447
> 100644
> --- a/arch/arm/boot/dts/qcom-msm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
> @@ -46,6 +46,12 @@ scm {
>  		};
>  	};
> 
> +	pmu {
> +		compatible = "arm,cortex-a7-pmu";
> +		interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(4) |
> +					 IRQ_TYPE_LEVEL_HIGH)>;
> +	};
> +
>  	reserved-memory {
>  		#address-cells = <1>;
>  		#size-cells = <1>;





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

* Re: [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node
  2023-05-20 12:19 ` [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node Matti Lehtimäki
@ 2023-05-22 16:09   ` Luca Weiss
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Weiss @ 2023-05-22 16:09 UTC (permalink / raw)
  To: linux-arm-msm, ~postmarketos/upstreaming
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Konrad Dybcio, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel,
	Matti Lehtimäki

On Samstag, 20. Mai 2023 14:19:32 CEST Matti Lehtimäki wrote:
> Add device node for the rpm-stats pseudo device.
> 
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Reviewed-by: Luca Weiss <luca@z3ntu.xyz>

> ---
>  arch/arm/boot/dts/qcom-msm8226.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi
> b/arch/arm/boot/dts/qcom-msm8226.dtsi index cb4b4a6d0447..8644540f5aae
> 100644
> --- a/arch/arm/boot/dts/qcom-msm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
> @@ -592,6 +592,11 @@ frame@f9028000 {
>  			};
>  		};
> 
> +		sram@fc190000 {
> +			compatible = "qcom,msm8226-rpm-stats";
> +			reg = <0xfc190000 0x10000>;
> +		};
> +
>  		rpm_msg_ram: sram@fc428000 {
>  			compatible = "qcom,rpm-msg-ram";
>  			reg = <0xfc428000 0x4000>;





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

* Re: [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node
  2023-05-20 12:19 ` [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node Matti Lehtimäki
@ 2023-05-22 16:11   ` Luca Weiss
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Weiss @ 2023-05-22 16:11 UTC (permalink / raw)
  To: linux-arm-msm, ~postmarketos/upstreaming
  Cc: ~postmarketos/upstreaming, phone-devel, Matti Lehtimäki,
	Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, devicetree, linux-kernel,
	Matti Lehtimäki

On Samstag, 20. Mai 2023 14:19:33 CEST Matti Lehtimäki wrote:
> This enables userspace to signal the bootloader to go into the
> bootloader or recovery mode.
> 
> The magic values can be found in both the downstream kernel and the LK
> kernel (bootloader).
> 
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>

Reviewed-by: Luca Weiss <luca@z3ntu.xyz>

> ---
> Changes in v2:
>   - Always enable IMEM node
>   - Move reboot-mode magic numbers to platform,
>     those should be always the same
> ---
>  arch/arm/boot/dts/qcom-msm8226.dtsi | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi
> b/arch/arm/boot/dts/qcom-msm8226.dtsi index 8644540f5aae..284b7c666fea
> 100644
> --- a/arch/arm/boot/dts/qcom-msm8226.dtsi
> +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi
> @@ -641,6 +641,20 @@ smd-edge {
>  				label = "lpass";
>  			};
>  		};
> +
> +		sram@fe805000 {
> +			compatible = "qcom,msm8226-imem", "syscon", 
"simple-mfd";
> +			reg = <0xfe805000 0x1000>;
> +
> +			reboot-mode {
> +				compatible = "syscon-reboot-mode";
> +				offset = <0x65c>;
> +
> +				mode-bootloader = <0x77665500>;
> +				mode-normal     = <0x77665501>;
> +				mode-recovery   = <0x77665502>;
> +			};
> +		};
>  	};
> 
>  	timer {





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

* Re: (subset) [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226
  2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
                   ` (3 preceding siblings ...)
  2023-05-20 12:19 ` [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node Matti Lehtimäki
@ 2023-05-25  4:54 ` Bjorn Andersson
  4 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2023-05-25  4:54 UTC (permalink / raw)
  To: Matti Lehtimäki, linux-arm-msm
  Cc: linux-kernel, Konrad Dybcio, devicetree,
	~postmarketos/upstreaming, phone-devel

On Sat, 20 May 2023 15:19:29 +0300, Matti Lehtimäki wrote:
> This series adds PMU, rpm-stats and IMEM nodes for MSM8226.
> It also defines reboot modes for MSM8226.
> 
> Changes in v2:
>   - Use constants instead of magic number in PMU node
>   - Always enable IMEM node
>   - Move reboot-mode magic numbers to platform,
>     those should be always the same, drop patch for matisse-wifi
> 
> [...]

Applied, thanks!

[2/4] ARM: dts: qcom: msm8226: Add PMU node
      commit: fbc669e65fa3b4fe417c14ea194057140d7f3d74
[3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node
      commit: c1ba26f1a00f560f143336dc29eb6524be333a75
[4/4] ARM: dts: qcom: msm8226: Add IMEM node
      commit: 94aca310e66d953c1676e71754744f181d6fe5f9

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

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

end of thread, other threads:[~2023-05-25  4:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-20 12:19 [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Matti Lehtimäki
2023-05-20 12:19 ` [PATCH v2 1/4] dt-bindings: sram: qcom,imem: Document MSM8226 Matti Lehtimäki
2023-05-20 12:19 ` [PATCH v2 2/4] ARM: dts: qcom: msm8226: Add PMU node Matti Lehtimäki
2023-05-22 16:03   ` Luca Weiss
2023-05-20 12:19 ` [PATCH v2 3/4] ARM: dts: qcom: msm8226: Add rpm-stats device node Matti Lehtimäki
2023-05-22 16:09   ` Luca Weiss
2023-05-20 12:19 ` [PATCH v2 4/4] ARM: dts: qcom: msm8226: Add IMEM node Matti Lehtimäki
2023-05-22 16:11   ` Luca Weiss
2023-05-25  4:54 ` (subset) [PATCH v2 0/4] PMU, rpm-stats and IMEM for MSM8226 Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).