devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p
@ 2023-04-17 14:55 Bartosz Golaszewski
  2023-04-17 14:55 ` [PATCH v2 1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes Bartosz Golaszewski
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-04-17 14:55 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Catalin Marinas, Will Deacon,
	Arnd Bergmann
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

SA8775P uses nvmem to pass the reboot reason magic value to the bootloader.
Remove the reboot modes from the PON node and introduce an SDAM node passed
to the nvmem-reboot-mode driver. While at it: convert the bindings for
nvmem-reboot-mode to YAML and enable it for arm64 in defconfig.

v1 -> v2:
- dropped the defconfig patch as it went upstream already
- in patch 1: explained better why we need to drop the reboot-modes from the
  PON node
- fixed formatting and order of properties in dt-bindings
- fixed naming of nodes in device tree

Bartosz Golaszewski (1):
  dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML

Parikshit Pareek (2):
  arm64: dts: qcom: sa8775p: pmic: remove the PON modes
  arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node

 .../power/reset/nvmem-reboot-mode.txt         | 26 ----------
 .../power/reset/nvmem-reboot-mode.yaml        | 52 +++++++++++++++++++
 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi   | 23 +++++++-
 3 files changed, 73 insertions(+), 28 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
 create mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml

-- 
2.37.2


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

* [PATCH v2 1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes
  2023-04-17 14:55 [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bartosz Golaszewski
@ 2023-04-17 14:55 ` Bartosz Golaszewski
  2023-04-17 14:55 ` [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML Bartosz Golaszewski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-04-17 14:55 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Catalin Marinas, Will Deacon,
	Arnd Bergmann
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Parikshit Pareek, Bartosz Golaszewski

From: Parikshit Pareek <quic_ppareek@quicinc.com>

On this PMIC, the PON peripheral does not provide passing reboot modes
over HLOS. They must be passed over SDAM. Remove the reboot-mode
properties as we'll provide a proper SDAM node in a later commit.

Fixes: d2d9a592746c ("arm64: dts: qcom: sa8775p: add the Power On device node")
Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 7602cca47bae..5abdc239d3a6 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -108,8 +108,6 @@ pmm8654au_0_pon: pon@1200 {
 			compatible = "qcom,pmk8350-pon";
 			reg = <0x1200>, <0x800>;
 			reg-names = "hlos", "pbs";
-			mode-recovery = <0x1>;
-			mode-bootloader = <0x2>;
 
 			pmm8654au_0_pon_pwrkey: pwrkey {
 				compatible = "qcom,pmk8350-pwrkey";
-- 
2.37.2


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

* [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML
  2023-04-17 14:55 [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bartosz Golaszewski
  2023-04-17 14:55 ` [PATCH v2 1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes Bartosz Golaszewski
@ 2023-04-17 14:55 ` Bartosz Golaszewski
  2023-05-08 12:39   ` Sebastian Reichel
  2023-04-17 14:55 ` [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node Bartosz Golaszewski
  2023-05-15  3:33 ` (subset) [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bjorn Andersson
  3 siblings, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-04-17 14:55 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Catalin Marinas, Will Deacon,
	Arnd Bergmann
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Bartosz Golaszewski, Krzysztof Kozlowski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Convert the DT binding document for nvmem-reboot-mode from .txt to YAML.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../power/reset/nvmem-reboot-mode.txt         | 26 ----------
 .../power/reset/nvmem-reboot-mode.yaml        | 52 +++++++++++++++++++
 2 files changed, 52 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
 create mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml

diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
deleted file mode 100644
index 752d6126d5da..000000000000
--- a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-NVMEM reboot mode driver
-
-This driver gets reboot mode magic value from reboot-mode driver
-and stores it in a NVMEM cell named "reboot-mode". Then the bootloader
-can read it and take different action according to the magic
-value stored.
-
-Required properties:
-- compatible: should be "nvmem-reboot-mode".
-- nvmem-cells: A phandle to the reboot mode provided by a nvmem device.
-- nvmem-cell-names: Should be "reboot-mode".
-
-The rest of the properties should follow the generic reboot-mode description
-found in reboot-mode.txt
-
-Example:
-	reboot-mode {
-		compatible = "nvmem-reboot-mode";
-		nvmem-cells = <&reboot_mode>;
-		nvmem-cell-names = "reboot-mode";
-
-		mode-normal     = <0xAAAA5501>;
-		mode-bootloader = <0xBBBB5500>;
-		mode-recovery   = <0xCCCC5502>;
-		mode-test       = <0xDDDD5503>;
-	};
diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml
new file mode 100644
index 000000000000..14a262bcbf7c
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic NVMEM reboot mode
+
+maintainers:
+  - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+description:
+  This driver gets the reboot mode magic value from the reboot-mode driver
+  and stores it in the NVMEM cell named "reboot-mode". The bootloader can
+  then read it and take different action according to the value.
+
+properties:
+  compatible:
+    const: nvmem-reboot-mode
+
+  nvmem-cells:
+    description:
+      A phandle pointing to the nvmem-cells node where the vendor-specific
+      magic value representing the reboot mode is stored.
+    maxItems: 1
+
+  nvmem-cell-names:
+    items:
+      - const: reboot-mode
+
+patternProperties:
+  "^mode-.+":
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Vendor-specific mode value written to the mode register
+
+required:
+  - compatible
+  - nvmem-cells
+  - nvmem-cell-names
+
+additionalProperties: false
+
+examples:
+  - |
+    reboot-mode {
+        compatible = "nvmem-reboot-mode";
+        nvmem-cells = <&reboot_reason>;
+        nvmem-cell-names = "reboot-mode";
+        mode-recovery = <0x01>;
+        mode-bootloader = <0x02>;
+    };
+...
-- 
2.37.2


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

* [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node
  2023-04-17 14:55 [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bartosz Golaszewski
  2023-04-17 14:55 ` [PATCH v2 1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes Bartosz Golaszewski
  2023-04-17 14:55 ` [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML Bartosz Golaszewski
@ 2023-04-17 14:55 ` Bartosz Golaszewski
  2023-04-17 17:55   ` Konrad Dybcio
  2023-04-18 18:11   ` Eric Chanudet
  2023-05-15  3:33 ` (subset) [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bjorn Andersson
  3 siblings, 2 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2023-04-17 14:55 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Catalin Marinas, Will Deacon,
	Arnd Bergmann
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Parikshit Pareek, Bartosz Golaszewski

From: Parikshit Pareek <quic_ppareek@quicinc.com>

Introduce sdam_0 node, which is to be used via nvmem for power on
reasons during reboot. Add supported PoN reaons supported via sdam_0
node.

Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
index 5abdc239d3a6..3c3b6287cd27 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
@@ -88,6 +88,14 @@ trip1 {
 			};
 		};
 	};
+
+	reboot-mode {
+		compatible = "nvmem-reboot-mode";
+		nvmem-cells = <&reboot_reason>;
+		nvmem-cell-names = "reboot-mode";
+		mode-recovery = <0x01>;
+		mode-bootloader = <0x02>;
+	};
 };
 
 &spmi_bus {
@@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
+
+		pmm8654au_0_sdam_0: nvram@7100 {
+			compatible = "qcom,spmi-sdam";
+			reg = <0x7100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges = <0 0x7100 0x100>;
+
+			reboot_reason: reboot-reason@48 {
+				reg = <0x48 0x1>;
+				bits = <1 7>;
+			};
+		};
 	};
 
 	pmm8654au_1: pmic@2 {
-- 
2.37.2


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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node
  2023-04-17 14:55 ` [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node Bartosz Golaszewski
@ 2023-04-17 17:55   ` Konrad Dybcio
  2023-04-18 18:11   ` Eric Chanudet
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-04-17 17:55 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sebastian Reichel, Rob Herring,
	Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Catalin Marinas,
	Will Deacon, Arnd Bergmann
  Cc: linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Parikshit Pareek, Bartosz Golaszewski



On 17.04.2023 16:55, Bartosz Golaszewski wrote:
> From: Parikshit Pareek <quic_ppareek@quicinc.com>
> 
> Introduce sdam_0 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reaons supported via sdam_0
> node.
> 
> Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
>  arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> index 5abdc239d3a6..3c3b6287cd27 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> @@ -88,6 +88,14 @@ trip1 {
>  			};
>  		};
>  	};
> +
> +	reboot-mode {
> +		compatible = "nvmem-reboot-mode";
> +		nvmem-cells = <&reboot_reason>;
> +		nvmem-cell-names = "reboot-mode";
> +		mode-recovery = <0x01>;
> +		mode-bootloader = <0x02>;
> +	};
>  };
>  
>  &spmi_bus {
> @@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
>  			interrupt-controller;
>  			#interrupt-cells = <2>;
>  		};
> +
> +		pmm8654au_0_sdam_0: nvram@7100 {
> +			compatible = "qcom,spmi-sdam";
> +			reg = <0x7100>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0 0x7100 0x100>;
> +
> +			reboot_reason: reboot-reason@48 {
> +				reg = <0x48 0x1>;
> +				bits = <1 7>;
> +			};
> +		};
>  	};
>  
>  	pmm8654au_1: pmic@2 {

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

* Re: [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node
  2023-04-17 14:55 ` [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node Bartosz Golaszewski
  2023-04-17 17:55   ` Konrad Dybcio
@ 2023-04-18 18:11   ` Eric Chanudet
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Chanudet @ 2023-04-18 18:11 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Catalin Marinas, Will Deacon,
	Arnd Bergmann, linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Parikshit Pareek, Bartosz Golaszewski

On Mon, Apr 17, 2023 at 04:55:36PM +0200, Bartosz Golaszewski wrote:
> From: Parikshit Pareek <quic_ppareek@quicinc.com>
> 
> Introduce sdam_0 node, which is to be used via nvmem for power on
> reasons during reboot. Add supported PoN reaons supported via sdam_0
> node.
> 
> Signed-off-by: Parikshit Pareek <quic_ppareek@quicinc.com>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)

Tested-by: Eric Chanudet <echanude@redhat.com>

> 
> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> index 5abdc239d3a6..3c3b6287cd27 100644
> --- a/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sa8775p-pmics.dtsi
> @@ -88,6 +88,14 @@ trip1 {
>  			};
>  		};
>  	};
> +
> +	reboot-mode {
> +		compatible = "nvmem-reboot-mode";
> +		nvmem-cells = <&reboot_reason>;
> +		nvmem-cell-names = "reboot-mode";
> +		mode-recovery = <0x01>;
> +		mode-bootloader = <0x02>;
> +	};
>  };
>  
>  &spmi_bus {
> @@ -133,6 +141,19 @@ pmm8654au_0_gpios: gpio@8800 {
>  			interrupt-controller;
>  			#interrupt-cells = <2>;
>  		};
> +
> +		pmm8654au_0_sdam_0: nvram@7100 {
> +			compatible = "qcom,spmi-sdam";
> +			reg = <0x7100>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			ranges = <0 0x7100 0x100>;
> +
> +			reboot_reason: reboot-reason@48 {
> +				reg = <0x48 0x1>;
> +				bits = <1 7>;
> +			};
> +		};
>  	};
>  
>  	pmm8654au_1: pmic@2 {
> -- 
> 2.37.2
> 

-- 
Eric Chanudet


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

* Re: [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML
  2023-04-17 14:55 ` [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML Bartosz Golaszewski
@ 2023-05-08 12:39   ` Sebastian Reichel
  0 siblings, 0 replies; 8+ messages in thread
From: Sebastian Reichel @ 2023-05-08 12:39 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Rob Herring, Krzysztof Kozlowski, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Catalin Marinas, Will Deacon, Arnd Bergmann,
	linux-pm, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel, Bartosz Golaszewski, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 3893 bytes --]

Hi,

On Mon, Apr 17, 2023 at 04:55:35PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Convert the DT binding document for nvmem-reboot-mode from .txt to YAML.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---

Thanks, queued.

-- Sebastian

>  .../power/reset/nvmem-reboot-mode.txt         | 26 ----------
>  .../power/reset/nvmem-reboot-mode.yaml        | 52 +++++++++++++++++++
>  2 files changed, 52 insertions(+), 26 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
>  create mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml
> 
> diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
> deleted file mode 100644
> index 752d6126d5da..000000000000
> --- a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -NVMEM reboot mode driver
> -
> -This driver gets reboot mode magic value from reboot-mode driver
> -and stores it in a NVMEM cell named "reboot-mode". Then the bootloader
> -can read it and take different action according to the magic
> -value stored.
> -
> -Required properties:
> -- compatible: should be "nvmem-reboot-mode".
> -- nvmem-cells: A phandle to the reboot mode provided by a nvmem device.
> -- nvmem-cell-names: Should be "reboot-mode".
> -
> -The rest of the properties should follow the generic reboot-mode description
> -found in reboot-mode.txt
> -
> -Example:
> -	reboot-mode {
> -		compatible = "nvmem-reboot-mode";
> -		nvmem-cells = <&reboot_mode>;
> -		nvmem-cell-names = "reboot-mode";
> -
> -		mode-normal     = <0xAAAA5501>;
> -		mode-bootloader = <0xBBBB5500>;
> -		mode-recovery   = <0xCCCC5502>;
> -		mode-test       = <0xDDDD5503>;
> -	};
> diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml
> new file mode 100644
> index 000000000000..14a262bcbf7c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic NVMEM reboot mode
> +
> +maintainers:
> +  - Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> +
> +description:
> +  This driver gets the reboot mode magic value from the reboot-mode driver
> +  and stores it in the NVMEM cell named "reboot-mode". The bootloader can
> +  then read it and take different action according to the value.
> +
> +properties:
> +  compatible:
> +    const: nvmem-reboot-mode
> +
> +  nvmem-cells:
> +    description:
> +      A phandle pointing to the nvmem-cells node where the vendor-specific
> +      magic value representing the reboot mode is stored.
> +    maxItems: 1
> +
> +  nvmem-cell-names:
> +    items:
> +      - const: reboot-mode
> +
> +patternProperties:
> +  "^mode-.+":
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description: Vendor-specific mode value written to the mode register
> +
> +required:
> +  - compatible
> +  - nvmem-cells
> +  - nvmem-cell-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    reboot-mode {
> +        compatible = "nvmem-reboot-mode";
> +        nvmem-cells = <&reboot_reason>;
> +        nvmem-cell-names = "reboot-mode";
> +        mode-recovery = <0x01>;
> +        mode-bootloader = <0x02>;
> +    };
> +...
> -- 
> 2.37.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: (subset) [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p
  2023-04-17 14:55 [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2023-04-17 14:55 ` [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node Bartosz Golaszewski
@ 2023-05-15  3:33 ` Bjorn Andersson
  3 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2023-05-15  3:33 UTC (permalink / raw)
  To: Bartosz Golaszewski, Will Deacon, Andy Gross, Konrad Dybcio,
	Krzysztof Kozlowski, Sebastian Reichel, Rob Herring,
	Catalin Marinas, Arnd Bergmann
  Cc: linux-kernel, Bartosz Golaszewski, linux-pm, linux-arm-kernel,
	devicetree, linux-arm-msm

On Mon, 17 Apr 2023 16:55:33 +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> SA8775P uses nvmem to pass the reboot reason magic value to the bootloader.
> Remove the reboot modes from the PON node and introduce an SDAM node passed
> to the nvmem-reboot-mode driver. While at it: convert the bindings for
> nvmem-reboot-mode to YAML and enable it for arm64 in defconfig.
> 
> [...]

Applied, thanks!

[1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes
      commit: 40d5835998705c28b985b1325114114c6007546e
[3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node
      commit: 6c92689a0a57b40c758a12c1ca668d6a36a805a6

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

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

end of thread, other threads:[~2023-05-15  3:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-17 14:55 [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p Bartosz Golaszewski
2023-04-17 14:55 ` [PATCH v2 1/3] arm64: dts: qcom: sa8775p: pmic: remove the PON modes Bartosz Golaszewski
2023-04-17 14:55 ` [PATCH v2 2/3] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML Bartosz Golaszewski
2023-05-08 12:39   ` Sebastian Reichel
2023-04-17 14:55 ` [PATCH v2 3/3] arm64: dts: qcom: sa8775p: pmic: add the sdam_0 node Bartosz Golaszewski
2023-04-17 17:55   ` Konrad Dybcio
2023-04-18 18:11   ` Eric Chanudet
2023-05-15  3:33 ` (subset) [PATCH v2 0/3] arm64: qcom: fix the reboot reason handling on sa8775p 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).