1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm PON Device 8 9maintainers: 10 - Vinod Koul <vkoul@kernel.org> 11 12description: | 13 The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey 14 and resin along with the Android reboot-mode. 15 16 This DT node has pwrkey and resin as sub nodes. 17 18properties: 19 compatible: 20 oneOf: 21 - enum: 22 - qcom,pm8916-pon 23 - qcom,pm8941-pon 24 - qcom,pms405-pon 25 - qcom,pm8998-pon 26 - qcom,pmk8350-pon 27 - items: 28 - const: qcom,pmm8654au-pon 29 - const: qcom,pmk8350-pon 30 31 reg: 32 description: | 33 Specifies the SPMI base address for the PON (power-on) peripheral. For 34 PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS 35 (e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS 36 peripherals. In that case, the PON_PBS address needs to be specified to 37 facilitate software debouncing on some PMIC. 38 minItems: 1 39 maxItems: 2 40 41 reg-names: 42 minItems: 1 43 maxItems: 2 44 45 pwrkey: 46 type: object 47 $ref: /schemas/input/qcom,pm8941-pwrkey.yaml# 48 49 resin: 50 type: object 51 $ref: /schemas/input/qcom,pm8941-pwrkey.yaml# 52 53 watchdog: 54 type: object 55 $ref: /schemas/watchdog/qcom,pm8916-wdt.yaml 56 57required: 58 - compatible 59 - reg 60 61patternProperties: 62 "^mode-.*$": 63 maxItems: 1 64 65unevaluatedProperties: false 66 67allOf: 68 - if: 69 properties: 70 compatible: 71 contains: 72 enum: 73 - qcom,pm8916-pon 74 - qcom,pms405-pon 75 - qcom,pm8998-pon 76 then: 77 allOf: 78 - $ref: reboot-mode.yaml# 79 80 properties: 81 reg: 82 maxItems: 1 83 reg-names: 84 items: 85 - const: pon 86 patternProperties: 87 # Negative look-ahead to disallow unsupported modes. The '$' has to be 88 # part of lookahead group to work, instead of trailing outside of (). 89 "^mode-(?!(bootloader$|recovery$))": false 90 else: 91 patternProperties: 92 "^mode-.*$": false 93 94 # Special case for pm8941, which doesn't store reset mode 95 - if: 96 properties: 97 compatible: 98 contains: 99 const: qcom,pm8941-pon 100 then: 101 properties: 102 reg: 103 maxItems: 1 104 reg-names: 105 items: 106 - const: pon 107 108 - if: 109 properties: 110 compatible: 111 contains: 112 const: qcom,pmk8350-pon 113 then: 114 properties: 115 reg: 116 minItems: 1 117 maxItems: 2 118 reg-names: 119 minItems: 1 120 items: 121 - const: hlos 122 - const: pbs 123 124examples: 125 - | 126 #include <dt-bindings/interrupt-controller/irq.h> 127 #include <dt-bindings/input/linux-event-codes.h> 128 #include <dt-bindings/spmi/spmi.h> 129 130 spmi@c440000 { 131 reg = <0x0c440000 0x1100>; 132 #address-cells = <2>; 133 #size-cells = <0>; 134 135 pmic@0 { 136 reg = <0x0 SPMI_USID>; 137 #address-cells = <1>; 138 #size-cells = <0>; 139 140 pon@800 { 141 compatible = "qcom,pm8998-pon"; 142 reg = <0x800>; 143 144 pwrkey { 145 compatible = "qcom,pm8941-pwrkey"; 146 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 147 debounce = <15625>; 148 bias-pull-up; 149 linux,code = <KEY_POWER>; 150 }; 151 152 resin { 153 compatible = "qcom,pm8941-resin"; 154 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 155 debounce = <15625>; 156 bias-pull-up; 157 linux,code = <KEY_VOLUMEDOWN>; 158 }; 159 }; 160 }; 161 }; 162... 163