From c4b2a48bd1cf7ac7d2091f2bd5432981e72078a2 Mon Sep 17 00:00:00 2001 From: Varshitha H N Date: Mon, 1 Jul 2024 12:41:35 +0530 Subject: [PATCH] dt-bindings: power: Add bindings for schgm-flash driver Add devicetree bindings for the schgm-flash driver. Change-Id: Id9da37b6dd5a33f1d6028007237d2e4fc763534c Signed-off-by: Varshitha H N --- bindings/power/supply/qcom,schgm-flash.yaml | 96 +++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 bindings/power/supply/qcom,schgm-flash.yaml diff --git a/bindings/power/supply/qcom,schgm-flash.yaml b/bindings/power/supply/qcom,schgm-flash.yaml new file mode 100644 index 00000000..a3748d9f --- /dev/null +++ b/bindings/power/supply/qcom,schgm-flash.yaml @@ -0,0 +1,96 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/qcom,schgm-flash.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. schgm_flash driver + +maintainers: + - Rakesh Kota + +description: | + Add support for SCHGM_FLASH module under charger. + SCHGM_FLASH module handles flash failure, de-rating and + allows configuration for different flash features. + +properties: + compatible: + const: qcom,schgm-flash + + reg: + description: | + Address and size of the peripheral's register block. + + interrupts: + description: | + Peripheral interrupt specifier. + + interrupt-names: + description: | + Interrupt names. This list must match up 1-to-1 with the + interrupts specified in the 'interrupts' property. + + qcom,flash-derating-soc: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SOC threshold in percentage below which hardware will start + derating flash. This is only applicable to certain PMICs like + PMI632 which has SCHGM_FLASH peripheral. + + qcom,flash-disable-soc: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SOC threshold in percentage below which hardware will disable + flash. This is only applicable to certain PMICs like PMI632 + which has SCHGM_FLASH peripheral. + + qcom,headroom-mode: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Specifies flash hardware headroom management policy. + possible values are + 0 - Fixed mode, constant 5V at flash input. + 1 - Adaptive mode allows charger output voltage to be + dynamically controlled by the flash module based on the + required flash headroom. + This is only applicable to certain PMICs like PMI632 which + has SCHGM_FLASH peripheral. + +required: + - compatible + - reg + - interrupts + - interrupt-names + +allOf: + - $ref: power-supply.yaml# + +additionalProperties: false + +examples: + - | + #include + + qcom,schgm-flash@a600 { + compatible = "qcom,schgm-flash"; + reg = <0xa600 0x100>; + interrupts = <0x2 0xa6 0x0 IRQ_TYPE_NONE>, + <0x2 0xa6 0x1 IRQ_TYPE_NONE>, + <0x2 0xa6 0x2 IRQ_TYPE_NONE>, + <0x2 0xa6 0x3 IRQ_TYPE_NONE>, + <0x2 0xa6 0x4 IRQ_TYPE_NONE>, + <0x2 0xa6 0x5 IRQ_TYPE_NONE>, + <0x2 0xa6 0x6 IRQ_TYPE_NONE>, + <0x2 0xa6 0x7 IRQ_TYPE_NONE>; + + interrupt-names = "flash-en", + "torch-req", + "flash-state-change", + "vout-up", + "vout-down", + "ilim1-s1", + "ilim2-s2", + "vreg-ok"; + }; +...