dt-bindings: input: Add bindings for qpnp-power-on driver

Add devicetree bindings for the qpnp-power-on driver.

Change-Id: I826698a4413ac5ea6f438c238a5d936e0ec4fea7
Signed-off-by: Varshitha H N <quic_vhn@quicinc.com>
This commit is contained in:
Varshitha H N
2024-05-27 12:07:07 +05:30
parent 35032f56da
commit 6b293c7197

View File

@@ -9,7 +9,7 @@ title: Qualcomm Technologies, Inc. QPNP Power-on PMIC Peripheral
maintainers: maintainers:
- David Collins <quic_collinsd@quicinc.com> - David Collins <quic_collinsd@quicinc.com>
description: > description: |
qpnp-power-on devices support the power-on (PON) peripheral found on qpnp-power-on devices support the power-on (PON) peripheral found on
Qualcomm Technologies, Inc. PMICs. The supported functionality includes power Qualcomm Technologies, Inc. PMICs. The supported functionality includes power
on/off reason, kerelease detection, PMIC reset configurations and other on/off reason, kerelease detection, PMIC reset configurations and other
@@ -22,117 +22,102 @@ properties:
const: qcom,qpnp-power-on const: qcom,qpnp-power-on
reg: reg:
description: Specifies the SPMI base address for this description: |
PON (power-on) peripheral. For PMICs that have Specifies the SPMI base address for this PON (power-on) peripheral.
PON peripheral (GEN3) split into PON_HLOS and For PMICs that have PON peripheral (GEN3) split into PON_HLOS and
PON_PBS, this can hold addresses of both. PON_PBS, this can hold addresses of both. PON_PBS base address needs
PON_PBS base address needs to be specified for to be specified for such devices if "qcom,kdpwr-sw-debounce" is specified.
such devices if "qcom,kdpwr-sw-debounce" is specified.
reg-names: reg-names:
description: For PON GEN1 and GEN2, it should be "pon". description: |
and for PON GEN3, it should include "pon_hlos" and For PON GEN1 and GEN2, it should be "pon". and for PON GEN3, it should
optionally "pon_pbs". include "pon_hlos" and optionally "pon_pbs".
interrupts: interrupts:
description: Specifies the interrupts associated with PON. description: |
Specifies the interrupts associated with PON.
interrupt-names: interrupt-names:
description: Specifies the interrupt names associated with description: |
the interrupts property. Must be a subset of Specifies the interrupt names associated with the interrupts property.
"kpdpwr", "kpdpwr-bark", "resin", "resin-bark", Must be a subset of "kpdpwr", "kpdpwr-bark", "resin", "resin-bark",
"cblpwr", "kpdpwr-resin-bark", and "cblpwr", "kpdpwr-resin-bark", and "pmic-wd-bark". Bark interrupts are
"pmic-wd-bark". Bark interrupts are associated associated with system reset configuration to allow default reset
with system reset configuration to allow default configuration to be activated. If system reset configuration is not supported
reset configuration to be activated. If system then bark interrupts are nops. Additionally, the "pmic-wd-bark" interrupt
reset configuration is not supported then bark can be added if the system needs to handle PMIC watchdog barks.
interrupts are nops. Additionally, the
"pmic-wd-bark" interrupt can be added if the
system needs to handle PMIC watchdog barks.
qcom,pon-dbc-delay: qcom,pon-dbc-delay:
description: The debounce delay for the power-key interrupt description: |
specified in us. The debounce delay for the power-key interrupt specified in us.
Possible values for GEN1 PON are Possible values for GEN1 PON are 15625, 31250, 62500, 125000, 250000, 500000,
15625, 31250, 62500, 125000, 250000, 500000, 1000000 and 2000000. Possible values for GEN2 PON are 62, 123, 245, 489, 977,
1000000 and 2000000. 1954, 3907, 7813, 15625, 31250, 62500, 125000 and 250000.
Possible values for GEN2 PON are Intermediate value is rounded down to the nearest valid value.
62, 123, 245, 489, 977, 1954, 3907, 7813,
15625, 31250, 62500, 125000 and 250000.
Intermediate value is rounded down to the
nearest valid value.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,system-reset: qcom,system-reset:
description: Boolean which specifies that this PON peripheral description: |
can be used to reset the system. This property Boolean which specifies that this PON peripheral can be used to reset the system.
can only be used by one device on the system. It This property can only be used by one device on the system. It is an error to
is an error to include it more than once. include it more than once.
type: boolean type: boolean
qcom,modem-reset: qcom,modem-reset:
description: Boolean which specifies that this PON peripheral description: |
can be used to reset the attached modem chip. Boolean which specifies that this PON peripheral can be used to reset the attached
This property can only be used by one PON device modem chip. This property can only be used by one PON device on the system.
on the system. qcom,modem-reset and qcom,modem-reset and qcom,system-reset cannot be specified for the same PON device.
qcom,system-reset cannot be specified for the
same PON device.
type: boolean type: boolean
qcom,s3-debounce: qcom,s3-debounce:
description: The debounce delay for stage 3 reset trigger in description: |
secs. The values range from 0 to 128. The debounce delay for stage 3 reset trigger in secs. The values range from 0 to 128.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,s3-src: qcom,s3-src:
description: The source for stage 3 reset. It can be one of description: |
"kpdpwr", "resin", "kpdpwr-or-resin" or The source for stage 3 reset. It can be one of "kpdpwr", "resin", "kpdpwr-or-resin" or
"kpdpwr-and-resin". "kpdpwr-and-resin".
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,clear-warm-reset: qcom,clear-warm-reset:
description: Boolean which specifies that the WARM_RESET description: |
reason registers need to be cleared for this Boolean which specifies that the WARM_RESET reason registers need to be cleared for this
target. The property is used for the targets target. The property is used for the targets which have a hardware feature to catch resets
which have a hardware feature to catch resets which aren't triggered by the application processor. In such cases clearing WARM_REASON
which aren't triggered by the application registers across processor resets keeps the registers in a useful state.
processor. In such cases clearing WARM_REASON
registers across processor resets keeps the
registers in a useful state.
type: boolean type: boolean
qcom,secondary-pon-reset: qcom,secondary-pon-reset:
description: Boolean property which indicates that the PON description: |
peripheral is a secondary PON device which Boolean property which indicates that the PON peripheral is a secondary PON device which
needs to be configured during reset in addition needs to be configured during reset in addition to the primary PON device that is configured
to the primary PON device that is configured for system reset through qcom,system-reset property.
for system reset through qcom,system-reset This should not be defined along with the qcom,system-reset or qcom,modem-reset property.
property.
This should not be defined along with the
qcom,system-reset or qcom,modem-reset property.
type: boolean type: boolean
qcom,store-hard-reset-reason: qcom,store-hard-reset-reason:
description: Boolean property which if set will store the description: |
hardware reset reason to SOFT_RB_SPARE register Boolean property which if set will store the hardware reset reason to SOFT_RB_SPARE
of the core PMIC PON peripheral. register of the core PMIC PON peripheral.
type: boolean type: boolean
qcom,hard-reset-poweroff-type: qcom,hard-reset-poweroff-type:
description: Same description as description: |
qcom,warm-reset-poweroff-type but this applies Same description as qcom,warm-reset-poweroff-type but this applies for the system
for the system hard reset case. hard reset case.
type: boolean type: boolean
qcom,kpdpwr-sw-debounce: qcom,kpdpwr-sw-debounce:
description: Boolean property to enable the debounce logic description: |
on the KPDPWR_N rising edge. Boolean property to enable the debounce logic on the KPDPWR_N rising edge.
type: boolean type: boolean
qcom,pon_X: qcom,pon_X:
description: These PON child nodes correspond to features description: |
supported by the PON peripheral including reset These PON child nodes correspond to features supported by the PON peripheral
configurations, pushbutton keys, and regulators. including reset configurations, pushbutton keys, and regulators.
type: boolean type: boolean
required: required:
@@ -140,29 +125,31 @@ required:
- reg - reg
patternProperties: patternProperties:
"^pon-[0-9]+$": '^qcom,pon_[0-9]$':
type: object type: object
$ref: input.yaml# $ref: input.yaml#
unevaluatedProperties: false unevaluatedProperties: false
properties: properties:
regulator-name: regulator-name:
description: Regulator name for the PON regulator that is being configured. description: |
Regulator name for the PON regulator that is being configured.
qcom,pon-spare-reg-addr: qcom,pon-spare-reg-addr:
description: Register offset from the base address of the description: |
PON peripheral that needs to be configured for Register offset from the base address of the PON peripheral that needs to be
the regulator being controlled. configured for the regulator being controlled.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,pon-spare-reg-bit: qcom,pon-spare-reg-bit:
description: Bit position in the specified register that description: |
needs to be configured for the regulator being Bit position in the specified register that needs to be configured for the
controlled. regulator being controlled.
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,pon-type: qcom,pon-type:
description: The type of PON/RESET source. Supported values are description: |
The type of PON/RESET source. Supported values are
0 = KPDPWR 0 = KPDPWR
1 = RESIN 1 = RESIN
2 = CBLPWR 2 = CBLPWR
@@ -172,12 +159,13 @@ patternProperties:
$ref: /schemas/types.yaml#/definitions/uint32 $ref: /schemas/types.yaml#/definitions/uint32
qcom,pull-up: qcom,pull-up:
description: Boolean flag indicating if a pull-up resistor description: |
should be enabled for the input. Boolean flag indicating if a pull-up resistor should be enabled for the input.
type: boolean type: boolean
qcom,support-reset: qcom,support-reset:
description: Indicates if this PON source supports description: |
Indicates if this PON source supports
reset functionality. reset functionality.
0 = Not supported 0 = Not supported
1 = Supported 1 = Supported
@@ -186,33 +174,32 @@ patternProperties:
type: boolean type: boolean
qcom,use-bark: qcom,use-bark:
description: Specify if this PON type needs to handle a bark description: |
interrupt. Specify if this PON type needs to handle a bark interrupt.
type: boolean type: boolean
linux,code: linux,code:
description: The input key-code associated with the reset description: |
source. The reset source in its default The input key-code associated with the reset source. The reset source in its
configuration can be used to support standard keys. default configuration can be used to support standard keys.
qcom,s1-timer: qcom,s1-timer:
description: The debounce timer for the BARK interrupt for description: |
the reset source. Value is specified in ms. The debounce timer for the BARK interrupt for the reset source. Value is
Supported values are specified in ms. Supported values are 0, 32, 56, 80, 128, 184, 272, 408, 608, 904,
0, 32, 56, 80, 128, 184, 272, 408, 608, 904, 1352, 2048, 3072, 4480, 6720, 10256
1352, 2048, 3072, 4480, 6720, 10256
type: boolean type: boolean
qcom,s2-timer: qcom,s2-timer:
description: The debounce timer for the S2 reset specified description: |
in ms. On the expiry of this timer, the PMIC The debounce timer for the S2 reset specified in ms. On the expiry of this timer,
executes the reset sequence. the PMIC executes the reset sequence. Supported values are 0, 10, 50, 100, 250,
Supported values are 500, 1000, 2000
0, 10, 50, 100, 250, 500, 1000, 2000
type: boolean type: boolean
qcom,s2-type: qcom,s2-type:
description: The type of reset associated with this source. description: |
The type of reset associated with this source.
Supported values Supported values
0 = SOFT_RESET (legacy) 0 = SOFT_RESET (legacy)
1 = WARM_RESET 1 = WARM_RESET
@@ -242,76 +229,84 @@ additionalProperties: false
examples: examples:
- | - |
#include <dt-bindings/input/qcom,qpnp-power-on.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
qcom,power-on@800 { qcom,power-on@800 {
compatible = "qcom,qpnp-power-on"; compatible = "qcom,qpnp-power-on";
reg = <0x800>; reg = <0x800>;
interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>, interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>, <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x8 0x4 IRQ_TYPE_EDGE_RISING>, <0x0 0x8 0x4 IRQ_TYPE_EDGE_RISING>,
<0x0 0x8 0x5 IRQ_TYPE_EDGE_RISING>; <0x0 0x8 0x5 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "kpdpwr", "resin", "resin-bark", interrupt-names = "kpdpwr", "resin", "resin-bark",
"kpdpwr-resin-bark"; "kpdpwr-resin-bark";
qcom,pon-dbc-delay = <15625>; qcom,pon-dbc-delay = <15625>;
qcom,system-reset; qcom,system-reset;
qcom,s3-debounce = <32>; qcom,s3-debounce = <32>;
qcom,s3-src = "resin"; qcom,s3-src = "resin";
qcom,clear-warm-reset; qcom,clear-warm-reset;
qcom,store-hard-reset-reason; qcom,store-hard-reset-reason;
qcom,pon_1 {
qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>; qcom,pon_1 {
qcom,pull-up; qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>;
linux,code = <KEY_POWER>; qcom,pull-up = <1>;
}; linux,code = <KEY_POWER>;
qcom,pon_2 { };
qcom,pon-type = <PON_POWER_ON_TYPE_RESIN>;
qcom,support-reset = <1>; qcom,pon_2 {
qcom,pull-up; qcom,pon-type = <PON_POWER_ON_TYPE_RESIN>;
qcom,s1-timer = <0>; qcom,support-reset = <1>;
qcom,s2-timer = <2000>; qcom,pull-up;
qcom,s2-type = <PON_POWER_OFF_TYPE_WARM_RESET>; qcom,s1-timer = <0>;
linux,code = <KEY_VOLUMEDOWN>; qcom,s2-timer = <2000>;
qcom,use-bark; qcom,s2-type = <PON_POWER_OFF_TYPE_WARM_RESET>;
}; linux,code = <KEY_VOLUMEDOWN>;
qcom,pon_3 { qcom,use-bark;
qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR_RESIN>; };
qcom,support-reset = <1>;
qcom,s1-timer = <6720>; qcom,pon_3 {
qcom,s2-timer = <2000>; qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR_RESIN>;
qcom,s2-type = <PON_POWER_OFF_TYPE_HARD_RESET>; qcom,support-reset = <1>;
qcom,pull-up; qcom,s1-timer = <6720>;
qcom,use-bark; qcom,s2-timer = <2000>;
}; qcom,s2-type = <PON_POWER_OFF_TYPE_HARD_RESET>;
qcom,pull-up;
qcom,use-bark;
};
}; };
- | - |
qcom,power-on@800 { qcom,power-on@800 {
compatible = "qcom,qpnp-power-on"; compatible = "qcom,qpnp-power-on";
reg = <0x800>; reg = <0x800>;
qcom,secondary-pon-reset; qcom,secondary-pon-reset;
qcom,hard-reset-poweroff-type = <PON_POWER_OFF_TYPE_SHUTDOWN>; qcom,hard-reset-poweroff-type = <PON_POWER_OFF_TYPE_SHUTDOWN>;
pon_perph_reg:qcom,pon_perph_reg { pon_perph_reg:qcom,pon_perph_reg {
regulator-name = "pon_spare_reg"; regulator-name = "pon_spare_reg";
qcom,pon-spare-reg-addr = <0x8c>; qcom,pon-spare-reg-addr = <0x8c>;
qcom,pon-spare-reg-bit = <1>; qcom,pon-spare-reg-bit = <1>;
}; };
}; };
- | - |
pon_hlos@1300 { pon_hlos@1300 {
compatible = "qcom,qpnp-power-on"; compatible = "qcom,qpnp-power-on";
reg = <0x1300>, <0x800>; reg = <0x1300>, <0x800>;
reg-names = "pon_hlos", "pon_pbs"; reg-names = "pon_hlos", "pon_pbs";
interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH> interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>,
<0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "kpdpwr", "resin"; interrupt-names = "kpdpwr", "resin";
qcom,kpdpwr-sw-debounce; qcom,kpdpwr-sw-debounce;
qcom,pon_1 { qcom,pon_1 {
qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>; qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>;
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
qcom,pon_2 {
qcom,pon-type = <PON_POWER_ON_TYPE_RESIN>; qcom,pon_2 {
linux,code = <KEY_VOLUMEDOWN>; qcom,pon-type = <PON_POWER_ON_TYPE_RESIN>;
}; linux,code = <KEY_VOLUMEDOWN>;
};
}; };
... ...