Message ID | 20230413131705.3073911-1-brgl@bgdev.pl |
---|---|
Headers | show |
Series | arm64: qcom: fix the reboot reason handling on sa8775p | expand |
On 13/04/2023 15:17, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Convert the DT binding document for nvmem-reboot-mode from .txt to YAML. Thank you for your patch. There is something to discuss/improve. > 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..64a7d224c7dd > --- /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 driver Drop "driver". > + > +maintainers: > + - Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > + > +description: | Do not need '|' unless you need to preserve formatting. > + 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: | Do not need '|' unless you need to preserve formatting. > + 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 > + > +additionalProperties: false > + > +required: > + - compatible > + - nvmem-cells > + - nvmem-cell-names put required: before additionalProperties Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Thu, Apr 13, 2023, at 15:17, 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. > > Bartosz Golaszewski (2): > arm64: defconfig: enable building the nvmem-reboot-mode module > 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 It looks like it's too late for the dts patches in v6.4, but I was picking up defconfig patches from the list, and that one seems useful regardless of the rest, so I added it to the soc/defconfig branch. Arnd
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. Bartosz Golaszewski (2): arm64: defconfig: enable building the nvmem-reboot-mode module 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 +++++++- arch/arm64/configs/defconfig | 1 + 4 files changed, 74 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