Files
linux/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
Johan Hovold 523100208b dt-bindings: power: reset: qcom-pon: fix inconsistent example
The current PON example is a bit of a mess after converting the binding
document to yaml and in the process updating parts of the example to
match the pmk8350 binding while leaving parts from the older pm8998
example in place.

Clean up the example and make it consistent by adding some newline
separators; dropping labels; removing stray spaces; fixing the PON node
name; and fixing the unit address so that it matches the interrupt
specifiers (which re-encodes the PON base address, 0x800 => 0x8).

Fixes: 76ba1900cb ("dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231130173017.12723-1-johan+linaro@kernel.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2023-12-24 23:43:28 +01:00

148 lines
3.2 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm PON Device
maintainers:
- Vinod Koul <vkoul@kernel.org>
description: |
The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
and resin along with the Android reboot-mode.
This DT node has pwrkey and resin as sub nodes.
properties:
compatible:
enum:
- qcom,pm8916-pon
- qcom,pm8941-pon
- qcom,pms405-pon
- qcom,pm8998-pon
- qcom,pmk8350-pon
reg:
description: |
Specifies the SPMI base address for the PON (power-on) peripheral. For
PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
(e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
peripherals. In that case, the PON_PBS address needs to be specified to
facilitate software debouncing on some PMIC.
minItems: 1
maxItems: 2
reg-names:
minItems: 1
maxItems: 2
pwrkey:
type: object
$ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
resin:
type: object
$ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
watchdog:
type: object
$ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
required:
- compatible
- reg
unevaluatedProperties: false
allOf:
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8916-pon
- qcom,pms405-pon
- qcom,pm8998-pon
then:
allOf:
- $ref: reboot-mode.yaml#
properties:
reg:
maxItems: 1
reg-names:
items:
- const: pon
# Special case for pm8941, which doesn't store reset mode
- if:
properties:
compatible:
contains:
const: qcom,pm8941-pon
then:
properties:
reg:
maxItems: 1
reg-names:
items:
- const: pon
- if:
properties:
compatible:
contains:
const: qcom,pmk8350-pon
then:
properties:
reg:
minItems: 1
maxItems: 2
reg-names:
minItems: 1
items:
- const: hlos
- const: pbs
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/spmi/spmi.h>
spmi@c440000 {
reg = <0x0c440000 0x1100>;
#address-cells = <2>;
#size-cells = <0>;
pmic@0 {
reg = <0x0 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pon@800 {
compatible = "qcom,pm8998-pon";
reg = <0x800>;
pwrkey {
compatible = "qcom,pm8941-pwrkey";
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_POWER>;
};
resin {
compatible = "qcom,pm8941-resin";
interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_VOLUMEDOWN>;
};
};
};
};
...