Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0-only
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Qualcomm SPMI PMICs multi-function device
0008 
0009 description: |
0010   Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced
0011   to the chip via the SPMI (System Power Management Interface) bus.
0012   Support for multiple independent functions are implemented by splitting the
0013   16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes
0014   each. A function can consume one or more of these fixed-size register regions.
0015 
0016   The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other
0017   PMICs.  These PMICs use a "QPNP" scheme through SPMI interface.
0018   QPNP is effectively a partitioning scheme for dividing the SPMI extended
0019   register space up into logical pieces, and set of fixed register
0020   locations/definitions within these regions, with some of these regions
0021   specifically used for interrupt handling.
0022 
0023 maintainers:
0024   - Stephen Boyd <sboyd@kernel.org>
0025 
0026 properties:
0027   $nodename:
0028     oneOf:
0029       - pattern: '^pmic@.*$'
0030       - pattern: '^pm(a|s)?[0-9]*@.*$'
0031         deprecated: true
0032 
0033   compatible:
0034     items:
0035       - enum:
0036           - qcom,pm660
0037           - qcom,pm660l
0038           - qcom,pm6150
0039           - qcom,pm6150l
0040           - qcom,pm6350
0041           - qcom,pm7325
0042           - qcom,pm8004
0043           - qcom,pm8005
0044           - qcom,pm8009
0045           - qcom,pm8019
0046           - qcom,pm8110
0047           - qcom,pm8150
0048           - qcom,pm8150b
0049           - qcom,pm8150l
0050           - qcom,pm8226
0051           - qcom,pm8350
0052           - qcom,pm8350b
0053           - qcom,pm8350c
0054           - qcom,pm8841
0055           - qcom,pm8909
0056           - qcom,pm8916
0057           - qcom,pm8941
0058           - qcom,pm8950
0059           - qcom,pm8994
0060           - qcom,pm8998
0061           - qcom,pma8084
0062           - qcom,pmd9635
0063           - qcom,pmi8950
0064           - qcom,pmi8962
0065           - qcom,pmi8994
0066           - qcom,pmi8998
0067           - qcom,pmk8350
0068           - qcom,pmm8155au
0069           - qcom,pmr735a
0070           - qcom,pmr735b
0071           - qcom,pms405
0072           - qcom,pmx55
0073           - qcom,pmx65
0074           - qcom,smb2351
0075       - const: qcom,spmi-pmic
0076 
0077   reg:
0078     minItems: 1
0079     maxItems: 2
0080 
0081   '#address-cells':
0082     const: 1
0083 
0084   '#size-cells':
0085     const: 0
0086 
0087   labibb:
0088     type: object
0089     $ref: /schemas/regulator/qcom-labibb-regulator.yaml#
0090 
0091   regulators:
0092     type: object
0093     $ref: /schemas/regulator/regulator.yaml#
0094 
0095 patternProperties:
0096   "^adc@[0-9a-f]+$":
0097     type: object
0098     $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml#
0099 
0100   "^adc-tm@[0-9a-f]+$":
0101     type: object
0102     $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml#
0103 
0104   "^audio-codec@[0-9a-f]+$":
0105     type: object
0106     additionalProperties: true # FIXME qcom,pm8916-wcd-analog-codec binding not converted yet
0107 
0108   "extcon@[0-9a-f]+$":
0109     type: object
0110     $ref: /schemas/extcon/qcom,pm8941-misc.yaml#
0111 
0112   "gpio(s)?@[0-9a-f]+$":
0113     type: object
0114     $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml#
0115 
0116   "pon@[0-9a-f]+$":
0117     type: object
0118     $ref: /schemas/power/reset/qcom,pon.yaml#
0119 
0120   "pwm@[0-9a-f]+$":
0121     type: object
0122     $ref: /schemas/leds/leds-qcom-lpg.yaml#
0123 
0124   "^rtc@[0-9a-f]+$":
0125     type: object
0126     $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml#
0127 
0128   "^temp-alarm@[0-9a-f]+$":
0129     type: object
0130     $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml#
0131 
0132   "^vibrator@[0-9a-f]+$":
0133     type: object
0134     additionalProperties: true # FIXME qcom,pm8916-vib binding not converted yet
0135 
0136   "^mpps@[0-9a-f]+$":
0137     type: object
0138     $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml#
0139 
0140   "(.*)?(wled|leds)@[0-9a-f]+$":
0141     type: object
0142     $ref: /schemas/leds/backlight/qcom-wled.yaml#
0143     unevaluatedProperties: false
0144 
0145 required:
0146   - compatible
0147   - reg
0148 
0149 additionalProperties: false
0150 
0151 examples:
0152   - |
0153     #include <dt-bindings/spmi/spmi.h>
0154     #include <dt-bindings/interrupt-controller/irq.h>
0155     #include <dt-bindings/interrupt-controller/arm-gic.h>
0156 
0157     spmi@c440000 {
0158         compatible = "qcom,spmi-pmic-arb";
0159         reg = <0x0c440000 0x1100>,
0160               <0x0c600000 0x2000000>,
0161               <0x0e600000 0x100000>,
0162               <0x0e700000 0xa0000>,
0163               <0x0c40a000 0x26000>;
0164         reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
0165         interrupt-names = "periph_irq";
0166         interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>;
0167         qcom,ee = <0>;
0168         qcom,channel = <0>;
0169         #address-cells = <2>;
0170         #size-cells = <0>;
0171         interrupt-controller;
0172         #interrupt-cells = <4>;
0173 
0174         pmi8998_lsid0: pmic@2 {
0175             compatible = "qcom,pmi8998", "qcom,spmi-pmic";
0176             reg = <0x2 SPMI_USID>;
0177             #address-cells = <1>;
0178             #size-cells = <0>;
0179 
0180             pmi8998_gpio: gpios@c000 {
0181                 compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio";
0182                 reg = <0xc000>;
0183                 gpio-controller;
0184                 gpio-ranges = <&pmi8998_gpio 0 0 14>;
0185                 #gpio-cells = <2>;
0186                 interrupt-controller;
0187                 #interrupt-cells = <2>;
0188             };
0189         };
0190     };