13f5117beSDavid Heidelberg# SPDX-License-Identifier: GPL-2.0-only 23f5117beSDavid Heidelberg%YAML 1.2 33f5117beSDavid Heidelberg--- 43f5117beSDavid Heidelberg$id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml# 53f5117beSDavid Heidelberg$schema: http://devicetree.org/meta-schemas/core.yaml# 63f5117beSDavid Heidelberg 73f5117beSDavid Heidelbergtitle: Qualcomm SPMI PMICs multi-function device 83f5117beSDavid Heidelberg 93f5117beSDavid Heidelbergdescription: | 103f5117beSDavid Heidelberg Some Qualcomm PMICs used with the Snapdragon series SoCs are interfaced 113f5117beSDavid Heidelberg to the chip via the SPMI (System Power Management Interface) bus. 123f5117beSDavid Heidelberg Support for multiple independent functions are implemented by splitting the 133f5117beSDavid Heidelberg 16-bit SPMI peripheral address space into 256 smaller fixed-size regions, 256 bytes 143f5117beSDavid Heidelberg each. A function can consume one or more of these fixed-size register regions. 153f5117beSDavid Heidelberg 163f5117beSDavid Heidelberg The Qualcomm SPMI series includes the PM8941, PM8841, PMA8084, PM8998 and other 173f5117beSDavid Heidelberg PMICs. These PMICs use a "QPNP" scheme through SPMI interface. 183f5117beSDavid Heidelberg QPNP is effectively a partitioning scheme for dividing the SPMI extended 193f5117beSDavid Heidelberg register space up into logical pieces, and set of fixed register 203f5117beSDavid Heidelberg locations/definitions within these regions, with some of these regions 213f5117beSDavid Heidelberg specifically used for interrupt handling. 223f5117beSDavid Heidelberg 233f5117beSDavid Heidelbergmaintainers: 243f5117beSDavid Heidelberg - Stephen Boyd <sboyd@kernel.org> 253f5117beSDavid Heidelberg 263f5117beSDavid Heidelbergproperties: 273f5117beSDavid Heidelberg $nodename: 283f5117beSDavid Heidelberg oneOf: 293f5117beSDavid Heidelberg - pattern: '^pmic@.*$' 303f5117beSDavid Heidelberg - pattern: '^pm(a|s)?[0-9]*@.*$' 313f5117beSDavid Heidelberg deprecated: true 323f5117beSDavid Heidelberg 333f5117beSDavid Heidelberg compatible: 343f5117beSDavid Heidelberg items: 353f5117beSDavid Heidelberg - enum: 363f5117beSDavid Heidelberg - qcom,pm6150 373f5117beSDavid Heidelberg - qcom,pm6150l 383f5117beSDavid Heidelberg - qcom,pm6350 3962a0261cSLuca Weiss - qcom,pm660 4062a0261cSLuca Weiss - qcom,pm660l 4162a0261cSLuca Weiss - qcom,pm7250b 423f5117beSDavid Heidelberg - qcom,pm7325 433f5117beSDavid Heidelberg - qcom,pm8004 443f5117beSDavid Heidelberg - qcom,pm8005 453f5117beSDavid Heidelberg - qcom,pm8009 463f5117beSDavid Heidelberg - qcom,pm8019 470a6df9f1SKrzysztof Kozlowski - qcom,pm8028 483f5117beSDavid Heidelberg - qcom,pm8110 493f5117beSDavid Heidelberg - qcom,pm8150 503f5117beSDavid Heidelberg - qcom,pm8150b 510a6df9f1SKrzysztof Kozlowski - qcom,pm8150c 523f5117beSDavid Heidelberg - qcom,pm8150l 533f5117beSDavid Heidelberg - qcom,pm8226 543f5117beSDavid Heidelberg - qcom,pm8350 553f5117beSDavid Heidelberg - qcom,pm8350b 563f5117beSDavid Heidelberg - qcom,pm8350c 573f5117beSDavid Heidelberg - qcom,pm8841 583f5117beSDavid Heidelberg - qcom,pm8909 593f5117beSDavid Heidelberg - qcom,pm8916 603f5117beSDavid Heidelberg - qcom,pm8941 613f5117beSDavid Heidelberg - qcom,pm8950 620a6df9f1SKrzysztof Kozlowski - qcom,pm8953 633f5117beSDavid Heidelberg - qcom,pm8994 643f5117beSDavid Heidelberg - qcom,pm8998 653f5117beSDavid Heidelberg - qcom,pma8084 663f5117beSDavid Heidelberg - qcom,pmd9635 673f5117beSDavid Heidelberg - qcom,pmi8950 683f5117beSDavid Heidelberg - qcom,pmi8962 693f5117beSDavid Heidelberg - qcom,pmi8994 703f5117beSDavid Heidelberg - qcom,pmi8998 710a6df9f1SKrzysztof Kozlowski - qcom,pmk8002 723f5117beSDavid Heidelberg - qcom,pmk8350 733f5117beSDavid Heidelberg - qcom,pmm8155au 74ce436a30SRobert Marko - qcom,pmp8074 753f5117beSDavid Heidelberg - qcom,pmr735a 763f5117beSDavid Heidelberg - qcom,pmr735b 773f5117beSDavid Heidelberg - qcom,pms405 783f5117beSDavid Heidelberg - qcom,pmx55 793f5117beSDavid Heidelberg - qcom,pmx65 803f5117beSDavid Heidelberg - qcom,smb2351 813f5117beSDavid Heidelberg - const: qcom,spmi-pmic 823f5117beSDavid Heidelberg 833f5117beSDavid Heidelberg reg: 843f5117beSDavid Heidelberg minItems: 1 853f5117beSDavid Heidelberg maxItems: 2 863f5117beSDavid Heidelberg 873f5117beSDavid Heidelberg '#address-cells': 883f5117beSDavid Heidelberg const: 1 893f5117beSDavid Heidelberg 903f5117beSDavid Heidelberg '#size-cells': 913f5117beSDavid Heidelberg const: 0 923f5117beSDavid Heidelberg 933f5117beSDavid Heidelberg labibb: 943f5117beSDavid Heidelberg type: object 953f5117beSDavid Heidelberg $ref: /schemas/regulator/qcom-labibb-regulator.yaml# 963f5117beSDavid Heidelberg 973f5117beSDavid Heidelberg regulators: 983f5117beSDavid Heidelberg type: object 99ea0dd0dfSKrzysztof Kozlowski $ref: /schemas/regulator/qcom,spmi-regulator.yaml# 1003f5117beSDavid Heidelberg 101763ab986SBryan O'Donoghue pwm: 102763ab986SBryan O'Donoghue type: object 103763ab986SBryan O'Donoghue $ref: /schemas/leds/leds-qcom-lpg.yaml# 104763ab986SBryan O'Donoghue 1053f5117beSDavid HeidelbergpatternProperties: 1063f5117beSDavid Heidelberg "^adc@[0-9a-f]+$": 1073f5117beSDavid Heidelberg type: object 108*ba215dd6SLuca Weiss oneOf: 109*ba215dd6SLuca Weiss - $ref: /schemas/iio/adc/qcom,spmi-iadc.yaml# 110*ba215dd6SLuca Weiss - $ref: /schemas/iio/adc/qcom,spmi-vadc.yaml# 1113f5117beSDavid Heidelberg 1123f5117beSDavid Heidelberg "^adc-tm@[0-9a-f]+$": 1133f5117beSDavid Heidelberg type: object 114f4b632daSKrzysztof Kozlowski # ref depends on compatible, see allOf below 1153f5117beSDavid Heidelberg 1163f5117beSDavid Heidelberg "^audio-codec@[0-9a-f]+$": 1173f5117beSDavid Heidelberg type: object 1183f5117beSDavid Heidelberg additionalProperties: true # FIXME qcom,pm8916-wcd-analog-codec binding not converted yet 1193f5117beSDavid Heidelberg 120*ba215dd6SLuca Weiss "^charger@[0-9a-f]+$": 121*ba215dd6SLuca Weiss type: object 122*ba215dd6SLuca Weiss oneOf: 123*ba215dd6SLuca Weiss - $ref: /schemas/power/supply/qcom,pm8941-charger.yaml# 124*ba215dd6SLuca Weiss - $ref: /schemas/power/supply/qcom,pm8941-coincell.yaml# 125*ba215dd6SLuca Weiss 1263f5117beSDavid Heidelberg "extcon@[0-9a-f]+$": 1273f5117beSDavid Heidelberg type: object 1283f5117beSDavid Heidelberg $ref: /schemas/extcon/qcom,pm8941-misc.yaml# 1293f5117beSDavid Heidelberg 1304bef4d51SKrzysztof Kozlowski "gpio@[0-9a-f]+$": 1313f5117beSDavid Heidelberg type: object 1323f5117beSDavid Heidelberg $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml# 1333f5117beSDavid Heidelberg 1343f5117beSDavid Heidelberg "pon@[0-9a-f]+$": 1353f5117beSDavid Heidelberg type: object 1363f5117beSDavid Heidelberg $ref: /schemas/power/reset/qcom,pon.yaml# 1373f5117beSDavid Heidelberg 1383f5117beSDavid Heidelberg "^rtc@[0-9a-f]+$": 1393f5117beSDavid Heidelberg type: object 1403f5117beSDavid Heidelberg $ref: /schemas/rtc/qcom-pm8xxx-rtc.yaml# 1413f5117beSDavid Heidelberg 1423f5117beSDavid Heidelberg "^temp-alarm@[0-9a-f]+$": 1433f5117beSDavid Heidelberg type: object 1443f5117beSDavid Heidelberg $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml# 1453f5117beSDavid Heidelberg 146*ba215dd6SLuca Weiss "^usb-vbus-regulator@[0-9a-f]+$": 147*ba215dd6SLuca Weiss type: object 148*ba215dd6SLuca Weiss $ref: /schemas/regulator/qcom,usb-vbus-regulator.yaml# 149*ba215dd6SLuca Weiss 1503f5117beSDavid Heidelberg "^vibrator@[0-9a-f]+$": 1513f5117beSDavid Heidelberg type: object 152*ba215dd6SLuca Weiss $ref: /schemas/input/qcom,pm8xxx-vib.yaml# 1533f5117beSDavid Heidelberg 1543f5117beSDavid Heidelberg "^mpps@[0-9a-f]+$": 1553f5117beSDavid Heidelberg type: object 1563f5117beSDavid Heidelberg $ref: /schemas/pinctrl/qcom,pmic-mpp.yaml# 1573f5117beSDavid Heidelberg 1583f5117beSDavid Heidelberg "(.*)?(wled|leds)@[0-9a-f]+$": 1593f5117beSDavid Heidelberg type: object 1603f5117beSDavid Heidelberg $ref: /schemas/leds/backlight/qcom-wled.yaml# 1613f5117beSDavid Heidelberg unevaluatedProperties: false 1623f5117beSDavid Heidelberg 1633f5117beSDavid Heidelbergrequired: 1643f5117beSDavid Heidelberg - compatible 1653f5117beSDavid Heidelberg - reg 1663f5117beSDavid Heidelberg 167f4b632daSKrzysztof KozlowskiallOf: 168f4b632daSKrzysztof Kozlowski - if: 169f4b632daSKrzysztof Kozlowski properties: 170f4b632daSKrzysztof Kozlowski compatible: 171f4b632daSKrzysztof Kozlowski contains: 172f4b632daSKrzysztof Kozlowski enum: 173f4b632daSKrzysztof Kozlowski - qcom,pm8998 174f4b632daSKrzysztof Kozlowski then: 175f4b632daSKrzysztof Kozlowski patternProperties: 176f4b632daSKrzysztof Kozlowski "^adc-tm@[0-9a-f]+$": 177f4b632daSKrzysztof Kozlowski $ref: /schemas/thermal/qcom-spmi-adc-tm-hc.yaml# 178f4b632daSKrzysztof Kozlowski else: 179f4b632daSKrzysztof Kozlowski patternProperties: 180f4b632daSKrzysztof Kozlowski "^adc-tm@[0-9a-f]+$": 181f4b632daSKrzysztof Kozlowski $ref: /schemas/thermal/qcom-spmi-adc-tm5.yaml# 182f4b632daSKrzysztof Kozlowski 1833f5117beSDavid HeidelbergadditionalProperties: false 1843f5117beSDavid Heidelberg 1853f5117beSDavid Heidelbergexamples: 1863f5117beSDavid Heidelberg - | 1873f5117beSDavid Heidelberg #include <dt-bindings/spmi/spmi.h> 1883f5117beSDavid Heidelberg #include <dt-bindings/interrupt-controller/irq.h> 1893f5117beSDavid Heidelberg #include <dt-bindings/interrupt-controller/arm-gic.h> 1903f5117beSDavid Heidelberg 1913f5117beSDavid Heidelberg spmi@c440000 { 1923f5117beSDavid Heidelberg compatible = "qcom,spmi-pmic-arb"; 1933f5117beSDavid Heidelberg reg = <0x0c440000 0x1100>, 1943f5117beSDavid Heidelberg <0x0c600000 0x2000000>, 1953f5117beSDavid Heidelberg <0x0e600000 0x100000>, 1963f5117beSDavid Heidelberg <0x0e700000 0xa0000>, 1973f5117beSDavid Heidelberg <0x0c40a000 0x26000>; 1983f5117beSDavid Heidelberg reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; 1993f5117beSDavid Heidelberg interrupt-names = "periph_irq"; 2003f5117beSDavid Heidelberg interrupts = <GIC_SPI 481 IRQ_TYPE_LEVEL_HIGH>; 2013f5117beSDavid Heidelberg qcom,ee = <0>; 2023f5117beSDavid Heidelberg qcom,channel = <0>; 2033f5117beSDavid Heidelberg #address-cells = <2>; 2043f5117beSDavid Heidelberg #size-cells = <0>; 2053f5117beSDavid Heidelberg interrupt-controller; 2063f5117beSDavid Heidelberg #interrupt-cells = <4>; 2073f5117beSDavid Heidelberg 2083f5117beSDavid Heidelberg pmi8998_lsid0: pmic@2 { 2093f5117beSDavid Heidelberg compatible = "qcom,pmi8998", "qcom,spmi-pmic"; 2103f5117beSDavid Heidelberg reg = <0x2 SPMI_USID>; 2113f5117beSDavid Heidelberg #address-cells = <1>; 2123f5117beSDavid Heidelberg #size-cells = <0>; 2133f5117beSDavid Heidelberg 2144bef4d51SKrzysztof Kozlowski pmi8998_gpio: gpio@c000 { 2153f5117beSDavid Heidelberg compatible = "qcom,pmi8998-gpio", "qcom,spmi-gpio"; 2163f5117beSDavid Heidelberg reg = <0xc000>; 2173f5117beSDavid Heidelberg gpio-controller; 2183f5117beSDavid Heidelberg gpio-ranges = <&pmi8998_gpio 0 0 14>; 2193f5117beSDavid Heidelberg #gpio-cells = <2>; 2203f5117beSDavid Heidelberg interrupt-controller; 2213f5117beSDavid Heidelberg #interrupt-cells = <2>; 2223f5117beSDavid Heidelberg }; 2233f5117beSDavid Heidelberg }; 2243f5117beSDavid Heidelberg }; 2256f42a14bSKrzysztof Kozlowski 2266f42a14bSKrzysztof Kozlowski - | 2276f42a14bSKrzysztof Kozlowski #include <dt-bindings/input/input.h> 2286f42a14bSKrzysztof Kozlowski #include <dt-bindings/interrupt-controller/irq.h> 2296f42a14bSKrzysztof Kozlowski #include <dt-bindings/interrupt-controller/arm-gic.h> 2306f42a14bSKrzysztof Kozlowski #include <dt-bindings/iio/qcom,spmi-vadc.h> 2316f42a14bSKrzysztof Kozlowski #include <dt-bindings/spmi/spmi.h> 2326f42a14bSKrzysztof Kozlowski 2336f42a14bSKrzysztof Kozlowski pmic@0 { 2346f42a14bSKrzysztof Kozlowski compatible = "qcom,pm6150", "qcom,spmi-pmic"; 2356f42a14bSKrzysztof Kozlowski reg = <0x0 SPMI_USID>; 2366f42a14bSKrzysztof Kozlowski #address-cells = <1>; 2376f42a14bSKrzysztof Kozlowski #size-cells = <0>; 2386f42a14bSKrzysztof Kozlowski 2396f42a14bSKrzysztof Kozlowski pon@800 { 2406f42a14bSKrzysztof Kozlowski compatible = "qcom,pm8998-pon"; 2416f42a14bSKrzysztof Kozlowski reg = <0x800>; 2426f42a14bSKrzysztof Kozlowski mode-bootloader = <0x2>; 2436f42a14bSKrzysztof Kozlowski mode-recovery = <0x1>; 2446f42a14bSKrzysztof Kozlowski 2456f42a14bSKrzysztof Kozlowski pwrkey { 2466f42a14bSKrzysztof Kozlowski compatible = "qcom,pm8941-pwrkey"; 2476f42a14bSKrzysztof Kozlowski interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 2486f42a14bSKrzysztof Kozlowski debounce = <15625>; 2496f42a14bSKrzysztof Kozlowski bias-pull-up; 2506f42a14bSKrzysztof Kozlowski linux,code = <KEY_POWER>; 2516f42a14bSKrzysztof Kozlowski }; 2526f42a14bSKrzysztof Kozlowski }; 2536f42a14bSKrzysztof Kozlowski 2546f42a14bSKrzysztof Kozlowski temp-alarm@2400 { 2556f42a14bSKrzysztof Kozlowski compatible = "qcom,spmi-temp-alarm"; 2566f42a14bSKrzysztof Kozlowski reg = <0x2400>; 2576f42a14bSKrzysztof Kozlowski interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; 2586f42a14bSKrzysztof Kozlowski io-channels = <&pm6150_adc ADC5_DIE_TEMP>; 2596f42a14bSKrzysztof Kozlowski io-channel-names = "thermal"; 2606f42a14bSKrzysztof Kozlowski #thermal-sensor-cells = <0>; 2616f42a14bSKrzysztof Kozlowski }; 2626f42a14bSKrzysztof Kozlowski 2636f42a14bSKrzysztof Kozlowski pm6150_adc: adc@3100 { 2646f42a14bSKrzysztof Kozlowski compatible = "qcom,spmi-adc5"; 2656f42a14bSKrzysztof Kozlowski reg = <0x3100>; 2666f42a14bSKrzysztof Kozlowski interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 2676f42a14bSKrzysztof Kozlowski #address-cells = <1>; 2686f42a14bSKrzysztof Kozlowski #size-cells = <0>; 2696f42a14bSKrzysztof Kozlowski #io-channel-cells = <1>; 2706f42a14bSKrzysztof Kozlowski 2716f42a14bSKrzysztof Kozlowski adc-chan@6 { 2726f42a14bSKrzysztof Kozlowski reg = <ADC5_DIE_TEMP>; 2736f42a14bSKrzysztof Kozlowski label = "die_temp"; 2746f42a14bSKrzysztof Kozlowski }; 2756f42a14bSKrzysztof Kozlowski 2766f42a14bSKrzysztof Kozlowski adc-chan@4f { 2776f42a14bSKrzysztof Kozlowski reg = <ADC5_AMUX_THM3_100K_PU>; 2786f42a14bSKrzysztof Kozlowski qcom,ratiometric; 2796f42a14bSKrzysztof Kozlowski qcom,hw-settle-time = <200>; 2806f42a14bSKrzysztof Kozlowski }; 2816f42a14bSKrzysztof Kozlowski }; 2826f42a14bSKrzysztof Kozlowski 2836f42a14bSKrzysztof Kozlowski adc-tm@3500 { 2846f42a14bSKrzysztof Kozlowski compatible = "qcom,spmi-adc-tm5"; 2856f42a14bSKrzysztof Kozlowski reg = <0x3500>; 2866f42a14bSKrzysztof Kozlowski interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 2876f42a14bSKrzysztof Kozlowski #thermal-sensor-cells = <1>; 2886f42a14bSKrzysztof Kozlowski #address-cells = <1>; 2896f42a14bSKrzysztof Kozlowski #size-cells = <0>; 2906f42a14bSKrzysztof Kozlowski 2916f42a14bSKrzysztof Kozlowski charger-thermistor@0 { 2926f42a14bSKrzysztof Kozlowski reg = <0>; 2936f42a14bSKrzysztof Kozlowski io-channels = <&pm6150_adc ADC5_AMUX_THM3_100K_PU>; 2946f42a14bSKrzysztof Kozlowski qcom,ratiometric; 2956f42a14bSKrzysztof Kozlowski qcom,hw-settle-time-us = <200>; 2966f42a14bSKrzysztof Kozlowski }; 2976f42a14bSKrzysztof Kozlowski }; 2986f42a14bSKrzysztof Kozlowski 2994bef4d51SKrzysztof Kozlowski pm6150_gpio: gpio@c000 { 3006f42a14bSKrzysztof Kozlowski compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio"; 3016f42a14bSKrzysztof Kozlowski reg = <0xc000>; 3026f42a14bSKrzysztof Kozlowski gpio-controller; 3036f42a14bSKrzysztof Kozlowski gpio-ranges = <&pm6150_gpio 0 0 10>; 3046f42a14bSKrzysztof Kozlowski #gpio-cells = <2>; 3056f42a14bSKrzysztof Kozlowski interrupt-controller; 3066f42a14bSKrzysztof Kozlowski #interrupt-cells = <2>; 3076f42a14bSKrzysztof Kozlowski }; 3086f42a14bSKrzysztof Kozlowski }; 309