xref: /linux/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml (revision 69f2970aad93758bea863432e49b564e0ba649ca)
176ba1900Ssatya priya# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
276ba1900Ssatya priya%YAML 1.2
376ba1900Ssatya priya---
476ba1900Ssatya priya$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
576ba1900Ssatya priya$schema: http://devicetree.org/meta-schemas/core.yaml#
676ba1900Ssatya priya
776ba1900Ssatya priyatitle: Qualcomm PON Device
876ba1900Ssatya priya
976ba1900Ssatya priyamaintainers:
1076ba1900Ssatya priya  - Vinod Koul <vkoul@kernel.org>
1176ba1900Ssatya priya
1276ba1900Ssatya priyadescription: |
1376ba1900Ssatya priya  The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
1476ba1900Ssatya priya  and resin along with the Android reboot-mode.
1576ba1900Ssatya priya
1676ba1900Ssatya priya  This DT node has pwrkey and resin as sub nodes.
1776ba1900Ssatya priya
1876ba1900Ssatya priyaproperties:
1976ba1900Ssatya priya  compatible:
2076ba1900Ssatya priya    enum:
2176ba1900Ssatya priya      - qcom,pm8916-pon
227a54cf02SDmitry Baryshkov      - qcom,pm8941-pon
2376ba1900Ssatya priya      - qcom,pms405-pon
2476ba1900Ssatya priya      - qcom,pm8998-pon
2503fccdc7SDavid Collins      - qcom,pmk8350-pon
2676ba1900Ssatya priya
2776ba1900Ssatya priya  reg:
2803fccdc7SDavid Collins    description: |
2903fccdc7SDavid Collins      Specifies the SPMI base address for the PON (power-on) peripheral.  For
3003fccdc7SDavid Collins      PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
3103fccdc7SDavid Collins      (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
3203fccdc7SDavid Collins      peripherals.  In that case, the PON_PBS address needs to be specified to
3303fccdc7SDavid Collins      facilitate software debouncing on some PMIC.
3403fccdc7SDavid Collins    minItems: 1
3503fccdc7SDavid Collins    maxItems: 2
3603fccdc7SDavid Collins
3703fccdc7SDavid Collins  reg-names:
3803fccdc7SDavid Collins    minItems: 1
3903fccdc7SDavid Collins    maxItems: 2
4076ba1900Ssatya priya
4176ba1900Ssatya priya  pwrkey:
4276ba1900Ssatya priya    type: object
4399cab201SKrzysztof Kozlowski    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
4476ba1900Ssatya priya
4576ba1900Ssatya priya  resin:
4676ba1900Ssatya priya    type: object
4799cab201SKrzysztof Kozlowski    $ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
4876ba1900Ssatya priya
4960320e6eSKrzysztof Kozlowski  watchdog:
5060320e6eSKrzysztof Kozlowski    type: object
5160320e6eSKrzysztof Kozlowski    $ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
5260320e6eSKrzysztof Kozlowski
5376ba1900Ssatya priyarequired:
5476ba1900Ssatya priya  - compatible
5576ba1900Ssatya priya  - reg
5676ba1900Ssatya priya
57*05d90441SElliot BermanpatternProperties:
58*05d90441SElliot Berman  "^mode-.*$":
59*05d90441SElliot Berman    maxItems: 1
60*05d90441SElliot Berman
6176ba1900Ssatya priyaunevaluatedProperties: false
6276ba1900Ssatya priya
6303fccdc7SDavid CollinsallOf:
6403fccdc7SDavid Collins  - if:
6503fccdc7SDavid Collins      properties:
6603fccdc7SDavid Collins        compatible:
6703fccdc7SDavid Collins          contains:
6803fccdc7SDavid Collins            enum:
6903fccdc7SDavid Collins              - qcom,pm8916-pon
7003fccdc7SDavid Collins              - qcom,pms405-pon
7103fccdc7SDavid Collins              - qcom,pm8998-pon
7203fccdc7SDavid Collins    then:
73d41dab4cSKonrad Dybcio      allOf:
74d41dab4cSKonrad Dybcio        - $ref: reboot-mode.yaml#
75d41dab4cSKonrad Dybcio
7603fccdc7SDavid Collins      properties:
7703fccdc7SDavid Collins        reg:
7803fccdc7SDavid Collins          maxItems: 1
7903fccdc7SDavid Collins        reg-names:
8003fccdc7SDavid Collins          items:
8103fccdc7SDavid Collins            - const: pon
82*05d90441SElliot Berman    else:
83*05d90441SElliot Berman      patternProperties:
84*05d90441SElliot Berman        "^mode-.*$": false
857a54cf02SDmitry Baryshkov
867a54cf02SDmitry Baryshkov    # Special case for pm8941, which doesn't store reset mode
877a54cf02SDmitry Baryshkov  - if:
887a54cf02SDmitry Baryshkov      properties:
897a54cf02SDmitry Baryshkov        compatible:
907a54cf02SDmitry Baryshkov          contains:
917a54cf02SDmitry Baryshkov            const: qcom,pm8941-pon
927a54cf02SDmitry Baryshkov    then:
937a54cf02SDmitry Baryshkov      properties:
947a54cf02SDmitry Baryshkov        reg:
957a54cf02SDmitry Baryshkov          maxItems: 1
967a54cf02SDmitry Baryshkov        reg-names:
977a54cf02SDmitry Baryshkov          items:
987a54cf02SDmitry Baryshkov            - const: pon
997a54cf02SDmitry Baryshkov
10003fccdc7SDavid Collins  - if:
10103fccdc7SDavid Collins      properties:
10203fccdc7SDavid Collins        compatible:
10303fccdc7SDavid Collins          contains:
10403fccdc7SDavid Collins            const: qcom,pmk8350-pon
10503fccdc7SDavid Collins    then:
10603fccdc7SDavid Collins      properties:
10703fccdc7SDavid Collins        reg:
10803fccdc7SDavid Collins          minItems: 1
10903fccdc7SDavid Collins          maxItems: 2
11003fccdc7SDavid Collins        reg-names:
11103fccdc7SDavid Collins          minItems: 1
11203fccdc7SDavid Collins          items:
11303fccdc7SDavid Collins            - const: hlos
11403fccdc7SDavid Collins            - const: pbs
11503fccdc7SDavid Collins
11676ba1900Ssatya priyaexamples:
11776ba1900Ssatya priya  - |
11876ba1900Ssatya priya    #include <dt-bindings/interrupt-controller/irq.h>
11976ba1900Ssatya priya    #include <dt-bindings/input/linux-event-codes.h>
12076ba1900Ssatya priya    #include <dt-bindings/spmi/spmi.h>
12152310020SJohan Hovold
12252310020SJohan Hovold    spmi@c440000 {
12376ba1900Ssatya priya        reg = <0x0c440000 0x1100>;
12476ba1900Ssatya priya        #address-cells = <2>;
12576ba1900Ssatya priya        #size-cells = <0>;
12652310020SJohan Hovold
12752310020SJohan Hovold        pmic@0 {
12876ba1900Ssatya priya            reg = <0x0 SPMI_USID>;
12976ba1900Ssatya priya            #address-cells = <1>;
13076ba1900Ssatya priya            #size-cells = <0>;
13152310020SJohan Hovold
13252310020SJohan Hovold            pon@800 {
13376ba1900Ssatya priya                compatible = "qcom,pm8998-pon";
13452310020SJohan Hovold                reg = <0x800>;
13576ba1900Ssatya priya
13676ba1900Ssatya priya                pwrkey {
13776ba1900Ssatya priya                    compatible = "qcom,pm8941-pwrkey";
13876ba1900Ssatya priya                    interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
13976ba1900Ssatya priya                    debounce = <15625>;
14076ba1900Ssatya priya                    bias-pull-up;
14176ba1900Ssatya priya                    linux,code = <KEY_POWER>;
14276ba1900Ssatya priya                };
14376ba1900Ssatya priya
14476ba1900Ssatya priya                resin {
14576ba1900Ssatya priya                    compatible = "qcom,pm8941-resin";
14676ba1900Ssatya priya                    interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
14776ba1900Ssatya priya                    debounce = <15625>;
14876ba1900Ssatya priya                    bias-pull-up;
14976ba1900Ssatya priya                    linux,code = <KEY_VOLUMEDOWN>;
15076ba1900Ssatya priya                };
15176ba1900Ssatya priya            };
15276ba1900Ssatya priya        };
15376ba1900Ssatya priya    };
15476ba1900Ssatya priya...
155